From 56da54bc36ae44ec1abcd0d373f560810b67ead6 Mon Sep 17 00:00:00 2001 From: Alejandro Angulo Date: Sat, 25 Mar 2023 09:17:58 -0700 Subject: [PATCH] Added printing config --- modules/services/printing/default.nix | 23 +++++++++++++++++++++++ systems/x86_64-linux/gospel/default.nix | 8 +------- 2 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 modules/services/printing/default.nix diff --git a/modules/services/printing/default.nix b/modules/services/printing/default.nix new file mode 100644 index 0000000..a37d8e0 --- /dev/null +++ b/modules/services/printing/default.nix @@ -0,0 +1,23 @@ +{ + options, + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.aa.apps.steam; +in { + options.aa.services.printing = with types; { + enable = mkEnableOption "printing"; + }; + + config = mkIf cfg.enable { + # Setup printing over the network + services.printing.enable = true; + services.avahi = { + enable = true; + nssmdns = true; + }; + }; +} diff --git a/systems/x86_64-linux/gospel/default.nix b/systems/x86_64-linux/gospel/default.nix index 5addd9f..ce303e9 100644 --- a/systems/x86_64-linux/gospel/default.nix +++ b/systems/x86_64-linux/gospel/default.nix @@ -32,6 +32,7 @@ domain_name = "kilonull.com"; subdomain_name = "gospel"; }; + services.printing.enable = true; }; boot.binfmt.emulatedSystems = ["aarch64-linux" "armv6l-linux"]; @@ -92,13 +93,6 @@ pulse.enable = true; }; - # Setup printing over the network - services.printing.enable = true; - services.avahi = { - enable = true; - nssmdns = true; - }; - # Copy the NixOS configuration file and link it from the resulting system # (/run/current-system/configuration.nix). This is useful in case you # accidentally delete configuration.nix.