1
0
mirror of https://github.com/kmein/niveum synced 2026-03-25 22:01:08 +01:00

8 Commits

8 changed files with 41 additions and 16 deletions

View File

@@ -254,7 +254,7 @@ in {
} | rofi -dmenu -i -p 'notes')
if test "$note_file"
then
i3-sensible-terminal -e "$EDITOR" "$note_file"
i3-sensible-terminal -e "$EDITOR" "~/notes/$note_file"
fi
''
}";

View File

@@ -8,4 +8,9 @@
nix.gc.automatic = true;
nix.optimise.automatic = true;
services.journald.extraConfig = "SystemMaxUse=500M";
# https://webzine.snowflake.ovh/issue-001.html -- garbage collect when less then 1 GB is available, make 3 GB fee
nix.extraOptions = ''
min-free = 1073741824
max-free = 3221225472
'';
}

View File

@@ -43,7 +43,7 @@ in {
passwordFile = toString <secrets/restic/password>;
paths = [
"/var/lib/codimd"
"/var/lib/postgresql"
config.services.postgresqlBackup.location
"/var/lib/weechat"
"/var/lib/nextcloud"
"/var/lib/grafana"

View File

@@ -176,18 +176,20 @@ in {
receivers = [
{
name = "all";
telegram_configs = [{
bot_token = lib.strings.fileContents <system-secrets/telegram/prometheus.token>;
chat_id = 18980945;
parse_mode = "";
api_url = "https://api.telegram.org";
send_resolved = true;
message = ''
{{range .Alerts -}}
{{ .Status }}: {{ index .Annotations "summary" }}
{{end -}}
'';
}];
telegram_configs = [
{
bot_token = lib.strings.fileContents <system-secrets/telegram/prometheus.token>;
chat_id = 18980945;
parse_mode = "";
api_url = "https://api.telegram.org";
send_resolved = true;
message = ''
{{range .Alerts -}}
{{ .Status }}: {{ index .Annotations "summary" }}
{{end -}}
'';
}
];
email_configs = let
inherit (import <niveum/lib>) kieran;
inherit (import <niveum/lib/email.nix> {inherit lib;}) cock;

View File

@@ -12,6 +12,7 @@ in {
package = pkgs.nextcloud25;
https = true;
enableBrokenCiphersForSSE = false;
autoUpdateApps = {
enable = true;
@@ -65,13 +66,18 @@ in {
}
];
services.postgresqlBackup = {
enable = true;
databases = [config.services.nextcloud.config.dbname];
};
services.postgresql = {
enable = true;
ensureDatabases = ["nextcloud"];
ensureDatabases = [config.services.nextcloud.config.dbname];
ensureUsers = [
{
name = "nextcloud";
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
ensurePermissions."DATABASE ${config.services.nextcloud.config.dbname}" = "ALL PRIVILEGES";
}
];
};

View File

@@ -1,6 +1,7 @@
{
pkgs,
lib,
config,
...
}: let
domain = "feed.kmein.de";
@@ -17,6 +18,11 @@ in {
};
};
services.postgresqlBackup = {
enable = true;
databases = [config.services.tt-rss.database.name];
};
services.nginx.virtualHosts.${domain} = {
enableACME = true;
forceSSL = true;

View File

@@ -14,6 +14,11 @@ in {
];
};
services.postgresqlBackup = {
enable = true;
databases = ["atuin"];
};
systemd.tmpfiles.rules = [
(tmpfilesConfig {
type = "d";

View File

@@ -41,6 +41,7 @@ in {
paths = [
"/var/lib/moodle-dl"
"/var/lib/containers/storage/volumes/home-assistant"
config.services.postgresqlBackup.location
];
};