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
auto
] ++ optionals graphical [
# tlpui
tlpui
] ++ optional enable_perf_policy x86_energy_perf_policy;
services.acpid = {

View file

@ -2,6 +2,14 @@
let
nivSources = import ./nix/sources.nix;
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
{
imports = [
@ -12,11 +20,23 @@ in
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: {
agenix = final.callPackage "${nivSources.agenix}/pkgs/agenix.nix" { };
});
nixpkgs.overlays = lib.singleton (
final: prev: { agenix = final.callPackage "${nivSources.agenix}/pkgs/agenix.nix" { }; }
);
nix.settings.extra-substituters = [
"https://cache.lix.systems"