From de8809f52a7de36de67e12f63becbda772bec267 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 20 Sep 2022 09:21:16 +0800 Subject: [PATCH] aux: fix printer sharing --- aux-etc-nixos/configuration.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/aux-etc-nixos/configuration.nix b/aux-etc-nixos/configuration.nix index eb93ccf..14df73c 100644 --- a/aux-etc-nixos/configuration.nix +++ b/aux-etc-nixos/configuration.nix @@ -97,6 +97,9 @@ in time.timeZone = "Asia/Hong_Kong"; nixpkgs.config.allowUnfree = true; + services.avahi.enable = true; + services.avahi.publish.enable = true; + services.avahi.publish.userServices = true; services.printing.enable = true; services.printing.drivers = [ pkgs.hplipWithPlugin ]; services.printing.browsing = true; @@ -104,6 +107,10 @@ in services.printing.defaultShared = true; hardware.sane.enable = true; 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 = { openssh.authorizedKeys.keys = [