nixos/cupsd: create lpadmin group and add it SystemGroups
Useful for giving users full admin permissions over printing.
This commit is contained in:
parent
d87d101acc
commit
5d4fd2fd9a
@ -71,7 +71,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
cupsFilesFile = writeConf "cups-files.conf" ''
|
cupsFilesFile = writeConf "cups-files.conf" ''
|
||||||
SystemGroup root wheel
|
SystemGroup root wheel lpadmin
|
||||||
|
|
||||||
ServerBin ${bindir}/lib/cups
|
ServerBin ${bindir}/lib/cups
|
||||||
DataDir ${bindir}/share/cups
|
DataDir ${bindir}/share/cups
|
||||||
@ -361,12 +361,17 @@ in
|
|||||||
|
|
||||||
config = mkIf config.services.printing.enable {
|
config = mkIf config.services.printing.enable {
|
||||||
|
|
||||||
users.users.cups = {
|
users = {
|
||||||
|
users.cups = {
|
||||||
uid = config.ids.uids.cups;
|
uid = config.ids.uids.cups;
|
||||||
group = "lp";
|
group = "lp";
|
||||||
description = "CUPS printing services";
|
description = "CUPS printing services";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# It seems that groups provided for `SystemGroup` must exist
|
||||||
|
groups.lpadmin = { };
|
||||||
|
};
|
||||||
|
|
||||||
# We need xdg-open (part of xdg-utils) for the desktop-file to proper open the users default-browser when opening "Manage Printing"
|
# We need xdg-open (part of xdg-utils) for the desktop-file to proper open the users default-browser when opening "Manage Printing"
|
||||||
# https://github.com/NixOS/nixpkgs/pull/237994#issuecomment-1597510969
|
# https://github.com/NixOS/nixpkgs/pull/237994#issuecomment-1597510969
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user