From 792444af8402cacb94d7ec4c58adba9e36ef8cb2 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Tue, 27 Aug 2019 15:39:48 -0400 Subject: [PATCH] nixos/system-config-printer: init --- nixos/modules/module-list.nix | 2 + .../programs/system-config-printer.nix | 32 ++++++++++++++++ .../desktops/system-config-printer.nix | 38 +++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 nixos/modules/programs/system-config-printer.nix create mode 100644 nixos/modules/services/desktops/system-config-printer.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index fe28cf7fa492..c21973faa89f 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -151,6 +151,7 @@ ./programs/sysdig.nix ./programs/systemtap.nix ./programs/sway.nix + ./programs/system-config-printer.nix ./programs/thefuck.nix ./programs/tmux.nix ./programs/tsm-client.nix @@ -309,6 +310,7 @@ ./services/desktops/gnome3/tracker.nix ./services/desktops/gnome3/tracker-miners.nix ./services/desktops/profile-sync-daemon.nix + ./services/desktops/system-config-printer.nix ./services/desktops/telepathy.nix ./services/desktops/tumbler.nix ./services/desktops/zeitgeist.nix diff --git a/nixos/modules/programs/system-config-printer.nix b/nixos/modules/programs/system-config-printer.nix new file mode 100644 index 000000000000..34592dd7064b --- /dev/null +++ b/nixos/modules/programs/system-config-printer.nix @@ -0,0 +1,32 @@ +{ config, pkgs, lib, ... }: + +with lib; + +{ + + ###### interface + + options = { + + programs.system-config-printer = { + + enable = mkEnableOption "system-config-printer, a Graphical user interface for CUPS administration"; + + }; + + }; + + + ###### implementation + + config = mkIf config.programs.system-config-printer.enable { + + environment.systemPackages = [ + pkgs.system-config-printer + ]; + + services.system-config-printer.enable = true; + + }; + +} diff --git a/nixos/modules/services/desktops/system-config-printer.nix b/nixos/modules/services/desktops/system-config-printer.nix new file mode 100644 index 000000000000..8a80be266b20 --- /dev/null +++ b/nixos/modules/services/desktops/system-config-printer.nix @@ -0,0 +1,38 @@ +{ config, pkgs, lib, ... }: + +with lib; + +{ + + ###### interface + + options = { + + services.system-config-printer = { + + enable = mkEnableOption "system-config-printer, a service for CUPS administration used by printing interfaces"; + + }; + + }; + + + ###### implementation + + config = mkIf config.services.system-config-printer.enable { + + services.dbus.packages = [ + pkgs.system-config-printer + ]; + + systemd.packages = [ + pkgs.system-config-printer + ]; + + services.udev.packages = [ + pkgs.system-config-printer + ]; + + }; + +}