Move rdp into an option

This commit is contained in:
Andreas Zweili 2023-05-27 17:54:43 +02:00
parent 4b04d78722
commit 54ec2d8915
3 changed files with 17 additions and 6 deletions

View File

@ -4,5 +4,6 @@
(import ./eog { inherit custom; }) (import ./eog { inherit custom; })
./lockscreen ./lockscreen
(import ./makemkv { inherit custom; }) (import ./makemkv { inherit custom; })
./rdp
]; ];
} }

View File

@ -1,8 +1,17 @@
{ pkgs, ... }: { config, lib, pkgs, ... }:
let
cfg = config.services.rdp;
in
{ {
services.xrdp = { options = {
enable = true; services.rdp.enable = lib.mkEnableOption "enable rdp";
defaultWindowManager = "${pkgs.qtile}/bin/qtile start"; };
config = lib.mkIf cfg.enable {
services.xrdp = {
enable = true;
defaultWindowManager = "${pkgs.qtile}/bin/qtile start";
};
networking.firewall.allowedTCPPorts = [ 3389 ];
}; };
networking.firewall.allowedTCPPorts = [ 3389 ];
} }

View File

@ -9,7 +9,6 @@
"${custom.inputs.self}/hardware/dvd" "${custom.inputs.self}/hardware/dvd"
(import "${custom.inputs.self}/modules/desktop" { inherit custom; }) (import "${custom.inputs.self}/modules/desktop" { inherit custom; })
"${custom.inputs.self}/modules/logs-share" "${custom.inputs.self}/modules/logs-share"
"${custom.inputs.self}/modules/rdp"
(import "${custom.inputs.self}/modules/restic-client-desktop" { inherit custom; }) (import "${custom.inputs.self}/modules/restic-client-desktop" { inherit custom; })
"${custom.inputs.self}/modules/tlp" "${custom.inputs.self}/modules/tlp"
]; ];
@ -57,6 +56,8 @@
makemkv.enable = true; makemkv.enable = true;
}; };
services.rdp.enable = true;
virtualisation.virtualbox.host.enable = true; virtualisation.virtualbox.host.enable = true;
} }