Make home print module
This commit is contained in:
@@ -16,6 +16,7 @@ in {
|
||||
./kde.nix
|
||||
./kiwix-serve.nix
|
||||
./linode.nix
|
||||
./print.nix
|
||||
./proxy.nix
|
||||
./router.nix
|
||||
./rpi4.nix
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
} ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user