diff --git a/home-manager/common/desktops/xfce/default.nix b/home-manager/common/desktops/xfce/default.nix index c0f35df8..6fd55282 100644 --- a/home-manager/common/desktops/xfce/default.nix +++ b/home-manager/common/desktops/xfce/default.nix @@ -1,67 +1,67 @@ -{ lib, ... }: { +{ ... }: { xdg.configFile."displays" = { enable = true; target = "xfce4/xfconf/xfce-perchannel-xml/displays.xml"; - text = lib.readFile "xfce/xfconf/displays.xml"; + text = builtins.readFile ./xfconf/displays.xml; }; xdg.configFile."thunar" = { enable = true; target = "xfce4/xfconf/xfce-perchannel-xml/thunar.xml"; - text = lib.readFile "xfce/xfconf/thunar.xml"; + text = builtins.readFile ./xfconf/thunar.xml; }; xdg.configFile."xfce4-appfinder" = { enable = true; target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-appfinder.xml"; - text = lib.readFile "xfce/xfconf/xfce4-appfinder.xml"; + text = builtins.readFile ./xfconf/xfce4-appfinder.xml; }; xdg.configFile."xfce4-desktop" = { enable = true; target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml"; - text = lib.readFile "xfce/xfconf/xfce4-desktop.xml"; + text = builtins.readFile ./xfconf/xfce4-desktop.xml; }; xdg.configFile."xfce4-keyboard-shortcuts" = { enable = true; target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml"; - text = lib.readFile "xfce/xfconf/xfce4-keyboard-shortcuts.xml"; + text = builtins.readFile ./xfconf/xfce4-keyboard-shortcuts.xml; }; xdg.configFile."xfce4-notifyd" = { enable = true; target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml"; - text = lib.readFile "xfce/xfconf/xfce4-notifyd.xml"; + text = builtins.readFile ./xfconf/xfce4-notifyd.xml; }; xdg.configFile."xfce4-panel" = { enable = true; target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml"; - text = lib.readFile "xfce/xfconf/xfce4-panel.xml"; + text = builtins.readFile ./xfconf/xfce4-panel.xml; }; xdg.configFile."xfce4-power-manager" = { enable = true; target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml"; - text = lib.readFile "xfce/xfconf/xfce4-power-manager.xml"; + text = builtins.readFile ./xfconf/xfce4-power-manager.xml; }; xdg.configFile."xfce4-screenshotter" = { enable = true; target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-screenshotter.xml"; - text = lib.readFile "xfce/xfconf/xfce4-screenshotter.xml"; + text = builtins.readFile ./xfconf/xfce4-screenshooter.xml; }; xdg.configFile."xfce4-settings-editor" = { enable = true; target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-editor.xml"; - text = lib.readFile "xfce/xfconf/xfce4-settings-editor.xml"; + text = builtins.readFile ./xfconf/xfce4-settings-editor.xml; }; xdg.configFile."xfce4-terminal" = { enable = true; target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-terminal.xml"; - text = lib.readFile "xfce/xfconf/xfce4-terminal.xml"; + text = builtins.readFile ./xfconf/xfce4-terminal.xml; }; xdg.configFile."xfwm4" = { enable = true; target = "xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml"; - text = lib.readFile "xfce/xfconf/xfwm4.xml"; + text = builtins.readFile ./xfconf/xfwm4.xml; }; xdg.configFile."xsettings.xml" = { enable = true; target = "xfce4/xfconf/xfce-perchannel-xml/xsettings.xml.xml"; - text = lib.readFile "xfce/xfconf/xsettings.xml.xml"; + text = builtins.readFile ./xfconf/xsettings.xml.xml; }; } diff --git a/nixos/containers/default.nix b/nixos/containers/default.nix index 54af6af2..48df3555 100644 --- a/nixos/containers/default.nix +++ b/nixos/containers/default.nix @@ -1,9 +1,8 @@ -{ pkgs, lib, stateVersion, hostname, username, ... }: { +{ stateVersion, hostname, username, ... }: { imports = [ ./${hostname} ../users/${username} ../common/modules/nixos.nix - # ,../common/modules/networking.nix # Services ../common/services/promtail.nix ../common/services/telegraf.nix @@ -12,8 +11,7 @@ boot.isContainer = true; system.stateVersion = stateVersion; - - networking.hostName = "${hostname}"; + networking.hostName = hostname; # Set up the secrets file: sops.secrets."tailscale_key" = { diff --git a/nixos/containers/rdesktop/default.nix b/nixos/containers/rdesktop/default.nix index 4e3cdc77..e2d611ab 100644 --- a/nixos/containers/rdesktop/default.nix +++ b/nixos/containers/rdesktop/default.nix @@ -1,9 +1,9 @@ -{ ... }: { +{ desktop, ... }: { imports = [ + ../../common/desktops/${desktop} ../../common/software/packages.nix - ../../common/desktops/xfce ]; - - networking.firewall.allowedTCPPorts = [ 3389 ]; + + services.xrdp.openFirewall = true; services.xrdp.enable = true; } diff --git a/nixos/hosts/framework-server/containers.nix b/nixos/hosts/framework-server/containers.nix index ba9b1765..27d5661b 100644 --- a/nixos/hosts/framework-server/containers.nix +++ b/nixos/hosts/framework-server/containers.nix @@ -4,13 +4,6 @@ let lanInterface = "enp0s13f0u4"; in { containers = { - rdesktop = libx.mkContainer { hostname = "rdesktop"; }; - }; - - networking = { - nat.enable = true; - nat.internalInterfaces = [ "ve-+" ]; - nat.externalInterface = lanInterface; - firewall.extraCommands = ''iptables -t nat -A POSTROUTING -o ${lanInterface} -j MASQUERADE''; + rdesktop = libx.mkContainer { hostname = "rdesktop"; unfree = true; desktop = "xfce"; }; }; } diff --git a/nixos/users/albert/default.nix b/nixos/users/albert/default.nix index 1c32d494..1cbfc2f4 100644 --- a/nixos/users/albert/default.nix +++ b/nixos/users/albert/default.nix @@ -15,6 +15,7 @@ in { ++ ifExists [ "video" ] ++ ifExists [ "docker" ] ++ ifExists [ "podman" ] + ++ ifExists [ "xrdp" ] ++ ifExists [ "syncthing" ]; # mkpasswd -m sha-512 hashedPassword = "$y$j9T$wKLsIWaA4Gf63RvjedwLJ0$EHKL6BBJV0CAxEKcHHjaBqW085KJ/MGvmbyWzmcWOy6";