l 2: add libvirt.nix
This commit is contained in:
parent
e59542f12d
commit
c8b82b0336
22
lass/2configs/libvirt.nix
Normal file
22
lass/2configs/libvirt.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
mainUser = config.users.extraUsers.mainUser;
|
||||
|
||||
in {
|
||||
virtualisation.libvirtd.enable = true;
|
||||
|
||||
users.extraUsers = {
|
||||
libvirt = {
|
||||
uid = 358821352; # genid libvirt
|
||||
description = "user for running libvirt stuff";
|
||||
home = "/home/libvirt";
|
||||
useDefaultShell = true;
|
||||
extraGroups = [ "libvirtd" "audio" ];
|
||||
createHome = true;
|
||||
};
|
||||
};
|
||||
security.sudo.extraConfig = ''
|
||||
${mainUser.name} ALL=(libvirt) NOPASSWD: ALL
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user