format all

This commit is contained in:
Kopatz
2025-10-30 21:59:31 +01:00
parent b1dda4d037
commit 8a78e618bb
188 changed files with 3526 additions and 1825 deletions

View File

@@ -1,14 +1,20 @@
{ lib, config, pkgs, ... }:
{
lib,
config,
pkgs,
...
}:
with lib;
let cfg = config.custom.virt-manager;
in {
let
cfg = config.custom.virt-manager;
in
{
options.custom.virt-manager = {
enable = mkEnableOption "Enables virt-manager";
};
config = mkIf cfg.enable {
programs.dconf.enable =
true; # virt-manager requires dconf to remember settings
programs.dconf.enable = true; # virt-manager requires dconf to remember settings
environment.systemPackages = with pkgs; [ virtiofsd ];
environment.sessionVariables.GSETTINGS_BACKEND = "keyfile";
boot.extraModprobeConfig = ''
@@ -25,19 +31,31 @@ in {
};
hooks.qemu = {
# doesnt work, screen just freezes. no error in libvirt logs though, so idk how to fix it
"passthrough" = lib.getExe (pkgs.writeShellApplication {
name = "qemu-hook";
excludeShellChecks = [ "SC2046" "SC2086" ];
"passthrough" = lib.getExe (
pkgs.writeShellApplication {
name = "qemu-hook";
excludeShellChecks = [
"SC2046"
"SC2086"
];
runtimeInputs = with pkgs; [ libvirt systemd kmod ];
text = builtins.readFile ./hook.sh;
});
runtimeInputs = with pkgs; [
libvirt
systemd
kmod
];
text = builtins.readFile ./hook.sh;
}
);
};
};
spiceUSBRedirection.enable = true;
};
services.spice-vdagentd.enable = true;
users.users.${config.mainUser.name}.extraGroups =
[ "libvirtd" "kvm" "input" ];
users.users.${config.mainUser.name}.extraGroups = [
"libvirtd"
"kvm"
"input"
];
};
}