2019-04-18 16:59:49 +01:00
|
|
|
# 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.
|
|
|
|
";
|
|
|
|
|
2019-04-19 13:47:19 +01:00
|
|
|
services.deepin.deepin-menu.enable = lib.mkEnableOption "
|
|
|
|
DBus service for unified menus in Deepin Desktop Environment.
|
|
|
|
";
|
|
|
|
|
2019-04-19 13:52:07 +01:00
|
|
|
services.deepin.deepin-turbo.enable = lib.mkEnableOption "
|
|
|
|
Turbo service for the Deepin Desktop Environment. It is a daemon
|
|
|
|
that helps to launch applications faster.
|
|
|
|
";
|
|
|
|
|
2019-04-18 16:59:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
|
|
|
config = lib.mkMerge [
|
|
|
|
|
|
|
|
(lib.mkIf config.services.deepin.core.enable {
|
|
|
|
environment.systemPackages = [
|
2019-04-19 13:36:22 +01:00
|
|
|
pkgs.deepin.dde-api
|
2019-04-19 14:12:36 +01:00
|
|
|
pkgs.deepin.dde-calendar
|
2019-04-18 16:59:49 +01:00
|
|
|
pkgs.deepin.dde-daemon
|
2019-05-02 20:39:26 +01:00
|
|
|
pkgs.deepin.dde-dock
|
2019-04-19 14:14:47 +01:00
|
|
|
pkgs.deepin.dde-session-ui
|
2019-04-19 14:18:09 +01:00
|
|
|
pkgs.deepin.deepin-image-viewer
|
2019-04-19 14:19:58 +01:00
|
|
|
pkgs.deepin.deepin-screenshot
|
2019-04-18 16:59:49 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
services.dbus.packages = [
|
2019-04-19 13:36:22 +01:00
|
|
|
pkgs.deepin.dde-api
|
2019-04-19 14:12:36 +01:00
|
|
|
pkgs.deepin.dde-calendar
|
2019-04-18 16:59:49 +01:00
|
|
|
pkgs.deepin.dde-daemon
|
2019-05-02 20:39:26 +01:00
|
|
|
pkgs.deepin.dde-dock
|
2019-04-19 14:14:47 +01:00
|
|
|
pkgs.deepin.dde-session-ui
|
2019-04-19 14:18:09 +01:00
|
|
|
pkgs.deepin.deepin-image-viewer
|
2019-04-19 14:19:58 +01:00
|
|
|
pkgs.deepin.deepin-screenshot
|
2019-04-18 16:59:49 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
systemd.packages = [
|
2019-04-19 13:36:22 +01:00
|
|
|
pkgs.deepin.dde-api
|
2019-04-18 16:59:49 +01:00
|
|
|
pkgs.deepin.dde-daemon
|
|
|
|
];
|
|
|
|
|
2019-04-19 13:36:22 +01:00
|
|
|
users.groups.deepin-sound-player = { };
|
|
|
|
|
|
|
|
users.users.deepin-sound-player = {
|
|
|
|
description = "Deepin sound player";
|
|
|
|
group = "deepin-sound-player";
|
|
|
|
isSystemUser = true;
|
|
|
|
};
|
|
|
|
|
2019-04-19 15:04:55 +01:00
|
|
|
users.groups.deepin-daemon = { };
|
2019-04-18 16:59:49 +01:00
|
|
|
|
2019-04-19 15:04:55 +01:00
|
|
|
users.users.deepin-daemon = {
|
2019-04-18 16:59:49 +01:00
|
|
|
description = "Deepin daemon user";
|
2019-04-19 15:04:55 +01:00
|
|
|
group = "deepin-daemon";
|
2019-04-18 16:59:49 +01:00
|
|
|
isSystemUser = true;
|
|
|
|
};
|
2019-04-19 13:47:19 +01:00
|
|
|
|
2019-04-19 14:42:17 +01:00
|
|
|
environment.etc = {
|
|
|
|
"polkit-1/localauthority/10-vendor.d/com.deepin.api.device.pkla".source = "${pkgs.deepin.dde-api}/etc/polkit-1/localauthority/10-vendor.d/com.deepin.api.device.pkla";
|
|
|
|
"polkit-1/localauthority/10-vendor.d/com.deepin.daemon.Accounts.pkla".source = "${pkgs.deepin.dde-daemon}/etc/polkit-1/localauthority/10-vendor.d/com.deepin.daemon.Accounts.pkla";
|
|
|
|
"polkit-1/localauthority/10-vendor.d/com.deepin.daemon.Grub2.pkla".source = "${pkgs.deepin.dde-daemon}/etc/polkit-1/localauthority/10-vendor.d/com.deepin.daemon.Grub2.pkla";
|
|
|
|
};
|
|
|
|
|
2019-04-19 13:47:19 +01:00
|
|
|
services.deepin.deepin-menu.enable = true;
|
2019-04-19 13:52:07 +01:00
|
|
|
services.deepin.deepin-turbo.enable = true;
|
2019-04-19 13:47:19 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
(lib.mkIf config.services.deepin.deepin-menu.enable {
|
|
|
|
services.dbus.packages = [ pkgs.deepin.deepin-menu ];
|
2019-04-18 16:59:49 +01:00
|
|
|
})
|
|
|
|
|
2019-04-19 13:52:07 +01:00
|
|
|
(lib.mkIf config.services.deepin.deepin-turbo.enable {
|
|
|
|
environment.systemPackages = [ pkgs.deepin.deepin-turbo ];
|
|
|
|
systemd.packages = [ pkgs.deepin.deepin-turbo ];
|
|
|
|
})
|
|
|
|
|
2019-04-18 16:59:49 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
}
|