de-flake: part 4: nixpkgs patching

This commit is contained in:
Grimmauld 2024-05-07 13:41:59 +02:00
parent 6cb0ead41b
commit 462a2c6463
Signed by: Grimmauld
GPG Key ID: C2946668769F91FB
2 changed files with 25 additions and 5 deletions

View File

@ -36,7 +36,7 @@ in
performance performance
auto auto
] ++ optionals graphical [ ] ++ optionals graphical [
# tlpui tlpui
] ++ optional enable_perf_policy x86_energy_perf_policy; ] ++ optional enable_perf_policy x86_energy_perf_policy;
services.acpid = { services.acpid = {

View File

@ -2,6 +2,14 @@
let let
nivSources = import ./nix/sources.nix; nivSources = import ./nix/sources.nix;
asGithubRef = src: "github:${src.owner}/${src.repo}/${src.rev}"; asGithubRef = src: "github:${src.owner}/${src.repo}/${src.rev}";
nixpkgs_patches = [
{
# tlpui
url = "https://patch-diff.githubusercontent.com/raw/NixOS/nixpkgs/pull/305278.patch";
hash = "sha256-8RvPI8Id+Ttgv07IMBTAxkSc+K00WhiWgdgrCcULd7o=";
}
];
in in
{ {
imports = [ imports = [
@ -12,11 +20,23 @@ in
nixpkgs.hostPlatform = "x86_64-linux"; nixpkgs.hostPlatform = "x86_64-linux";
nixpkgs.pkgs = import nivSources.nixpkgs { allowUnfree = true; }; nixpkgs.pkgs =
let
src = nivSources.nixpkgs;
unpatched = import src { allowUnfree = true; };
inherit (unpatched) applyPatches fetchpatch;
in
import
(applyPatches {
name = "nixpkgs-patched";
inherit src;
patches = map fetchpatch nixpkgs_patches;
})
{ };
nixpkgs.overlays = lib.singleton (final: prev: { nixpkgs.overlays = lib.singleton (
agenix = final.callPackage "${nivSources.agenix}/pkgs/agenix.nix" { }; final: prev: { agenix = final.callPackage "${nivSources.agenix}/pkgs/agenix.nix" { }; }
}); );
nix.settings.extra-substituters = [ nix.settings.extra-substituters = [
"https://cache.lix.systems" "https://cache.lix.systems"