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 = {
|
||||
enable = true;
|
||||
location = paths.path0;
|
||||
databases = ["mastodon" "nextcloud" "peertube" "forgejo"];
|
||||
databases = ["mastodon" "nextcloud" "peertube" "forgejo" "wiki"];
|
||||
};
|
||||
postgresql = {
|
||||
enable = true;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue