{ config, lib, pkgs, this, ... }: let cfg = config.nixfiles.modules.profiles.headless; in { options.nixfiles.modules.profiles.headless.enable = lib.mkEnableOption "headless profile" // { default = this.isHeadless; }; config = lib.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. }; hm.home.file = { ".hushlogin".text = ""; ".bash_history".source = config.hm.lib.file.mkOutOfStoreSymlink "/dev/null"; }; boot.kernelPackages = pkgs.linuxPackages_hardened; nix = { gc = { automatic = true; dates = "weekly"; options = "--delete-older-than 30d"; }; optimise = { automatic = true; dates = [ "daily" ]; }; }; environment.systemPackages = with pkgs; [ alacritty.terminfo foot.terminfo ]; services.udisks2.enable = false; }; }