diff --git a/common/default.nix b/common/default.nix index 050fd083..a4464a4c 100644 --- a/common/default.nix +++ b/common/default.nix @@ -26,7 +26,6 @@ boot.tmp.useTmpfs = true; nix = { - # Keep a version that works with nix-eval-jobs package = pkgs.nixVersions.git.overrideAttrs (oldAttrs: { pname = "nix"; version = "2.21.3"; @@ -107,7 +106,10 @@ home.packages = [ nix-melt.packages.${pkgs.system}.default - nurl.packages.${pkgs.system}.default + + (nurl.packages.${pkgs.system}.default.override { + nix = config.nix.package; + }) ] ++ (with config.nur.repos.rycee; [ mozilla-addons-to-nix diff --git a/common/home/direnv/default.nix b/common/home/direnv/default.nix index f4152f1a..84f63107 100644 --- a/common/home/direnv/default.nix +++ b/common/home/direnv/default.nix @@ -2,9 +2,10 @@ programs.direnv = { enable = true; enableBashIntegration = true; + nix-direnv = { enable = true; - package = pkgs.nix-direnv-flakes; + package = pkgs.nix-direnv; }; }; } diff --git a/common/home/packages.nix b/common/home/packages.nix index b50fa605..fcf2fa2a 100644 --- a/common/home/packages.nix +++ b/common/home/packages.nix @@ -27,5 +27,14 @@ usbutils wget zip - ]); + ]) + ++ [ + # This could help as well: nix derivation show -r /run/current-system + (pkgs.writeShellApplication { + name = "listDerivs"; + text = '' + nix-store --query --requisites /run/current-system | cut -d- -f2- | sort -u + ''; + }) + ]; } diff --git a/common/modules/cachix.nix b/common/modules/cachix.nix index 3fbcb6ae..e3ff38e7 100644 --- a/common/modules/cachix.nix +++ b/common/modules/cachix.nix @@ -1,8 +1,11 @@ { config, + lib, pkgs, ... -}: { +}: let + inherit (lib) optionals; +in { environment.systemPackages = [ (pkgs.writeShellApplication { name = "rebuild-no-cache"; @@ -15,22 +18,25 @@ nix = { settings = { - substituters = [ - "https://hyprland.cachix.org" - "https://nix-gaming.cachix.org" - # Nixpkgs-Wayland - "https://cache.nixos.org" - "https://nixpkgs-wayland.cachix.org" - "https://nix-community.cachix.org" - # Nix-community - "https://nix-community.cachix.org" - # Nh - "https://viperml.cachix.org" - # Caddy - "https://caddycf.cachix.org" - # Personal config cache - "https://cache.nelim.org" - ]; + substituters = + [ + "https://hyprland.cachix.org" + "https://nix-gaming.cachix.org" + # Nixpkgs-Wayland + "https://cache.nixos.org" + "https://nixpkgs-wayland.cachix.org" + "https://nix-community.cachix.org" + # Nix-community + "https://nix-community.cachix.org" + # Nh + "https://viperml.cachix.org" + # Caddy + "https://caddycf.cachix.org" + ] + ++ optionals (!config.services.nix-serve.enable) [ + # Personal config cache + "https://cache.nelim.org" + ]; trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4=" diff --git a/devices/servivi/modules/binary-cache.nix b/devices/servivi/modules/binary-cache.nix index 8bb10d2b..7b16f53c 100644 --- a/devices/servivi/modules/binary-cache.nix +++ b/devices/servivi/modules/binary-cache.nix @@ -8,12 +8,16 @@ inherit (config.vars) mainUser; inherit (config.sops) secrets; - nixPkg = { - nix = config.nix.package; - }; + nix-eval-jobsPkg = + nix-eval-jobs.packages.${pkgs.system}.default.override { + nix = config.nix.package; + } + // { + nix = config.nix.package; + }; + nix-fast-buildPkg = nix-fast-build.packages.${pkgs.system}.nix-fast-build.override { - nix-eval-jobs = - nix-eval-jobs.packages.${pkgs.system}.default.override nixPkg // nixPkg; + nix-eval-jobs = nix-eval-jobsPkg; }; in { services.nix-serve = { diff --git a/flake.lock b/flake.lock index b6b184c4..a62c2c88 100644 --- a/flake.lock +++ b/flake.lock @@ -1532,22 +1532,6 @@ "type": "github" } }, - "nixpkgs_3": { - "locked": { - "lastModified": 1708296515, - "narHash": "sha256-FyF489fYNAUy7b6dkYV6rGPyzp+4tThhr80KNAaF/yY=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "b98a4e1746acceb92c509bc496ef3d0e5ad8d4aa", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nmd": { "flake": false, "locked": { @@ -1639,18 +1623,20 @@ }, "nurl": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1708368674, - "narHash": "sha256-QzvpuikAHHHN91pDkBDoUx3x8LJVHbk2JDwYXe87WCc=", - "owner": "nix-community", + "lastModified": 1717025176, + "narHash": "sha256-3S6pdNj+ui0fX1tBtWQlEYIuY3Uy3xiSzjfMxAjSlD8=", + "owner": "matt1432", "repo": "nurl", - "rev": "7f789ea2da9ff52724efb38df01ecda87704fc87", + "rev": "1086a09f386d76e93fa6db46e0d002e4f5dc12c0", "type": "github" }, "original": { - "owner": "nix-community", + "owner": "matt1432", "repo": "nurl", "type": "github" } diff --git a/flake.nix b/flake.nix index ccea46ab..9de83a81 100644 --- a/flake.nix +++ b/flake.nix @@ -244,7 +244,8 @@ type = "github"; }; nurl = { - owner = "nix-community"; + inputs.nixpkgs.follows = "nixpkgs"; + owner = "matt1432"; repo = "nurl"; type = "github"; }; diff --git a/inputs.nix b/inputs.nix index 44bcd86a..7463b54a 100644 --- a/inputs.nix +++ b/inputs.nix @@ -9,8 +9,8 @@ let # Inputs nixTools = { - nurl = mkInput { - owner = "nix-community"; + nurl = mkDep { + owner = "matt1432"; repo = "nurl"; }; @@ -58,6 +58,7 @@ let repo = "stylelint-lsp"; }; + # uses nixVersions.nix_2_19 nixd = mkDep { owner = "nix-community"; repo = "nixd";