diff options
author | Tim Keller <tjk@tjkeller.xyz> | 2025-08-21 12:27:51 -0500 |
---|---|---|
committer | Tim Keller <tjk@tjkeller.xyz> | 2025-08-21 12:27:51 -0500 |
commit | 86fb7036cb4279abfc4ffc2bfa6b3a432c8700b5 (patch) | |
tree | bcde8a15f5cec938d3f4653863b0f6309bc65626 /modules/root/nas.nix | |
parent | 078e8ea33d29af21bad55313d75d716db8d5a617 (diff) | |
download | nixos-86fb7036cb4279abfc4ffc2bfa6b3a432c8700b5.tar.xz nixos-86fb7036cb4279abfc4ffc2bfa6b3a432c8700b5.zip |
refactor project to prioritize correctness. place custom nixos options into existing 'modules' and prefix them with '_'. use _archetypes module for software collections, system profiles, etc. personal configs moved to _archetypes.tjkeller. probably changed or fixed or broke a few other things in the process
Diffstat (limited to 'modules/root/nas.nix')
-rw-r--r-- | modules/root/nas.nix | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/modules/root/nas.nix b/modules/root/nas.nix deleted file mode 100644 index 0116ba3..0000000 --- a/modules/root/nas.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ lib, config, ... } : -let - mkNetworkFileSystem = device: automount: { - device = "${device}"; - fsType = "nfs"; - options = [ "defaults" ] ++ lib.optionals (!automount) [ "noauto" ]; - }; -in { - options = { - nas = { - enable = lib.mkEnableOption "enable network shares"; - home = { - enable = lib.mkEnableOption "enable home network shares"; - automount = lib.mkEnableOption "automount home network shares"; - }; - office = { - enable = lib.mkEnableOption "enable office network shares"; - automount = lib.mkEnableOption "automount home network shares"; - }; - }; - }; - - config = lib.mkIf config.nas.enable { - fileSystems = lib.optionalAttrs config.nas.home.enable { - "/media/Storage/Media" = mkNetworkFileSystem "truenas-home:/mnt/Storage/Media" config.nas.home.automount; - "/media/Storage/Backups" = mkNetworkFileSystem "truenas-home:/mnt/Storage/Backups" config.nas.home.automount; - "/media/Storage/Tapes" = mkNetworkFileSystem "truenas-home:/mnt/Storage/Backups/Tapes" config.nas.home.automount; - "/media/Family Photos" = mkNetworkFileSystem "truenas-home:/mnt/Media/Photos" config.nas.home.automount; - } // lib.optionalAttrs config.nas.office.enable { - "/media/chexx/chexx" = mkNetworkFileSystem "truenas-office:/mnt/Storage/chexx" config.nas.office.automount; - "/media/chexx/tkdocs" = mkNetworkFileSystem "truenas-office:/mnt/Storage/Users/Tim-Keller" config.nas.office.automount; - "/media/chexx/scans" = mkNetworkFileSystem "truenas-office:/mnt/Storage/Scans" config.nas.office.automount; - }; - # TODO auto mkdirz - }; -} |