3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/modules/services/desktops/deepin/deepin.nix

69 lines
1.4 KiB
Nix
Raw Normal View History

# 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.
";
services.deepin.deepin-menu.enable = lib.mkEnableOption "
DBus service for unified menus in Deepin Desktop Environment.
";
};
###### implementation
config = lib.mkMerge [
(lib.mkIf config.services.deepin.core.enable {
environment.systemPackages = [
pkgs.deepin.dde-api
pkgs.deepin.dde-daemon
];
services.dbus.packages = [
pkgs.deepin.dde-api
pkgs.deepin.dde-daemon
];
systemd.packages = [
pkgs.deepin.dde-api
pkgs.deepin.dde-daemon
];
users.groups.deepin-sound-player = { };
users.users.deepin-sound-player = {
description = "Deepin sound player";
group = "deepin-sound-player";
isSystemUser = true;
};
users.groups.deepin-daemon = { };
users.users.deepin-daemon = {
description = "Deepin daemon user";
group = "deepin-daemon";
isSystemUser = true;
};
services.deepin.deepin-menu.enable = true;
})
(lib.mkIf config.services.deepin.deepin-menu.enable {
services.dbus.packages = [ pkgs.deepin.deepin-menu ];
})
];
}