mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 10:58:02 +00:00
hosts/plover: add pre-service script for atuin service
This commit is contained in:
parent
affd08e3c1
commit
a046192bca
@ -467,6 +467,14 @@ in
|
|||||||
port = 8965;
|
port = 8965;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.atuin = {
|
||||||
|
path = [ config.services.postgresql.package ];
|
||||||
|
preStart = ''
|
||||||
|
psql -tAc "SELECT 1 FROM information_schema.schemata WHERE schema_name='atuin';" \
|
||||||
|
grep -q 1 || psql -tAc "CREATE SCHEMA IF NOT EXISTS atuin;"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
# Of course, what is a server without a backup? A professionally-handled
|
# Of course, what is a server without a backup? A professionally-handled
|
||||||
# production system. However, we're not professionals so we do have backups.
|
# production system. However, we're not professionals so we do have backups.
|
||||||
services.borgbackup.jobs =
|
services.borgbackup.jobs =
|
||||||
|
Loading…
Reference in New Issue
Block a user