diff --git a/build.conf.nix b/build.conf.nix index 6770b9c..f32bcb1 100644 --- a/build.conf.nix +++ b/build.conf.nix @@ -2,6 +2,7 @@ input@{ wm ? null, ...}: with builtins; input // rec { + # should probably split plasma into plasma-x11 and plasma-wayland at some point x11-wms = ["plasma" "xmonad" "i3"]; wayland-wms = ["hyprland" "sway"]; wms = x11-wms ++ wayland-wms; diff --git a/flake.lock b/flake.lock index 8f5d713..32c8b41 100644 --- a/flake.lock +++ b/flake.lock @@ -38,6 +38,42 @@ "type": "github" } }, + "nixlib": { + "locked": { + "lastModified": 1689469483, + "narHash": "sha256-2SBhY7rZQ/iNCxe04Eqxlz9YK9KgbaTMBssq3/BgdWY=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "02fea408f27186f139153e1ae88f8ab2abd9c22c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixos-generators": { + "inputs": { + "nixlib": "nixlib", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1690133435, + "narHash": "sha256-YNZiefETggroaTLsLJG2M+wpF0pJPwiauKG4q48ddNU=", + "owner": "nix-community", + "repo": "nixos-generators", + "rev": "b1171de4d362c022130c92d7c8adc4bf2b83d586", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixos-generators", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1692067901, @@ -58,6 +94,7 @@ "inputs": { "flake-utils": "flake-utils", "home-manager": "home-manager", + "nixos-generators": "nixos-generators", "nixpkgs": "nixpkgs" } }, diff --git a/flake.nix b/flake.nix index a572235..81068e8 100644 --- a/flake.nix +++ b/flake.nix @@ -5,26 +5,37 @@ inputs.home-manager.url = "github:nix-community/home-manager"; inputs.home-manager.inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.url = "github:numtide/flake-utils"; + inputs.nixos-generators.url = "github:nix-community/nixos-generators"; + inputs.nixos-generators.inputs.nixpkgs.follows = "nixpkgs"; - outputs = inputs@{ self, nixpkgs, home-manager, flake-utils, ... }: + outputs = inputs@{ self, nixpkgs, home-manager, flake-utils, nixos-generators, ... }: let # :( conf = (import ./build.conf.nix) { wm = "plasma"; }; + modules = [ + ((import ./configuration.nix) conf) + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.mbk = (import ./home.nix) conf; + } + ]; in { nixosConfigurations = { nix = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ - ((import ./configuration.nix) conf) - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.mbk = (import ./home.nix) conf; - } - ]; + modules = modules; + }; + }; + + packages.x86_64-linux = { + iso = nixos-generators.nixosGenerate { + system = "x86_64-linux"; + modules = modules; + format = "iso"; }; }; };