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

View file

@ -10,7 +10,7 @@
... ...
}: let }: let
inherit (config.vars) hostName mainUser neovimIde; 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; javaSdk = pkgs.temurin-bin-17;
coc-stylelintplus-flake = coc-stylelintplus.packages.${pkgs.system}.default; coc-stylelintplus-flake = coc-stylelintplus.packages.${pkgs.system}.default;

View file

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

View file

@ -248,7 +248,10 @@
}, },
"flake-parts_3": { "flake-parts_3": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": [
"nix-eval-jobs",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1712014858, "lastModified": 1712014858,
@ -265,6 +268,24 @@
} }
}, },
"flake-parts_4": { "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": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib_2" "nixpkgs-lib": "nixpkgs-lib_2"
}, },
@ -282,7 +303,25 @@
"type": "github" "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": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"nixpkgs-wayland", "nixpkgs-wayland",
@ -734,7 +773,7 @@
"lib-aggregate": { "lib-aggregate": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
"nixpkgs-lib": "nixpkgs-lib_3" "nixpkgs-lib": "nixpkgs-lib_4"
}, },
"locked": { "locked": {
"lastModified": 1713701427, "lastModified": 1713701427,
@ -786,9 +825,11 @@
}, },
"nix-eval-jobs": { "nix-eval-jobs": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_5", "flake-parts": "flake-parts_3",
"nix-github-actions": "nix-github-actions", "nix-github-actions": "nix-github-actions",
"nixpkgs": "nixpkgs_6", "nixpkgs": [
"nixpkgs"
],
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
@ -805,6 +846,49 @@
"type": "github" "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": { "nix-formatter-pack": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -830,7 +914,7 @@
}, },
"nix-gaming": { "nix-gaming": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_3", "flake-parts": "flake-parts_5",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
@ -848,6 +932,27 @@
} }
}, },
"nix-github-actions": { "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": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs-wayland", "nixpkgs-wayland",
@ -936,7 +1041,7 @@
}, },
"nixd": { "nixd": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_4", "flake-parts": "flake-parts_6",
"flake-root": "flake-root", "flake-root": "flake-root",
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_4"
}, },
@ -1005,11 +1110,11 @@
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"dir": "lib", "dir": "lib",
"lastModified": 1711703276, "lastModified": 1698611440,
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=", "narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089", "rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1039,6 +1144,24 @@
} }
}, },
"nixpkgs-lib_3": { "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": { "locked": {
"lastModified": 1713660444, "lastModified": 1713660444,
"narHash": "sha256-2bVnrEGyWJhRNKspzfTJmVD/fsH9HQURD4cWpz79Ulw=", "narHash": "sha256-2bVnrEGyWJhRNKspzfTJmVD/fsH9HQURD4cWpz79Ulw=",
@ -1089,7 +1212,7 @@
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"lib-aggregate": "lib-aggregate", "lib-aggregate": "lib-aggregate",
"nix-eval-jobs": "nix-eval-jobs", "nix-eval-jobs": "nix-eval-jobs_2",
"nixpkgs": "nixpkgs_7" "nixpkgs": "nixpkgs_7"
}, },
"locked": { "locked": {
@ -1549,6 +1672,8 @@
"jellyfin-ultrachromic-src": "jellyfin-ultrachromic-src", "jellyfin-ultrachromic-src": "jellyfin-ultrachromic-src",
"modernx-src": "modernx-src", "modernx-src": "modernx-src",
"nh": "nh", "nh": "nh",
"nix-eval-jobs": "nix-eval-jobs",
"nix-fast-build": "nix-fast-build",
"nix-gaming": "nix-gaming", "nix-gaming": "nix-gaming",
"nix-index-db": "nix-index-db", "nix-index-db": "nix-index-db",
"nix-melt": "nix-melt", "nix-melt": "nix-melt",
@ -1815,6 +1940,48 @@
} }
}, },
"treefmt-nix": { "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": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs-wayland", "nixpkgs-wayland",

View file

@ -152,6 +152,7 @@
type = "github"; type = "github";
owner = "Mic92"; owner = "Mic92";
repo = "sops-nix"; repo = "sops-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@ -355,6 +356,22 @@
owner = "nix-community"; owner = "nix-community";
repo = "nix-melt"; 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 =- # -= Non-flake inputs =-