From 4fcaded92b9da4d7d0b8904a0e2180822cd59373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Thu, 18 Apr 2019 12:59:49 -0300 Subject: [PATCH] nixos/deepin: rename dde-daemon module The deepin module is used to set basic dbus and systedmd services, kernel modules, groups and users needed by the Deepin Desktop Environment. --- nixos/modules/module-list.nix | 2 +- .../services/desktops/deepin/dde-daemon.nix | 41 ---------------- .../services/desktops/deepin/deepin.nix | 47 +++++++++++++++++++ 3 files changed, 48 insertions(+), 42 deletions(-) delete mode 100644 nixos/modules/services/desktops/deepin/dde-daemon.nix create mode 100644 nixos/modules/services/desktops/deepin/deepin.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 05b4b7296396..28e3d5171492 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -256,7 +256,7 @@ ./services/databases/virtuoso.nix ./services/desktops/accountsservice.nix ./services/desktops/bamf.nix - ./services/desktops/deepin/dde-daemon.nix + ./services/desktops/deepin/deepin.nix ./services/desktops/deepin/deepin-menu.nix ./services/desktops/dleyna-renderer.nix ./services/desktops/dleyna-server.nix diff --git a/nixos/modules/services/desktops/deepin/dde-daemon.nix b/nixos/modules/services/desktops/deepin/dde-daemon.nix deleted file mode 100644 index 057da4e2d7f2..000000000000 --- a/nixos/modules/services/desktops/deepin/dde-daemon.nix +++ /dev/null @@ -1,41 +0,0 @@ -# dde-daemon - -{ config, pkgs, lib, ... }: - -{ - - ###### interface - - options = { - - services.deepin.dde-daemon = { - - enable = lib.mkEnableOption - "A daemon for handling Deepin Desktop Environment session settings"; - - }; - - }; - - - ###### implementation - - config = lib.mkIf config.services.deepin.dde-daemon.enable { - - environment.systemPackages = [ pkgs.deepin.dde-daemon ]; - - services.dbus.packages = [ pkgs.deepin.dde-daemon ]; - - systemd.packages = [ pkgs.deepin.dde-daemon ]; - - users.groups.dde-daemon = { }; - - users.users.dde-daemon = { - description = "Deepin daemon user"; - group = "dde-daemon"; - isSystemUser = true; - }; - - }; - -} diff --git a/nixos/modules/services/desktops/deepin/deepin.nix b/nixos/modules/services/desktops/deepin/deepin.nix new file mode 100644 index 000000000000..14d2124476a1 --- /dev/null +++ b/nixos/modules/services/desktops/deepin/deepin.nix @@ -0,0 +1,47 @@ +# deepin + +{ config, pkgs, lib, ... }: + +{ + + ###### interface + + options = { + + services.deepin.core.enable = lib.mkEnableOption " + Basic dbus and systemd services, groups and users needed by the + Deepin Desktop Environment. + "; + + }; + + + ###### implementation + + config = lib.mkMerge [ + + (lib.mkIf config.services.deepin.core.enable { + environment.systemPackages = [ + pkgs.deepin.dde-daemon + ]; + + services.dbus.packages = [ + pkgs.deepin.dde-daemon + ]; + + systemd.packages = [ + pkgs.deepin.dde-daemon + ]; + + users.groups.dde-daemon = { }; + + users.users.dde-daemon = { + description = "Deepin daemon user"; + group = "dde-daemon"; + isSystemUser = true; + }; + }) + + ]; + +}