rust-motd: added configuration for rust-motd service
This commit is contained in:
parent
e9dc037124
commit
9007b42d93
|
@ -14,5 +14,6 @@ in
|
|||
openvpn.enable = mkEnableOption "openvpn";
|
||||
stubby.enable = mkEnableOption "stubby";
|
||||
jellyfin.enable = mkEnableOption "jellyfin";
|
||||
rust-motd.enable = mkEnableOption "rust-motd";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
openvpn.enable = true;
|
||||
stubby.enable = true;
|
||||
jellyfin.enable = true;
|
||||
rust-motd.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,12 +4,13 @@
|
|||
./caddy.nix
|
||||
./cockpit.nix
|
||||
./forgejo.nix
|
||||
./samba.nix
|
||||
./nextcloud.nix
|
||||
./syncthing.nix
|
||||
./kavita.nix
|
||||
./openvpn.nix
|
||||
./stubby.nix
|
||||
./jellyfin.nix
|
||||
./kavita.nix
|
||||
./nextcloud.nix
|
||||
./openvpn.nix
|
||||
./rust-motd.nix
|
||||
./samba.nix
|
||||
./stubby.nix
|
||||
./syncthing.nix
|
||||
];
|
||||
}
|
||||
|
|
50
system/services/rust-motd.nix
Normal file
50
system/services/rust-motd.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.profile.services.rust-motd;
|
||||
inherit (lib) mkIf mkMerge;
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
fail2ban
|
||||
];
|
||||
programs.rust-motd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
banner = {
|
||||
color = "white";
|
||||
command = "${pkgs.fortune-kind}/bin/fortune-kind | ${pkgs.neo-cowsay}/bin/cowsay --random";
|
||||
};
|
||||
service_status = mkMerge [
|
||||
{ }
|
||||
(mkIf config.profile.podman.pihole.enable { Pihole = "podman-pihole"; })
|
||||
(mkIf config.profile.podman.qbittorrent.enable { QBittorrent = "podman-qbittorrent"; })
|
||||
(mkIf config.profile.services.forgejo.enable { Forgejo = "forgejo"; })
|
||||
];
|
||||
uptime = {
|
||||
prefix = "Up";
|
||||
};
|
||||
filesystems = {
|
||||
Root = "/";
|
||||
NAS = "/nas";
|
||||
};
|
||||
memory = {
|
||||
swap_pos = "beside";
|
||||
};
|
||||
last_login = {
|
||||
${config.profile.user.name} = 1;
|
||||
};
|
||||
last_run = { };
|
||||
};
|
||||
order = [
|
||||
"banner"
|
||||
"last_login"
|
||||
"uptime"
|
||||
"memory"
|
||||
"service_status"
|
||||
"filesystems"
|
||||
"last_run"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue