add(printer)
This commit is contained in:
parent
1845f17799
commit
b89d7fd2ee
1 changed files with 31 additions and 0 deletions
31
modules/nixos/services/printer/default.nix
Normal file
31
modules/nixos/services/printer/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.${namespace};
|
||||
let
|
||||
cfg = config.${namespace}.services.printer;
|
||||
in
|
||||
{
|
||||
options.${namespace}.services.printer = {
|
||||
enable = mkBoolOpt false "Printer";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [ pkgs.hplip ];
|
||||
};
|
||||
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue