nixos/module-overrides: init, override luksroot
This commit is contained in:
parent
b8d79d3515
commit
5f531791f7
2 changed files with 31 additions and 0 deletions
|
@ -24,6 +24,10 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
./module-overrides.nix
|
||||||
|
];
|
||||||
|
|
||||||
# kernel
|
# kernel
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
|
27
nix-os/module-overrides.nix
Normal file
27
nix-os/module-overrides.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
moduleOverrides = [
|
||||||
|
# TODO: Remove after updating to nixos 25.05
|
||||||
|
{
|
||||||
|
# https://github.com/NixOS/nixpkgs/pull/359882
|
||||||
|
disabledModules = [
|
||||||
|
"system/boot/luksroot.nix"
|
||||||
|
];
|
||||||
|
replacementModules = [(builtins.fetchurl {
|
||||||
|
url = "https://raw.githubusercontent.com/amozeo/nixpkgs/728d5806fe6f975ba3843297332d12e13119fe86/nixos/modules/system/boot/luksroot.nix";
|
||||||
|
sha256 = "0s2k8k6rrlwn2zb02q6fkvswln8w4hvh02hm4krqvkh46amyasyy";
|
||||||
|
})];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
toModule = entry: {
|
||||||
|
imports = entry.replacementModules;
|
||||||
|
disabledModules = entry.disabledModules;
|
||||||
|
_file = let
|
||||||
|
info = builtins.unsafeGetAttrPos "disabledModules" entry;
|
||||||
|
in "${info.file}:L${info.line}";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = lib.map toModule moduleOverrides;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue