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

48 lines
1.4 KiB
Nix
Raw Normal View History

2024-05-31 08:51:56 -05:00
{ config, lib, pkgs, ... }:
2024-03-25 07:37:21 -05:00
# 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 = [{
name = config.networking.hostName;
group = "servers";
url = "icmp://${config.networking.hostName}.${config.mySystem.internalDomain}";
interval = "1m";
2024-04-11 04:42:26 -05:00
conditions = [ "[CONNECTED] == true" ];
}];
2024-03-25 07:37:21 -05:00
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;
2024-05-31 08:46:04 -05:00
environment = {
noXlibs = mkDefault true;
systemPackages = [ pkgs.lazygit ];
};
documentation = {
enable = mkDefault false;
doc.enable = mkDefault false;
info.enable = mkDefault false;
man.enable = mkDefault false;
nixos.enable = mkDefault false;
};
2024-03-25 07:37:21 -05:00
2024-05-31 08:46:04 -05:00
programs.command-not-found.enable = mkDefault false;
sound.enable = false;
hardware.pulseaudio.enable = false;
services.udisks2.enable = mkDefault false;
};
2024-03-25 07:37:21 -05:00
}