boxen/profiles/home/default.nix

43 lines
1.2 KiB
Nix

{ config, pkgs, lib, ... }:
with lib;
let activeProfiles = config.profiles;
in {
config = mkIf (elem "home" activeProfiles) {
hardware.printers.ensurePrinters = let
commonOptions = {
PageSize = "A4";
Duplex = "DuplexNoTumble";
InputSlot = "Auto";
};
in [
{
name = "Study-Laser";
location = "Study";
description = "Samsung CLX-6260 Laser";
deviceUri =
"dnssd://Samsung%20laser%20printer%20(Study)._printer._tcp.local/";
model = "samsung/CLX-6260.ppd";
ppdOptions = commonOptions // {
ColorMode = "False";
MediaType = "Plain";
};
}
{
name = "Study-Inkjet";
location = "Study";
description = "Epson XP-860 Inkjet";
deviceUri =
"dnssd://EPSON%20XP-860%20Series._ipp._tcp.local/?uuid=cfe92100-67c4-11d4-a45f-44d244241018";
model =
"epson-inkjet-printer-escpr/Epson-XP-860_Series-epson-escpr-en.ppd";
ppdOptions = commonOptions // { MediaType = "PLAIN_NORMAL"; };
}
];
services.printing = {
drivers = with pkgs; [ samsung-unified-linux-driver epson-escpr ];
};
users.groups.lp.members = [ "jez" "elly" ];
};
}