fixed RDP layout
This commit is contained in:
1
app/icons/rdp.svg
Normal file
1
app/icons/rdp.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect x="6" y="12" width="52" height="34" rx="4" fill="#3584E4" stroke="#fff" stroke-width="2"/><rect x="12" y="18" width="40" height="22" rx="2" fill="#1A1A2E"/><rect x="26" y="46" width="12" height="4" rx="1" fill="#aaa"/><rect x="20" y="50" width="24" height="3" rx="1.5" fill="#888"/></svg>
|
||||
|
After Width: | Height: | Size: 354 B |
@@ -14,9 +14,11 @@ let
|
||||
{ label = "Root Password"; file = "/var/lib/secrets/root-password"; }
|
||||
{ label = "SSH Local Access"; value = "ssh root@localhost / Passphrase: gosovransystems"; }
|
||||
]; }
|
||||
|
||||
{ name = "Remote Desktop (RDP)"; unit = "gnome-remote-desktop.service"; type = "system"; icon = "rdp"; enabled = cfg.features.rdp; category = "apps"; credentials = [
|
||||
{ label = "Credentials"; file = "/var/lib/gnome-remote-desktop/rdp-credentials"; multiline = true; }
|
||||
{ name = "Remote Desktop"; unit = "gnome-remote-desktop.service"; type = "system"; icon = "rdp"; enabled = cfg.features.rdp; category = "infrastructure"; credentials = [
|
||||
{ label = "Username"; file = "/var/lib/gnome-remote-desktop/rdp-username"; }
|
||||
{ label = "Password"; file = "/var/lib/gnome-remote-desktop/rdp-password"; }
|
||||
{ label = "Address"; file = "/var/lib/secrets/internal-ip"; suffix = ":3389"; }
|
||||
{ label = "How to Connect"; value = "1. Install an RDP client (e.g. Remmina, Microsoft Remote Desktop)\n2. Create a new RDP connection\n3. Enter the Address above as the host\n4. Enter the Username and Password above\n5. Connect — you will see your desktop remotely"; }
|
||||
]; }
|
||||
]
|
||||
# ── Bitcoin Base (node implementations) ────────────────────
|
||||
@@ -182,7 +184,7 @@ let
|
||||
# ── Generated config ───────────────────────────────────────
|
||||
cp ${generatedConfig} $out/lib/sovran-hub-web/config.json
|
||||
|
||||
# ── Icons (SVG) ────────────────────────────────────────────
|
||||
# ── Icons (SVG) ──────────────────<EFBFBD><EFBFBD>─────────────────────────
|
||||
install -d $out/share/sovran-hub/icons
|
||||
cp icons/* $out/share/sovran-hub/icons/ 2>/dev/null || true
|
||||
|
||||
@@ -248,4 +250,4 @@ in
|
||||
# ── Open firewall port ─────────────────────────────────────
|
||||
networking.firewall.allowedTCPPorts = [ 8937 ];
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,16 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
lib.mkIf config.sovran_systemsOS.features.rdp {
|
||||
|
||||
services.gnome.gnome-remote-desktop.enable = true;
|
||||
services.gnome-remote-desktop.enable = true;
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 3389 ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
freerdp
|
||||
];
|
||||
|
||||
# The NixOS module installs the unit but doesn't enable it — we just need to start it and order it
|
||||
systemd.services.gnome-remote-desktop = {
|
||||
wantedBy = [ "graphical.target" ];
|
||||
after = [ "gnome-remote-desktop-setup.service" ];
|
||||
wants = [ "gnome-remote-desktop-setup.service" ];
|
||||
users.users.gnome-remote-desktop = {
|
||||
isSystemUser = true;
|
||||
group = "gnome-remote-desktop";
|
||||
home = "/var/lib/gnome-remote-desktop";
|
||||
createHome = true;
|
||||
};
|
||||
users.groups.gnome-remote-desktop = {};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/lib/gnome-remote-desktop 0750 gnome-remote-desktop gnome-remote-desktop -"
|
||||
@@ -77,6 +72,10 @@ lib.mkIf config.sovran_systemsOS.features.rdp {
|
||||
PASSWORD=$(cat /var/lib/gnome-remote-desktop/rdp-password)
|
||||
fi
|
||||
|
||||
# Write username to a separate file for the hub
|
||||
echo "sovran" > /var/lib/gnome-remote-desktop/rdp-username
|
||||
chmod 600 /var/lib/gnome-remote-desktop/rdp-username
|
||||
|
||||
# Get current IP address
|
||||
LOCAL_IP=$(hostname -I | awk '{print $1}')
|
||||
|
||||
@@ -104,4 +103,4 @@ lib.mkIf config.sovran_systemsOS.features.rdp {
|
||||
echo "GNOME Remote Desktop RDP configured successfully"
|
||||
'';
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user