aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2022-04-28 15:07:07 -0400
committerCara Salter <cara@devcara.com>2022-04-28 16:17:08 -0400
commit8f4277c55a2079edf1c9a69383c353e1cb9ef55c (patch)
treec30887a47d1ad1c050df34698561da44734046c9
parente06d062e15d171d37f249d83b1938df6a594d82c (diff)
downloadglitch-ng-8f4277c55a2079edf1c9a69383c353e1cb9ef55c.tar.gz
glitch-ng-8f4277c55a2079edf1c9a69383c353e1cb9ef55c.zip
fix init script
-rw-r--r--flake.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/flake.nix b/flake.nix
index c113f40..ceb4ddb 100644
--- a/flake.nix
+++ b/flake.nix
@@ -62,7 +62,7 @@
User = "glitch-ng";
Group = "glitch-ng";
Restart = "always";
- WorkingDirectory = "${defaultPackage}";
+ WorkingDirectory = "/var/lib/glitch-ng";
ExecStart = "${defaultPackage}/bin/glitch-ng";
EnvironmentFile = "${config.services.glitch-ng.environment-file-location}";
};
@@ -75,10 +75,10 @@
description = "Initialize for glitch-ng";
script = with pkgs; ''
- if ! [ -e /var/lib/glitch-ng/.db-created ]; then
+ if ! [ -e /var/lib/postgresql/.glitch-inited ]; then
${config.services.postgresql.package}/bin/createuser glitch-ng
${config.services.postgresql.package}/bin/createdb -O glitch-ng glitch
- touch /var/lib/glitch-ng/.db-created
+ touch /var/lib/postgresql/.glitch-inited
fi
'';
serviceConfig = {