print server for merlin
This commit is contained in:
parent
cc351fda28
commit
04695d4526
|
@ -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";
|
||||
};
|
||||
}
|
|
@ -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 = {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue