aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-06-07 04:29:32 +0900
committerOphestra <cat@gensokyo.uk>2025-06-08 01:12:18 +0900
commitbf5772bd8adfb844eb339c3e9d054bfde8ce955c (patch)
tree94acab50a89d1d7d223554c88c4d8caf2d255893 /test
parent9a7c81a44e4876f2efde1e2d71a5ffbb0b3e96a8 (diff)
nix: deduplicate home-manager merging
This becomes a problem when extraHomeConfig defines nixos module options. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'test')
-rw-r--r--test/configuration.nix18
-rw-r--r--test/test.py4
2 files changed, 16 insertions, 6 deletions
diff --git a/test/configuration.nix b/test/configuration.nix
index 0bee0b2e..4bd1ea55 100644
--- a/test/configuration.nix
+++ b/test/configuration.nix
@@ -95,14 +95,23 @@
stateDir = "/var/lib/fortify";
users.alice = 0;
- extraHomeConfig = {
- home.stateVersion = "23.05";
- };
+ extraHomeConfig =
+ { config, ... }:
+ {
+ # To test merge deduplication:
+ options._fortify.stateVersion = lib.mkOption { type = lib.types.str; };
+
+ config = {
+ home = { inherit (config._fortify) stateVersion; };
+ _fortify.stateVersion = "23.05";
+ };
+ };
apps = {
"cat.gensokyo.extern.foot.noEnablements" = {
name = "ne-foot";
identity = 1;
+ shareUid = true;
verbose = true;
share = pkgs.foot;
packages = with pkgs; [
@@ -130,7 +139,8 @@
"cat.gensokyo.extern.Alacritty.x11" = {
name = "x11-alacritty";
- identity = 3;
+ identity = 1;
+ shareUid = true;
verbose = true;
share = pkgs.alacritty;
packages = with pkgs; [
diff --git a/test/test.py b/test/test.py
index b912d6ef..4b67b6fd 100644
--- a/test/test.py
+++ b/test/test.py
@@ -206,9 +206,9 @@ machine.wait_until_fails("pgrep foot", timeout=5)
# Test XWayland (foot does not support X):
swaymsg("exec x11-alacritty")
-wait_for_window(f"u0_a{aid(2)}@machine")
+wait_for_window(f"u0_a{aid(0)}@machine")
machine.send_chars("clear; glinfo && touch /tmp/x11-ok\n")
-machine.wait_for_file(tmpdir_path(2, "x11-ok"), timeout=15)
+machine.wait_for_file(tmpdir_path(0, "x11-ok"), timeout=15)
collect_state_ui("alacritty_x11")
check_state("x11-alacritty", 2)
machine.send_chars("exit\n")