chore: merge remote-tracking branch 'refs/remotes/origin/master'

This commit is contained in:
Ahwx 2025-06-08 14:58:36 +02:00
commit 8d92925a61
13 changed files with 127 additions and 69 deletions

View file

@ -12,6 +12,10 @@
./../../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";
liv.server.enable = true;

View file

@ -1,30 +1,45 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"thunderbolt"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/24035f97-746a-4aec-b1d8-696bc32d3c97";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/24035f97-746a-4aec-b1d8-696bc32d3c97";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-156453ac-bbad-452c-ad92-4fc569db9347".device = "/dev/disk/by-uuid/156453ac-bbad-452c-ad92-4fc569db9347";
boot.initrd.luks.devices."luks-root".device = "/dev/nvme0n1p3";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/0EFD-4B3F";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/0EFD-4B3F";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [ ];

54
hosts/violet/backups.nix Normal file
View file

@ -0,0 +1,54 @@
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";
};
};
}

View file

@ -9,6 +9,7 @@
./hardware-configuration.nix
./../../modules/core/default.server.nix
./../../modules/services/violet.nix
# ./backups.nix # disable for now, test first.
];
networking.hostName = "violet";
@ -24,15 +25,16 @@
pkgs.kitty.terminfo
];
services.smartd = {
enable = lib.mkForce false;
autodetect = lib.mkForce false;
services = {
smartd = {
enable = lib.mkForce false;
autodetect = lib.mkForce false;
};
xserver.videoDrivers = [ "nvidia" ];
};
liv.nvidia.enable = true;
services.xserver.videoDrivers = [ "nvidia" ];
boot = {
loader.grub = {
enable = true;

View file

@ -23,7 +23,7 @@
desktop.enable = true;
creative.enable = true;
amdgpu.enable = true;
wine.enable = true;
wine.enable = false;
gui.enable = true;
};