refactor: import nixosModules unconditionally, add enable options
This commit is contained in:
parent
c2d4ce78de
commit
850d673035
38 changed files with 959 additions and 761 deletions
|
|
@ -1,12 +1,17 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
services = {
|
||||
# Enable CUPS to print documents.
|
||||
printing.enable = true;
|
||||
options.my.printing.enable = lib.mkEnableOption "printing (CUPS + Avahi)";
|
||||
|
||||
avahi = {
|
||||
enable = true; # runs the Avahi daemon
|
||||
nssmdns4 = true; # enables the mDNS NSS plug-in
|
||||
openFirewall = true; # opens the firewall for UDP port 5353
|
||||
config = lib.mkIf config.my.printing.enable {
|
||||
services = {
|
||||
# Enable CUPS to print documents.
|
||||
printing.enable = true;
|
||||
|
||||
avahi = {
|
||||
enable = true; # runs the Avahi daemon
|
||||
nssmdns4 = true; # enables the mDNS NSS plug-in
|
||||
openFirewall = true; # opens the firewall for UDP port 5353
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue