Migrate nextcloud database to kubernetes
Disable postgresql database on lewis
This commit is contained in:
parent
c56a17fc4f
commit
266d7d905c
4 changed files with 127 additions and 93 deletions
|
@ -35,15 +35,7 @@ let
|
|||
encryption_passcommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets."borg_passphrase".path}";
|
||||
before_everything = [ "${beforeEverything}/bin/beforeEverything" ];
|
||||
|
||||
postgresql_databases = [
|
||||
{
|
||||
name = "nextcloud";
|
||||
hostname = "lewis.dmz";
|
||||
username = "nextcloud";
|
||||
password = "\${NEXTCLOUD_DATABASE_PASSWORD}";
|
||||
format = "tar";
|
||||
}
|
||||
];
|
||||
postgresql_databases = [ ];
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.lab.data-sharing;
|
||||
|
||||
|
@ -36,14 +36,6 @@ in
|
|||
Root directory of NFS data.
|
||||
'';
|
||||
};
|
||||
|
||||
postgresDir = lib.mkOption {
|
||||
default = "/mnt/data/postgresql/${config.services.postgresql.package.psqlSchema}";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
Postgresql data directory.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -54,23 +46,9 @@ in
|
|||
20048 # NFS
|
||||
];
|
||||
|
||||
services = {
|
||||
nfs.server = {
|
||||
enable = true;
|
||||
exports = nfsExports;
|
||||
};
|
||||
|
||||
postgresql = {
|
||||
enable = true;
|
||||
package = pkgs.postgresql_15;
|
||||
enableTCPIP = true;
|
||||
|
||||
dataDir = cfg.postgresDir;
|
||||
|
||||
authentication = ''
|
||||
host nextcloud nextcloud all md5
|
||||
'';
|
||||
};
|
||||
services.nfs.server = {
|
||||
enable = true;
|
||||
exports = nfsExports;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Reference in a new issue