From 8ed1f6fcf938942e292ae5cb6931dff7ef38b6b1 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Sun, 24 Nov 2024 20:51:07 +0800 Subject: [PATCH] home-manager/services/ludusavi: create config in home directory It needs the config directory to be writable where the manifest file will be written alongside it. --- modules/home-manager/services/ludusavi.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/home-manager/services/ludusavi.nix b/modules/home-manager/services/ludusavi.nix index b9a862db..c5a07d38 100644 --- a/modules/home-manager/services/ludusavi.nix +++ b/modules/home-manager/services/ludusavi.nix @@ -76,6 +76,11 @@ in (lib.hm.assertions.assertPlatform "services.ludusavi" pkgs lib.platforms.linux) ]; + # We're putting it somewhere in the home directory instead of the typical + # Nix store directory since the configuration directory has to be writable + # for the manifest file. + xdg.dataFile."ludusavi/hm-service-config.yaml".source = configFile; + systemd.user.services.ludusavi = { Unit = { Description = "Periodic game backup"; @@ -88,7 +93,7 @@ in }; Service = { - ExecStart = "${lib.getExe' cfg.package "ludusavi"} --config ${configFile} backup ${lib.concatStringsSep " " cfg.extraArgs}"; + ExecStart = "${lib.getExe' cfg.package "ludusavi"} --config ${config.xdg.dataHome}/ludusavi/hm-service-config.yaml backup ${lib.concatStringsSep " " cfg.extraArgs}"; Restart = "on-failure"; }; };