aboutsummaryrefslogtreecommitdiff
path: root/share/system/virt.nix
diff options
context:
space:
mode:
authorMiran Bastaja <miran.bastaja04@gmail.com>2024-07-06 06:48:40 +0200
committerMiran Bastaja <miran.bastaja04@gmail.com>2024-07-06 06:48:40 +0200
commitc97a1d66084aaf50ca816d9c482f296d31346f9f (patch)
treed03726dfb1edfa87b93ca42b9076658c7c50c940 /share/system/virt.nix
parentfed01b401d65e655f565fc5c6304f2ab0d758513 (diff)
formatting
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 {