clanServices: add desktop module
This commit is contained in:
28
clanServices/kde/README.md
Normal file
28
clanServices/kde/README.md
Normal file
@@ -0,0 +1,28 @@
|
||||
This module sets up the [KDE Plasma](https://kde.org) Desktop environment.
|
||||
|
||||
!!! Note "Customisation"
|
||||
This service intentionally does not provide any settings or customisation
|
||||
options, as desktop preferences are highly subjective. Clan currently
|
||||
supports only this default desktop configuration. Any additional
|
||||
customisation can be done via the `extraModules` option. Furthermore, if you
|
||||
want to use a different desktop environment or compositor (e.g. Gnome or
|
||||
sway), we encourage you to to build your own
|
||||
[Clan Service](https://docs.clan.lol/guides/services/community/) or have a
|
||||
look at the [Community Services](https://docs.clan.lol/services/community/).
|
||||
|
||||
## Example Usage
|
||||
|
||||
```nix
|
||||
inventory = {
|
||||
instances = {
|
||||
kde = {
|
||||
|
||||
# Deploy on all machines
|
||||
roles.default.tags.all = { };
|
||||
|
||||
# Or individual hosts
|
||||
roles.default.machines.laptop = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
```
|
||||
18
clanServices/kde/default.nix
Normal file
18
clanServices/kde/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ ... }:
|
||||
{
|
||||
_class = "clan.service";
|
||||
manifest.name = "clan-core/kde";
|
||||
manifest.description = "Sets up a graphical desktop environment";
|
||||
manifest.categories = [ "Desktop" ];
|
||||
|
||||
roles.default = {
|
||||
description = "KDE/Plasma (wayland): Full-featured desktop environment with modern Qt-based interface";
|
||||
perInstance.nixosModule = {
|
||||
services = {
|
||||
displayManager.sddm.enable = true;
|
||||
displayManager.sddm.wayland.enable = true;
|
||||
desktopManager.plasma6.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
24
clanServices/kde/flake-module.nix
Normal file
24
clanServices/kde/flake-module.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
self,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
module = lib.modules.importApply ./default.nix {
|
||||
inherit (self) packages;
|
||||
};
|
||||
in
|
||||
{
|
||||
clan.modules = {
|
||||
kde = module;
|
||||
};
|
||||
perSystem =
|
||||
{ ... }:
|
||||
{
|
||||
clan.nixosTests.kde = {
|
||||
imports = [ ./tests/vm/default.nix ];
|
||||
|
||||
clan.modules.kde = module;
|
||||
};
|
||||
};
|
||||
}
|
||||
30
clanServices/kde/tests/vm/default.nix
Normal file
30
clanServices/kde/tests/vm/default.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
name = "kde";
|
||||
|
||||
clan = {
|
||||
directory = ./.;
|
||||
inventory = {
|
||||
|
||||
machines.client = { };
|
||||
|
||||
instances = {
|
||||
kde = {
|
||||
module.name = "kde";
|
||||
module.input = "self";
|
||||
roles.default.machines."client" = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
|
||||
client.systemctl("start network-online.target")
|
||||
client.wait_for_unit("network-online.target")
|
||||
|
||||
client.wait_for_unit("graphical.target")
|
||||
client.wait_for_unit("display-manager.service")
|
||||
client.succeed("systemctl status display-manager.service")
|
||||
'';
|
||||
}
|
||||
4
clanServices/kde/tests/vm/sops/users/admin/key.json
Normal file
4
clanServices/kde/tests/vm/sops/users/admin/key.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"publickey": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
|
||||
"type": "age"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
25.11
|
||||
@@ -165,6 +165,7 @@ nav:
|
||||
- services/official/garage.md
|
||||
- services/official/hello-world.md
|
||||
- services/official/importer.md
|
||||
- services/official/kde.md
|
||||
- services/official/localbackup.md
|
||||
- services/official/matrix-synapse.md
|
||||
- services/official/mycelium.md
|
||||
|
||||
@@ -294,21 +294,22 @@ in
|
||||
'';
|
||||
type = types.listOf (
|
||||
types.enum [
|
||||
"AudioVideo"
|
||||
"Audio"
|
||||
"Video"
|
||||
"AudioVideo"
|
||||
"Desktop"
|
||||
"Development"
|
||||
"Education"
|
||||
"Game"
|
||||
"Graphics"
|
||||
"Social"
|
||||
"Network"
|
||||
"Office"
|
||||
"Science"
|
||||
"System"
|
||||
"Settings"
|
||||
"Utility"
|
||||
"Social"
|
||||
"System"
|
||||
"Uncategorized"
|
||||
"Utility"
|
||||
"Video"
|
||||
]
|
||||
);
|
||||
};
|
||||
|
||||
@@ -39,6 +39,7 @@ class ModuleManifest:
|
||||
"Audio": {"color": "#CFCFC4", "description": "Audio"},
|
||||
"Video": {"color": "#FFD1DC", "description": "Video"},
|
||||
"Development": {"color": "#F49AC2", "description": "Development"},
|
||||
"Desktop": {"color": "#F4eeaa", "description": "Desktop Environment"},
|
||||
"Education": {"color": "#B39EB5", "description": "Education"},
|
||||
"Game": {"color": "#FFB347", "description": "Game"},
|
||||
"Graphics": {"color": "#FF6961", "description": "Graphics"},
|
||||
|
||||
Reference in New Issue
Block a user