diff options
Diffstat (limited to 'hosts')
| -rw-r--r-- | hosts/akashi/hardware-configuration.nix | 2 | ||||
| -rw-r--r-- | hosts/kansai/hardware-configuration.nix | 32 | ||||
| -rw-r--r-- | hosts/shared/hardware-configuration.nix | 21 |
3 files changed, 31 insertions, 24 deletions
diff --git a/hosts/akashi/hardware-configuration.nix b/hosts/akashi/hardware-configuration.nix index f06ef10..c7c580f 100644 --- a/hosts/akashi/hardware-configuration.nix +++ b/hosts/akashi/hardware-configuration.nix @@ -2,6 +2,7 @@ config, lib, modulesPath, + self, ... }: let @@ -17,6 +18,7 @@ in { imports = [ (modulesPath + "/installer/scan/not-detected.nix") + (import "${self}/hosts/shared/hardware-configuration.nix") ]; swapDevices = [ ]; diff --git a/hosts/kansai/hardware-configuration.nix b/hosts/kansai/hardware-configuration.nix index 20ac43b..ad53f56 100644 --- a/hosts/kansai/hardware-configuration.nix +++ b/hosts/kansai/hardware-configuration.nix @@ -2,6 +2,7 @@ config, lib, modulesPath, + self, ... }: let @@ -14,14 +15,12 @@ let "space_cache=v2" "ssd" ]; - - commonUserOptions = [ - "uid=1000" - "gid=1000" - ]; in { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + (import "${self}/hosts/shared/hardware-configuration.nix") + ]; boot = { initrd = { @@ -84,26 +83,11 @@ in "rw" "nofail" "noatime" + "uid=1000" + "gid=1000" "dmask=027" "fmask=137" - ] ++ commonUserOptions; - }; - - "/mnt/kioku" = { - device = "//kioku/usb"; - fsType = "cifs"; - - options = [ - "x-systemd.automount" - "noauto" - "x-systemd.idle-timeout=60" - "x-systemd.device-timeout=5s" - "x-systemd.mount-timeout=5s" - "rw" - "nofail" - "noatime" - "credentials=${config.sops.secrets.samba_secrets.path}" - ] ++ commonUserOptions; + ]; }; }; diff --git a/hosts/shared/hardware-configuration.nix b/hosts/shared/hardware-configuration.nix new file mode 100644 index 0000000..aea9310 --- /dev/null +++ b/hosts/shared/hardware-configuration.nix @@ -0,0 +1,21 @@ +{ config, ... }: +{ + fileSystems."/mnt/kioku" = { + device = "//kioku/usb"; + fsType = "cifs"; + + options = [ + "x-systemd.automount" + "noauto" + "x-systemd.idle-timeout=60" + "x-systemd.device-timeout=5s" + "x-systemd.mount-timeout=5s" + "rw" + "nofail" + "noatime" + "credentials=${config.sops.secrets.samba_secrets.path}" + "uid=1000" + "gid=1000" + ]; + }; +} |