Continue adding deployment config
This commit is contained in:
25
flake.nix
25
flake.nix
@@ -80,14 +80,28 @@
|
||||
options.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 {
|
||||
type = types.path;
|
||||
description = lib.mdDoc ''
|
||||
Environment file as defined in {manpage}`systemd.exec(5)` passed to the service.
|
||||
'';
|
||||
};
|
||||
|
||||
This must contain at least `LIVEBOOK_PASSWORD` or
|
||||
`LIVEBOOK_TOKEN_ENABLED=false`. See `livebook server --help`
|
||||
for other options.'';
|
||||
databasePath = mkOption {
|
||||
type = types.str;
|
||||
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";
|
||||
ExecStart = "${pkg}/bin/wish start";
|
||||
};
|
||||
|
||||
environment = {
|
||||
DATABASE_PATH = cfg.databasePath;
|
||||
SECRET_KEY_BASE = cfg.secretKeyBase;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user