l 2 libvirt: add lass to libvirtd
This commit is contained in:
parent
c37b42b702
commit
512f90d100
@ -1,23 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
{
|
||||||
mainUser = config.users.extraUsers.mainUser;
|
users.users.mainUser.extraGroups = [ "libvirtd" ];
|
||||||
inherit (import <stockholm/lib>) genid;
|
|
||||||
|
|
||||||
in {
|
|
||||||
virtualisation.libvirtd.enable = true;
|
virtualisation.libvirtd.enable = true;
|
||||||
|
|
||||||
users.extraUsers = {
|
|
||||||
libvirt = {
|
|
||||||
uid = 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