This repository has been archived on 2024-07-08. You can view files and clone it, but cannot push or open issues or pull requests.
nix-config-tn/nixos/profiles/role-server.nix
Truxnell a003d2205c
feat: motd, systemd notifications, restic backups (#93)
* flesh out impermanence

* glances

* hack

* hacking in plex and tautulli

* hack

* hacking

* feat: motd AND systemd failure notifications

---------

Co-authored-by: Truxnell <9149206+truxnell@users.noreply.github.com>
2024-04-14 05:44:46 +00:00

61 lines
1.6 KiB
Nix

{ config, lib, pkgs, imports, boot, self, ... }:
# Role for headless servers
# covers raspi's, sbc, NUC etc, anything
# that is headless and minimal for running services
with lib;
{
config = {
# Enable monitoring for remote scraiping
mySystem.services.promMonitoring.enable = true;
mySystem.services.rebootRequiredCheck.enable = true;
mySystem.security.wheelNeedsSudoPassword = false;
mySystem.services.cockpit.enable = true;
mySystem.system.motd.enable = true;
mySystem.services.gatus.monitors = mkIf config.mySystem.services.gatus.enable [{
name = config.networking.hostName;
group = "servers";
url = "icmp://${config.networking.hostName}.${config.mySystem.internalDomain}";
interval = "30s";
conditions = [ "[CONNECTED] == true" ];
}];
nix.settings = {
# TODO factor out into mySystem
# Avoid disk full issues
max-free = lib.mkDefault (1000 * 1000 * 1000);
min-free = lib.mkDefault (128 * 1000 * 1000);
};
services.logrotate.enable = mkDefault true;
environment.noXlibs = mkDefault true;
documentation = {
enable = mkDefault false;
doc.enable = mkDefault false;
info.enable = mkDefault false;
man.enable = mkDefault false;
nixos.enable = mkDefault false;
};
programs.command-not-found.enable = mkDefault false;
sound.enable = false;
hardware.pulseaudio.enable = false;
services.udisks2.enable = mkDefault false;
# xdg = {
# autostart.enable = mkDefault false;
# icons.enable = mkDefault false;
# mime.enable = mkDefault true;
# sounds.enable = mkDefault false;
# };
};
}