refactor: Move network share mount to module
This commit is contained in:
parent
b09f6105d2
commit
fd59db025f
3 changed files with 91 additions and 75 deletions
26
os-mods/net_disks/oeko.nix
Normal file
26
os-mods/net_disks/oeko.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
fileSystems =
|
||||
let
|
||||
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
|
||||
perm_opts = "uid=1001,gid=100";
|
||||
smb_opts = [
|
||||
"vers=2.0,credentials=/home/tristand/.smb-secrets"
|
||||
perm_opts
|
||||
automount_opts
|
||||
];
|
||||
in
|
||||
{
|
||||
"/mnt/ServerF" = {
|
||||
# device = "//srv-nas-01.local/Server_F";
|
||||
device = "//192.168.0.1/Server_F";
|
||||
fsType = "cifs";
|
||||
options = smb_opts;
|
||||
};
|
||||
"/mnt/Scans" = {
|
||||
# device = "//srv-nas-01.local/Server_F";
|
||||
device = "//192.168.0.1/Scans";
|
||||
fsType = "cifs";
|
||||
options = smb_opts;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -11,6 +11,7 @@
|
|||
inputs.nixos-hardware.nixosModules.common-hidpi
|
||||
inputs.nixos-hardware.nixosModules.common-pc-laptop-acpi_call
|
||||
inputs.nixos-hardware.nixosModules.framework-16-7040-amd
|
||||
../../os-mods/net_disks/oeko.nix
|
||||
../../os-mods/amdgpu
|
||||
../../os-mods/cachix
|
||||
../../os-mods/common
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
# --label=ssd.ssd_4t /dev/mapper/crypt_ssd_4t_data \
|
||||
# --label=ssd.ssd_2t /dev/mapper/crypt_ssd_2t_data
|
||||
|
||||
config = {
|
||||
boot = {
|
||||
supportedFilesystems = [ "bcachefs" "vfat" ];
|
||||
initrd.supportedFilesystems = [ "bcachefs" "vfat" ];
|
||||
|
@ -66,19 +67,6 @@
|
|||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
"/mnt/ServerF" = {
|
||||
# device = "//srv-nas-01.local/Server_F";
|
||||
device = "//192.168.0.1/Server_F";
|
||||
fsType = "cifs";
|
||||
options = smb_opts;
|
||||
};
|
||||
"/mnt/Scans" = {
|
||||
# device = "//srv-nas-01.local/Server_F";
|
||||
device = "//192.168.0.1/Scans";
|
||||
fsType = "cifs";
|
||||
options = smb_opts;
|
||||
};
|
||||
|
||||
# "/mnt/media_v2" = {
|
||||
# device = "root@23.88.68.113:/media_v2";
|
||||
# fsType = "sshfs";
|
||||
|
@ -92,4 +80,5 @@
|
|||
];
|
||||
|
||||
system.fsPackages = [ pkgs.sshfs ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue