feat: use local version of nix-fast-build

This commit is contained in:
matt1432 2024-05-01 10:21:27 -04:00
parent b12b2e2911
commit e1d746b0f5
5 changed files with 213 additions and 23 deletions

View file

@ -30,14 +30,16 @@
boot.tmp.useTmpfs = true;
nix = {
# Allow deleting store files with '.' in the name
package = pkgs.nix.overrideAttrs (o: {
patches =
(o.patches or [])
++ [
./overlays/nix/patch
];
# FIXME: https://github.com/nix-community/home-manager/issues/4692#issuecomment-2054003365
package = pkgs.nixVersions.unstable.overrideAttrs (o: {
src = pkgs.fetchFromGitHub {
owner = "NixOS";
repo = "nix";
rev = "60824fa97c588a0faf68ea61260a47e388b0a4e5";
sha256 = "10z/SoidVl9/lh56cMLj7ntJZHtVrumFvmn1YEqXmaM=";
};
});
# Edit nix.conf
settings = {
# Store

View file

@ -10,7 +10,7 @@
...
}: let
inherit (config.vars) hostName mainUser neovimIde;
inherit (lib) fileContents hasPrefix mdDoc optionalAttrs optionals removePrefix;
inherit (lib) fileContents hasPrefix optionalAttrs optionals removePrefix;
javaSdk = pkgs.temurin-bin-17;
coc-stylelintplus-flake = coc-stylelintplus.packages.${pkgs.system}.default;

View file

@ -1,14 +1,19 @@
{
config,
nix-eval-jobs,
nix-fast-build,
pkgs,
...
}: let
inherit (config.vars) mainUser;
inherit (config.sops) secrets;
nix-fast-buildPkg = pkgs.writeShellApplication {
name = "nix-fast-build";
text = "nix run github:Mic92/nix-fast-build \"$@\"";
nixPkg = {
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;
};
in {
services.nix-serve = {
@ -31,7 +36,6 @@ in {
path = with pkgs; [
git
nix
nix-fast-buildPkg
openssh
];

View file

@ -248,7 +248,10 @@
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
"nixpkgs-lib": [
"nix-eval-jobs",
"nixpkgs"
]
},
"locked": {
"lastModified": 1712014858,
@ -265,6 +268,24 @@
}
},
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1698882062,
"narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "8c9fa2545007b49a5db5f650ae91f227672c3877",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_5": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
@ -282,7 +303,25 @@
"type": "github"
}
},
"flake-parts_5": {
"flake-parts_6": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_3"
},
"locked": {
"lastModified": 1712014858,
"narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_7": {
"inputs": {
"nixpkgs-lib": [
"nixpkgs-wayland",
@ -734,7 +773,7 @@
"lib-aggregate": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs-lib": "nixpkgs-lib_3"
"nixpkgs-lib": "nixpkgs-lib_4"
},
"locked": {
"lastModified": 1713701427,
@ -786,9 +825,11 @@
},
"nix-eval-jobs": {
"inputs": {
"flake-parts": "flake-parts_5",
"flake-parts": "flake-parts_3",
"nix-github-actions": "nix-github-actions",
"nixpkgs": "nixpkgs_6",
"nixpkgs": [
"nixpkgs"
],
"treefmt-nix": "treefmt-nix"
},
"locked": {
@ -805,6 +846,49 @@
"type": "github"
}
},
"nix-eval-jobs_2": {
"inputs": {
"flake-parts": "flake-parts_7",
"nix-github-actions": "nix-github-actions_2",
"nixpkgs": "nixpkgs_6",
"treefmt-nix": "treefmt-nix_3"
},
"locked": {
"lastModified": 1713858845,
"narHash": "sha256-StJq7Zy+/iVBUAKFzhHWlsirFucZ3gNtzXhAYXAsNnw=",
"owner": "nix-community",
"repo": "nix-eval-jobs",
"rev": "7b6640f2a10701bf0db16aff048070f400e8ea7c",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-eval-jobs",
"type": "github"
}
},
"nix-fast-build": {
"inputs": {
"flake-parts": "flake-parts_4",
"nixpkgs": [
"nixpkgs"
],
"treefmt-nix": "treefmt-nix_2"
},
"locked": {
"lastModified": 1713864757,
"narHash": "sha256-eBh+4DLKktrMWh0QfSFwugd4Gf2KO/X0VUTlRspR+9I=",
"owner": "Mic92",
"repo": "nix-fast-build",
"rev": "f024a66e6a1f83de95aba109287a97dd6ca76127",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "nix-fast-build",
"type": "github"
}
},
"nix-formatter-pack": {
"inputs": {
"nixpkgs": [
@ -830,7 +914,7 @@
},
"nix-gaming": {
"inputs": {
"flake-parts": "flake-parts_3",
"flake-parts": "flake-parts_5",
"nixpkgs": "nixpkgs_2"
},
"locked": {
@ -848,6 +932,27 @@
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
"nix-eval-jobs",
"nixpkgs"
]
},
"locked": {
"lastModified": 1703863825,
"narHash": "sha256-rXwqjtwiGKJheXB43ybM8NwWB8rO2dSRrEqes0S7F5Y=",
"owner": "nix-community",
"repo": "nix-github-actions",
"rev": "5163432afc817cf8bd1f031418d1869e4c9d5547",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-github-actions",
"type": "github"
}
},
"nix-github-actions_2": {
"inputs": {
"nixpkgs": [
"nixpkgs-wayland",
@ -936,7 +1041,7 @@
},
"nixd": {
"inputs": {
"flake-parts": "flake-parts_4",
"flake-parts": "flake-parts_6",
"flake-root": "flake-root",
"nixpkgs": "nixpkgs_4"
},
@ -1005,11 +1110,11 @@
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1711703276,
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
"lastModified": 1698611440,
"narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
"rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735",
"type": "github"
},
"original": {
@ -1039,6 +1144,24 @@
}
},
"nixpkgs-lib_3": {
"locked": {
"dir": "lib",
"lastModified": 1711703276,
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib_4": {
"locked": {
"lastModified": 1713660444,
"narHash": "sha256-2bVnrEGyWJhRNKspzfTJmVD/fsH9HQURD4cWpz79Ulw=",
@ -1089,7 +1212,7 @@
"inputs": {
"flake-compat": "flake-compat",
"lib-aggregate": "lib-aggregate",
"nix-eval-jobs": "nix-eval-jobs",
"nix-eval-jobs": "nix-eval-jobs_2",
"nixpkgs": "nixpkgs_7"
},
"locked": {
@ -1549,6 +1672,8 @@
"jellyfin-ultrachromic-src": "jellyfin-ultrachromic-src",
"modernx-src": "modernx-src",
"nh": "nh",
"nix-eval-jobs": "nix-eval-jobs",
"nix-fast-build": "nix-fast-build",
"nix-gaming": "nix-gaming",
"nix-index-db": "nix-index-db",
"nix-melt": "nix-melt",
@ -1815,6 +1940,48 @@
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"nix-eval-jobs",
"nixpkgs"
]
},
"locked": {
"lastModified": 1714058656,
"narHash": "sha256-Qv4RBm4LKuO4fNOfx9wl40W2rBbv5u5m+whxRYUMiaA=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "c6aaf729f34a36c445618580a9f95a48f5e4e03f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_2": {
"inputs": {
"nixpkgs": [
"nix-fast-build",
"nixpkgs"
]
},
"locked": {
"lastModified": 1698438538,
"narHash": "sha256-AWxaKTDL3MtxaVTVU5lYBvSnlspOS0Fjt8GxBgnU0Do=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "5deb8dc125a9f83b65ca86cf0c8167c46593e0b1",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_3": {
"inputs": {
"nixpkgs": [
"nixpkgs-wayland",

View file

@ -152,6 +152,7 @@
type = "github";
owner = "Mic92";
repo = "sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
@ -355,6 +356,22 @@
owner = "nix-community";
repo = "nix-melt";
};
nix-eval-jobs = {
type = "github";
owner = "nix-community";
repo = "nix-eval-jobs";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-fast-build = {
type = "github";
owner = "Mic92";
repo = "nix-fast-build";
inputs.nixpkgs.follows = "nixpkgs";
};
#
# -= Non-flake inputs =-