# # These are the different profiles that can be used when building NixOS. # # flake.nix # └─ ./hosts # ├─ default.nix * # ├─ configuration.nix # ├─ home.nix # └─ ./desktop OR ./laptop OR ./vm # ├─ ./default.nix # └─ ./home.nix # { lib, inputs, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager, home-manager-unstable, nur, user, userdmz, userserver, location, agenix, jovian-nixos, microvm, impermanence, lanzaboote, ... }: let system = "x86_64-linux"; # System architecture pkgs = import nixpkgs { inherit system; config.allowUnfree = true; # Allow proprietary software }; lib = nixpkgs.lib; users.defaultShell = "pkgs.zsh"; in { desktop = lib.nixosSystem { # Desktop profile inherit system; specialArgs = { inherit inputs user location nixos-hardware nur agenix microvm nixpkgs lanzaboote; }; modules = [ agenix.nixosModules.default nur.nixosModules.nur microvm.nixosModules.host lanzaboote.nixosModules.lanzaboote ./desktop ./configuration_desktop.nix ../modules/hardware/remoteBuilder.nix nixos-hardware.nixosModules.common-cpu-amd nixos-hardware.nixosModules.common-gpu-amd nixos-hardware.nixosModules.common-pc-ssd home-manager.nixosModules.home-manager { nixpkgs.overlays = [ nur.overlay ]; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user; }; home-manager.users.${user} = { imports = [(import ./home.nix)] ++ [(import ./desktop/home.nix)]; }; } ]; }; laptop = lib.nixosSystem { # Laptop profile inherit system; specialArgs = { inherit inputs user location nixos-hardware nur agenix; }; modules = [ agenix.nixosModules.default nur.nixosModules.nur ./laptop ./configuration_desktop.nix #../modules/hardware/remoteClient.nix nixos-hardware.nixosModules.common-cpu-intel nixos-hardware.nixosModules.common-gpu-intel nixos-hardware.nixosModules.common-pc-ssd home-manager.nixosModules.home-manager { nixpkgs.overlays = [ nur.overlay ]; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user; }; home-manager.users.${user} = { imports = [(import ./home.nix)] ++ [(import ./laptop/home.nix)]; }; } ]; }; steamdeck = nixpkgs-unstable.lib.nixosSystem { # steamdeck profile inherit system; specialArgs = { inherit inputs user location nixos-hardware nur agenix jovian-nixos lanzaboote; }; modules = [ agenix.nixosModules.default nur.nixosModules.nur jovian-nixos.nixosModules.default lanzaboote.nixosModules.lanzaboote ./steamdeck ./configuration_desktop.nix #../modules/hardware/remoteClient.nix nixos-hardware.nixosModules.common-cpu-amd nixos-hardware.nixosModules.common-gpu-amd nixos-hardware.nixosModules.common-pc-ssd home-manager-unstable.nixosModules.home-manager { nixpkgs.overlays = [ nur.overlay ]; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user; }; home-manager.users.${user} = { imports = [(import ./home.nix)] ++ [(import ./steamdeck/home.nix)]; }; } ]; }; server = lib.nixosSystem { # Desktop profile inherit system; specialArgs = { inherit inputs user location nixos-hardware nur agenix nixpkgs impermanence; }; modules = [ agenix.nixosModules.default microvm.nixosModules.host nur.nixosModules.nur ./server ./configuration_server.nix nixos-hardware.nixosModules.common-cpu-amd nixos-hardware.nixosModules.common-pc-ssd home-manager.nixosModules.home-manager { nixpkgs.overlays = [ nur.overlay ]; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user; }; home-manager.users.${user} = { imports = [(import ./home_server.nix)] ++ [(import ./server/home.nix)]; }; } ]; }; server_big = lib.nixosSystem { # Desktop profile inherit system; specialArgs = { inherit inputs user location nixos-hardware agenix nixpkgs impermanence; }; modules = [ agenix.nixosModules.default microvm.nixosModules.host ./server_big ./configuration_server.nix nixos-hardware.nixosModules.common-cpu-amd nixos-hardware.nixosModules.common-pc-ssd home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user; }; home-manager.users.${user} = { imports = [(import ./home_server.nix)] ++ [(import ./server/home.nix)]; }; } ]; }; nasbackup = lib.nixosSystem { # Desktop profile inherit system; specialArgs = { inherit inputs user location nixos-hardware nur agenix; }; modules = [ agenix.nixosModules.default nur.nixosModules.nur ./nasbackup ./configuration_desktop.nix #../modules/hardware/remoteClient.nix nixos-hardware.nixosModules.common-cpu-intel nixos-hardware.nixosModules.common-pc-ssd home-manager.nixosModules.home-manager { nixpkgs.overlays = [ nur.overlay ]; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user; }; home-manager.users.${user} = { imports = [(import ./home_server.nix)] ++ [(import ./nasbackup/home.nix)]; }; } ]; }; jupiter = lib.nixosSystem { # Desktop profile inherit system; specialArgs = { inherit inputs user location nixos-hardware nur agenix; }; modules = [ agenix.nixosModules.default nur.nixosModules.nur ./jupiter ./configuration_desktop.nix #../modules/hardware/remoteClient.nix nixos-hardware.nixosModules.common-cpu-intel nixos-hardware.nixosModules.common-pc-ssd home-manager.nixosModules.home-manager { nixpkgs.overlays = [ nur.overlay ]; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user; }; home-manager.users.${user} = { imports = [(import ./home_server.nix)] ++ [(import ./jupiter/home.nix)]; }; } ]; }; dmz = lib.nixosSystem { # Desktop profile inherit system; specialArgs = { inherit inputs user location nixos-hardware nur agenix nixpkgs impermanence; }; modules = [ agenix.nixosModules.default nur.nixosModules.nur microvm.nixosModules.host ./dmz ./configuration_server.nix nixos-hardware.nixosModules.common-pc-ssd home-manager.nixosModules.home-manager { nixpkgs.overlays = [ nur.overlay ]; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user; }; home-manager.users.${user} = { imports = [(import ./home_server.nix)] ++ [(import ./dmz/home.nix)]; }; } ]; }; # vm = lib.nixosSystem { # VM profile # inherit system; # specialArgs = { inherit inputs user location; }; # modules = [ # ./vm # ./configuration.nix # # home-manager.nixosModules.home-manager { # home-manager.useGlobalPkgs = true; # home-manager.useUserPackages = true; # home-manager.extraSpecialArgs = { inherit user; }; # home-manager.users.${user} = { # imports = [(import ./home.nix)] ++ [(import ./vm/home.nix)]; # }; # } # ]; # }; }