diff --git a/flake.nix b/flake.nix index 5609e30..fd96cc3 100644 --- a/flake.nix +++ b/flake.nix @@ -11,8 +11,10 @@ system = "x86_64-linux"; username = "opdavies"; - nixos-system = import ./system/nixos { inherit inputs self system username; }; - wsl-system = import ./system/wsl2 { inherit inputs self system username; }; + pkgs = inputs.nixpkgs.legacyPackages.${system}; + + nixos-system = import ./system/nixos { inherit inputs pkgs self system username; }; + wsl-system = import ./system/wsl2 { inherit inputs pkgs self system username; }; in flake-parts.lib.mkFlake { inherit inputs; } { systems = [ "x86_64-linux" ]; diff --git a/system/nixos/default.nix b/system/nixos/default.nix index a421561..394ab8f 100644 --- a/system/nixos/default.nix +++ b/system/nixos/default.nix @@ -1,10 +1,8 @@ -{ inputs, self, system, username }: +{ inputs, pkgs, self, system, username }: -{ desktop }: +{ desktop ? false }: let - pkgs = inputs.nixpkgs.legacyPackages."${system}"; - configuration = import ./configuration.nix { inherit inputs pkgs system; }; hardware-configuration = import ./hardware-configuration.nix; in diff --git a/system/wsl2/default.nix b/system/wsl2/default.nix index e1548b4..919a80b 100644 --- a/system/wsl2/default.nix +++ b/system/wsl2/default.nix @@ -1,8 +1,6 @@ -{ inputs, self, system, username }: +{ inputs, pkgs, self, system, username }: let - pkgs = inputs.nixpkgs.legacyPackages."${system}"; - shared-config = import ../shared/home-manager.nix { inherit inputs pkgs self username; }; shared-packages = import ../shared/home-manager-packages.nix { inherit inputs pkgs; }; in