From 0f9ffb552dcbe59a1f8ee518bbb9a34c35e0dfd7 Mon Sep 17 00:00:00 2001 From: zack Date: Tue, 20 May 2025 11:06:40 -0400 Subject: [PATCH] fix: libvirt hooks getting deleted at boot god nixos is so fucking cool --- overlays/libvirt-hooks/defualt.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 overlays/libvirt-hooks/defualt.nix diff --git a/overlays/libvirt-hooks/defualt.nix b/overlays/libvirt-hooks/defualt.nix new file mode 100644 index 0000000..cc36843 --- /dev/null +++ b/overlays/libvirt-hooks/defualt.nix @@ -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 {}; + }; + } + ]; + }; +}