moved printing to core/

This commit is contained in:
Sven Vogel 2023-12-01 20:55:20 +01:00
parent 20d705c297
commit 092585ca2b
2 changed files with 13 additions and 12 deletions

13
core/printing.nix Normal file
View File

@ -0,0 +1,13 @@
{ pkgs, config, ... }: {
services.printing.enable = true;
services.avahi.enable = true;
# for a WiFi printer
services.avahi.openFirewall = true;
services.avahi.nssmdns = false; # Use the settings from below
# settings from avahi-daemon.nix where mdns is replaced with mdns4
system.nssModules = pkgs.lib.optional (!config.services.avahi.nssmdns) pkgs.nssmdns;
system.nssDatabases.hosts = with pkgs.lib; optionals (!config.services.avahi.nssmdns) (mkMerge [
(mkBefore [ "mdns4_minimal [NOTFOUND=return]" ]) # before resolve
(mkAfter [ "mdns4" ]) # after dns
]);
}

View File

@ -9,18 +9,6 @@
# #
# Configuration for user servostar # Configuration for user servostar
services.printing.enable = true;
services.avahi.enable = true;
# for a WiFi printer
services.avahi.openFirewall = true;
services.avahi.nssmdns = false; # Use the settings from below
# settings from avahi-daemon.nix where mdns is replaced with mdns4
system.nssModules = pkgs.lib.optional (!config.services.avahi.nssmdns) pkgs.nssmdns;
system.nssDatabases.hosts = with pkgs.lib; optionals (!config.services.avahi.nssmdns) (mkMerge [
(mkBefore [ "mdns4_minimal [NOTFOUND=return]" ]) # before resolve
(mkAfter [ "mdns4" ]) # after dns
]);
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.servostar = { users.users.servostar = {
isNormalUser = true; isNormalUser = true;