Initial commit
This commit is contained in:
32
modules/sys/printing/default.nix
Normal file
32
modules/sys/printing/default.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = with lib; {
|
||||
services.printing = {
|
||||
ricoh = {
|
||||
enable = mkEnableOption "Enable Ricoh Printer";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.services.printing.enable {
|
||||
virtualisation.oci-containers.containers = lib.mkIf config.services.printing.ricoh.enable {
|
||||
ricoh = {
|
||||
image = "ricoh-cups:latest";
|
||||
autoStart = true;
|
||||
extraOptions = [
|
||||
"--device=/dev/bus/usb/005"
|
||||
"--network=host"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
631
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user