{ lib, config, ... }: let cfg = config.permafrost.motd; in { options.permafrost.motd = { enable = lib.mkEnableOption "nginx nixos module"; }; 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" "memory" "docker" "service_status" "last_login" ]; programs.rust-motd.settings = { uptime.prefix = "up"; 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}/fullchain.pem"; }; }; memory.swap_pos = "beside"; last_login.ravenshade = 3; last_run = { }; }; }; }