mirror of
https://github.com/youwen5/nixos.git
synced 2025-01-17 20:52:09 -08:00
feat: add printing module
This commit is contained in:
parent
a6224c13c2
commit
c9c3e3f6cb
1 changed files with 25 additions and 0 deletions
25
modules/linux/misc/default.nix
Normal file
25
modules/linux/misc/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.liminalOS.system.printing;
|
||||
in
|
||||
{
|
||||
options.liminalOS.system.printing = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = config.liminalOS.enable;
|
||||
description = ''
|
||||
Whether to set up default options for printing and printer discover on UNIX.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.printing.enable = true;
|
||||
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue