refactor: set extraGroups for printing/scanners in

NixOS module
This commit is contained in:
teutat3s 2024-01-25 19:17:34 +01:00
parent c8a724a785
commit bb72a79076
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1
2 changed files with 8 additions and 3 deletions

View file

@ -4,7 +4,10 @@
pkgs, pkgs,
lib, lib,
... ...
}: { }:
with lib; let
psCfg = config.pub-solar;
in {
services.avahi.enable = true; services.avahi.enable = true;
services.avahi.ipv6 = true; services.avahi.ipv6 = true;
services.avahi.nssmdns = true; services.avahi.nssmdns = true;
@ -22,6 +25,10 @@
then [ pkgs.cups-brother-hl3140cw ] then [ pkgs.cups-brother-hl3140cw ]
else []); else []);
users.users."${psCfg.user.name}" = {
extraGroups = ["lp" "scanner"];
};
networking.hosts = flake.self.lib.addLocalHostname ["cups.local"]; networking.hosts = flake.self.lib.addLocalHostname ["cups.local"];
services.caddy = { services.caddy = {

View file

@ -68,9 +68,7 @@ with lib; {
description = psCfg.user.description; description = psCfg.user.description;
extraGroups = [ extraGroups = [
"input" "input"
"lp"
"networkmanager" "networkmanager"
"scanner"
"video" "video"
"wheel" "wheel"
]; ];