1 { config, pkgs, lib, nixpkgs, ports, secrets, ... }:
3 # ssh-keyscan monitoring-1 | nix-shell -p ssh-to-age --run ssh-to-age
4 secrets.ageKeys = [ "age1dn4lzhgxusqrpjjnzm7w8ml39ptf326htuzmpqdqs2gg3wq7cqzqxuvx8k" ];
5 boot.kernelPackages = pkgs.linuxPackages_latest;
8 secrets.nixosModules.users-config-monitoring-1
9 (nixpkgs + "/nixos/modules/profiles/qemu-guest.nix")
10 ./monitoring-master.nix
16 nixpkgs.overlays = builtins.attrValues ports.overlays;
17 nixpkgs.config.permittedInsecurePackages = [
18 "python-2.7.18.6" # for nagios-cli
21 myServices.monitoring.enable = true;
22 myServices.monitoring.master = true;
23 myServices.status.enable = true;
25 firewall.enable = true;
26 interfaces."ens3".ipv4.addresses = pkgs.lib.flatten (pkgs.lib.attrsets.mapAttrsToList
27 (n: ips: map (ip: { address = ip; prefixLength = 32; }) (ips.ip4 or []))
28 (pkgs.lib.attrsets.filterAttrs (n: v: n != "main") config.hostEnv.ips));
29 interfaces."ens3".ipv6.addresses = pkgs.lib.flatten (pkgs.lib.attrsets.mapAttrsToList
30 (n: ips: map (ip: { address = ip; prefixLength = (if n == "main" && ip == pkgs.lib.head ips.ip6 then 64 else 128); }) (ips.ip6 or []))
32 defaultGateway6 = { address = "fe80::1"; interface = "ens3"; };
34 boot.loader.grub.device = "nodev";
35 fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
36 myServices.mailRelay.enable = true;
38 security.pki.certificateFiles = [
40 url = "http://downloads.e.eriomem.net/eriomemca.pem";
41 sha256 = "1ixx4c6j3m26j8dp9a3dkvxc80v1nr5aqgmawwgs06bskasqkvvh";
45 # This value determines the NixOS release with which your system is
46 # to be compatible, in order to avoid breaking some software such as
47 # database servers. You should change this only after NixOS release
48 # notes say you should.
49 # https://nixos.org/nixos/manual/release-notes.html
50 system.stateVersion = "23.05"; # Did you read the comment?