From 1318cedfb297a48d314fbc03e9f0400e8be05799 Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Sat, 28 Dec 2024 00:48:29 -0800 Subject: [PATCH] motd: ssl certs and systemd status --- modules/motd.nix | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/modules/motd.nix b/modules/motd.nix index 3e8e73f..e219e27 100644 --- a/modules/motd.nix +++ b/modules/motd.nix @@ -9,7 +9,20 @@ in }; config = lib.mkIf cfg.enable { + systemd.services.rust-motd.serviceConfig = { + Group = "nginx"; + }; + programs.rust-motd.enable = true; + programs.rust-motd.order = [ + "last_run" + "uptime" + "s_s_l_certs" + "filesystems" + "docker" + "service_status" + "last_login" + ]; programs.rust-motd.settings = { uptime = { prefix = "up"; @@ -17,16 +30,25 @@ in filesystems = { root = "/"; }; + service_status = { + Foundry = "foundry"; + Nginx = "nginx"; + Nyazoom = "nyazoom"; + }; docker = { "/forgejo" = "Forgejo"; "/ddb-importer-ddb-proxy-1" = "ddb-proxy"; }; - # s_s_l_certs = lib.mkIf config.permafrost.acme.enable { - # sort_method = "manual"; - # certs = { - # "scarlet.zynh.me" = "${config.security.acme.certs.permafrost.directory}/key.pem"; - # }; - # }; + s_s_l_certs = lib.mkIf config.permafrost.acme.enable { + sort_method = "manual"; + certs = { + "scarlet.zynh.me" = "${config.security.acme.certs.permafrost.directory}/fullchain.pem"; + }; + }; + last_login = { + ravenshade = 3; + }; + last_run = { }; }; }; }