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; })
./lockscreen
(import ./makemkv { inherit custom; })
./rdp
];
}

View File

@ -1,8 +1,17 @@
{ pkgs, ... }:
{ config, lib, pkgs, ... }:
let
cfg = config.services.rdp;
in
{
services.xrdp = {
enable = true;
defaultWindowManager = "${pkgs.qtile}/bin/qtile start";
options = {
services.rdp.enable = lib.mkEnableOption "enable rdp";
};
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"
(import "${custom.inputs.self}/modules/desktop" { inherit custom; })
"${custom.inputs.self}/modules/logs-share"
"${custom.inputs.self}/modules/rdp"
(import "${custom.inputs.self}/modules/restic-client-desktop" { inherit custom; })
"${custom.inputs.self}/modules/tlp"
];
@ -57,6 +56,8 @@
makemkv.enable = true;
};
services.rdp.enable = true;
virtualisation.virtualbox.host.enable = true;
}