mirror of
https://github.com/kmein/niveum
synced 2026-03-28 23:31:07 +01:00
Compare commits
6 Commits
e76489b6d8
...
feature/ha
| Author | SHA1 | Date | |
|---|---|---|---|
| eafc87415a | |||
| 1e37581325 | |||
| c63cb4d157 | |||
| 88257e9ffb | |||
| b9d0258132 | |||
| 53bbc65716 |
@@ -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}";
|
||||
|
||||
@@ -275,7 +275,7 @@ in {
|
||||
libreoffice
|
||||
# gnumeric
|
||||
dia
|
||||
pandoc
|
||||
unstablePackages.pandoc
|
||||
niveumPackages.man-pandoc
|
||||
typst
|
||||
# proselint
|
||||
|
||||
2
secrets
2
secrets
Submodule secrets updated: 0e94e9e2ef...9efd6ac7e1
@@ -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
|
||||
|
||||
@@ -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
54
systems/ful/ledger.nix
Normal 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}";
|
||||
};
|
||||
}
|
||||
@@ -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 = [
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user