refactor: set extraGroups for printing/scanners in
NixOS module
This commit is contained in:
parent
c8a724a785
commit
bb72a79076
|
@ -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 = {
|
||||||
|
|
|
@ -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"
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue