feat: wiki test

This commit is contained in:
Nick 2024-10-19 16:00:30 -05:00
parent ddcf87fcb4
commit 020fec7e8e
2 changed files with 30 additions and 19 deletions

View file

@ -13,11 +13,12 @@ in {
services = {
wiki-js = {
enable = true;
environmentFile = config.sops.secrets."${name}-pass".path;
# environmentFile = config.sops.secrets."${name}-pass".path;
settings = {
port = ports.port0;
bindIP = localhost;
db = {
db = name;
type = "postgres";
host = "/run/postgresql";
};
@ -35,25 +36,35 @@ in {
};
};
};
postgresql = {
ensureDatabases = [name];
ensureUsers = [
{
name = name;
ensureDBOwnership = true;
}
];
};
};
sops = let
sopsSecrets = ["pass"];
sopsPath = secret: {
path = "${sops.path0}/${name}-${secret}";
owner = "root";
mode = "600";
};
in {
secrets = builtins.listToAttrs (
map
(secret: {
name = "${name}-${secret}";
value = sopsPath secret;
})
sopsSecrets
);
};
# sops = let
# sopsSecrets = ["pass"];
# sopsPath = secret: {
# path = "${sops.path0}/${name}-${secret}";
# owner = "root";
# mode = "600";
# };
# in {
# secrets = builtins.listToAttrs (
# map
# (secret: {
# name = "${name}-${secret}";
# value = sopsPath secret;
# })
# sopsSecrets
# );
# };
fileSystems."/var/lib/${name}" = {
device = paths.path0;