fix: libvirt hooks getting deleted at boot
god nixos is so fucking cool
This commit is contained in:
parent
caf9810290
commit
0f9ffb552d
1 changed files with 28 additions and 0 deletions
28
overlays/libvirt-hooks/defualt.nix
Normal file
28
overlays/libvirt-hooks/defualt.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
self: super: {
|
||||
# We are overriding the libvirtd entry in nixosModules
|
||||
nixosModules =
|
||||
super.nixosModules
|
||||
// {
|
||||
libvirtd = {
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
} @ args: let
|
||||
# Import and evaluate the original libvirtd module definition
|
||||
# super.nixosModules.libvirtd is typically the path to the original module file
|
||||
originalModule = import super.nixosModules.libvirtd args;
|
||||
in
|
||||
lib.mkMerge [
|
||||
# Include everything from the original module (its options, config assignments, etc.)
|
||||
originalModule
|
||||
|
||||
# Add our overriding configuration
|
||||
{
|
||||
config = lib.mkIf config.virtualisation.libvirtd.enable {
|
||||
virtualisation.libvirtd.hooks = lib.mkForce {};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue