Files
nixos/modules/nixos/print.nix
T
Greg Hellings 140ba3d08a Streamline base install
Don't install printers by default
Don't install NetworkManager by default, as it pulls in WAY too many
dependencies, including a full GUI suite
Simplify the template
2025-04-14 00:44:19 -05:00

36 lines
754 B
Nix

{
config,
lib,
pkgs,
...
}:
let
cfg = config.greg.print;
in
with lib;
{
options.greg.print.enable = mkEnableOption "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 ] ++ (lib.optional pkgs.stdenv.isx86_64 gutenprintBin);
};
hardware.printers.ensurePrinters = [
{
name = "HomeLexmarkColorPrinter";
location = "Home office";
deviceUri = "ipp://printer.thehellings.lan:631/";
model = "drv:///sample.drv/generic.ppd";
ppdOptions = {
PageSize = "Letter";
};
}
];
};
}