{ lib, pkgs, ... }@attrs: let hostname = "${attrs.hostname}"; in { config = lib.mkIf (hostname == "home-nix") { hardware.sane.enable = true; services.ipp-usb.enable = true; hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ]; users.users.${attrs.username}.extraGroups = [ "scanner" "lp" ]; environment.systemPackages = [ pkgs.xsane pkgs.simple-scan pkgs.cups pkgs.hplip ]; }; }