nix-infra/flake.nix
fi 36491b8e17
flake.lock: Update
Flake lock file updates:

• Updated input 'nixos-generators':
    'github:nix-community/nixos-generators/098e8b6ff72c86944a8d54b64ddd7b7e6635830a?narHash=sha256-/MNhZLR0eh9z/d3l%2Bammq%2BF5XxHln0RHgO4Bhtjr0IM%3D' (2024-11-25)
  → 'github:nix-community/nixos-generators/d162ffdf0a30f3d19e67df5091d6744ab8b9229f?narHash=sha256-0tlZU8xfQGPcBOdXZee7P3vJLyPjTrXw7WbIgXD34gM%3D' (2024-12-12)
• Updated input 'nixos-generators/nixlib':
    'github:nix-community/nixpkgs.lib/87b6978992e2eb605732fba842cad0a7e14b2047?narHash=sha256-/hxIKRTBsdrnudJWDGaBN8wIjHovqVAVxXdi8ByVtck%3D' (2024-11-24)
  → 'github:nix-community/nixpkgs.lib/f4dc9a6c02e5e14d91d158522f69f6ab4194eb5b?narHash=sha256-5WoMeCkaXqTZwwCNLRzyLxEJn8ISwjx4cNqLgqKwg9s%3D' (2024-12-08)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/809802e9ab4b56e7a3db576832e95e3f7b74781a?narHash=sha256-RvyWCxT6O9ugSqSXHAMaFTIZtKS7SBHdUHKLoPW1/xg%3D' (2024-11-30)
  → 'github:NixOS/nixpkgs/8e21c38b7d24eadf3ef672a65a1cc927015d2197?narHash=sha256-x5OW9e2w1y/7UKvZK0m9vXddociX9cF1F1Cg9/uA/Ts%3D' (2024-12-13)
• Updated input 'nixpkgs-master':
    'github:NixOS/nixpkgs/33b9d57c656e65a9c88c5f34e4eb00b83e2b0ca9?narHash=sha256-9Vvu3a1ep1LB6F/kVE2hHH2HQzhSFtUyJYiJRkUkC4Q%3D' (2024-11-30)
  → 'github:NixOS/nixpkgs/5e28b3fe1a979e365d90172558616c08d114d753?narHash=sha256-tWCGLhWSc3BqDrQIapnpU8JCW228NrZeVHzJbEAoJN0%3D' (2024-12-14)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/57feb2a16f705eeffb075888d92a986e66473012?narHash=sha256-ndq0dD5E6FkqwmNYFS1wUAHa/5HixS3jLjulogM%2B7/E%3D' (2024-11-30)
  → 'github:NixOS/nixpkgs/119bb2941c87b630c56b5e36b9ed63e3daa0e2d3?narHash=sha256-I8cMXXWtf/%2B3DJT3QGm9BAp/b1oOCdKfgvpZ5XAUnp4%3D' (2024-12-14)
2024-12-14 23:40:19 +01:00

79 lines
2.7 KiB
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11-small";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small";
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
};
outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-master, nixos-generators, simple-nixos-mailserver, ... }@inputs:
let
hosts = import ./hosts.nix inputs;
helper = import ./helper.nix inputs;
in {
colmena = {
meta = {
# Set the default pkgs, which is pointless in this case,
# because nodeNixpkgs is overriding it anyway and a default value is generated.
# It is still needed for colmena to run.
nixpkgs = nixpkgs.legacyPackages."x86_64-linux";
# Specify nixpkgs to use for each host.
# The default is "nixpkgs" for "x86_64-linux" systems,
# but it is overridden by the host-specific "hostNixpkgs" and "system" attributes.
nodeNixpkgs = builtins.mapAttrs (name: host: host.pkgs) hosts;
specialArgs = {
inherit nixpkgs-unstable nixpkgs-master hosts simple-nixos-mailserver;
# Provide environment for secret key command
keyCommandEnv = [ "env" "GNUPGHOME=/home/fi/.passinfra_gnupg" "PASSWORD_STORE_DIR=/home/fi/pass/infra" ];
};
};
} // builtins.mapAttrs (helper.generateColmenaHost) hosts;
hydraJobs = {
nixConfigurations = builtins.mapAttrs (host: helper.generateNixConfiguration host {
inherit nixpkgs-unstable nixpkgs-master hosts simple-nixos-mailserver;
}) hosts;
};
# Generate a base VM image for Proxmox with `nix build .#base-proxmox`
packages.x86_64-linux = {
base-proxmox = nixos-generators.nixosGenerate {
system = "x86_64-linux";
modules = [
./config/common
./config/nixos-generators
./config/nixos-generators/proxmox.nix
./config/environments/proxmox-vm
];
format = "proxmox";
};
base-openstack = nixos-generators.nixosGenerate {
system = "x86_64-linux";
modules = [
./config/common
./config/nixos-generators
./config/environments/openstack-vm
];
format = "openstack";
};
};
# Binary cache hint
nixConfig = {
extra-substituters = [
"https://nix-cache.nekover.se"
];
extra-trusted-public-keys = [
"nix-cache.nekover.se:f/VfGqC5lctLzOa6pLLDmEkihcip4WYpYShlW3rivLU="
];
};
};
}