[faunus-ater] Prepare printing server setup
This commit is contained in:
parent
490c4cafb0
commit
71f8c06a28
|
@ -26,6 +26,7 @@ in {
|
|||
|
||||
# === Settings ===
|
||||
settings.ssh.openOutsideVPN = true;
|
||||
settings.printing.enable = true;
|
||||
|
||||
# === ZFS services ===
|
||||
services.zfs.trim.enable = true;
|
||||
|
@ -40,6 +41,33 @@ in {
|
|||
cpuFreqGovernor = "powersave";
|
||||
};
|
||||
|
||||
# === Extend printing settings because sharing is caring ===
|
||||
services.printing = {
|
||||
listenAddresses = ["*:631"];
|
||||
allowFrom = [ "all" "@IF(${vpnInterface})" ];
|
||||
defaultShared = true;
|
||||
browsing = true;
|
||||
logLevel = "debug";
|
||||
};
|
||||
networking.firewall.interfaces.${vpnInterface} = {
|
||||
allowedUDPPorts = [631];
|
||||
allowedTCPPorts = [631];
|
||||
};
|
||||
hardware.printers = {
|
||||
ensureDefaultPrinter = "Local";
|
||||
ensurePrinters = lib.singleton {
|
||||
description = "The fastest Boi in town!";
|
||||
deviceUri = "usb://Samsung/ML-1640%20Series?serial=144QBAHS600499T.";
|
||||
location = "@Home";
|
||||
model = "samsung/ML-1640.ppd";
|
||||
name = "Local";
|
||||
ppdOptions = {
|
||||
PageSize = "A4";
|
||||
Resolution = "600dpi";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.backend = "podman";
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
|
|
|
@ -167,7 +167,7 @@ in {
|
|||
drivers = [pkgs.samsung-unified-linux-driver];
|
||||
};
|
||||
hardware.printers = lib.mkIf cfg.printing.enable {
|
||||
ensureDefaultPrinter = "Laser-Boi";
|
||||
ensureDefaultPrinter = mkDefault "Laser-Boi";
|
||||
ensurePrinters = lib.singleton {
|
||||
description = "The fastest Boi in town!";
|
||||
deviceUri = "usb://Samsung/ML-1640%20Series?serial=144QBAHS600499T.";
|
||||
|
|
Loading…
Reference in a new issue