diff --git a/common/nixos-wayland.nix b/common/nixos-wayland.nix index eb6cddb..7eb9257 100644 --- a/common/nixos-wayland.nix +++ b/common/nixos-wayland.nix @@ -196,18 +196,11 @@ output * scale 1 bg #121212 solid_color #################### from nwg-display + # Generated by nwg-displays on 2025-07-09 at 20:13:34. Do not edit manually. + output "eDP-1" { mode 1920x1080@60.001Hz - pos 0 1181 - transform normal - scale 1.0 - scale_filter nearest - adaptive_sync off - dpms on - } - output "HEADLESS-1" { - mode 1920x1080@1.0Hz - pos 5760 532 + pos 0 1080 transform normal scale 1.0 scale_filter nearest @@ -223,6 +216,7 @@ adaptive_sync off dpms on } + output "DP-2" disable #################### end from nwg-display set $disp2 "DP-1" diff --git a/hosts/fusu.nix b/hosts/fusu.nix index ae0e85b..36f289e 100644 --- a/hosts/fusu.nix +++ b/hosts/fusu.nix @@ -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"; + }; + }; + } diff --git a/hosts/lush.nix b/hosts/lush.nix index 370185e..b0a277f 100644 --- a/hosts/lush.nix +++ b/hosts/lush.nix @@ -68,6 +68,7 @@ services.blueman.enable = true; hardware.enableRedistributableFirmware = true; + services.tailscale.enable = true; environment.systemPackages = with pkgs; [ linuxPackages.usbip diff --git a/hosts/main.nix b/hosts/main.nix index 1a8b5ad..16dc28f 100644 --- a/hosts/main.nix +++ b/hosts/main.nix @@ -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 = { diff --git a/users/files/home.nix b/users/files/home.nix index c28e93e..516fb4f 100644 --- a/users/files/home.nix +++ b/users/files/home.nix @@ -19,6 +19,10 @@ user = "server"; port = 49388; }; + ocih = { + hostname = "152.67.70.13"; + user = "ubuntu"; + }; }; };