nix-infra/flake.nix
Fiona Grzebien fd6bf13e45 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/dd6d18bf8d291daca03a444973bd4f9aa5c1f681?narHash=sha256-O2/v/ocUL0KsACqEIK5eD5XeX46duRIgKdOu6uCKarw%3D' (2024-10-28)
  → 'github:NixOS/nixpkgs/c128e44a249d6180740d0a979b6480d5b795c013?narHash=sha256-i85DPrhDuvzgvIWCpJlbfM2UFtNYbapo20MtQXsvay4%3D' (2024-11-06)
• Updated input 'nixpkgs-master':
    'github:NixOS/nixpkgs/ec7caabec9679b1a9008e0cbcfa4b14a2b600774?narHash=sha256-WPGVR8NW9ctqwLMtYV23b94ExQulTFoTKqD21WI3fbg%3D' (2024-10-29)
  → 'github:NixOS/nixpkgs/a40c3f1a5a8d3fa81fc4edc9dfa4719f8908b1d8?narHash=sha256-JTpBZcKpiz0/Fm5saVrTdPRsywNlBFz5pSdwMaVKwH8%3D' (2024-11-06)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/75e28c029ef2605f9841e0baa335d70065fe7ae2?narHash=sha256-P8wF4ag6Srmpb/gwskYpnIsnspbjZlRvu47iN527ABQ%3D' (2024-10-28)
  → 'github:NixOS/nixpkgs/1c07b97d2d4302baca8c61fa2d0d4632427972a7?narHash=sha256-OrCMJZ8qZftRplhoB%2BBksvoPLBOZQpH8mnACgPKNuMc%3D' (2024-11-06)
• Added input 'pterodactyl':
    'git+https://git.nekover.se/fi/pterodactyl.git?ref=refs/heads/main&rev=67dbbc01133790a3a1e892cc4cb147413f5238ee' (2024-10-29)
• Added input 'pterodactyl/nixpkgs':
    'github:NixOS/nixpkgs/ccc0c2126893dd20963580b6478d1a10a4512185?narHash=sha256-4HQI%2B6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo%3D' (2024-10-18)
2024-11-06 18:11:43 +01:00

82 lines
2.8 KiB
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05-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";
pterodactyl = {
url = "git+https://git.nekover.se/fi/pterodactyl.git";
};
};
outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-master, nixos-generators, simple-nixos-mailserver, pterodactyl, ... }@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 pterodactyl;
# Provide environment for secret key command
keyCommandEnv = [ "env" "GNUPGHOME=/home/yuri/.passinfra_gnupg" "PASSWORD_STORE_DIR=/home/yuri/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="
];
};
};
}