From c97a1d66084aaf50ca816d9c482f296d31346f9f Mon Sep 17 00:00:00 2001 From: Miran Bastaja Date: Sat, 6 Jul 2024 06:48:40 +0200 Subject: formatting --- share/system/virt.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'share/system/virt.nix') 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 { -- cgit v1.3.1