aboutsummaryrefslogtreecommitdiff
path: root/share/system/virt.nix
diff options
context:
space:
mode:
Diffstat (limited to 'share/system/virt.nix')
-rw-r--r--share/system/virt.nix18
1 files changed, 13 insertions, 5 deletions
diff --git a/share/system/virt.nix b/share/system/virt.nix
index 6f5a9fe..ac74332 100644
--- a/share/system/virt.nix
+++ b/share/system/virt.nix
@@ -1,10 +1,18 @@
-{ pkgs, virt-users ? [ ], ... }:
+{
+ pkgs,
+ virt-users ? [ ],
+ ...
+}:
let
# https://stackoverflow.com/questions/75855410/nix-map-list-of-keys-to-attribute-set-members
- attrSetRepeatValue = value: list:
- let acc = { }; # accumulator
- in builtins.foldl' (acc: key: acc // { "${key}" = value; }) acc list;
-in {
+ attrSetRepeatValue =
+ value: list:
+ let
+ acc = { }; # accumulator
+ in
+ builtins.foldl' (acc: key: acc // { "${key}" = value; }) acc list;
+in
+{
users.users = attrSetRepeatValue { extraGroups = [ "libvirtd" ]; } virt-users;
home-manager.users = attrSetRepeatValue {