Add printing module
This commit is contained in:
39
systems/modules/printing.nix
Normal file
39
systems/modules/printing.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
cnijfilter2
|
||||
];
|
||||
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [ pkgs.cnijfilter2 ];
|
||||
};
|
||||
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
hardware.printers = {
|
||||
ensurePrinters = [
|
||||
{
|
||||
name = "CanonTS3100";
|
||||
location = "Home";
|
||||
deviceUri = "dnssd://Canon%20TS3100%20series._ipp._tcp.local/?uuid=00000000-0000-1000-8000-0018271a7e44";
|
||||
model = "canonts3100.ppd";
|
||||
ppdOptions = {
|
||||
PageSize = "A4";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
ensureDefaultPrinter = "CanonTS3100";
|
||||
};
|
||||
|
||||
# for samba
|
||||
networking.hosts = {
|
||||
"192.168.68.60" = [ "2C2919000000.local" "2C2919000000" ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user