diff --git a/nixos/hosts/framework-server/default.nix b/nixos/hosts/framework-server/default.nix index 2b89297e..94645cbd 100644 --- a/nixos/hosts/framework-server/default.nix +++ b/nixos/hosts/framework-server/default.nix @@ -10,7 +10,8 @@ ./ssh-luks.nix ./docker.nix ./wireguard.nix - ] ++ lib.optional (builtins.isString desktop) ./gnome-rdp.nix; + ] ++ lib.optional (builtins.isString desktop) ./sleep.nix + ++ lib.optional (builtins.isString desktop) ./xrdp.nix; # steam , etc nixpkgs.config.allowUnfree = true; @@ -48,10 +49,13 @@ "--advertise-routes=10.2.0.0/24" ]; - boot.kernel.sysctl = { "net.ipv4.ip_forward" = true; }; + boot.kernel.sysctl = { + "net.ipv4.ip_forward" = true; + "net.ipv6.ip_forward" = true; + }; boot.initrd.services.udev.rules = '' - # This is used to change the default configuration of Realtek USB ethernet adapters + # This is used to load the correct kernel module for the Framework USB-C Ethernet Adapter ACTION!="add", GOTO="usb_realtek_net_end" SUBSYSTEM!="usb", GOTO="usb_realtek_net_end" diff --git a/nixos/hosts/framework-server/gnome-rdp.nix b/nixos/hosts/framework-server/sleep.nix similarity index 64% rename from nixos/hosts/framework-server/gnome-rdp.nix rename to nixos/hosts/framework-server/sleep.nix index 0269829a..b9a7505b 100644 --- a/nixos/hosts/framework-server/gnome-rdp.nix +++ b/nixos/hosts/framework-server/sleep.nix @@ -1,6 +1,4 @@ { ... }: { - services.gnome.gnome-remote-desktop.enable = true; - networking.firewall.allowedTCPPorts = [ 3389 ]; systemd.targets.sleep.enable = false; systemd.targets.suspend.enable = false; systemd.targets.hibernate.enable = false; diff --git a/nixos/hosts/framework-server/xrdp.nix b/nixos/hosts/framework-server/xrdp.nix new file mode 100644 index 00000000..2b4c2fe8 --- /dev/null +++ b/nixos/hosts/framework-server/xrdp.nix @@ -0,0 +1,7 @@ +{ inputs, config, lib, pkgs, modulesPath, desktop, username, ... }: { + services.xrdp = { + enable = true; + openFirewall = true; + defaultWindowManager = "gnome-shell"; + }; +} \ No newline at end of file