infra/flake.nix
github-actions[bot] de95074435 flake.lock: Update
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/5fd852c4155a689098095406500d0ae3d04654a8?narHash=sha256-c9I3i1CwZ10SoM5npQQVnfwgvB86jAS3lT4ZqkRoSOI%3D' (2024-11-14)
  → 'github:nix-community/disko/639d1520df9417ca2761536c3072688569e83c80?narHash=sha256-z76Q/OXLxO/RxMII3fIt/TG665DANiE2lVvnolK2lXk%3D' (2024-11-18)
• Updated input 'nix-darwin':
    'github:LnL7/nix-darwin/6c71c49e2448e51ad830ed211024e6d0edc50116?narHash=sha256-TtwvgFxUa0wyptLhQbKaixgNW1UXf3%2BTDqfX3Kp63oM%3D' (2024-11-12)
  → 'github:LnL7/nix-darwin/c60b5c924c6188a0b3ca2e139ead3d0f92ae5db5?narHash=sha256-ZrztYfSOS33J%2Bewq5alBOSdnIyZ0/sr1iy7FyBe9zIg%3D' (2024-11-17)
• Updated input 'nix-index-database':
    'github:nix-community/nix-index-database/896019f04b22ce5db4c0ee4f89978694f44345c3?narHash=sha256-BF7FBh1hIYPDihdUlImHGsQzaJZVLLfYqfDx41wjuF0%3D' (2024-11-10)
  → 'github:nix-community/nix-index-database/bdba246946fb079b87b4cada4df9b1cdf1c06132?narHash=sha256-l9ryrx1Twh08a%2BgxrMGM9O/aZKEimZfa6sZVyPCImgI%3D' (2024-11-17)
• Updated input 'nixos-facter-modules':
    'github:numtide/nixos-facter-modules/505386dda29452140f93734509b03de57986af57?narHash=sha256-azk9oxzHkfYZcgBzAK3J9qdUQG0UjLSOjt8KzJ9rb8g%3D' (2024-11-12)
  → 'github:numtide/nixos-facter-modules/5a1c2a28589e34f8a44d46dd1909cfacf928cb1a?narHash=sha256-aIy8m4jjr/BFXzniNzoH16sF7HEFV/01/5b3FhtUHrw%3D' (2024-11-17)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/18979df9f0be9d69f0e4d35059914c1a868c79b8?narHash=sha256-tmzIz0iCCnnqXFS/lGkl1/%2BlGMn8lTiMshzd0v8LwYk%3D' (2024-11-13)
  → 'github:NixOS/nixpkgs/6c33d760f16f52ffc0dd8538b9239808d96ec699?narHash=sha256-HIl3lTqMVu/RXx9Gav46qai6%2BOV9Gu3cQFbvZSOvjJI%3D' (2024-11-17)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/4c91d52db103e757fc25b58998b0576ae702d659?narHash=sha256-HC0anOL%2BKmUQ2hdRl0AtunbAckasxrkn4VLmxbW/WaA%3D' (2024-11-11)
  → 'github:Mic92/sops-nix/472741cf3fee089241ac9ea705bb2b9e0bfa2978?narHash=sha256-NVUTFxKrJp/hjehlF1IvkPnlRYg/O9HFVutbxOM8zNM%3D' (2024-11-17)
• Removed input 'sops-nix/nixpkgs-stable'
• Updated input 'srvos':
    'github:nix-community/srvos/dabae9d2062afd45f343d13d819eea1029d08162?narHash=sha256-FyRDs/jlmaBDL1ryf3tM9rFaOrlYn5wSa1VUr4k2w%2B4%3D' (2024-11-07)
  → 'github:nix-community/srvos/e26a814735f50034e35dff637efad2d502698d09?narHash=sha256-rRREuHCR3k6/g%2BF9sToP2Cf05qVlWQbl2c7dRRhcqTI%3D' (2024-11-18)
2024-11-18 03:27:38 +00:00

153 lines
5.9 KiB
Nix

