# # 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, nixos-hardware, home-manager, home-manager-unstable, nur, user, userdmz, userserver, location, agenix, jovian-nixos, microvm, ... }: 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; }; modules = [ agenix.nixosModules.default nur.nixosModules.nur microvm.nixosModules.host ./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 = lib.nixosSystem { # Laptop profile inherit system; specialArgs = { inherit inputs user location nixos-hardware nur agenix jovian-nixos; }; modules = [ agenix.nixosModules.default nur.nixosModules.nur jovian-nixos.nixosModules.default ./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; }; modules = [ agenix.nixosModules.default 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)]; }; } ]; }; nasbackup = lib.nixosSystem { # Desktop profile inherit system; #user = "dmz-user"; 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; }; 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)]; }; } ]; }; q920 = lib.nixosSystem { # Laptop profile inherit system; specialArgs = { inherit inputs user location ; }; modules = [ ./q920 ./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 ./q920/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)]; }; } ]; }; }