diff options
Diffstat (limited to 'modules/scripts/motd/default.nix')
-rw-r--r-- | modules/scripts/motd/default.nix | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/modules/scripts/motd/default.nix b/modules/scripts/motd/default.nix index 6d95119..5185797 100644 --- a/modules/scripts/motd/default.nix +++ b/modules/scripts/motd/default.nix @@ -6,9 +6,10 @@ }: with lib; let - cfg = config.programs.motd; + script = "motd"; + cfg = config.modules.scripts.${script}; - motd = pkgs.writeShellScriptBin "motd" '' + motd = pkgs.writeShellScriptBin script '' RED="\e[31m" GREEN="\e[32m" YELLOW="\e[33m" @@ -78,19 +79,17 @@ let ''; in { - options = { - programs.motd = { - enable = mkEnableOption "motd"; - networkInterfaces = mkOption { - default = [ ]; - type = types.listOf types.str; - description = "Network interfaces to monitor."; - }; - servicesToCheck = mkOption { - default = [ ]; - type = types.listOf types.str; - description = "Services to validate alongside podman containers."; - }; + options.modules.scripts.${script} = { + enable = mkEnableOption script; + networkInterfaces = mkOption { + default = [ ]; + type = types.listOf types.str; + description = "Network interfaces to monitor."; + }; + servicesToCheck = mkOption { + default = [ ]; + type = types.listOf types.str; + description = "Services to validate alongside podman containers."; }; }; |