From c84419cb781ea162c814455351faf6a6558e7a81 Mon Sep 17 00:00:00 2001 From: Soispha Date: Sat, 20 May 2023 07:48:51 +0200 Subject: Refactor(system/users): Add the groups in the file, giving context --- system/libvirtd/default.nix | 9 ++++----- system/services/scanning/default.nix | 4 ++++ system/users/default.nix | 2 -- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/system/libvirtd/default.nix b/system/libvirtd/default.nix index 5deab740..71a864b3 100644 --- a/system/libvirtd/default.nix +++ b/system/libvirtd/default.nix @@ -1,9 +1,5 @@ # vim: ts=2 -{ - config, - pkgs, - ... -}: { +{pkgs, ...}: { virtualisation = { # cores = 8; # diskSize = 25000; @@ -25,4 +21,7 @@ }; }; }; + users.users.soispha.extraGroups = [ + "libvirtd" # to run libvirt stuff as this user + ]; } diff --git a/system/services/scanning/default.nix b/system/services/scanning/default.nix index b132e915..27e7ccbb 100644 --- a/system/services/scanning/default.nix +++ b/system/services/scanning/default.nix @@ -6,4 +6,8 @@ extraBackends = [pkgs.sane-airscan]; }; }; + + users.users.soispha.extraGroups = [ + "scanner" # for permission to access the scanner. + ]; } diff --git a/system/users/default.nix b/system/users/default.nix index 96925671..2aa67ac3 100644 --- a/system/users/default.nix +++ b/system/users/default.nix @@ -34,8 +34,6 @@ in { extraGroups = [ "plugdev" # although deprecated, this helps with old udev rules, that still use this group. TODO check for an open issue "wheel" - "libvirtd" # needed to run libvirt stuff as this user - "scanner" # needed for permission to access the scanner ]; uid = 1000; openssh.authorizedKeys.keys = [ -- cgit 1.4.1