{ # Source of inspiration: # - https://github.com/BonusPlay/sysconf/blob/master/flake.nix (agenix) # - https://github.com/NixOS/infra/blob/master/build/flake.nix (agenix) # - https://johns.codes/blog/organizing-system-configs-with-nixos (caddy) # - https://nixos-and-flakes.thiscute.world/nixos-with-flakes/start-using-home-manager # - https://forum.proxmox.com/threads/tutorial-unprivileged-lxcs-mount-cifs-shares.101795/ (Samba share) description = "Pazpi's systems"; inputs = { # NixOS related inputs nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; lix-module = { url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-2.tar.gz"; inputs.nixpkgs.follows = "nixpkgs"; }; agenix = { url = "github:ryantm/agenix"; inputs.nixpkgs.follows = "nixpkgs"; }; colmena = { url = "github:zhaofengli/colmena"; inputs.nixpkgs.follows = "nixpkgs"; }; home-manager = { url = "github:nix-community/home-manager/release-24.11"; inputs.nixpkgs.follows = "nixpkgs"; }; authentik-nix = { url = "github:nix-community/authentik-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { self, nixpkgs, nixpkgs-unstable, nixos-hardware, lix-module, authentik-nix, agenix, colmena, home-manager, ... }@inputs: let system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; }; lib = nixpkgs.lib; hosts = import hosts/hosts.nix { inherit inputs; }; in { # used with: `nix fmt` formatter.${system} = pkgs.nixfmt-rfc-style; nixosConfigurations = (import ./hosts inputs); colmena = lib.recursiveUpdate (builtins.mapAttrs (k: v: { imports = v._module.args.modules; }) self.nixosConfigurations) hosts; devShells.${system}.default = pkgs.mkShell { buildInputs = with pkgs; [ cmake pkg-config meson agenix.packages.${system}.agenix colmena.packages.${system}.colmena ]; }; }; }