1
0
mirror of https://github.com/kmein/niveum synced 2026-03-28 23:31:07 +01:00

6 Commits

8 changed files with 82 additions and 8 deletions

View File

@@ -212,11 +212,7 @@ in {
"${modifier}+r" = "mode resize";
"${modifier}+v" = "split v";
"${modifier}+w" = "layout tabbed";
"${modifier}+q" = "exec ${pkgs.writers.writeDash "newsboat-sync" ''
notify-send --app-name="newsboat" "Updating ..."
newsboat -x reload
notify-send --app-name="newsboat" "Finished updating."
''}";
"${modifier}+q" = "exec ${config.services.clipmenu.package}/bin/clipmenu";
"${modifier}+Return" = "exec ${(defaultApplications pkgs).terminal}";
"${modifier}+t" = "exec ${(defaultApplications pkgs).fileManager}";

View File

@@ -275,7 +275,7 @@ in {
libreoffice
# gnumeric
dia
pandoc
unstablePackages.pandoc
niveumPackages.man-pandoc
typst
# proselint

Submodule secrets updated: 0e94e9e2ef...9efd6ac7e1

View File

@@ -24,6 +24,7 @@ secrets/kabsa-specus-privateKey.age
secrets/kabsa-syncthing-cert.age
secrets/kabsa-syncthing-key.age
secrets/kfm-password.age
secrets/ledger-basicAuth.age
secrets/makanek-retiolum-privateKey-ed25519.age
secrets/makanek-retiolum-privateKey-rsa.age
secrets/makanek-specus-privateKey.age

View File

@@ -11,6 +11,7 @@ in {
./matomo.nix
./radio.nix
./panoptikon.nix
./ledger.nix
../../configs/monitoring.nix
../../configs/tor.nix
../../configs/save-space.nix

54
systems/ful/ledger.nix Normal file
View File

@@ -0,0 +1,54 @@
{
config,
pkgs,
...
}: {
services.hledger-web = {
enable = true;
capabilities = {
add = true;
view = true;
manage = false;
};
serveApi = false; # serve only the JSON API
baseUrl = "https://ledger.kmein.de";
journalFiles = [
"privat.journal"
];
};
systemd.services.hledger-backup = {
enable = true;
startAt = "hourly";
wants = ["network-online.target"];
wantedBy = ["multi-user.target"];
script = ''
${pkgs.git}/bin/git config user.name "hledger-web"
${pkgs.git}/bin/git config user.email "hledger-web@${config.networking.hostName}"
${pkgs.git}/bin/git commit -am $(date -Ih)
${pkgs.git}/bin/git pull --rebase
${pkgs.git}/bin/git push
'';
serviceConfig = {
User = "hledger";
Group = "hledger";
WorkingDirectory = config.services.hledger-web.stateDir;
};
};
age.secrets = {
ledger-basicAuth = {
file = ../../secrets/ledger-basicAuth.age;
owner = "nginx";
group = "nginx";
mode = "400";
};
};
services.nginx.virtualHosts."ledger.kmein.de" = {
enableACME = true;
basicAuthFile = config.age.secrets.ledger-basicAuth.path;
forceSSL = true;
locations."/".proxyPass = "http://127.0.0.1:${toString config.services.hledger-web.port}";
};
}

View File

@@ -247,6 +247,12 @@ in {
group = "prometheus";
mode = "440";
};
home-assistant-token = {
file = ../../../secrets/home-assistant-token.age;
owner = "prometheus";
group = "prometheus";
mode = "440";
};
};
services.prometheus.alertmanagers = [
@@ -315,6 +321,14 @@ in {
}
];
}
{
job_name = "home_assistant";
scrape_interval = "60s";
metrics_path = "/api/prometheus";
scheme = "http";
static_configs = [{targets = ["zaatar.r:8123"];}];
bearer_token_file = config.age.secrets.home-assistant-token.path;
}
{
job_name = "ful";
static_configs = [

View File

@@ -1,9 +1,10 @@
{config, ...}: let
port = 8123;
inherit (import ../../lib) restic;
influxPort = 9100;
volumeName = "home-assistant.bak";
in {
networking.firewall.allowedTCPPorts = [port];
networking.firewall.allowedTCPPorts = [port influxPort];
services.nginx.virtualHosts."home.kmein.r" = {
locations."/" = {
@@ -11,6 +12,13 @@ in {
};
};
services.influxdb = {
enable = true;
extraConfig = {
http.bind-address = ":${toString influxPort}";
};
};
services.restic.backups.niveum = {
initialize = true;
inherit (restic) repository;