use content addressing
This commit is contained in:
parent
6c7560cba0
commit
bfda34453b
3 changed files with 39 additions and 4 deletions
19
flake.lock
19
flake.lock
|
@ -272,6 +272,22 @@
|
||||||
"type": "github"
|
"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": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"attic": "attic",
|
"attic": "attic",
|
||||||
|
@ -280,7 +296,8 @@
|
||||||
"gomod2nix": "gomod2nix",
|
"gomod2nix": "gomod2nix",
|
||||||
"hydra": "hydra",
|
"hydra": "hydra",
|
||||||
"mautrix-cleanup": "mautrix-cleanup",
|
"mautrix-cleanup": "mautrix-cleanup",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"per-system-optim": "per-system-optim"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
|
|
11
flake.nix
11
flake.nix
|
@ -26,6 +26,10 @@
|
||||||
hydra = {
|
hydra = {
|
||||||
url = "git+https://git.chir.rs/darkkirb/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 = {
|
outputs = {
|
||||||
|
@ -33,14 +37,17 @@
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
flake-utils,
|
flake-utils,
|
||||||
hydra,
|
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
|
system: let
|
||||||
pkgs = import nixpkgs {
|
nixpkgs-patched = (import "${per-system-optim}/nixpkgs/eval.nix" {inherit nixpkgs;}).${system};
|
||||||
|
pkgs = import nixpkgs-patched {
|
||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
config.allowUnsupportedSystem = true;
|
config.allowUnsupportedSystem = true;
|
||||||
|
config.contentAddressedByDefault = true;
|
||||||
overlays = [
|
overlays = [
|
||||||
self.overlays.${system}.default
|
self.overlays.${system}.default
|
||||||
];
|
];
|
||||||
|
|
|
@ -3,13 +3,24 @@
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
system,
|
system,
|
||||||
}: let
|
}: let
|
||||||
pkgs = import nixpkgs {
|
pkgs' = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
config = {
|
config = {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
allowUnsupportedSystem = 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-patched {
|
||||||
|
inherit system;
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
allowUnsupportedSystem = true;
|
||||||
|
contentAddressedByDefault = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
ci = import nix-packages {inherit pkgs;};
|
ci = import nix-packages {inherit pkgs;};
|
||||||
isReserved = n: n == "lib" || n == "overlays" || n == "modules";
|
isReserved = n: n == "lib" || n == "overlays" || n == "modules";
|
||||||
in
|
in
|
||||||
|
|
Reference in a new issue