doc: add assertions to not activate desktop and server profiles at the same time
This commit is contained in:
parent
3a3d1e6cdf
commit
57b58d78ea
1 changed files with 19 additions and 1 deletions
|
@ -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.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue