Move common nix code one level up.

This commit is contained in:
2023-11-26 09:36:17 +00:00
parent dfd472ebe8
commit 361dd002d5
26 changed files with 8 additions and 8 deletions

30
common/cifs-client.nix Normal file
View File

@@ -0,0 +1,30 @@
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.cifs-utils ];
environment.etc."nixos/smb-secrets" = {
text = ''
username=compute
password=aaShecheseiwee5eeh2p
'';
mode = "0400";
};
fileSystems."/data/media" = {
device = "//fractal/media";
fsType = "cifs";
options = let
# 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";
in ["${automount_opts},credentials=/etc/nixos/smb-secrets"];
};
fileSystems."/data/shared" = {
device = "//fractal/shared";
fsType = "cifs";
options = let
# 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";
in ["${automount_opts},credentials=/etc/nixos/smb-secrets"];
};
}