refactor: reduce amount of nix versions
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-05-29 21:05:19 -04:00
parent 7893d37df5
commit e692c2eee0
9 changed files with 53 additions and 44 deletions

View file

@ -26,17 +26,8 @@
boot.tmp.useTmpfs = true; boot.tmp.useTmpfs = true;
nix = { nix = {
# Keep a version that works with nix-eval-jobs # See $FLAKE/common/overlays/nix-package.nix
package = pkgs.nixVersions.git.overrideAttrs (oldAttrs: { package = pkgs.nix;
pname = "nix";
version = "2.21.3";
src = pkgs.fetchFromGitHub {
owner = "NixOS";
repo = "nix";
rev = "60824fa97c588a0faf68ea61260a47e388b0a4e5";
sha256 = "10z/SoidVl9/lh56cMLj7ntJZHtVrumFvmn1YEqXmaM=";
};
});
# Edit nix.conf # Edit nix.conf
settings = { settings = {
@ -107,7 +98,10 @@
home.packages = home.packages =
[ [
nix-melt.packages.${pkgs.system}.default 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; [ ++ (with config.nur.repos.rycee; [
mozilla-addons-to-nix mozilla-addons-to-nix

View file

@ -2,9 +2,10 @@
programs.direnv = { programs.direnv = {
enable = true; enable = true;
enableBashIntegration = true; enableBashIntegration = true;
nix-direnv = { nix-direnv = {
enable = true; enable = true;
package = pkgs.nix-direnv-flakes; package = pkgs.nix-direnv;
}; };
}; };
} }

View file

@ -27,5 +27,14 @@
usbutils usbutils
wget wget
zip 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
'';
})
];
} }

View file

@ -4,6 +4,7 @@
... ...
} @ inputs: [ } @ inputs: [
(import ./dracula-theme inputs) (import ./dracula-theme inputs)
(import ./nix-package.nix)
grim-hyprland.overlays.default grim-hyprland.overlays.default
nixpkgs-wayland.overlay nixpkgs-wayland.overlay

View file

@ -0,0 +1,12 @@
(self: super: {
nix = self.nixVersions.nix_2_21.overrideAttrs (o: {
pname = "nix";
version = "2.21.3";
src = self.fetchFromGitHub {
owner = "NixOS";
repo = "nix";
rev = "60824fa97c588a0faf68ea61260a47e388b0a4e5";
sha256 = "10z/SoidVl9/lh56cMLj7ntJZHtVrumFvmn1YEqXmaM=";
};
});
})

View file

@ -8,12 +8,16 @@
inherit (config.vars) mainUser; inherit (config.vars) mainUser;
inherit (config.sops) secrets; inherit (config.sops) secrets;
nixPkg = { nix-eval-jobsPkg =
nix = config.nix.package; 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-fast-buildPkg = nix-fast-build.packages.${pkgs.system}.nix-fast-build.override {
nix-eval-jobs = nix-eval-jobs = nix-eval-jobsPkg;
nix-eval-jobs.packages.${pkgs.system}.default.override nixPkg // nixPkg;
}; };
in { in {
services.nix-serve = { services.nix-serve = {

View file

@ -1532,22 +1532,6 @@
"type": "github" "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": { "nmd": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -1639,18 +1623,20 @@
}, },
"nurl": { "nurl": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_3" "nixpkgs": [
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1708368674, "lastModified": 1717025176,
"narHash": "sha256-QzvpuikAHHHN91pDkBDoUx3x8LJVHbk2JDwYXe87WCc=", "narHash": "sha256-3S6pdNj+ui0fX1tBtWQlEYIuY3Uy3xiSzjfMxAjSlD8=",
"owner": "nix-community", "owner": "matt1432",
"repo": "nurl", "repo": "nurl",
"rev": "7f789ea2da9ff52724efb38df01ecda87704fc87", "rev": "1086a09f386d76e93fa6db46e0d002e4f5dc12c0",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "matt1432",
"repo": "nurl", "repo": "nurl",
"type": "github" "type": "github"
} }

View file

@ -244,7 +244,8 @@
type = "github"; type = "github";
}; };
nurl = { nurl = {
owner = "nix-community"; inputs.nixpkgs.follows = "nixpkgs";
owner = "matt1432";
repo = "nurl"; repo = "nurl";
type = "github"; type = "github";
}; };

View file

@ -9,8 +9,8 @@ let
# Inputs # Inputs
nixTools = { nixTools = {
nurl = mkInput { nurl = mkDep {
owner = "nix-community"; owner = "matt1432";
repo = "nurl"; repo = "nurl";
}; };
@ -58,6 +58,7 @@ let
repo = "stylelint-lsp"; repo = "stylelint-lsp";
}; };
# uses nixVersions.nix_2_19
nixd = mkDep { nixd = mkDep {
owner = "nix-community"; owner = "nix-community";
repo = "nixd"; repo = "nixd";