diff --git a/flake.nix b/flake.nix index 8a726af..e71ee29 100644 --- a/flake.nix +++ b/flake.nix @@ -15,10 +15,12 @@ in { nixosModules.default = - { pkgs, ... }: + { pkgs, config, ... }: { imports = [ ./module.nix ]; - nix.shorturls.package = self.packages.${pkgs.stdenv.hostPlatform.system}.default; + nix.shorturls.package = ( + self.packages.${pkgs.stdenv.hostPlatform.system}.default { nix = config.nix.package; } + ); }; packages = forAllSystems ( @@ -27,23 +29,27 @@ pkgs = nixpkgs.legacyPackages.${system}; in { - default = pkgs.stdenv.mkDerivation { - pname = "nix-shorturl-plugin"; - version = "0.1.0"; - src = self; + default = + { + nix ? pkgs.nix, + }: + pkgs.stdenv.mkDerivation { + pname = "nix-shorturl-plugin"; + version = "0.1.0"; + src = self; - nativeBuildInputs = with pkgs; [ - meson - ninja - pkg-config - ]; + nativeBuildInputs = with pkgs; [ + meson + ninja + pkg-config + ]; - buildInputs = with pkgs; [ - nix.dev - nlohmann_json - boost - ]; - }; + buildInputs = with pkgs; [ + nix.dev + nlohmann_json + boost + ]; + }; } );