wlin003_GamingPC/system/smb-mount-fsrv.nix aktualisiert

This commit is contained in:
Henrik Lutzmann 2024-12-25 22:35:02 +01:00
parent 4490dc1606
commit 6084c4ac6f
1 changed files with 78 additions and 78 deletions

View File

@ -1,78 +1,78 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
environment.systemPackages = [ pkgs.cifs-utils ]; environment.systemPackages = [ pkgs.cifs-utils ];
fileSystems."/mnt/fileserver01/Appz" = { fileSystems."/mnt/fileserver01/Appz" = {
device = "//192.168.10.58/appz/"; device = "//192.168.10.52/appz/";
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,user,users"; automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users";
in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"];
}; };
fileSystems."/mnt/fileserver01/Backup" = { fileSystems."/mnt/fileserver01/Backup" = {
device = "//192.168.10.58/backup/"; device = "//192.168.10.52/backup/";
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,user,users"; automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users";
in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"];
}; };
fileSystems."/mnt/fileserver01/Dateien" = { fileSystems."/mnt/fileserver01/Dateien" = {
device = "//192.168.10.58/dateien/"; device = "//192.168.10.52/dateien/";
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,user,users"; automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users";
in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"];
}; };
fileSystems."/mnt/fileserver01/Downloads" = { fileSystems."/mnt/fileserver01/Downloads" = {
device = "//192.168.10.58/downloads/"; device = "//192.168.10.52/downloads/";
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,user,users"; automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users";
in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"];
}; };
fileSystems."/mnt/fileserver01/ISOs" = { fileSystems."/mnt/fileserver01/ISOs" = {
device = "//192.168.10.58/isos/"; device = "//192.168.10.52/isos/";
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,user,users"; automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users";
in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"];
}; };
fileSystems."/mnt/fileserver01/Multimedia" = { fileSystems."/mnt/fileserver01/Multimedia" = {
device = "//192.168.10.58/multimedia/"; device = "//192.168.10.52/multimedia/";
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,user,users"; automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users";
in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"];
}; };
fileSystems."/mnt/fileserver01/Public" = { fileSystems."/mnt/fileserver01/Public" = {
device = "//192.168.10.58/public/"; device = "//192.168.10.52/public/";
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,user,users"; automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users";
in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"];
}; };
fileSystems."/mnt/fileserver01/Share" = { fileSystems."/mnt/fileserver01/Share" = {
device = "//192.168.10.58/share/"; device = "//192.168.10.52/share/";
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,user,users"; automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users";
in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"];
}; };
} }