virt only on North

This commit is contained in:
Lennart J. Kurzweg (Nx2)
2024-04-26 16:14:06 +02:00
parent b1a31ad504
commit 93c6fcbd71
2 changed files with 21 additions and 17 deletions

View File

@@ -1,14 +1,16 @@
{ config, pkgs, ... }:
{ config, pkgs, host, ... }:
{
home.packages = with pkgs; [
virt-manager
];
config = pkgs.lib.mkIf (host == "NxNORTH") {
home.packages = with pkgs; [
virt-manager
];
# programs.virt-manager.enable = true; # needs this in virtualization.nix
dconf.settings = {
"org/virt-manager/virt-manager/connections" = {
autoconnect = [ "qemu:///system" ];
uris = [ "qemu:///system" ];
# programs.virt-manager.enable = true; # needs this in virtualization.nix
dconf.settings = {
"org/virt-manager/virt-manager/connections" = {
autoconnect = [ "qemu:///system" ];
uris = [ "qemu:///system" ];
};
};
};
}
}

View File

@@ -1,10 +1,12 @@
{ config, pkgs, user, ... }:
{ config, pkgs, lib, user, host, ... }:
{
environment.systemPackages = with pkgs; [
virtiofsd
];
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
users.users."${user}".extraGroups = [ "libvirtd" ];
config = lib.mkIf (host == "NxNORTH") {
environment.systemPackages = with pkgs; [
virtiofsd
];
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
users.users."${user}".extraGroups = [ "libvirtd" ];
};
}