mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 18:15:13 -05:00
feat: wiki test
This commit is contained in:
parent
ddcf87fcb4
commit
020fec7e8e
2 changed files with 30 additions and 19 deletions
|
@ -6,7 +6,7 @@ in {
|
||||||
postgresqlBackup = {
|
postgresqlBackup = {
|
||||||
enable = true;
|
enable = true;
|
||||||
location = paths.path0;
|
location = paths.path0;
|
||||||
databases = ["mastodon" "nextcloud" "peertube" "forgejo"];
|
databases = ["mastodon" "nextcloud" "peertube" "forgejo" "wiki"];
|
||||||
};
|
};
|
||||||
postgresql = {
|
postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -13,11 +13,12 @@ in {
|
||||||
services = {
|
services = {
|
||||||
wiki-js = {
|
wiki-js = {
|
||||||
enable = true;
|
enable = true;
|
||||||
environmentFile = config.sops.secrets."${name}-pass".path;
|
# environmentFile = config.sops.secrets."${name}-pass".path;
|
||||||
settings = {
|
settings = {
|
||||||
port = ports.port0;
|
port = ports.port0;
|
||||||
bindIP = localhost;
|
bindIP = localhost;
|
||||||
db = {
|
db = {
|
||||||
|
db = name;
|
||||||
type = "postgres";
|
type = "postgres";
|
||||||
host = "/run/postgresql";
|
host = "/run/postgresql";
|
||||||
};
|
};
|
||||||
|
@ -35,25 +36,35 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postgresql = {
|
||||||
|
ensureDatabases = [name];
|
||||||
|
ensureUsers = [
|
||||||
|
{
|
||||||
|
name = name;
|
||||||
|
ensureDBOwnership = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sops = let
|
# sops = let
|
||||||
sopsSecrets = ["pass"];
|
# sopsSecrets = ["pass"];
|
||||||
sopsPath = secret: {
|
# sopsPath = secret: {
|
||||||
path = "${sops.path0}/${name}-${secret}";
|
# path = "${sops.path0}/${name}-${secret}";
|
||||||
owner = "root";
|
# owner = "root";
|
||||||
mode = "600";
|
# mode = "600";
|
||||||
};
|
# };
|
||||||
in {
|
# in {
|
||||||
secrets = builtins.listToAttrs (
|
# secrets = builtins.listToAttrs (
|
||||||
map
|
# map
|
||||||
(secret: {
|
# (secret: {
|
||||||
name = "${name}-${secret}";
|
# name = "${name}-${secret}";
|
||||||
value = sopsPath secret;
|
# value = sopsPath secret;
|
||||||
})
|
# })
|
||||||
sopsSecrets
|
# sopsSecrets
|
||||||
);
|
# );
|
||||||
};
|
# };
|
||||||
|
|
||||||
fileSystems."/var/lib/${name}" = {
|
fileSystems."/var/lib/${name}" = {
|
||||||
device = paths.path0;
|
device = paths.path0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue