os/modules/printing/default.nix
teutat3s b81890d769
nixos-unstable: fixes for NixOS 24.05
Wireplumber config changes for bluetooth
pinentryFlavor -> pinentryPackage
alacritty config changed to TOML
alacritty deprecated config fixes
Nix registry now gets generated from flake inputs ->
(nixpkgs.flake.setFlakeRegistry)
nssmdns -> nssmdns4
2024-04-18 12:57:14 +02:00

47 lines
935 B
Nix

{
flake,
config,
pkgs,
lib,
...
}:
with lib; let
psCfg = config.pub-solar;
in {
services.avahi.enable = true;
services.avahi.ipv6 = true;
services.avahi.nssmdns4 = true;
services.avahi.publish.enable = true;
services.avahi.publish.userServices = true;
services.printing.enable = true;
services.printing.browsing = true;
services.printing.listenAddresses = ["localhost:631"];
services.printing.defaultShared = lib.mkDefault false;
services.printing.drivers = [
pkgs.gutenprint
];
hardware.sane = {
enable = true;
brscan5.enable = true;
};
users.users."${psCfg.user.name}" = {
extraGroups = ["lp" "scanner"];
};
networking.hosts = flake.self.lib.addLocalHostname ["cups.local"];
services.caddy = {
enable = true;
extraConfig = ''
cups.local {
request_header Host localhost:631
reverse_proxy unix//run/cups/cups.sock
}
'';
};
}