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

zaatar died, move hass and restic to tahina

This commit is contained in:
2024-07-07 14:03:52 +02:00
parent 9f6d1c3dc6
commit 6d16b93530
8 changed files with 48 additions and 49 deletions

View File

@@ -11,7 +11,7 @@
environment.variables.ATUIN_CONFIG_DIR = toString (pkgs.writeTextDir "/config.toml" '' environment.variables.ATUIN_CONFIG_DIR = toString (pkgs.writeTextDir "/config.toml" ''
auto_sync = true auto_sync = true
update_check = false update_check = false
sync_address = "http://zaatar.r:8888" sync_address = "http://tahina.r:8888"
sync_frequency = 0 sync_frequency = 0
style = "compact" style = "compact"
''); '');

View File

@@ -11,7 +11,7 @@
restic = rec { restic = rec {
port = 3571; port = 3571;
host = "zaatar.r"; host = "tahina.r";
repository = "rest:http://${host}:${toString port}/"; repository = "rest:http://${host}:${toString port}/";
}; };

Submodule secrets updated: ecdc95abf8...0fe64633ae

View File

@@ -317,12 +317,12 @@ in {
]; ];
} }
{ {
job_name = "zaatar"; job_name = "tahina";
static_configs = [ static_configs = [
{ {
targets = [ targets = [
"zaatar.r:${toString config.services.prometheus.exporters.node.port}" "tahina.r:${toString config.services.prometheus.exporters.node.port}"
"zaatar.r:${toString restic.port}" "tahina.r:${toString restic.port}"
]; ];
} }
]; ];
@@ -332,7 +332,7 @@ in {
scrape_interval = "60s"; scrape_interval = "60s";
metrics_path = "/api/prometheus"; metrics_path = "/api/prometheus";
scheme = "http"; scheme = "http";
static_configs = [{targets = ["zaatar.r:8123"];}]; static_configs = [{targets = ["tahina.r:8123"];}];
bearer_token_file = config.age.secrets.home-assistant-token.path; bearer_token_file = config.age.secrets.home-assistant-token.path;
} }
{ {

View File

@@ -3,15 +3,22 @@
pkgs, pkgs,
... ...
}: let }: let
inherit (import ../../lib) retiolumAddresses; inherit (import ../../lib) retiolumAddresses restic;
in { in {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./home-assistant.nix
./backup.nix
./atuin.nix
../../configs/spacetime.nix ../../configs/spacetime.nix
../../configs/sshd.nix ../../configs/sshd.nix
../../configs/printing.nix
../../configs/monitoring.nix
../../configs/tmux.nix
../../configs/retiolum.nix ../../configs/retiolum.nix
../../configs/nix.nix ../../configs/nix.nix
../../configs/admin-essentials.nix ../../configs/admin-essentials.nix
../../configs/wpa_supplicant.nix
]; ];
age.secrets = { age.secrets = {
@@ -27,47 +34,40 @@ in {
owner = "tinc-retiolum"; owner = "tinc-retiolum";
group = "tinc-retiolum"; group = "tinc-retiolum";
}; };
}; restic = {
file = ../../secrets/restic.age;
console.keyMap = "de"; mode = "400";
i18n.defaultLocale = "de_DE.UTF-8"; owner = "restic";
services.xserver = { group = "restic";
layout = "de";
libinput.enable = true;
};
users.users.xenos = {
name = "xenos";
password = "xenos";
isNormalUser = true;
extraGroups = ["networkmanager"];
};
services.xserver = {
enable = true;
desktopManager.pantheon.enable = true;
displayManager = {
lightdm = {
enable = true;
greeters.pantheon.enable = true;
};
autoLogin = {
enable = true;
user = "xenos";
};
}; };
}; };
boot.plymouth.enable = true;
environment.systemPackages = [ services.restic.backups.niveum = {
pkgs.libreoffice initialize = true;
pkgs.gimp inherit (restic) repository;
pkgs.inkscape timerConfig = {
pkgs.firefox OnCalendar = "daily";
pkgs.audacity RandomizedDelaySec = "1h";
pkgs.pidgin };
pkgs.git passwordFile = config.age.secrets.restic.path;
]; paths = [
"/var/lib/moodle-dl"
"/var/lib/containers/storage/volumes/home-assistant"
config.services.postgresqlBackup.location
];
};
services.logind = {
lidSwitch = "ignore";
lidSwitchDocked = "ignore";
lidSwitchExternalPower = "ignore";
suspendKey = "ignore";
suspendKeyLongPress = "ignore";
hibernateKey = "ignore";
hibernateKeyLongPress = "ignore";
};
services.illum.enable = true;
networking = { networking = {
useDHCP = false; useDHCP = false;

View File

@@ -1,10 +1,9 @@
{config, ...}: let {config, ...}: let
port = 8123; port = 8123;
inherit (import ../../lib) restic; inherit (import ../../lib) restic;
influxPort = 9100; volumeName = "home-assistant";
volumeName = "home-assistant.bak";
in { in {
networking.firewall.allowedTCPPorts = [port influxPort]; networking.firewall.allowedTCPPorts = [port];
services.nginx.virtualHosts."home.kmein.r" = { services.nginx.virtualHosts."home.kmein.r" = {
locations."/" = { locations."/" = {