service_status motd updates
This commit is contained in:
@@ -55,6 +55,13 @@ in
|
||||
port = 443;
|
||||
};
|
||||
|
||||
loginText.extraServiceStatus = {
|
||||
Docker = "docker";
|
||||
"mTLS Renewal" = "mtls-renew.timer";
|
||||
Forgejo = "forgejo.service";
|
||||
"Forgejo Backup" = "forgejo-dump.timer";
|
||||
};
|
||||
|
||||
step-ssh-host.hostname = hostname;
|
||||
|
||||
# This provides the secrets at install time
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.nixos.login-text = { config, ... }: {
|
||||
flake.modules.nixos.login-text = { config, lib, ... }:
|
||||
let
|
||||
defaultServiceStatus = {
|
||||
SSH = "sshd.socket";
|
||||
"SSH Cert Renewal" = "step-ssh-host-renew.timer";
|
||||
};
|
||||
in {
|
||||
options.loginText.extraServiceStatus = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
default = { };
|
||||
description = "Additional rust-motd service status entries keyed by display name.";
|
||||
};
|
||||
|
||||
config = {
|
||||
programs.rust-motd = {
|
||||
enable = true;
|
||||
refreshInterval = "*:0/5";
|
||||
@@ -21,12 +34,10 @@
|
||||
root = 3;
|
||||
};
|
||||
|
||||
service_status = {
|
||||
Docker = "docker";
|
||||
SSH = "sshd.socket";
|
||||
"SSH Cert Renewal" = "step-ssh-host-renew.timer";
|
||||
"mTLS Renewal" = "mtls-renew.timer";
|
||||
};
|
||||
service_status = lib.mkMerge [
|
||||
defaultServiceStatus
|
||||
config.loginText.extraServiceStatus
|
||||
];
|
||||
|
||||
# This calculation is wrong for LXCs
|
||||
# uptime = {
|
||||
@@ -43,4 +54,5 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user