helm/hosts/profiles/wallabag/default.nix

38 lines
1,017 B
Nix
Raw Normal View History

2022-12-19 21:51:11 -08:00
{ self, pkgs, config, lib, ... }:
2022-09-18 15:13:50 -07:00
{
2024-07-14 20:20:49 -07:00
age.secrets.wallabag-password.file = "${self}/secrets/wallabag-password.age";
age.secrets.wallabag-secret.file = "${self}/secrets/wallabag-secret.age";
age.secrets.wallabag-password.owner = "wallabag";
age.secrets.wallabag-secret.owner = "wallabag";
2022-09-18 15:13:50 -07:00
services.postgresql = {
enable = true;
2024-01-11 21:56:55 -08:00
package = pkgs.postgresql_15;
2022-09-18 15:13:50 -07:00
# Ensure the database, user, and permissions always exist
ensureDatabases = [ "wallabag" ];
ensureUsers = [
{
name = "wallabag";
2024-01-11 21:56:55 -08:00
# ensureDBOwnership = true;
2022-09-18 15:13:50 -07:00
}
];
2024-01-11 21:56:55 -08:00
authentication = ''
2024-07-14 20:20:49 -07:00
local wallabag all peer
2024-01-11 21:56:55 -08:00
'';
2022-09-18 15:13:50 -07:00
};
services.wallabag = {
enable = true;
2024-07-14 20:20:49 -07:00
domain = "read.mossnet.lan";
virtualHost.enable = true;
2024-03-15 23:25:49 -07:00
package = pkgs.my-wallabag;
2024-07-14 20:20:49 -07:00
# Systemd now defaults to /var/lib?
# dataDir = "/var/lib/wallabag";
parameters = {
"env(SECRET_FILE)" = config.age.secrets.wallabag-secret.path;
secret = "%env(file:resolve:SECRET_FILE)%";
};
2022-09-18 15:13:50 -07:00
};
}