services.xrdp: fix

This commit is contained in:
陈浩南 2024-03-04 18:29:39 +08:00
parent f312b3f53f
commit 71f3be8d2d
3 changed files with 11 additions and 6 deletions

View File

@ -104,8 +104,6 @@
})
./modules
./devices/${system}
# TODO: enable xrdp in next release
(moduleInputs: { config.nixos.services.xrdp.enable = moduleInputs.lib.mkForce false; })
];
};
})

View File

@ -12,13 +12,20 @@ inputs:
inherit (inputs.config.nixos.services) xrdp;
in mkIf xrdp.enable (mkMerge
[
{
assertions =
[{
assertion = !inputs.config.nixos.system.envfs.enable;
message = "Somehow xrdp could not start if envfs is enabled";
}];
}
{
services.xrdp =
{
enable = true;
port = xrdp.port;
openFirewall = true;
defaultWindowManager = "startplasma-x11";
defaultWindowManager = "${inputs.pkgs.plasma-workspace}/bin/startplasma-x11";
};
}
(

View File

@ -2,11 +2,11 @@ inputs:
{
options.nixos.system.envfs = let inherit (inputs.lib) mkOption types; in
{
enable = mkOption { type = types.bool; default = true; };
enable = mkOption { type = types.bool; default = false; };
};
config = inputs.lib.mkMerge
config = inputs.lib.mkIf inputs.config.nixos.system.envfs.enable (inputs.lib.mkMerge
[
(builtins.elemAt inputs.topInputs.envfs.nixosModules.envfs.imports 0 inputs)
{ environment.variables.ENVFS_RESOLVE_ALWAYS = "1"; }
];
]);
}