diff options
author | tdback <tyler@tdback.net> | 2025-01-26 11:33:25 -0500 |
---|---|---|
committer | tdback <tyler@tdback.net> | 2025-01-26 11:33:25 -0500 |
commit | d4e6b5e506dd1e02c420807c3c3d5c975fce608f (patch) | |
tree | b8791d5da9861bbcc4a52fbe3fe30abf5b61ad88 /modules/scripts/motd | |
parent | 3f33751dcb0cafb273eb868f230b1ae348437f89 (diff) |
scripts: formatted scripts as modules
Diffstat (limited to 'modules/scripts/motd')
-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."; }; }; |