1 { pkgs, lib, config, name, nodes, ... }:
4 networking.extraHosts = builtins.concatStringsSep "\n"
5 (lib.mapAttrsToList (n: v: "${v.config.hostEnv.ips.main.ip4} ${n}") nodes);
7 users.extraUsers.root.openssh.authorizedKeys.keyFiles = [ "${config.myEnv.privateFiles}/id_ed25519.pub" ];
8 services.openssh.enable = true;
10 services.duplyBackup.profiles.system = {
12 excludeFile = lib.mkAfter ''
17 + /var/lib/private/systemd
21 nixpkgs.overlays = builtins.attrValues (import ../../overlays) ++ [
23 postgresql = self.postgresql_pam;
24 mariadb = self.mariadb_pam;
25 }) # don’t put them as generic overlay because of home-manager
28 services.journald.extraConfig = ''
29 MaxLevelStore="warning"
30 MaxRetentionSec="1year"
34 builtins.listToAttrs (map (x: lib.attrsets.nameValuePair x.name ({
36 home = "/home/${x.name}";
39 } // x)) (config.hostEnv.users pkgs))
42 nagios-cli = pkgs.writeScriptBin "nagios-cli" ''
43 #!${pkgs.stdenv.shell}
44 sudo -u naemon ${pkgs.nagios-cli}/bin/nagios-cli -c ${./monitoring/nagios-cli.cfg}
59 # pkgs.mitmproxy # failing
76 users.mutableUsers = false;
78 environment.etc.cnagios.source = "${pkgs.cnagios}/share/doc/cnagios";
79 environment.systemPackages = [
85 (lib.optional (builtins.length (config.hostEnv.users pkgs) > 0) pkgs.home-manager);
87 systemd.targets.maintenance = {
88 description = "Maintenance target with only sshd";
89 after = [ "network-online.target" "sshd.service" ];
90 requires = [ "network-online.target" "sshd.service" ];
91 unitConfig.AllowIsolate = "yes";