mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 12:19:07 +00:00
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.
This commit is contained in:
parent
ee0ad60385
commit
8ed1f6fcf9
@ -76,6 +76,11 @@ in
|
|||||||
(lib.hm.assertions.assertPlatform "services.ludusavi" pkgs lib.platforms.linux)
|
(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 = {
|
systemd.user.services.ludusavi = {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Periodic game backup";
|
Description = "Periodic game backup";
|
||||||
@ -88,7 +93,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
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";
|
Restart = "on-failure";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user