inputs: let commonProfiles = [ { imports = [ ../profiles/nix.nix ../profiles/tzlil.nix ../profiles/security.nix ../profiles/ssh.nix ../profiles/network.nix ../profiles/impermanence.nix ]; } inputs.agenix.nixosModules.age ]; commonHome = [ inputs.home-manager.nixosModule { home-manager = { useGlobalPkgs = true; extraSpecialArgs = {inherit inputs;}; }; } ]; nixinate = host: { _module.args.nixinate = { inherit host; sshUser = "tzlil"; buildOn = "remote"; # valid args are "local" or "remote" substituteOnTarget = true; # if buildOn is "local" then it will substitute on the target, "-s" hermetic = false; }; }; stateVersion = v: { home-manager.users.tzlil.home.stateVersion = v; system.stateVersion = v; }; in { navi = inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = {inherit inputs;}; modules = [ "${inputs.self}/hosts/navi" {networking.hostName = "navi";} (nixinate "navi") (stateVersion "23.11") ] ++ commonProfiles ++ commonHome; }; vps = inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = {inherit inputs;}; modules = [ "${inputs.self}/hosts/vps" {networking.hostName = "vps";} (nixinate "vps") (stateVersion "22.05") ] ++ commonProfiles ++ commonHome; }; }