mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-05 07:05:40 +01:00
Compare commits
No commits in common. "1b514a44c25426d4a08e39c11b4e340f3e42758b" and "84f7e2ce6a9869ebb287be33c839d06255b61257" have entirely different histories.
1b514a44c2
...
84f7e2ce6a
5 changed files with 6 additions and 67 deletions
|
|
@ -12,10 +12,6 @@
|
||||||
./../../modules/services/dandelion.nix
|
./../../modules/services/dandelion.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users.liv.openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOLdcB5JFWx6OK2BAr8J0wPHNhr2VP2/Ci6fv3a+DPfo liv@violet" # allow violet to log in over ssh to do back ups
|
|
||||||
];
|
|
||||||
|
|
||||||
networking.hostName = "dandelion";
|
networking.hostName = "dandelion";
|
||||||
|
|
||||||
liv.server.enable = true;
|
liv.server.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
let
|
|
||||||
borgbackupMonitor =
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib;
|
|
||||||
{
|
|
||||||
key = "borgbackupMonitor";
|
|
||||||
_file = "borgbackupMonitor";
|
|
||||||
config.systemd.services =
|
|
||||||
{
|
|
||||||
"notify-problems@" = {
|
|
||||||
enable = true;
|
|
||||||
serviceConfig.User = "liv";
|
|
||||||
environment.SERVICE = "%i";
|
|
||||||
script = ''
|
|
||||||
${pkgs.curl}/bin/curl -d "$SERVICE FAILED! - service $SERVICE on host $(hostname) failed, run journalctl -u $SERVICE for details."
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
// flip mapAttrs' config.services.borgbackup.jobs (
|
|
||||||
name: value:
|
|
||||||
nameValuePair "borgbackup-job-${name}" {
|
|
||||||
unitConfig.OnFailure = "notify-problems@%i.service";
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
# optional, but this actually forces backup after boot in case laptop was powered off during scheduled event
|
|
||||||
# for example, if you scheduled backups daily, your laptop should be powered on at 00:00
|
|
||||||
config.systemd.timers = flip mapAttrs' config.services.borgbackup.jobs (
|
|
||||||
name: value:
|
|
||||||
nameValuePair "borgbackup-job-${name}" {
|
|
||||||
timerConfig.Persistent = true;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [ borgbackupMonitor ];
|
|
||||||
services = {
|
|
||||||
borgbackup.jobs.liv-violet = {
|
|
||||||
paths = "/home/liv";
|
|
||||||
encryption.mode = "none";
|
|
||||||
environment.BORG_RSH = "ssh -i /home/liv/.ssh/id_ed25519";
|
|
||||||
repo = "ssh://liv@100.115.178.50:9123/spinners/rootvol/backups/hosts/violet";
|
|
||||||
compression = "auto,zstd";
|
|
||||||
startAt = "daily";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -9,7 +9,6 @@
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./../../modules/core/default.server.nix
|
./../../modules/core/default.server.nix
|
||||||
./../../modules/services/violet.nix
|
./../../modules/services/violet.nix
|
||||||
# ./backups.nix # disable for now, test first.
|
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "violet";
|
networking.hostName = "violet";
|
||||||
|
|
@ -25,16 +24,15 @@
|
||||||
pkgs.kitty.terminfo
|
pkgs.kitty.terminfo
|
||||||
];
|
];
|
||||||
|
|
||||||
services = {
|
services.smartd = {
|
||||||
smartd = {
|
enable = lib.mkForce false;
|
||||||
enable = lib.mkForce false;
|
autodetect = lib.mkForce false;
|
||||||
autodetect = lib.mkForce false;
|
|
||||||
};
|
|
||||||
xserver.videoDrivers = [ "nvidia" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
liv.nvidia.enable = true;
|
liv.nvidia.enable = true;
|
||||||
|
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
loader.grub = {
|
loader.grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ in
|
||||||
listen-http = "127.0.0.1:${toString port}";
|
listen-http = "127.0.0.1:${toString port}";
|
||||||
behind-proxy = true;
|
behind-proxy = true;
|
||||||
visitor-attachment-daily-bandwidth-limit = "10M";
|
visitor-attachment-daily-bandwidth-limit = "10M";
|
||||||
visitor-request-limit-burst = 15;
|
visitor-request-limit-burst = 5;
|
||||||
visitor-request-limit-replenish = "15s";
|
visitor-request-limit-replenish = "15s";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@
|
||||||
++ [ (import ./nginx.nix) ]
|
++ [ (import ./nginx.nix) ]
|
||||||
# ++ [(import ./komga.nix)]
|
# ++ [(import ./komga.nix)]
|
||||||
++ [ (import ./radicale.nix) ]
|
++ [ (import ./radicale.nix) ]
|
||||||
++ [ (import ./tailscale.nix) ]
|
|
||||||
++ [ (import ./readarr.nix) ];
|
++ [ (import ./readarr.nix) ];
|
||||||
# ++ [(import ./smart-monitoring.nix)]
|
# ++ [(import ./smart-monitoring.nix)]
|
||||||
# ++ [(import ./jitsi-meet.nix)]
|
# ++ [(import ./jitsi-meet.nix)]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue