chore: printing, tailscale, and opencode
This commit is contained in:
24
modules/nixos/services/printing/default.nix
Normal file
24
modules/nixos/services/printing/default.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ config
|
||||
, lib
|
||||
, namespace
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption types;
|
||||
inherit (lib.${namespace}) mkOpt;
|
||||
|
||||
cfg = config.${namespace}.services.printing;
|
||||
in
|
||||
{
|
||||
options.${namespace}.services.printing = with types; {
|
||||
enable = mkEnableOption "enable printing service";
|
||||
drivers = mkOpt (listOf package) [ ] "print drivers to use";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = cfg.drivers;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user