Update flake.lock and fix samba syntax errors

This commit is contained in:
Sravan Balaji
2024-04-01 20:15:22 -04:00
parent f2e2471c20
commit 33a657d209
2 changed files with 12 additions and 14 deletions

12
flake.lock generated
View File

@@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1711588700, "lastModified": 1711934712,
"narHash": "sha256-vBB5HoQVnA6c/UrDOhLXKAahEwSRccw2YXYHxD7qoi4=", "narHash": "sha256-sBDe+QmX/QohlnKeSEzrftcXyZL5FY09OMjZ59Rpyy4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "502241afa3de2a24865ddcbe4c122f4546e32092", "rev": "611c9ea53250f7bb22286b3d26872280a0e608f9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -224,11 +224,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1711868868, "lastModified": 1711915616,
"narHash": "sha256-QpZanlbVu6Gb2K96u3vgu0F2BvZD74+fOsIFWcYEXoY=", "narHash": "sha256-co6LoFA+j6BZEeJNSR8nZ4oOort5qYPskjrDHBaJgmo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "30f2ec39519f4f5a8a96af808c439e730c15aeab", "rev": "820be197ccf3adaad9a8856ef255c13b6cc561a6",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -9,16 +9,14 @@
fileSystems."/mnt/fileserver" = { fileSystems."/mnt/fileserver" = {
device = "//192.168.12.5/fileserver"; device = "//192.168.12.5/fileserver";
fsType = "cifs"; fsType = "cifs";
options = let options =
let
# this line prevents hanging on network split # this line prevents hanging on network split
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
username = userSettings.username;
in [ uid = config.users.users.${username}.uid;
"${automount_opts}, gid = config.users.groups.${username}.gid;
credentials=/etc/nixos/smb-secrets, in [ "${automount_opts},credentials=/etc/nixos/smb-secrets,uid=${toString uid},gid=${toString gid}" ];
${config.users.users.${userSettings.username}.uid},
gid=${config.users.groups.${userSettings.username}.gid}"
];
# Make sure to create `/etc/nixos/smb-secrets` with following content # Make sure to create `/etc/nixos/smb-secrets` with following content
# where domain can be optional # where domain can be optional
# username=<USERNAME> # username=<USERNAME>