From bf2805b1a7116b90901138130b727739a573261c Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Fri, 27 Dec 2024 23:31:44 -0800 Subject: [PATCH] motd: module init --- hosts/permafrost/configuration.nix | 1 + modules/motd.nix | 31 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 modules/motd.nix diff --git a/hosts/permafrost/configuration.nix b/hosts/permafrost/configuration.nix index fd8d876..9514b11 100644 --- a/hosts/permafrost/configuration.nix +++ b/hosts/permafrost/configuration.nix @@ -3,6 +3,7 @@ { permafrost.nyazoom.enable = true; permafrost.forgejo.enable = true; + permafrost.motd.enable = true; permafrost.acme.enable = true; permafrost.acme.useStagingServer = false; diff --git a/modules/motd.nix b/modules/motd.nix new file mode 100644 index 0000000..e235cc7 --- /dev/null +++ b/modules/motd.nix @@ -0,0 +1,31 @@ +{ lib, config, ... }: + +let + cfg = config.permafrost.motd; +in +{ + options.permafrost.motd = { + enable = lib.mkEnableOption "nginx nixos module"; + }; + + config = lib.mkIf cfg.enable { + programs.rust-motd.enable = true; + programs.rust-motd.settings = { + uptime = { + prefix = "up"; + }; + filesystems = { + root = "/"; + }; + docker = { + "/forgejo" = "Forgejo"; + }; + # 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"; + # }; + # }; + }; + }; +}