diff --git a/flake.nix b/flake.nix index 889d594..cd2e125 100644 --- a/flake.nix +++ b/flake.nix @@ -15,11 +15,16 @@ outputs = { self, nixpkgs, ... } @ inputs: { nixosModules = rec { - nixvim-config = { pkgs, ... }: - import ./default.nix { - inherit inputs; - inherit pkgs; - }; + nixvim-config = { config, ... }: + let + # Get system from the importing module's context + system = nixpkgs.lib.systems.elaborate config.nixpkgs.hostPlatform; + pkgs = nixpkgs.legacyPackages.${system.system}; + in + import ./default.nix { + inherit inputs; + inherit pkgs; + }; default = nixvim-config; }; };