print server for merlin

This commit is contained in:
Sam 2025-01-24 12:33:21 +00:00
parent cc351fda28
commit 04695d4526
4 changed files with 49 additions and 1 deletions

View File

@ -0,0 +1,46 @@
{pkgs, ...}: {
networking.firewall = {
allowedTCPPorts = [631];
allowedUDPPorts = [631];
};
services = {
printing = {
enable = true;
drivers = [pkgs.hplip];
browsing = true;
defaultShared = true;
listenAddresses = ["*:631"];
allowFrom = ["all"];
extraConf = ''
DefaultPaperSize A4
'';
};
avahi = {
enable = true;
nssmdns = true;
openFirewall = true;
publish = {
enable = true;
userServices = true;
};
};
};
hardware.printers = {
ensurePrinters = [
{
name = "HP_Envy_6000";
location = "Home";
deviceUri = "usb://HP/ENVY%206000%20series?serial=TH0B93F08W&interface=1";
# deviceUri = "usb://Dell/1250c%20Color%20Printer?serial=YNP023240";
model = "HP/hp-deskjet_plus_6000_series.ppd.gz";
ppdOptions = {
PageSize = "A4";
};
}
];
ensureDefaultPrinter = "HP_Envy_6000";
};
}

View File

@ -29,7 +29,7 @@ in {
{
name = "HP_ENVY_6000";
description = "Network printer hosted on bob";
location = "bob";
location = "home";
deviceUri = "ipp://bob/printers/HP_ENVY_6000_series";
model = "everywhere";
ppdOptions = {

View File

@ -48,6 +48,7 @@ in {
../common/optional/docker.nix
../common/optional/nix-ld.nix
../common/optional/fileserver/nfs-server/homeshare.nix
../common/optional/print-server.nix
# Nixos containers
../common/optional/nixos-containers/docker.nix

View File

@ -28,6 +28,7 @@ in
remote = lib.mkOption {
type = lib.types.str;
description = "Attempts build on remote host <user@host>.";
default = "";
};
onCalendar = lib.mkOption {
default = "daily";