mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 10:05:13 -05:00
refactor: abstracted out printer config
This commit is contained in:
parent
0ea9ac4333
commit
a1d093e44a
1 changed files with 15 additions and 10 deletions
|
@ -1,27 +1,32 @@
|
||||||
{
|
{flake, ...}: let
|
||||||
|
inherit (flake.config.system.device) printer0 printer1;
|
||||||
|
geneticPPD = "drv:///sample.drv/generic.ppd";
|
||||||
|
pageSize = "Letter";
|
||||||
|
in {
|
||||||
hardware.printers = {
|
hardware.printers = {
|
||||||
ensurePrinters = [
|
ensurePrinters = [
|
||||||
{
|
{
|
||||||
name = "Canon-TR7620a";
|
name = printer0.label;
|
||||||
location = "Downstairs";
|
location = "Downstairs";
|
||||||
deviceUri = "https://10.0.0.234";
|
deviceUri = "https://${printer0.ip.address0}";
|
||||||
model = "drv:///sample.drv/generic.ppd";
|
model = geneticPPD;
|
||||||
ppdOptions = {
|
ppdOptions = {
|
||||||
PageSize = "Letter";
|
PageSize = pageSize;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "Brother-HL-2170W";
|
name = printer1.label;
|
||||||
location = "Upstairs";
|
location = "Upstairs";
|
||||||
deviceUri = "https://192.168.50.195";
|
deviceUri = "https://${printer1.ip.address0}";
|
||||||
model = "drv:///sample.drv/generic.ppd";
|
model = geneticPPD;
|
||||||
ppdOptions = {
|
ppdOptions = {
|
||||||
PageSize = "Letter";
|
PageSize = pageSize;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
ensureDefaultPrinter = "Brother-HL-2170W";
|
ensureDefaultPrinter = printer1.label;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
firewall = {
|
firewall = {
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue