Make home print module

This commit is contained in:
Greg Hellings
2024-09-03 20:35:31 -05:00
parent 42e607dc68
commit 643a01e530
5 changed files with 37 additions and 14 deletions
+1
View File
@@ -16,6 +16,7 @@ in {
./kde.nix
./kiwix-serve.nix
./linode.nix
./print.nix
./proxy.nix
./router.nix
./rpi4.nix
+34
View File
@@ -0,0 +1,34 @@
{ config, lib, pkgs, ... }:
let
cfg = config.greg.print;
in with lib;
{
options.greg.print.enable = mkOption {
type = types.bool;
default = true;
description = "Configures the system to print with my home printer";
};
config = mkIf cfg.enable {
# ipp://printer.thehellings.lan:631/ - generic postscript printer
services.printing = {
enable = true;
drivers = with pkgs; [
gutenprint
gutenprintBin
];
};
hardware.printers.ensurePrinters = [ {
name = "HomeLexmarkColorPrinter";
location = "Home office";
deviceUri = "ipp://printer.thehellings.lan:631/";
model = "drv:///sample.drv/generic.ppd";
ppdOptions = {
PageSize = "Letter";
};
} ];
};
}