postgres upgrade@m3-atlas
This commit is contained in:
parent
7854d75742
commit
e0aa2783bb
@ -13,7 +13,6 @@ in {
|
|||||||
../features/cli
|
../features/cli
|
||||||
../features/coding
|
../features/coding
|
||||||
../features/desktop
|
../features/desktop
|
||||||
./services/librechat.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
options.features.desktop.hyprland.enable =
|
options.features.desktop.hyprland.enable =
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
users.users.m3tam3re = {
|
users.users.m3tam3re = {
|
||||||
#initialHashedPassword = "$y$j9T$IoChbWGYRh.rKfmm0G86X0$bYgsWqDRkvX.EBzJTX.Z0RsTlwspADpvEF3QErNyCMC";
|
#initialHashedPassword = "$y$j9T$IoChbWGYRh.rKfmm0G86X0$bYgsWqDRkvX.EBzJTX.Z0RsTlwspADpvEF3QErNyCMC";
|
||||||
password = "12345";
|
password = "12345";
|
||||||
|
linger = true;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "m3tam3re";
|
description = "m3tam3re";
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{config, ...}: {
|
{config, ...}: {
|
||||||
virtualisation.oci-containers.containers."baserow" = {
|
virtualisation.oci-containers.containers."baserow" = {
|
||||||
image = "docker.io/baserow/baserow:1.31.1";
|
image = "docker.io/baserow/baserow:1.33.2";
|
||||||
environmentFiles = [config.age.secrets.baserow-env.path];
|
environmentFiles = [config.age.secrets.baserow-env.path];
|
||||||
ports = ["127.0.0.1:3001:80"];
|
ports = ["127.0.0.1:3001:80"];
|
||||||
volumes = ["baserow_data:/baserow/data"];
|
volumes = ["baserow_data:/baserow/data"];
|
||||||
|
@ -18,5 +18,10 @@
|
|||||||
calendar = "03:00:00";
|
calendar = "03:00:00";
|
||||||
databases = ["ghost" "matomo"];
|
databases = ["ghost" "matomo"];
|
||||||
};
|
};
|
||||||
networking.firewall.allowedTCPPorts = [3306];
|
networking.firewall = {
|
||||||
|
extraCommands = ''
|
||||||
|
iptables -A INPUT -p tcp -s 127.0.0.1 --dport 3306 -j ACCEPT
|
||||||
|
iptables -A INPUT -p tcp -s 10.89.0.0/24 --dport 3306 -j ACCEPT
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,11 @@
|
|||||||
configureTika = true;
|
configureTika = true;
|
||||||
settings = {
|
settings = {
|
||||||
PAPERLESS_URL = "https://pl.m3ta.dev";
|
PAPERLESS_URL = "https://pl.m3ta.dev";
|
||||||
DATABASE_URL = "postgresql://paperless:paperless@localhost:5432/paperless";
|
DATABASE_URL = "postgresql://paperless:paperless@127.0.0.1:5432/paperless";
|
||||||
PAPERLESS_CONSUMER_IGNORE_PATTERN = [
|
PAPERLESS_CONSUMER_IGNORE_PATTERN = [
|
||||||
".DS_STORE/*"
|
".DS_STORE/*"
|
||||||
"desktop.ini"
|
"desktop.ini"
|
||||||
|
".env"
|
||||||
];
|
];
|
||||||
PAPERLESS_OCR_LANGUAGE = "deu+eng";
|
PAPERLESS_OCR_LANGUAGE = "deu+eng";
|
||||||
PAPERLESS_OCR_USER_ARGS = {
|
PAPERLESS_OCR_USER_ARGS = {
|
||||||
|
@ -2,23 +2,39 @@
|
|||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableTCPIP = true;
|
enableTCPIP = true;
|
||||||
package = pkgs.postgresql_15;
|
package = pkgs.postgresql_17;
|
||||||
|
extensions = with pkgs.postgresql17Packages; [
|
||||||
|
pgvector
|
||||||
|
];
|
||||||
authentication = pkgs.lib.mkOverride 10 ''
|
authentication = pkgs.lib.mkOverride 10 ''
|
||||||
local all all trust
|
# Local connections (Unix socket)
|
||||||
host all all 127.0.0.1/32 trust
|
local all postgres peer
|
||||||
host all all ::1/128 trust
|
local paperless paperless scram-sha-256
|
||||||
host all all 10.89.0.0/16 trust
|
|
||||||
'';
|
# Localhost connections (IPv4 and IPv6)
|
||||||
initialScript = pkgs.writeText "backend-initScript" ''
|
host all postgres 127.0.0.1/32 scram-sha-256
|
||||||
CREATE USER baserow WITH ENCRYPTED PASSWORD 'baserow';
|
host all postgres ::1/128 scram-sha-256
|
||||||
CREATE DATABASE baserow;
|
host paperless paperless 127.0.0.1/32 scram-sha-256
|
||||||
ALTER DATABASE baserow OWNER to baserow;
|
host paperless paperless ::1/128 scram-sha-256
|
||||||
|
|
||||||
|
# Podman network connections for Baserow
|
||||||
|
host baserow baserow 10.89.0.0/24 scram-sha-256
|
||||||
|
|
||||||
|
# Deny all other connections
|
||||||
|
local all all reject
|
||||||
|
host all all 0.0.0.0/0 reject
|
||||||
|
host all all ::/0 reject
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
services.postgresqlBackup = {
|
services.postgresqlBackup = {
|
||||||
enable = true;
|
enable = true;
|
||||||
startAt = "03:10:00";
|
startAt = "03:10:00";
|
||||||
databases = ["baserow"];
|
databases = ["baserow" "paperless"];
|
||||||
|
};
|
||||||
|
networking.firewall = {
|
||||||
|
extraCommands = ''
|
||||||
|
iptables -A INPUT -p tcp -s 127.0.0.1 --dport 5432 -j ACCEPT
|
||||||
|
iptables -A INPUT -p tcp -s 10.89.0.0/24 --dport 5432 -j ACCEPT
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
networking.firewall.allowedTCPPorts = [5432];
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user