diff --git a/modules/nixos/services/nas/default.nix b/modules/nixos/services/nas/default.nix new file mode 100644 index 0000000..a2a09f1 --- /dev/null +++ b/modules/nixos/services/nas/default.nix @@ -0,0 +1,17 @@ +{ + config, + lib, + ... +}: { + imports = [ + ./drives.nix + ]; + + options = { + nas.enable = lib.mkEnableOption "NAS utilities and config"; + }; + + config = lib.mkIf config.nas.enable { + drives.enable = lib.mkDefault true; + }; +} diff --git a/modules/nixos/services/nas/drives.nix b/modules/nixos/services/nas/drives.nix new file mode 100644 index 0000000..e0136d4 --- /dev/null +++ b/modules/nixos/services/nas/drives.nix @@ -0,0 +1,16 @@ +{ + config, + lib, + pkgs, + ... +}: { + options = { + drives.enable = lib.mkEnableOption "Utilities for managing drives"; + }; + + config = lib.mkIf config.drives.enable { + environment.systemPackages = with pkgs; [ + smartmontools + ]; + }; +}