From f283f269c18150f26fe1fb7cd79104f2077a9f9e Mon Sep 17 00:00:00 2001 From: zorrobert <118135271+zorrobert@users.noreply.github.com> Date: Fri, 23 Feb 2024 13:25:32 +0100 Subject: [PATCH] fusuma: add missing dependencies --- modules/services/fusuma.nix | 12 ++++++------ .../modules/services/fusuma/expected-service.service | 4 ++-- tests/modules/services/fusuma/service.nix | 1 + tests/modules/services/fusuma/settings.nix | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/modules/services/fusuma.nix b/modules/services/fusuma.nix index e0ced9769..17d8b1431 100644 --- a/modules/services/fusuma.nix +++ b/modules/services/fusuma.nix @@ -96,10 +96,11 @@ in { extraPackages = mkOption { type = types.listOf types.package; - default = with pkgs; [ coreutils ]; - defaultText = literalExpression "pkgs.coreutils"; + default = with pkgs; [ xdotool coreutils xorg.xprop ]; + defaultText = + literalExpression "pkgs.xdotool pkgs.coreutils pkgs.xorg.xprop"; example = literalExpression '' - with pkgs; [ coreutils xdotool ]; + with pkgs; [ xdotool coreutils xorg.xprop ]; ''; description = '' Extra packages needs to bring to the scope of fusuma service. @@ -113,7 +114,7 @@ in { lib.platforms.linux) ]; - xdg.configFile."fusuma/config.yaml".source = configYaml; + xdg.configFile."fusuma/config.yml".source = configYaml; systemd.user.services.fusuma = { Unit = { @@ -124,8 +125,7 @@ in { Service = { Environment = with pkgs; "PATH=${makeBinPath cfg.extraPackages}"; - ExecStart = - "${cfg.package}/bin/fusuma -c ${config.xdg.configHome}/fusuma/config.yaml"; + ExecStart = "${cfg.package}/bin/fusuma"; }; Install = { WantedBy = [ "graphical-session.target" ]; }; diff --git a/tests/modules/services/fusuma/expected-service.service b/tests/modules/services/fusuma/expected-service.service index a86627f4c..585d8a85e 100644 --- a/tests/modules/services/fusuma/expected-service.service +++ b/tests/modules/services/fusuma/expected-service.service @@ -2,8 +2,8 @@ WantedBy=graphical-session.target [Service] -Environment=PATH=@coreutils@/bin:@xdotool@/bin -ExecStart=@fusuma@/bin/fusuma -c /home/hm-user/.config/fusuma/config.yaml +Environment=PATH=@coreutils@/bin:@xdotool@/bin:@xorg.xprop@/bin +ExecStart=@fusuma@/bin/fusuma [Unit] After=graphical-session-pre.target diff --git a/tests/modules/services/fusuma/service.nix b/tests/modules/services/fusuma/service.nix index d02a75f52..8041bf7b8 100644 --- a/tests/modules/services/fusuma/service.nix +++ b/tests/modules/services/fusuma/service.nix @@ -7,6 +7,7 @@ extraPackages = [ (config.lib.test.mkStubPackage { outPath = "@coreutils@"; }) (config.lib.test.mkStubPackage { outPath = "@xdotool@"; }) + (config.lib.test.mkStubPackage { outPath = "@xorg.xprop@"; }) ]; settings = { }; }; diff --git a/tests/modules/services/fusuma/settings.nix b/tests/modules/services/fusuma/settings.nix index 303a13272..a1500cb21 100644 --- a/tests/modules/services/fusuma/settings.nix +++ b/tests/modules/services/fusuma/settings.nix @@ -18,7 +18,7 @@ nmt.script = '' assertFileContent \ - home-files/.config/fusuma/config.yaml \ + home-files/.config/fusuma/config.yml \ ${./expected-settings.yaml} ''; }