{ config, lib, pkgs, ... }: with lib; let cfg = config.nixfiles.modules.profiles.headless; in { config = mkIf cfg.enable { nixfiles.modules = { openssh.server.enable = true; endlessh-go.enable = true; fail2ban.enable = true; node-exporter.enable = true; promtail.enable = false; # FIXME High RAM usage. }; # Pin version to prevent any surprises. Try keeping this up-to-date[1] with # the latest LTS release + hardened patches (just in case). # # [1]: https://kernel.org boot.kernelPackages = pkgs.linuxPackages_5_15_hardened; nix = { gc = { automatic = true; dates = "weekly"; options = "--delete-older-than 30d"; }; optimise = { automatic = true; dates = ["daily"]; }; }; services.udisks2.enable = false; xdg.sounds.enable = false; }; }