use content addressing
This commit is contained in:
parent
6c7560cba0
commit
85eb452107
3 changed files with 39 additions and 4 deletions
19
flake.lock
19
flake.lock
|
@ -272,6 +272,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"per-system-optim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1690201962,
|
||||
"narHash": "sha256-tMO6Etv+eOpvodQ0CguzVpha86DxqPlmHdbZGZLZn6M=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "0bd0f0813464742251233df72c8590093a407aa0",
|
||||
"revCount": 10,
|
||||
"type": "git",
|
||||
"url": "https://git.chir.rs/darkkirb/per-system-optim"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.chir.rs/darkkirb/per-system-optim"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"attic": "attic",
|
||||
|
@ -280,7 +296,8 @@
|
|||
"gomod2nix": "gomod2nix",
|
||||
"hydra": "hydra",
|
||||
"mautrix-cleanup": "mautrix-cleanup",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"per-system-optim": "per-system-optim"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
|
|
11
flake.nix
11
flake.nix
|
@ -26,6 +26,10 @@
|
|||
hydra = {
|
||||
url = "git+https://git.chir.rs/darkkirb/hydra";
|
||||
};
|
||||
per-system-optim = {
|
||||
url = "git+https://git.chir.rs/darkkirb/per-system-optim";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
|
@ -33,14 +37,17 @@
|
|||
nixpkgs,
|
||||
flake-utils,
|
||||
hydra,
|
||||
per-system-optim,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachSystem ["aarch64-darwin" "aarch64-linux" "x86_64-darwin" "x86_64-linux" "riscv64-linux"] (
|
||||
flake-utils.lib.eachSystem ["aarch64-linux" "x86_64-linux" "riscv64-linux"] (
|
||||
system: let
|
||||
pkgs = import nixpkgs {
|
||||
nixpkgs-patched = (import "${per-system-optim}/nixpkgs/eval.nix" {inherit nixpkgs;}).${system};
|
||||
pkgs = import nixpkgs-patched {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
config.allowUnsupportedSystem = true;
|
||||
config.contentAddressedByDefault = true;
|
||||
overlays = [
|
||||
self.overlays.${system}.default
|
||||
];
|
||||
|
|
|
@ -3,13 +3,24 @@
|
|||
nixpkgs,
|
||||
system,
|
||||
}: let
|
||||
pkgs = import nixpkgs {
|
||||
pkgs' = import nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnsupportedSystem = true;
|
||||
};
|
||||
};
|
||||
lib = import ../lib {pkgs = pkgs';};
|
||||
flake = (lib.importFlake {inherit system;}).defaultNix;
|
||||
nixpkgs-patched = (import "${flake.inputs.per-system-optim}/nixpkgs/eval.nix" {inherit nixpkgs;}).${system};
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnsupportedSystem = true;
|
||||
contentAddressedByDefault = true;
|
||||
};
|
||||
};
|
||||
ci = import nix-packages {inherit pkgs;};
|
||||
isReserved = n: n == "lib" || n == "overlays" || n == "modules";
|
||||
in
|
||||
|
|
Reference in a new issue