summaryrefslogtreecommitdiff
path: root/hosts/hyper-v/configuration.nix
diff options
context:
space:
mode:
authorChristian <[email protected]>2026-01-18 21:17:14 -0600
committerChristian <[email protected]>2026-01-18 21:41:12 -0600
commit87be0d3dd54e71f33b9d8a757273ae4f2170e3f0 (patch)
tree758db0c339023ef7bdae276dab85770a31c6644f /hosts/hyper-v/configuration.nix
parent44adb7d61e71370acb7d839e6b76270f9a081939 (diff)
Multiple configs
Diffstat (limited to 'hosts/hyper-v/configuration.nix')
-rw-r--r--hosts/hyper-v/configuration.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/hosts/hyper-v/configuration.nix b/hosts/hyper-v/configuration.nix
new file mode 100644
index 0000000..f7bc699
--- /dev/null
+++ b/hosts/hyper-v/configuration.nix
@@ -0,0 +1,34 @@
+{config, lib, pkgs, inputs, ...}:
+
+{
+ imports =
+ [ # Include the results of the hardware scan.
+ ./hardware-configuration.nix
+ ../../modules/common.nix
+ ];
+
+ networking.hostName = "hyper-v";
+
+
+ # Hyper-V setup
+ virtualisation.hypervGuest.enable = true;
+ services.xrdp.enable = true;
+ services.xrdp.defaultWindowManager = "xmonad";
+
+ systemd.services.xrdp.serviceConfig = {
+ # Remove the --port in the invokation of xrdp (it overwrites the option in the config)
+ ExecStart = lib.mkForce "${pkgs.xrdp}/bin/xrdp --nodaemon --config ${config.services.xrdp.confDir}/xrdp.ini";
+ };
+
+ services.xrdp.extraConfDirCommands = ''
+ substituteInPlace $out/xrdp.ini \
+ --replace-fail "port=3389" "port=vsock://-1:3389" \
+ --replace-fail "#vmconnect=true" "vmconnect=true" \
+ --replace-fail "security_layer=negotiate" "security_layer=rdp" \
+ --replace-fail "crypt_level=high" "crypt_level=none" \
+ '';
+
+ services.xserver.displayManager.lightdm.enable = false;
+
+ system.stateVersion = "25.11";
+}