diff --git a/custom-add-ons.md b/custom-add-ons.md index 7fbff53..c350ed8 100644 --- a/custom-add-ons.md +++ b/custom-add-ons.md @@ -64,3 +64,22 @@ sovran_systemsOS.features.element-calling = true; ```nix sovran_systemsOS.features.rdp = true; ``` +Next in a new termianl window paste this in: + +```bash +ssh root@localhost +``` +Type in password for if required it is the password to run the Sovran_SystemsOS_Updater app + +Next paste in these commands and make sure you add your own username and password +```bash +sudo -u gnome-remote-desktop winpr-makecert -silent -rdp -path /var/lib/gnome-remote-desktop rdp-tls +grdctl --system rdp set-tls-key /var/lib/gnome-remote-desktop/rdp-tls.key +grdctl --system rdp set-tls-cert /var/lib/gnome-remote-desktop/rdp-tls.crt +grdctl --system rdp enable +grdctl --system rdp set-credentials "username" "passaword" +``` +Last access Sovran_SystemsOS Desktop from any computer in your nextwork by using any software that connects thrthrough RDP + + + diff --git a/modules/rdp.nix b/modules/rdp.nix index 9b9e789..a7f5d02 100755 --- a/modules/rdp.nix +++ b/modules/rdp.nix @@ -1,62 +1,16 @@ { config, pkgs, lib, ... }: -let - cfg = config.sovran_systemsOS.features.rdp; -in -lib.mkIf cfg { + config.sovran_systemsOS.features.rdp { - services.gnome.gnome-remote-desktop.enable = true; + services.gnome.gnome-remote-desktop.enable = true; - networking.firewall.allowedTCPPorts = [ 3389 ]; - - environment.systemPackages = with pkgs; [ - freerdp - ]; - - # Ensure correct directory ownership declaratively - systemd.tmpfiles.rules = [ - "d /var/lib/gnome-remote-desktop 0700 gnome-remote-desktop gnome-remote-desktop -" - ]; - - systemd.services.grd-cert = { - description = "GRD TLS cert"; - - wantedBy = [ "multi-user.target" ]; - - serviceConfig.Type = "oneshot"; - - script = '' - CERT_DIR=/var/lib/gnome-remote-desktop - - if [ ! -f "$CERT_DIR/rdp-tls.key" ]; then - ${pkgs.util-linux}/bin/runuser -u gnome-remote-desktop -- \ - ${pkgs.freerdp}/bin/winpr-makecert -silent -rdp \ - -path "$CERT_DIR" rdp-tls - fi - ''; -}; - - systemd.user.services.grd-setup = { - description = "GNOME Remote Desktop setup"; - - wantedBy = [ "default.target" ]; - after = [ "graphical-session.target" ]; - - serviceConfig.Type = "oneshot"; - - script = '' - set -euo pipefail - - CERT_DIR=/var/lib/gnome-remote-desktop - - ${pkgs.gnome-remote-desktop}/bin/grdctl rdp set-tls-key "$CERT_DIR/rdp-tls.key" - ${pkgs.gnome-remote-desktop}/bin/grdctl rdp set-tls-cert "$CERT_DIR/rdp-tls.crt" - ${pkgs.gnome-remote-desktop}/bin/grdctl rdp enable - - if ! ${pkgs.gnome-remote-desktop}/bin/grdctl rdp show | grep -q username; then - ${pkgs.gnome-remote-desktop}/bin/grdctl rdp set-credentials "free" "a" - fi - ''; - }; + networking.firewall.allowedTCPPorts = [ 3389 ]; + environment.systemPackages = with pkgs; [ + freerdp + ]; } + + + +