flake input patching :)

This commit is contained in:
LordGrimmauld 2024-04-26 11:44:59 +02:00
parent 919f5d17e4
commit 3dda82d830
4 changed files with 42 additions and 21 deletions

View file

@ -12,9 +12,9 @@ in
usbutils
powertop
ddcutil
# tlpui
] ++ lib.optionals graphical [
ddcui
tlpui
];
# services.ddccontrol.enable = true;

View file

@ -1,4 +1,4 @@
{ pkgs, config, lib, ... }:
{ pkgs, config, lib, inputs, system, ... }:
let
cfg = config.grimmShared;
in
@ -22,6 +22,7 @@ in
libsecret
vulnix
doas-sudo-shim # muscle memory
inputs.agenix.packages.${system}.default
] ++ lib.optionals (tooling.enable && tooling.pass) [
pass
(writeShellScriptBin "passw" "pass $@")

View file

@ -78,11 +78,11 @@
"yafas": "yafas"
},
"locked": {
"lastModified": 1713731828,
"narHash": "sha256-htFugddDpE7ziY/MdxKxD40+JejADwCkN6Ln5D8a0oY=",
"lastModified": 1714043270,
"narHash": "sha256-WTpyfCMHEaGWLKQR0rVTXwxFnGzyC8VYwHYVsOTdf1Q=",
"owner": "chaotic-cx",
"repo": "nyx",
"rev": "60b608762452d4c17ce620cb1075078827f22108",
"rev": "7705ea7bb501453ffb1f085b4ddbdc606f5463f8",
"type": "github"
},
"original": {
@ -485,11 +485,11 @@
]
},
"locked": {
"lastModified": 1713748476,
"narHash": "sha256-FB+tCte2nOOLI7i3YvHFZZsFWDjaq+f5nn4wxt6akTQ=",
"lastModified": 1714093995,
"narHash": "sha256-7oYv0EJ2iqL9MZiB7QRE63nHDVMuyTgukgYZDdjL8Kg=",
"owner": "fufexan",
"repo": "nix-gaming",
"rev": "5dba7fd39730e14f3c54787df23c533dc98e1e0f",
"rev": "a8c2a0e160e1212c67724aa89a823b55d423d157",
"type": "github"
},
"original": {
@ -544,11 +544,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1713714899,
"narHash": "sha256-+z/XjO3QJs5rLE5UOf015gdVauVRQd2vZtsFkaXBq2Y=",
"lastModified": 1714076141,
"narHash": "sha256-Drmja/f5MRHZCskS6mvzFqxEaZMeciScCTFxWVLqWEY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6143fc5eeb9c4f00163267708e26191d1e918932",
"rev": "7bb2ccd8cdc44c91edba16c48d2c8f331fb3d856",
"type": "github"
},
"original": {
@ -594,11 +594,11 @@
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1713725259,
"narHash": "sha256-9ZR/Rbx5/Z/JZf5ehVNMoz/s5xjpP0a22tL6qNvLt5E=",
"lastModified": 1713995372,
"narHash": "sha256-fFE3M0vCoiSwCX02z8VF58jXFRj9enYUSTqjyHAjrds=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a5e4bbcb4780c63c79c87d29ea409abf097de3f7",
"rev": "dd37924974b9202f8226ed5d74a252a9785aedf8",
"type": "github"
},
"original": {

View file

@ -33,14 +33,35 @@
outputs = inputs @ { self, nix-gaming, agenix, hammering, nixpkgs, nixpkgs-stable, nix-locate, chaotic, ... }:
let
system = "x86_64-linux";
stable = import nixpkgs-stable { inherit system; config.allowUnfree = true; };
patches = [
{
url = "https://patch-diff.githubusercontent.com/raw/NixOS/nixpkgs/pull/305278.patch";
hash = "sha256-8RvPI8Id+Ttgv07IMBTAxkSc+K00WhiWgdgrCcULd7o=";
}
];
customNixosSystem = system: definitions:
let
stable = import nixpkgs-stable {
inherit system;
config.allowUnfree = true;
};
patched = let unpatched = nixpkgs.legacyPackages.${system}; in
unpatched.applyPatches {
name = "nixpkgs-patched";
src = inputs.nixpkgs;
patches = map unpatched.fetchpatch patches;
};
nixosSystem = import (patched + "/nixos/lib/eval-config.nix");
in
nixosSystem ({
inherit system;
specialArgs = { inherit inputs system stable; };
} // definitions);
in
{
nixosConfigurations = {
grimmauld-nixos = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs system stable; };
grimmauld-nixos = (customNixosSystem "x86_64-linux" {
modules = [
(import ./overlays)
agenix.nixosModules.default
@ -52,9 +73,8 @@
./modules/users.nix
./modules/system-packages.nix
./modules/kvm.nix
{ environment.systemPackages = [ agenix.packages.${system}.default ]; }
];
};
});
};
};
}