Continue adding deployment config

This commit is contained in:
2023-11-25 15:15:32 +00:00
parent dcd1d76783
commit 3b0ee83188

View File

@@ -80,14 +80,28 @@
options.wish.service = { options.wish.service = {
enable = mkEnableOption "Enable the wish service."; enable = mkEnableOption "Enable the wish service.";
stateDir = mkOption {
type = types.str;
default = "/var/lib/wish";
description = lib.mdDoc "Wish data directory.";
};
environmentFile = mkOption { environmentFile = mkOption {
type = types.path; type = types.path;
description = lib.mdDoc '' description = lib.mdDoc ''
Environment file as defined in {manpage}`systemd.exec(5)` passed to the service. Environment file as defined in {manpage}`systemd.exec(5)` passed to the service.
'';
};
This must contain at least `LIVEBOOK_PASSWORD` or databasePath = mkOption {
`LIVEBOOK_TOKEN_ENABLED=false`. See `livebook server --help` type = types.str;
for other options.''; default = "${cfg.stateDir}/data/wish.db";
description = lib.mdDoc "Path to the sqlite3 database file.";
};
secretKeyBase = mkOption {
type = types.str;
description = lib.mdDoc "Phoenix secret key base.";
}; };
}; };
@@ -102,6 +116,11 @@
Restart = "on-failure"; Restart = "on-failure";
ExecStart = "${pkg}/bin/wish start"; ExecStart = "${pkg}/bin/wish start";
}; };
environment = {
DATABASE_PATH = cfg.databasePath;
SECRET_KEY_BASE = cfg.secretKeyBase;
};
}; };
}; };
}; };