Skip to content

Commit

Permalink
Add CIFS mount
Browse files Browse the repository at this point in the history
  • Loading branch information
yousiki committed Mar 21, 2024
1 parent 8646e6f commit 04b8de8
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion cells/nixos/hosts/hakase/hardware-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,21 @@
pkgs,
modulesPath,
...
}: {
}: let
mkCifs = device: {
device = device;
fsType = "cifs";
options = [
"noauto"
"x-systemd.automount"
"x-systemd.idle-timeout=60"
"x-systemd.device-timeout=5s"
"x-systemd.mount-timeout=5s"
"noperm"
"credentials=/etc/credentials"
];
};
in {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
Expand Down Expand Up @@ -39,6 +53,11 @@
options = ["noatime"];
};

fileSystems."/mnt/nas-yyp-home" = mkCifs "//nas.ybh1998.space/home";
fileSystems."/mnt/nas-yyp-share" = mkCifs "//nas.ybh1998.space/share";
fileSystems."/mnt/nas-mck-home" = mkCifs "//nas-changping.ybh1998.space/home";
fileSystems."/mnt/nas-mck-share" = mkCifs "//nas-changping.ybh1998.space/share";

# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
Expand Down

0 comments on commit 04b8de8

Please sign in to comment.