{ description = "Build Entire System"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; home-manager = { url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; }; nathan.url = "./home"; system.url = "./system"; system.inputs.diskoConfig.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { self, nixpkgs, ... }@core_inputs: let system = "x86_64-linux"; iso_system = "x86_64-linux"; host = "laptop"; username = "nathan"; devices = { main = "/dev/nvme0n1"; bonus = null; }; in rec { inputs.home-manager.useGlobalPkgs = true; nixosConfigurations.${host} = nixpkgs.lib.nixosSystem { inherit system; specialArgs = { core_inputs = (core_inputs // { inherit host username; }); inherit devices; }; modules = [ core_inputs.system.nixosModule core_inputs.home-manager.nixosModules.home-manager ({ lib, ... }: { sysconfig.${host}.enable = true; disko.enable = lib.mkForce false; }) ]; }; nixosConfigurations.iso = nixpkgs.lib.nixosSystem { inherit iso_system; specialArgs = { core_inputs = (core_inputs // { inherit host username; }); devices = (devices // { bonus = { disk1 = "/dev/nvme1n1"; }; }); }; modules = [ ({ pkgs, modulesPath, ... }: { imports = [ (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ]; nixpkgs.hostPlatform = iso_system; }) #inputs.system.nixosModule #inputs.home-manager.nixosModules.home-manager ]; }; packages.${iso_system}.default = nixosConfigurations.iso.config.system.build.isoImage; homeConfigurations."nathan" = core_inputs.home-manager.lib.homeManagerConfiguration { pkgs = import nixpkgs { inherit system; config.allowUnfree = true; }; extraSpecialArgs = { inherit core_inputs; }; modules = [ core_inputs.nathan.homeManagerModule ]; }; }; }