{ inputs = { nixpkgs = { type = "github"; owner = "NixOS"; repo = "nixpkgs"; ref = "nixos-23.11"; }; colmena = { type = "github"; owner = "zhaofengli"; repo = "colmena"; inputs.nixpkgs.follows = "nixpkgs"; }; nixago = { type = "github"; owner = "nix-community"; repo = "nixago"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "utils"; }; pre-commit-hooks = { type = "github"; owner = "cachix"; repo = "pre-commit-hooks.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; sops = { type = "github"; owner = "Mic92"; repo = "sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs-stable.follows = "nixpkgs"; }; utils = { type = "github"; owner = "numtide"; repo = "flake-utils"; }; disko = { type = "github"; owner = "nix-community"; repo = "disko"; inputs.nixpkgs.follows = "nixpkgs"; }; gather = { type = "github"; owner = "fooker"; repo = "gather.nix"; }; ldap-sync = { type = "git"; url = "https://gogs.informatik.hs-fulda.de/fooker/ldap-sync.git"; flake = false; }; }; outputs = { nixpkgs, utils, disko, ... }@inputs: { colmena = import ./deployment.nix inputs; devShell = utils.lib.eachSystemMap utils.lib.allSystems (system: let pkgs = nixpkgs.legacyPackages.${system}; colmena = inputs.colmena.defaultPackage.${system}.overrideAttrs (final: prev: { patches = (prev.patches or [ ]) ++ [ ./patches/colmena-disable-ssh-master.patch ]; }); pre-commit-hooks = inputs.pre-commit-hooks.lib.${system}.run { src = ./.; hooks = { nixpkgs-fmt.enable = true; statix.enable = true; shellcheck.enable = true; }; }; sops-hooks = inputs.nixago.lib.${system}.make { data = (pkgs.callPackage ./sops.nix { }).config; output = ".sops.yaml"; format = "yaml"; }; gather = pkgs.writeShellScript "gather" '' ROOT=${toString ./.} MACHINES=( "$(${colmena}/bin/colmena eval -E '{nodes, ...}: ')" ) if [[ "$1" != "" ]]; then else mapfile -t MACHINES < <() fi ''; in pkgs.mkShell { buildInputs = [ colmena #gather ] ++ (with pkgs; [ bash gitAndTools.git gnutar gzip openssh sops age mkdocs ] ++ [ (pkgs.vscode-with-extensions.override { vscode = pkgs.vscodium; vscodeExtensions = with pkgs.vscode-extensions; [ bbenoist.nix ]; }) ]); shellHook = '' ${pre-commit-hooks.shellHook} ${sops-hooks.shellHook} ''; }); }; }