aux: fix printer sharing

This commit is contained in:
Sebastien Bourdeauducq 2022-09-20 09:21:16 +08:00
parent 0ce1e64d60
commit de8809f52a
1 changed files with 7 additions and 0 deletions

View File

@ -97,6 +97,9 @@ in
time.timeZone = "Asia/Hong_Kong"; time.timeZone = "Asia/Hong_Kong";
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
services.avahi.enable = true;
services.avahi.publish.enable = true;
services.avahi.publish.userServices = true;
services.printing.enable = true; services.printing.enable = true;
services.printing.drivers = [ pkgs.hplipWithPlugin ]; services.printing.drivers = [ pkgs.hplipWithPlugin ];
services.printing.browsing = true; services.printing.browsing = true;
@ -104,6 +107,10 @@ in
services.printing.defaultShared = true; services.printing.defaultShared = true;
hardware.sane.enable = true; hardware.sane.enable = true;
hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ]; hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ];
systemd.sockets.cups.wants = [ "network-setup.service" ];
systemd.sockets.cups.after = [ "network-setup.service" ];
systemd.sockets.cups.wantedBy = [ "multi-user.target" ];
systemd.services.cups.wantedBy = [ "multi-user.target" ];
users.extraUsers.root = { users.extraUsers.root = {
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [