From 08b2989e5e8e85995cb9de265f56d5d5bef42709 Mon Sep 17 00:00:00 2001 From: Simon Cornet Date: Sun, 24 Mar 2024 21:24:55 +0100 Subject: [PATCH] [virt-manager] enabled --- nix/home/default.nix | 1 + nix/home/virt-manager/default.nix | 1 + nix/home/virt-manager/virt-manager.nix | 11 +++++++++++ nix/systems/default.nix | 1 + nix/systems/simon.nix | 2 +- nix/systems/virt-manager.nix | 7 +++++++ 6 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 nix/home/virt-manager/default.nix create mode 100644 nix/home/virt-manager/virt-manager.nix create mode 100644 nix/systems/virt-manager.nix diff --git a/nix/home/default.nix b/nix/home/default.nix index c0ca639..8f60908 100644 --- a/nix/home/default.nix +++ b/nix/home/default.nix @@ -10,6 +10,7 @@ ./mpv ./ssh ./theme + ./virt-manager ./xdg ./zsh ]; diff --git a/nix/home/virt-manager/default.nix b/nix/home/virt-manager/default.nix new file mode 100644 index 0000000..4b5c9bb --- /dev/null +++ b/nix/home/virt-manager/default.nix @@ -0,0 +1 @@ +{ ... }: { imports = [ ./virt-manager.nix ]; } diff --git a/nix/home/virt-manager/virt-manager.nix b/nix/home/virt-manager/virt-manager.nix new file mode 100644 index 0000000..d112785 --- /dev/null +++ b/nix/home/virt-manager/virt-manager.nix @@ -0,0 +1,11 @@ +{ config, ... }: +{ + + # dconf settings for virt-manager + dconf.settings = { + "org/virt-manager/virt-manager/connections" = { + autoconnect = ["qemu:///system"]; + uris = ["qemu:///system"]; + }; + }; +} diff --git a/nix/systems/default.nix b/nix/systems/default.nix index 4fdf5c8..fc103b9 100644 --- a/nix/systems/default.nix +++ b/nix/systems/default.nix @@ -12,6 +12,7 @@ ./security.nix ./simon.nix ./sound.nix + ./virt-manager.nix ]; # system state version diff --git a/nix/systems/simon.nix b/nix/systems/simon.nix index 45d46d5..b76a20e 100644 --- a/nix/systems/simon.nix +++ b/nix/systems/simon.nix @@ -7,7 +7,7 @@ users.users.simon = { isNormalUser = true; description = "Simon Cornet"; - extraGroups = [ "networkmanager" "wheel" ]; + extraGroups = [ "libvirtd" "networkmanager" "wheel" ]; initialPassword = "changeme"; shell = pkgs.zsh; }; diff --git a/nix/systems/virt-manager.nix b/nix/systems/virt-manager.nix new file mode 100644 index 0000000..0e53922 --- /dev/null +++ b/nix/systems/virt-manager.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: { + + # setup virt-manager + virtualisation.libvirtd.enable = true; + programs.virt-manager.enable = true; + +}