{
description = "NixOS configuration of our builders";
nixConfig.extra-substituters = [ "https://nix-community.cachix.org" ];
nixConfig.extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
inputs = {
agenix.inputs.darwin.follows = "nix-darwin";
agenix.inputs.home-manager.follows = "empty";
agenix.inputs.nixpkgs.follows = "nixpkgs";
agenix.inputs.systems.follows = "systems";
agenix.url = "github:ryantm/agenix";
buildbot-nix.inputs.flake-parts.follows = "flake-parts";
buildbot-nix.inputs.nixpkgs.follows = "nixpkgs";
buildbot-nix.inputs.treefmt-nix.follows = "treefmt-nix";
buildbot-nix.url = "github:nix-community/buildbot-nix";
cgroup-exporter.inputs.nixpkgs.follows = "nixpkgs";
cgroup-exporter.url = "github:arianvp/cgroup-exporter";
disko.inputs.nixpkgs.follows = "nixpkgs";
disko.url = "github:nix-community/disko";
empty.url = "github:nix-systems/empty";
flake-compat.url = "github:nix-community/flake-compat";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
flake-parts.url = "github:hercules-ci/flake-parts";
hercules-ci-effects.inputs.flake-parts.follows = "flake-parts";
hercules-ci-effects.inputs.nixpkgs.follows = "nixpkgs";
hercules-ci-effects.url = "github:hercules-ci/hercules-ci-effects";
hydra.flake = false;
hydra.url = "github:qowoz/hydra/community";
lite-config.url = "github:yelite/lite-config";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
nix-darwin.url = "github:LnL7/nix-darwin";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
nix-index-database.url = "github:nix-community/nix-index-database";
nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
nixpkgs-update-github-releases.flake = false;
nixpkgs-update-github-releases.url = "github:nix-community/nixpkgs-update-github-releases";
nixpkgs-update.inputs.mmdoc.follows = "empty";
nixpkgs-update.inputs.runtimeDeps.follows = "nixpkgs";
nixpkgs-update.inputs.treefmt-nix.follows = "treefmt-nix";
nixpkgs-update.url = "github:nix-community/nixpkgs-update";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
nur-update.inputs.nixpkgs.follows = "nixpkgs";
nur-update.url = "github:nix-community/nur-update";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
sops-nix.url = "github:Mic92/sops-nix";
srvos.inputs.nixpkgs.follows = "nixpkgs";
srvos.url = "github:nix-community/srvos";
systems.url = "github:nix-systems/default";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
treefmt-nix.url = "github:numtide/treefmt-nix";
};
outputs =
inputs@{ flake-parts, self, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = import inputs.systems;
imports = [
./modules
inputs.lite-config.flakeModule
inputs.treefmt-nix.flakeModule
];
lite-config =
{ lib, ... }:
{
nixpkgs = {
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "terraform" ];
overlays = [
(final: prev: {
hydra = (prev.hydra.override { nix = final.nixVersions.nix_2_24; }).overrideAttrs (o: {
version = inputs.hydra.shortRev;
src = inputs.hydra;
buildInputs = o.buildInputs ++ [ final.perlPackages.DBIxClassHelpers ];
});
})
];
};
hostModuleDir = ./hosts;
hosts = {
build01.system = "x86_64-linux";
build02.system = "x86_64-linux";
build03.system = "x86_64-linux";
build04.system = "aarch64-linux";
darwin01.system = "aarch64-darwin";
darwin02.system = "aarch64-darwin";
web02.system = "x86_64-linux";
};
systemModules = [
(
{ hostPlatform, ... }:
{
imports =
lib.optionals hostPlatform.isDarwin [ ./modules/darwin/common ]
++ lib.optionals hostPlatform.isLinux [ ./modules/nixos/common ];
}
)
];
};
perSystem =
{
inputs',
lib,
pkgs,
self',
system,
...
}:
{
imports = [
./dev/docs.nix
./dev/shell.nix
./terraform/shell.nix
];
treefmt = {
flakeCheck = system == "x86_64-linux";
imports = [ ./dev/treefmt.nix ];
};
checks =
let
darwinConfigurations = lib.mapAttrs' (
name: config: lib.nameValuePair "host-${name}" config.config.system.build.toplevel
) ((lib.filterAttrs (_: config: config.pkgs.system == system)) self.darwinConfigurations);
devShells = lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells;
nixosConfigurations = lib.mapAttrs' (
name: config: lib.nameValuePair "host-${name}" config.config.system.build.toplevel
) ((lib.filterAttrs (_: config: config.pkgs.system == system)) self.nixosConfigurations);
in
darwinConfigurations
// devShells
// {
inherit (self') formatter;
}
// nixosConfigurations
// pkgs.lib.optionalAttrs (system == "x86_64-linux") {
inherit (self'.packages) docs docs-linkcheck;
nixpkgs-update-supervisor-test = pkgs.callPackage ./hosts/build02/supervisor_test.nix { };
nixosTests-buildbot = pkgs.nixosTests.buildbot;
nixosTests-buildbot-nix-master = inputs'.buildbot-nix.checks.master;
nixosTests-buildbot-nix-worker = inputs'.buildbot-nix.checks.worker;
nixosTests-hydra = pkgs.nixosTests.hydra.hydra;
};
};
};
}