l 2 libvirt: add lass to libvirtd

This commit is contained in:
lassulus 2016-12-26 13:29:06 +01:00
parent c37b42b702
commit 512f90d100

View File

@ -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
'';
} }