mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
nixos/soft-serve: specify config path in env instead of systemd.tmpfiles
When config location is in systemd tmpfiles, if you nuke the configuration directory (`rm -rf /var/lib/private/soft-serve`) and then restart the service, the configuration file will not be set, and the service uses default configurations. Having the configuration file in env also removes the need to use 'restartTriggers'.
This commit is contained in:
parent
4fc12581a0
commit
11e4f92703
1 changed files with 1 additions and 7 deletions
|
|
@ -45,11 +45,6 @@ in
|
|||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
# The config file has to be inside the state dir
|
||||
"L+ ${stateDir}/config.yaml - - - - ${configFile}"
|
||||
];
|
||||
|
||||
systemd.services.soft-serve = {
|
||||
description = "Soft Serve git server";
|
||||
documentation = [ docUrl ];
|
||||
|
|
@ -58,8 +53,7 @@ in
|
|||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
environment.SOFT_SERVE_DATA_PATH = stateDir;
|
||||
|
||||
restartTriggers = [ configFile ];
|
||||
environment.SOFT_SERVE_CONFIG_LOCATION = configFile;
|
||||
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue