pinwheel: Add vm module
This commit is contained in:
@@ -56,8 +56,6 @@
|
|||||||
LC_TIME = "en_US.UTF-8";
|
LC_TIME = "en_US.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.dconf.enable = true;
|
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
users.users.alex = {
|
users.users.alex = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
@@ -90,6 +88,7 @@
|
|||||||
keyboard.enable = true;
|
keyboard.enable = true;
|
||||||
docker.enable = true;
|
docker.enable = true;
|
||||||
podman.enable = false;
|
podman.enable = false;
|
||||||
|
vm.enable = true;
|
||||||
scripts.enable = true;
|
scripts.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
33
hosts/pinwheel/modules/vm/default.nix
Normal file
33
hosts/pinwheel/modules/vm/default.nix
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
let
|
||||||
|
enabled = config.mod.vm.enable;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
mod.vm = {
|
||||||
|
enable = lib.mkEnableOption "add vm module";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf enabled {
|
||||||
|
virtualisation.libvirtd.enable = true;
|
||||||
|
|
||||||
|
users.users.alex = {
|
||||||
|
extraGroups = [ "libvirtd" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [ virt-manager ];
|
||||||
|
|
||||||
|
# virt-manager requires dconf to remember settings
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
home-manager.users.alex = {
|
||||||
|
dconf.settings = {
|
||||||
|
"org/virt-manager/virt-manager/connections" = {
|
||||||
|
autoconnect = ["qemu:///system"];
|
||||||
|
uris = ["qemu:///system"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user