{ self, nixpkgs, nixpkgs-stable, sops-nix, home-manager, lanzaboote, simple-nixos-mailserver, inputs, ... }: let customModules = import ../modules/modules-list.nix; customPkgs = self.packages; baseModules = [ {_module.args.inputs = inputs;} { imports = [ ({pkgs, ...}: { nix = { nixPath = ["nixpkgs=${pkgs.path}"]; gc = { automatic = true; dates = "weekly"; options = "--delete-older-than 7d"; }; package = pkgs.nixVersions.stable; settings = { auto-optimise-store = true; experimental-features = ["nix-command" "flakes"]; keep-outputs = true; keep-derivations = true; }; }; }) ]; } sops-nix.nixosModules.sops ]; defaultModules = baseModules ++ customModules; myNixosSystem = { np, ip, system, file, remoteBuild ? true, sshPort ? 22, sshUser ? "root", allowLocalDeployment ? false, additionalModules ? [], }: np.lib.nixosSystem { inherit system; specialArgs = {mypkgs = customPkgs."${system}";}; modules = defaultModules ++ [ { remote = { inherit ip sshUser sshPort allowLocalDeployment remoteBuild; }; } {nixpkgs.system = "${system}";} ] ++ additionalModules ++ [file]; }; in { laptop = myNixosSystem { np = nixpkgs; system = "x86_64-linux"; ip = "127.0.0.1"; allowLocalDeployment = true; file = ./laptop/configuration.nix; }; framework = myNixosSystem { np = nixpkgs; system = "x86_64-linux"; ip = "127.0.0.1"; allowLocalDeployment = true; file = ./framework/configuration.nix; additionalModules = [ lanzaboote.nixosModules.lanzaboote home-manager.nixosModules.home-manager ]; }; celestia = myNixosSystem { np = nixpkgs; system = "x86_64-linux"; ip = "192.168.1.11"; # remoteBuild = false; file = ./celestia/configuration.nix; }; primordial = myNixosSystem { np = nixpkgs; system = "aarch64-linux"; ip = "159.69.53.14"; file = ./primordial/configuration.nix; additionalModules = [ simple-nixos-mailserver.nixosModules.mailserver ]; }; }