doc: add assertions to not activate desktop and server profiles at the same time

This commit is contained in:
punkfairie 2025-05-26 16:24:26 -07:00
parent 3a3d1e6cdf
commit 57b58d78ea
Signed by: punkfairie
GPG key ID: B3C5488E9A1A7CA6

View file

@ -1,6 +1,24 @@
{lib, ...}: {
{
lib,
config,
...
}: let
cfg = config.marleycfg.profiles;
in {
options.marleycfg.profiles = {
desktop = lib.mkEnableOption "graphical desktop profile";
server = lib.mkEnableOption "server profile";
};
config = lib.mkIf cfg.server {
assertions = [
{
assertion = cfg.server -> !cfg.desktop;
message = ''
The marleycfg.profiles.server and marleycfg.profiles.desktop options
are mutually exclusive.
'';
}
];
};
}