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:
@@ -11,7 +11,7 @@
|
||||
environment.variables.ATUIN_CONFIG_DIR = toString (pkgs.writeTextDir "/config.toml" ''
|
||||
auto_sync = true
|
||||
update_check = false
|
||||
sync_address = "http://zaatar.r:8888"
|
||||
sync_address = "http://tahina.r:8888"
|
||||
sync_frequency = 0
|
||||
style = "compact"
|
||||
'');
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
restic = rec {
|
||||
port = 3571;
|
||||
host = "zaatar.r";
|
||||
host = "tahina.r";
|
||||
repository = "rest:http://${host}:${toString port}/";
|
||||
};
|
||||
|
||||
|
||||
2
secrets
2
secrets
Submodule secrets updated: ecdc95abf8...0fe64633ae
@@ -317,12 +317,12 @@ in {
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "zaatar";
|
||||
job_name = "tahina";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [
|
||||
"zaatar.r:${toString config.services.prometheus.exporters.node.port}"
|
||||
"zaatar.r:${toString restic.port}"
|
||||
"tahina.r:${toString config.services.prometheus.exporters.node.port}"
|
||||
"tahina.r:${toString restic.port}"
|
||||
];
|
||||
}
|
||||
];
|
||||
@@ -332,7 +332,7 @@ in {
|
||||
scrape_interval = "60s";
|
||||
metrics_path = "/api/prometheus";
|
||||
scheme = "http";
|
||||
static_configs = [{targets = ["zaatar.r:8123"];}];
|
||||
static_configs = [{targets = ["tahina.r:8123"];}];
|
||||
bearer_token_file = config.age.secrets.home-assistant-token.path;
|
||||
}
|
||||
{
|
||||
|
||||
@@ -3,15 +3,22 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../../lib) retiolumAddresses;
|
||||
inherit (import ../../lib) retiolumAddresses restic;
|
||||
in {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./home-assistant.nix
|
||||
./backup.nix
|
||||
./atuin.nix
|
||||
../../configs/spacetime.nix
|
||||
../../configs/sshd.nix
|
||||
../../configs/printing.nix
|
||||
../../configs/monitoring.nix
|
||||
../../configs/tmux.nix
|
||||
../../configs/retiolum.nix
|
||||
../../configs/nix.nix
|
||||
../../configs/admin-essentials.nix
|
||||
../../configs/wpa_supplicant.nix
|
||||
];
|
||||
|
||||
age.secrets = {
|
||||
@@ -27,47 +34,40 @@ in {
|
||||
owner = "tinc-retiolum";
|
||||
group = "tinc-retiolum";
|
||||
};
|
||||
};
|
||||
|
||||
console.keyMap = "de";
|
||||
i18n.defaultLocale = "de_DE.UTF-8";
|
||||
services.xserver = {
|
||||
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";
|
||||
};
|
||||
restic = {
|
||||
file = ../../secrets/restic.age;
|
||||
mode = "400";
|
||||
owner = "restic";
|
||||
group = "restic";
|
||||
};
|
||||
};
|
||||
boot.plymouth.enable = true;
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.libreoffice
|
||||
pkgs.gimp
|
||||
pkgs.inkscape
|
||||
pkgs.firefox
|
||||
pkgs.audacity
|
||||
pkgs.pidgin
|
||||
pkgs.git
|
||||
];
|
||||
services.restic.backups.niveum = {
|
||||
initialize = true;
|
||||
inherit (restic) repository;
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
RandomizedDelaySec = "1h";
|
||||
};
|
||||
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 = {
|
||||
useDHCP = false;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
{config, ...}: let
|
||||
port = 8123;
|
||||
inherit (import ../../lib) restic;
|
||||
influxPort = 9100;
|
||||
volumeName = "home-assistant.bak";
|
||||
volumeName = "home-assistant";
|
||||
in {
|
||||
networking.firewall.allowedTCPPorts = [port influxPort];
|
||||
networking.firewall.allowedTCPPorts = [port];
|
||||
|
||||
services.nginx.virtualHosts."home.kmein.r" = {
|
||||
locations."/" = {
|
||||
Reference in New Issue
Block a user