diff --git a/devices/servivi/modules/binary-cache.nix b/devices/servivi/modules/binary-cache.nix index 49570294..484d0264 100644 --- a/devices/servivi/modules/binary-cache.nix +++ b/devices/servivi/modules/binary-cache.nix @@ -1,6 +1,7 @@ { config, mainUser, + nix-eval-jobs, nix-fast-build, pkgs, ... @@ -9,7 +10,7 @@ nix-fast-build-pkg = nix-fast-build.packages.${pkgs.system}.nix-fast-build.override { nix-eval-jobs = - pkgs.nix-eval-jobs.override { + nix-eval-jobs.packages.${pkgs.system}.default.override { nix = config.nix.package; } // { @@ -46,6 +47,7 @@ in { services.nix-serve = { enable = true; + package = pkgs.nix-serve-ng; secretKeyFile = secrets.binary-cache-key.path; }; diff --git a/flake.lock b/flake.lock index a8c27d93..2a162e2b 100644 Binary files a/flake.lock and b/flake.lock differ diff --git a/flake.nix b/flake.nix index 71ef55f0..1d9edbe4 100644 Binary files a/flake.nix and b/flake.nix differ diff --git a/inputs/default.nix b/inputs/default.nix index a79702d2..ea723e08 100644 --- a/inputs/default.nix +++ b/inputs/default.nix @@ -9,6 +9,11 @@ let repo = "nix-fast-build"; }; + nix-eval-jobs = mkDep { + owner = "nix-community"; + repo = "nix-eval-jobs"; + }; + nix-index-db = mkDep { owner = "Mic92"; repo = "nix-index-database"; @@ -55,9 +60,6 @@ let nixd = mkDep { owner = "nix-community"; repo = "nixd"; - - # FIXME: stay on nix 2.24 for now - rev = "5507bb141efc11cf548e87e39b61da66dfbca9e5"; }; }; diff --git a/inputs/lib.nix b/inputs/lib.nix index e3eb2105..e7d85372 100644 --- a/inputs/lib.nix +++ b/inputs/lib.nix @@ -38,6 +38,7 @@ in rec { (mkOverride "flake-parts") (mkOverride "treefmt-nix") (mkOverride "lib-aggregate") + (mkOverride "nix-eval-jobs") ]; mkDep = info: mkInput (recursiveUpdate info {inputs.nixpkgs.follows = "nixpkgs";}); diff --git a/lib/flake/default.nix b/lib/flake/default.nix index 79d23ee4..9ec48036 100644 --- a/lib/flake/default.nix +++ b/lib/flake/default.nix @@ -4,11 +4,17 @@ inputs: rec { system, nixpkgs, cfg ? {}, + nix ? null, cudaSupport ? false, }: import nixpkgs { inherit system; - overlays = [inputs.self.overlays.build-failures] ++ (cfg.overlays or []); + overlays = + [ + (inputs.self.overlays.nix-version {inherit nix;}) + inputs.self.overlays.build-failures + ] + ++ (cfg.overlays or []); config = { inherit cudaSupport; @@ -24,6 +30,7 @@ inputs: rec { }: ({config, ...}: let pkgs = mkPkgs { cfg = config.nixpkgs; + nix = config.nix.package; inherit system cudaSupport; inherit (inputs) nixpkgs; }; diff --git a/nixosModules/base/packages/default.nix b/nixosModules/base/packages/default.nix index 0a606c71..5441586a 100644 --- a/nixosModules/base/packages/default.nix +++ b/nixosModules/base/packages/default.nix @@ -100,7 +100,7 @@ in { ; }) ++ [ - # This could help as well: nix derivation show -r /run/current-system + # TODO: `depOf` program that looks through `nix derivation show -r /run/current-system` (pkgs.writeShellApplication { name = "listDerivs"; text = '' diff --git a/overlays/default.nix b/overlays/default.nix index 47acc1ef..11060335 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,4 +1,5 @@ {...}: { build-failures = import ./build-failures; + nix-version = import ./nix-version; xdg-desktop-portal-kde = import ./xdg-desktop-portal-kde; } diff --git a/overlays/nix-version/default.nix b/overlays/nix-version/default.nix new file mode 100644 index 00000000..762bfe9f --- /dev/null +++ b/overlays/nix-version/default.nix @@ -0,0 +1,15 @@ +{nix ? null}: ( + final: prev: + builtins.mapAttrs + (n: v: + if nix == null + then prev.${n} + else v) + { + inherit nix; + + nix-serve-ng = prev.nix-serve-ng.override { + inherit nix; + }; + } +) diff --git a/packages/librespot-auth/default.nix b/packages/librespot-auth/default.nix index a0bd5362..80ca6bb5 100644 --- a/packages/librespot-auth/default.nix +++ b/packages/librespot-auth/default.nix @@ -1,4 +1,3 @@ -# FIXME: the source appears to be deprecated https://github.com/dspearson/librespot-auth { lib, fetchFromGitHub, @@ -12,6 +11,7 @@ rustPlatform.buildRustPackage rec { pname = "librespot-auth"; version = "0.1.1"; + # deprecated https://github.com/dspearson/librespot-auth src = fetchFromGitHub { owner = "dspearson"; repo = pname;