This commit is contained in:
Sebastian Moser
2025-07-10 10:18:40 +02:00
parent 919673e994
commit 60b70c23d2
5 changed files with 81 additions and 14 deletions

View File

@@ -203,7 +203,7 @@
runtimeInputs = with pkgs; [ curl w3m ];
text = ''
ip=$(curl my.ip.fi)
ip=$(curl -4 my.ip.fi)
curl "http://dynv6.com/api/update?hostname=${builtins.readFile "${secretsDir}/dns-name-two"}&ipv4=$ip&token=${builtins.readFile "${secretsDir}/dns-name-two-token"}"
curl "https://dynamicdns.park-your-domain.com/update?host=home&domain=${builtins.readFile "${secretsDir}/dns-name"}&password=${builtins.readFile "${secretsDir}/dns-name-token"}&ip=$ip"
@@ -447,12 +447,13 @@
unitConfig = {
Type = "simple";
};
path = with pkgs; [ socat borgbackup openssh ];
path = with pkgs; [ curl bash socat borgbackup openssh ];
serviceConfig = {
ExecStart = "/home/borgs/backups/ouranos-minecraft.sh";
User = "borgs";
Group = "borgs";
WorkingDirectory = "/home/borgs/backups";
ExecStopPost = "/home/borgs/backups/exit-ouranos-minecraft.sh";
};
wants = [ "home-files-storage.mount" ];
};
@@ -474,12 +475,13 @@
unitConfig = {
Type = "simple";
};
path = with pkgs; [ socat borgbackup openssh ];
path = with pkgs; [ curl bash socat borgbackup openssh ];
serviceConfig = {
ExecStart = "/home/borgs/backups/fusu-server.sh";
User = "borgs";
Group = "borgs";
WorkingDirectory = "/home/borgs/backups";
ExecStopPost = "/home/borgs/backups/exit-fusu-server.sh";
};
wants = [ "home-files-storage.mount" ];
};
@@ -488,11 +490,39 @@
timerConfig = {
#OnBootSec = "5m";
#OnUnitActiveSec = "1d";
OnCalendar = "*-*-* 04:00:00";
OnCalendar = "*-*-* 03:00:00";
Persistent = "True";
Unit = "backup-fusu-server.service";
};
};
# ocih
systemd.services.backup-ocih = {
enable = true;
description = "backup the ~/host folder on ocih";
unitConfig = {
Type = "simple";
};
path = with pkgs; [ curl bash socat borgbackup openssh ];
serviceConfig = {
ExecStart = "/home/borgs/backups/fusu-ocih.sh";
User = "borgs";
Group = "borgs";
WorkingDirectory = "/home/borgs/backups";
ExecStopPost = "/home/borgs/backups/exit-ocih.sh";
};
wants = [ "home-files-storage.mount" ];
};
systemd.timers.backup-ocih = {
wantedBy = [ "timers.target" ];
timerConfig = {
#OnBootSec = "5m";
#OnUnitActiveSec = "1d";
OnCalendar = "*-*-* 02:00:00";
Persistent = "True";
Unit = "backup-ocih.service";
};
};
}

View File

@@ -68,6 +68,7 @@
services.blueman.enable = true;
hardware.enableRedistributableFirmware = true;
services.tailscale.enable = true;
environment.systemPackages = with pkgs; [
linuxPackages.usbip

View File

@@ -35,6 +35,43 @@
#services.openssh.enable = true;
# virtual display
hardware.display = {
edid.packages = [
(pkgs.runCommand "edid-custom" {} ''
mkdir -p "$out/lib/firmware/edid"
base64 -d > "$out/lib/firmware/edid/virtual.bin" <<'EOF'
AP///////wAEctsABAdgIAYWAQOAPCJ4CGCFplZKnCUSUFQAAAABAQEBAQHRwAEBAQEBAQEBAjqA
GHE4LUBYLEUAQEQhAAAGAAAA/ABTMjczSEwKICAgICAgAAAA/QA3Sx5QEgAKICAgICAgAAAA/wBM
UUEwQzAxNzgwMDEKAEA=
EOF
'')
/*
(pkgs.runCommand "edid-custom" {} ''
mkdir -p "$out/lib/firmware/edid"
base64 -d > "$out/lib/firmware/edid/virtual.bin" <<'EOF'
AP///////wAEctsABAdgIAYWAQOAPCJ46mCFplZKnCUSUFQAAAABAQEBAQHRwAEBAQEBAQEBAjqA
GHE4LUBYLEUAVVAhAAAeAAAA/ABTMjczSEwKICAgICAgAAAA/QA3Sx5QEgAKICAgICAgAAAA/wBM
UUEwQzAxNzgwMDEKACU=
EOF
'')
*/
];
# find a free GPU output using this command:
# for p in /sys/class/drm/*/status; do con=${p%/status}; echo -n "${con#*/card?-}: "; cat $p; done
outputs."DP-2" = {
edid = "virtual.bin";
# forces this output on even though the display is not physically connected
# https://wiki.archlinux.org/title/Kernel_mode_setting#Forcing_modes
#mode = "e";
mode = "1920x1080e";
};
};
programs.fuse.userAllowOther = true;
@@ -708,6 +745,7 @@
"resume_offset=45743809"
"intel_iommu=on"
"pcie_aspm=force"
#"drm.debug=0xff"
];
virtualisation.kvmgt.vgpus = {