From 00cc68b7cc21a1089f06eba8f129b7540a540473 Mon Sep 17 00:00:00 2001 From: satr14 Date: Thu, 7 May 2026 22:37:08 +0700 Subject: [PATCH 001/224] init --- modules/system/homelab/mc-backup.nix | 103 +++++++++++++++++++++++++++ modules/system/server.nix | 1 + 2 files changed, 104 insertions(+) create mode 100644 modules/system/homelab/mc-backup.nix diff --git a/modules/system/homelab/mc-backup.nix b/modules/system/homelab/mc-backup.nix new file mode 100644 index 0000000..1a2cb96 --- /dev/null +++ b/modules/system/homelab/mc-backup.nix @@ -0,0 +1,103 @@ +{ pkgs, ... }: let + serverName = "mc0-explorers-creativity"; + serviceName = "minecraft-server-${serverName}"; + backupDir = "/mnt/data/backups/mc"; + keepBackups = 7; # number of backups to retain + rconHost = "localhost"; + rconPort = "25575"; + rconPassword = "howdy"; + ntfyUrl = "http://127.0.0.1:8067"; + ntfyTopic = "mc-backup"; + + backupScript = pkgs.writeShellScriptBin "mc-backup" '' + set -euo pipefail + + rcon() { + ${pkgs.rcon-cli}/bin/rcon-cli --address "${rconHost}:${rconPort}" --password "${rconPassword}" "$@" || true + } + + BACKUP_OK=false + + on_exit() { + # Always restart the server first + echo "[mc-backup] Restarting server..." + systemctl start ${serviceName}.service + + # Notify via ntfy only on failure + if [ "$BACKUP_OK" != "true" ]; then + echo "[mc-backup] Sending failure notification..." + ${pkgs.curl}/bin/curl -s -o /dev/null \ + -H "Title: Minecraft Backup Failed" \ + -H "Priority: high" \ + -H "Tags: warning" \ + -d "Nightly backup failed at $(date '+%Y-%m-%d %H:%M:%S'). Check logs with: journalctl -u mc-backup -n 50" \ + "${ntfyUrl}/${ntfyTopic}" + fi + } + + # Always restart the server on exit, even if the script fails mid-backup + trap on_exit EXIT + + # --- Countdown warnings via RCON --- + echo "[mc-backup] Sending 5-minute warning..." + rcon "say §c[Backup] §fServer will restart in §e5 minutes §ffor a scheduled backup." + + sleep 240 + + echo "[mc-backup] Sending 1-minute warning..." + rcon "say §c[Backup] §fServer restarting in §e1 minute§f." + + sleep 50 + + echo "[mc-backup] Sending 10-second warning..." + rcon "say §c[Backup] §fServer restarting in §e10 seconds§f." + + sleep 10 + + rcon "say §c[Backup] §fShutting down now. Back shortly!" + + # --- Save world & stop --- + echo "[mc-backup] Saving world..." + rcon "save-all" + sleep 5 + + echo "[mc-backup] Stopping ${serviceName}..." + systemctl stop ${serviceName}.service + + # --- Backup --- + echo "[mc-backup] Backing up to ${backupDir}..." + mkdir -p "${backupDir}" + TIMESTAMP=$(date +%Y-%m-%d_%H-%M-%S) + XZ_OPT="-9e" tar -cJf "${backupDir}/mc-backup-$TIMESTAMP.tar.xz" \ + -C /srv/minecraft ${serverName} + + # Prune old backups, keeping the last ${toString keepBackups} + ls -t "${backupDir}"/mc-backup-*.tar.xz | tail -n +${toString (keepBackups + 1)} | xargs -r rm -- + + echo "[mc-backup] Backup complete: mc-backup-$TIMESTAMP.tar.xz" + BACKUP_OK=true + # Server restart is handled by the EXIT trap above + ''; +in { + environment.systemPackages = [ backupScript ]; + + systemd.services.mc-backup = { + description = "Nightly Minecraft server backup"; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${backupScript}/bin/mc-backup"; + User = "root"; + StandardOutput = "journal"; + StandardError = "journal"; + }; + }; + + systemd.timers.mc-backup = { + description = "Nightly Minecraft backup timer"; + wantedBy = [ "timers.target" ]; + timerConfig = { + OnCalendar = "daily"; # fires at 00:00:00 every day + Persistent = true; # catch up if the machine was off at midnight + }; + }; +} diff --git a/modules/system/server.nix b/modules/system/server.nix index 57a3ff0..0916649 100644 --- a/modules/system/server.nix +++ b/modules/system/server.nix @@ -26,6 +26,7 @@ in { ./homelab/ai.nix ./homelab/db.nix ./homelab/mc.nix + ./homelab/mc-backup.nix ./core/swapfile.nix ./core/oom.nix From 37867492a9856725f69720c91aeb1c4a94a5d22d Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 8 May 2026 16:33:02 +0700 Subject: [PATCH 002/224] performance tweaks (zgc, sysctl, jvmopts, etc) --- modules/system/homelab/mc.nix | 69 ++++++++++++++--------------------- 1 file changed, 27 insertions(+), 42 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 276ab69..4e45400 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -1,6 +1,5 @@ { inputs, lib, pkgs, ... }: let - ram-allocation = "10240M"; - # auth-server = "https://mc.satr14.my.id"; # TODO: self hosted drasl server + ram-allocation-mb = 12288; modpack = let commit = "667aadf36aac9b0689289f4988a76b924bbb9cbc"; in pkgs.fetchPackwizModpack { @@ -11,6 +10,12 @@ in { imports = [ inputs.mc.nixosModules.minecraft-servers ]; nixpkgs.overlays = [ inputs.mc.overlay ]; + powerManagement.cpuFreqGovernor = "schedutil"; + boot.kernel.sysctl = { + "vm.nr_hugepages" = 6656; + "vm.swappiness" = 10; + }; + services.minecraft-servers = { enable = true; eula = true; @@ -21,54 +26,34 @@ in { enable = true; autoStart = true; restart = "always"; - enableReload = false; # NOTE: development phase, disable in production + enableReload = true; # NOTE: development phase, disable in production package = pkgs.fabricServers.fabric-1_21_11.override { - jre_headless = pkgs.javaPackages.compiler.temurin-bin.jre-25; + jre_headless = pkgs.javaPackages.compiler.temurin-bin.jdk-25; loaderVersion = "0.19.2"; }; - jvmOpts = let - flags = [ - "-Xms${ram-allocation}" - "-Xmx${ram-allocation}" - "--add-modules=jdk.incubator.vector" - - # Custom auth server - # "-Dminecraft.api.env=custom" - # "-Dminecraft.api.auth.host=${auth-server}/auth" - # "-Dminecraft.api.account.host=${auth-server}/account" - # "-Dminecraft.api.profiles.host=${auth-server}/account" - # "-Dminecraft.api.session.host=${auth-server}/session" - # "-Dminecraft.api.services.host=${auth-server}/services" + jvmOpts = let flags = [ + "-Xms${toString ram-allocation-mb}M" + "-Xmx${toString ram-allocation-mb}M" - # Aikar's GC flags (tuned for 10GB) - "-XX:+UseG1GC" - "-XX:+ParallelRefProcEnabled" - "-XX:MaxGCPauseMillis=200" - "-XX:+UnlockExperimentalVMOptions" - "-XX:+DisableExplicitGC" - "-XX:+AlwaysPreTouch" - "-XX:G1HeapWastePercent=5" - "-XX:G1MixedGCCountTarget=4" - "-XX:InitiatingHeapOccupancyPercent=15" - "-XX:G1MixedGCLiveThresholdPercent=90" - "-XX:G1RSetUpdatingPauseTimePercent=5" - "-XX:SurvivorRatio=32" - "-XX:+PerfDisableSharedMem" - "-XX:MaxTenuringThreshold=1" - "-Dusing.aikars.flags=https://mcflags.emc.gs" - "-Daikars.new.flags=true" - "-XX:G1NewSizePercent=30" - "-XX:G1MaxNewSizePercent=40" - "-XX:G1HeapRegionSize=8M" - "-XX:G1ReservePercent=20" - ]; - in lib.concatStringsSep " " flags; + # Exposes SIMD instructions (requires full JDK, useful with performance mods) + "--add-modules=jdk.incubator.vector" + + # ZGC flags (requires Java v25+, 8+ CPU cores, 10GB+ RAM) + "-XX:+UseZGC" + "-XX:+UseLargePages" + "-XX:+AlwaysPreTouch" + "-XX:+DisableExplicitGC" + "-XX:+PerfDisableSharedMem" + "-XX:+UseCompactObjectHeaders" + "-XX:ZAllocationSpikeTolerance=5" + "-XX:SoftMaxHeapSize=${toString (ram-allocation-mb - 2048)}M" + ]; in lib.concatStringsSep " " flags; serverProperties = { server-port = 25565; - server-name = "Digit Association"; + server-name = "Minecraft Server"; motd = "§lSeason 3 TESTING§r - §dExplorers Creativity 🔥"; difficulty = "normal"; @@ -88,7 +73,7 @@ in { # resource-pack-sha1 = "e0958dcef5755286f390c22280700c471ec34a65"; # resource-pack-enforce = false; - simulation-distance = 16; + simulation-distance = 12; view-distance = 4; enable-rcon = true; From 02c4edc9084d91fd8b69efd25562b9f4b76450cd Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 8 May 2026 19:04:56 +0700 Subject: [PATCH 003/224] add rclone --- modules/system/misc/utilities.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/system/misc/utilities.nix b/modules/system/misc/utilities.nix index de5d35e..a637e8d 100644 --- a/modules/system/misc/utilities.nix +++ b/modules/system/misc/utilities.nix @@ -8,6 +8,7 @@ ntfs3g exfatprogs smartmontools + rclone ncdu ventoy-full-qt From 3afe1f226f41f91d5fe82621b0bfd55ca831aee7 Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 8 May 2026 21:09:20 +0700 Subject: [PATCH 004/224] update modpack and add credits to readme --- README.md | 3 ++- modules/system/homelab/mc.nix | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ee0d382..2eb43c0 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,5 @@ - `homelab` - i7 8700T, 32GB RAM, 512GB NVME, 1TB 2.5" SATA ## Credits -- [orangc's flake](https://git.orangc.net/c/dots) \ No newline at end of file +- [orangc's flake](https://git.orangc.net/c/dots) +- [vimjoyer's tutorials](https://www.youtube.com/@vimjoyer) \ No newline at end of file diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 4e45400..eb11851 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -1,9 +1,9 @@ { inputs, lib, pkgs, ... }: let ram-allocation-mb = 12288; modpack = let - commit = "667aadf36aac9b0689289f4988a76b924bbb9cbc"; + commit = "c82e271f5e8a8067ed62af6e870307459580e812"; in pkgs.fetchPackwizModpack { - packHash = "sha256-sNWuqTIpqnwxhoof5PkJXrvVE5x/wnhc3LoqomjYBNs="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; in { From 73428f1501f29b3b24ae48fe1216734d13a00704 Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 8 May 2026 21:12:56 +0700 Subject: [PATCH 005/224] update fix --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index eb11851..4b3adc6 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -1,7 +1,7 @@ { inputs, lib, pkgs, ... }: let ram-allocation-mb = 12288; modpack = let - commit = "c82e271f5e8a8067ed62af6e870307459580e812"; + commit = "2465b8364a9dd8166921dbe854c5cc7d530cdc7c"; in pkgs.fetchPackwizModpack { packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; From 05f27f292734a2ff3bdc59581a888a612a5c7324 Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 8 May 2026 21:15:37 +0700 Subject: [PATCH 006/224] update fix 2 --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 4b3adc6..57a23b0 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -1,7 +1,7 @@ { inputs, lib, pkgs, ... }: let ram-allocation-mb = 12288; modpack = let - commit = "2465b8364a9dd8166921dbe854c5cc7d530cdc7c"; + commit = "d1c0e4d6813e912a861345aa172eb52b83f93da9"; in pkgs.fetchPackwizModpack { packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; From 21f3df0cb42c39e2b71281c4ec8a46511d70fbdc Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 8 May 2026 21:16:40 +0700 Subject: [PATCH 007/224] update hash --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 57a23b0..1e0affc 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -3,7 +3,7 @@ modpack = let commit = "d1c0e4d6813e912a861345aa172eb52b83f93da9"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-qeiJlkMBkTW+WQemGt9W0N+iTgG6TKsq/5YiJuph1Sk="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; in { From e3202701ef094ee3c0db015625b09420983b3ae0 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 9 May 2026 14:21:30 +0700 Subject: [PATCH 008/224] wp source --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2eb43c0..9172fc5 100644 --- a/README.md +++ b/README.md @@ -9,4 +9,5 @@ ## Credits - [orangc's flake](https://git.orangc.net/c/dots) -- [vimjoyer's tutorials](https://www.youtube.com/@vimjoyer) \ No newline at end of file +- [vimjoyer's tutorials](https://www.youtube.com/@vimjoyer) +- [wallpaper source](https://github.com/er2de2/catppuccin_walls/blob/master/wallpapers_png/autumn_2.0.png) \ No newline at end of file From 0cdce64701ad540db7ccdbc0f9db29582db95926 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 9 May 2026 14:21:45 +0700 Subject: [PATCH 009/224] dynamic large pages and update modpack --- modules/system/homelab/mc.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 1e0affc..8bb9344 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -1,9 +1,9 @@ { inputs, lib, pkgs, ... }: let ram-allocation-mb = 12288; modpack = let - commit = "d1c0e4d6813e912a861345aa172eb52b83f93da9"; + commit = "476d4e5c08caded28ef0e24193249bec75cf52e6"; in pkgs.fetchPackwizModpack { - packHash = "sha256-qeiJlkMBkTW+WQemGt9W0N+iTgG6TKsq/5YiJuph1Sk="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; in { @@ -12,7 +12,7 @@ in { powerManagement.cpuFreqGovernor = "schedutil"; boot.kernel.sysctl = { - "vm.nr_hugepages" = 6656; + "vm.nr_hugepages" = (ram-allocation-mb / 2) + 512; # (heap_mb / 2MB per page) + 512 pages (1GB) for ZGC off-heap overhead "vm.swappiness" = 10; }; From 81bf3f71187d93a4b3e6746b200e452c12a21e81 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 9 May 2026 14:23:15 +0700 Subject: [PATCH 010/224] update hash --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 8bb9344..a017ca8 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -3,7 +3,7 @@ modpack = let commit = "476d4e5c08caded28ef0e24193249bec75cf52e6"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-zO7r8nXsK5Z3EnkUZNVDmPU1xqLI6qbZfS2tw0LLi0Q="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; in { From 59163a8f067fc66cb4fea8699a1833195384426d Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 9 May 2026 19:49:35 +0700 Subject: [PATCH 011/224] update modpack include worldgen --- modules/system/homelab/mc.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index a017ca8..adbdcf0 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -1,9 +1,9 @@ { inputs, lib, pkgs, ... }: let ram-allocation-mb = 12288; modpack = let - commit = "476d4e5c08caded28ef0e24193249bec75cf52e6"; + commit = "9241d6b4642239a6dfb5629ddb822a127bf93dff"; in pkgs.fetchPackwizModpack { - packHash = "sha256-zO7r8nXsK5Z3EnkUZNVDmPU1xqLI6qbZfS2tw0LLi0Q="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; in { From 48c4c03b738191211c6a61357b09af9ce3acd34f Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 9 May 2026 19:56:01 +0700 Subject: [PATCH 012/224] update hash --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index adbdcf0..9149da2 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -3,7 +3,7 @@ modpack = let commit = "9241d6b4642239a6dfb5629ddb822a127bf93dff"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-GwXJf81iXuEEQeg97nKxzGG/dYl9l8xMW0+mOHRiSAQ="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; in { From 2844bce5a33a83220a8282dffec98b3846545bdb Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 9 May 2026 20:40:07 +0700 Subject: [PATCH 013/224] add mc group and gamerule --- modules/system/homelab/mc.nix | 18 ++++++++++++++---- modules/system/user.nix | 1 + 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 9149da2..42e1e2e 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -1,11 +1,13 @@ { inputs, lib, pkgs, ... }: let ram-allocation-mb = 12288; + rcon-pass = "howdy"; modpack = let commit = "9241d6b4642239a6dfb5629ddb822a127bf93dff"; in pkgs.fetchPackwizModpack { packHash = "sha256-GwXJf81iXuEEQeg97nKxzGG/dYl9l8xMW0+mOHRiSAQ="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; + in { imports = [ inputs.mc.nixosModules.minecraft-servers ]; nixpkgs.overlays = [ inputs.mc.overlay ]; @@ -50,6 +52,16 @@ in { "-XX:ZAllocationSpikeTolerance=5" "-XX:SoftMaxHeapSize=${toString (ram-allocation-mb - 2048)}M" ]; in lib.concatStringsSep " " flags; + + extraStartPost = let gamerules = { + "locator_bar" = false; + "mob_explosion_drop_decay" = false; + # "reduced_debug_info" = false; + # "global_sound_events" = false; + }; in lib.concatStringsSep "\n" (map + (rule: "rcon-cli --password ${rcon-pass} gamerule ${rule} ${toString (gamerules.${rule})}") + (lib.attrNames gamerules) + ); serverProperties = { server-port = 25565; @@ -78,16 +90,14 @@ in { enable-rcon = true; sync-chunk-writes = false; - "rcon.password" = "howdy"; + "rcon.password" = rcon-pass; "rcon.port" = 25575; }; symlinks = { + # "server-icon.png" = "${modpack}/server-icon.png"; # "resources/datapack/required" = "${modpack}/datapacks"; "mods" = "${modpack}/mods"; - - # "server-icon.png" = "${modpack}/server-icon.png"; - # "config" = ""; }; }; }; diff --git a/modules/system/user.nix b/modules/system/user.nix index 44910e9..5f50a54 100644 --- a/modules/system/user.nix +++ b/modules/system/user.nix @@ -7,6 +7,7 @@ shell = pkgs.zsh; extraGroups = [ "networkmanager" + "minecraft" "wheel" "dialout" "libvirtd" From 51ea85202650d2e21eed01a51198fb331d638268 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 9 May 2026 23:31:50 +0700 Subject: [PATCH 014/224] update modpack and include datapacks --- modules/system/homelab/mc.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 42e1e2e..cc64bb7 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -2,9 +2,9 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "9241d6b4642239a6dfb5629ddb822a127bf93dff"; + commit = "c204d7f5891543b9f15b5d6ba9a7904bab93bfde"; in pkgs.fetchPackwizModpack { - packHash = "sha256-GwXJf81iXuEEQeg97nKxzGG/dYl9l8xMW0+mOHRiSAQ="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; @@ -96,7 +96,7 @@ in { symlinks = { # "server-icon.png" = "${modpack}/server-icon.png"; - # "resources/datapack/required" = "${modpack}/datapacks"; + "world/datapacks" = "${modpack}/datapacks"; "mods" = "${modpack}/mods"; }; }; From c48283a6e237a017b4c69525c12893e36e7f0597 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 9 May 2026 23:35:23 +0700 Subject: [PATCH 015/224] update hash --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index cc64bb7..409b5a3 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,7 +4,7 @@ modpack = let commit = "c204d7f5891543b9f15b5d6ba9a7904bab93bfde"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-mzUO3/jVS0kLmSEa1MVaVG7+kDwMiOorwGJw0IVCRMk="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; From b2ecd770c8e55d82961754665f07298571a52050 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 9 May 2026 23:40:13 +0700 Subject: [PATCH 016/224] fix rcon-cli path --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 409b5a3..0c778cb 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -59,7 +59,7 @@ in { # "reduced_debug_info" = false; # "global_sound_events" = false; }; in lib.concatStringsSep "\n" (map - (rule: "rcon-cli --password ${rcon-pass} gamerule ${rule} ${toString (gamerules.${rule})}") + (rule: "${pkgs.rcon-cli} --password ${rcon-pass} gamerule ${rule} ${toString (gamerules.${rule})}") (lib.attrNames gamerules) ); From 68455e7ce4f7d3400daba6e6ebea5b76797ad6cc Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 9 May 2026 23:41:18 +0700 Subject: [PATCH 017/224] fix bin path --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 0c778cb..9fc0966 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -59,7 +59,7 @@ in { # "reduced_debug_info" = false; # "global_sound_events" = false; }; in lib.concatStringsSep "\n" (map - (rule: "${pkgs.rcon-cli} --password ${rcon-pass} gamerule ${rule} ${toString (gamerules.${rule})}") + (rule: "${pkgs.rcon-cli}/bin/rcon-cli --password ${rcon-pass} gamerule ${rule} ${toString (gamerules.${rule})}") (lib.attrNames gamerules) ); From 7d2be949cad00463c08b81289bc80f52861bdc23 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 9 May 2026 23:43:30 +0700 Subject: [PATCH 018/224] startpost remove --- modules/system/homelab/mc.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 9fc0966..51444c4 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -53,15 +53,16 @@ in { "-XX:SoftMaxHeapSize=${toString (ram-allocation-mb - 2048)}M" ]; in lib.concatStringsSep " " flags; - extraStartPost = let gamerules = { - "locator_bar" = false; - "mob_explosion_drop_decay" = false; - # "reduced_debug_info" = false; - # "global_sound_events" = false; - }; in lib.concatStringsSep "\n" (map - (rule: "${pkgs.rcon-cli}/bin/rcon-cli --password ${rcon-pass} gamerule ${rule} ${toString (gamerules.${rule})}") - (lib.attrNames gamerules) - ); + # extraStartPost = let gamerules = { + # "locator_bar" = false; + # "mob_explosion_drop_decay" = false; + # # "reduced_debug_info" = false; + # # "global_sound_events" = false; + # }; in lib.concatStringsSep "\n" (map + # (rule: "${pkgs.rcon-cli}/bin/rcon-cli --password ${rcon-pass} gamerule ${rule} ${toString (gamerules.${rule})}") + # (lib.attrNames gamerules) + # ); + # TODO: figure out how to set gamerules on start (script above runs **before** server ready) serverProperties = { server-port = 25565; From 2740bb817587c5a04b5db9c30bbf9becc4e43922 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 9 May 2026 23:46:33 +0700 Subject: [PATCH 019/224] update modpack --- modules/system/homelab/mc.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 51444c4..50a7865 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -2,9 +2,9 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "c204d7f5891543b9f15b5d6ba9a7904bab93bfde"; + commit = "d2b9f6d5059ec68df3323328dab70a918195e487"; in pkgs.fetchPackwizModpack { - packHash = "sha256-mzUO3/jVS0kLmSEa1MVaVG7+kDwMiOorwGJw0IVCRMk="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; From b917409d106facc8d0ce66b80b52bd7968530e77 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 9 May 2026 23:49:38 +0700 Subject: [PATCH 020/224] update hash --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 50a7865..0edebbb 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,7 +4,7 @@ modpack = let commit = "d2b9f6d5059ec68df3323328dab70a918195e487"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-p2Lg2VldNcujIcI2DsmwZtZeF6rdAIQzcf0QaEPn15A="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; From acf495fae239919577c3701351b7b4b3eb9774ab Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 9 May 2026 23:54:44 +0700 Subject: [PATCH 021/224] update modpack --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 0edebbb..9e77ee5 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -2,7 +2,7 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "d2b9f6d5059ec68df3323328dab70a918195e487"; + commit = "4da142e626638de11e454db604251dce6cc14c58"; in pkgs.fetchPackwizModpack { packHash = "sha256-p2Lg2VldNcujIcI2DsmwZtZeF6rdAIQzcf0QaEPn15A="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; From 4b6a8a6fa28d534681b43feb80b55818e53355d1 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 9 May 2026 23:56:17 +0700 Subject: [PATCH 022/224] refresh hash --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 9e77ee5..29fb169 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,7 +4,7 @@ modpack = let commit = "4da142e626638de11e454db604251dce6cc14c58"; in pkgs.fetchPackwizModpack { - packHash = "sha256-p2Lg2VldNcujIcI2DsmwZtZeF6rdAIQzcf0QaEPn15A="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; From c03567baa351aae858aa28ee28d435795495fb00 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 9 May 2026 23:57:24 +0700 Subject: [PATCH 023/224] update hash --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 29fb169..096c885 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,7 +4,7 @@ modpack = let commit = "4da142e626638de11e454db604251dce6cc14c58"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-xpVxreoFVF5e3VidtlqgiIWZYcBy8OY9vrSv3dgV/u8="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; From e9306f35153be41bd24ae1db242f7a232951b0dd Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 10 May 2026 00:03:51 +0700 Subject: [PATCH 024/224] update modpack --- modules/system/homelab/mc.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 096c885..913cc36 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -2,9 +2,9 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "4da142e626638de11e454db604251dce6cc14c58"; + commit = "a52f65c1234b9f2dbe1392c471cb32a0614c5073"; in pkgs.fetchPackwizModpack { - packHash = "sha256-xpVxreoFVF5e3VidtlqgiIWZYcBy8OY9vrSv3dgV/u8="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; From 13041a04a5a31aa0145c304075c26d7a908a9533 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 10 May 2026 00:06:31 +0700 Subject: [PATCH 025/224] update hash --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 913cc36..fc641c7 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,7 +4,7 @@ modpack = let commit = "a52f65c1234b9f2dbe1392c471cb32a0614c5073"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-WplCmvuCmA8TNeRVBKMwkvizmYlBcU9PDugXXSKTBaA="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; From 0b2ef091ee9c7dd8a7cd9ab1981da47d5c682d59 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 10 May 2026 10:43:02 +0700 Subject: [PATCH 026/224] got some things mixed up :p --- modules/system/homelab/mc.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index fc641c7..d47f5db 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -86,8 +86,8 @@ in { # resource-pack-sha1 = "e0958dcef5755286f390c22280700c471ec34a65"; # resource-pack-enforce = false; - simulation-distance = 12; - view-distance = 4; + view-distance = 12; + simulation-distance = 4; enable-rcon = true; sync-chunk-writes = false; From 6e02ff9c9c1de4a695ea8c2d6b32e1e0a58fa4f6 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 10 May 2026 10:49:39 +0700 Subject: [PATCH 027/224] remove datapacks --- modules/system/homelab/mc.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index d47f5db..505c34f 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -97,7 +97,6 @@ in { symlinks = { # "server-icon.png" = "${modpack}/server-icon.png"; - "world/datapacks" = "${modpack}/datapacks"; "mods" = "${modpack}/mods"; }; }; From 3dc56278c9e83efbbce8206634c14c9d81f08ffa Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 10 May 2026 10:50:02 +0700 Subject: [PATCH 028/224] zgc lag from pause fix --- modules/system/homelab/mc.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 505c34f..531253a 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -51,6 +51,10 @@ in { "-XX:+UseCompactObjectHeaders" "-XX:ZAllocationSpikeTolerance=5" "-XX:SoftMaxHeapSize=${toString (ram-allocation-mb - 2048)}M" + + # High MSPT due to ZGC pauses + "-XX:ZUncommitDelay=300" + "-XX:ZCollectionInterval=5" ]; in lib.concatStringsSep " " flags; # extraStartPost = let gamerules = { From 90ed03a7aeb3cb8d3cde86e261531e02d41bef25 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 10 May 2026 11:20:55 +0700 Subject: [PATCH 029/224] update modpack --- modules/system/homelab/mc.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 531253a..03171a9 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -2,9 +2,9 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "a52f65c1234b9f2dbe1392c471cb32a0614c5073"; + commit = "ac9278758cf96b97fbb4f816aca0fb2f94ccf3a2"; in pkgs.fetchPackwizModpack { - packHash = "sha256-WplCmvuCmA8TNeRVBKMwkvizmYlBcU9PDugXXSKTBaA="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; From 7e2c4b5169971e46a296d9a3428eebffa5fa857f Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 10 May 2026 11:27:44 +0700 Subject: [PATCH 030/224] update hash --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 03171a9..18a49a9 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,7 +4,7 @@ modpack = let commit = "ac9278758cf96b97fbb4f816aca0fb2f94ccf3a2"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-X9CTYHfGRx6caCHfe+KS6/jhXV5fPCZ9hr8O2tlXus0="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; From 51b83d617ed394ed0b5533293353f040dae84989 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 10 May 2026 18:52:32 +0700 Subject: [PATCH 031/224] update modpack --- modules/system/homelab/mc.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 18a49a9..182a82f 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -2,9 +2,9 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "ac9278758cf96b97fbb4f816aca0fb2f94ccf3a2"; + commit = "918b281754d4c289a3567cca083774087b2a2ec0"; in pkgs.fetchPackwizModpack { - packHash = "sha256-X9CTYHfGRx6caCHfe+KS6/jhXV5fPCZ9hr8O2tlXus0="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; From b8b5084352287158eb9011d9b6d9eb57d27e13f5 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 10 May 2026 18:54:43 +0700 Subject: [PATCH 032/224] update hash --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 182a82f..70c9dc0 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,7 +4,7 @@ modpack = let commit = "918b281754d4c289a3567cca083774087b2a2ec0"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-HmTDQac9FCQXBPWiZIxu9zmHyl2vqMVQpZpDHp+2lBA="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; From 35185583ee71deb26f0bad0a45cbd25e8544ddff Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 11 May 2026 16:12:48 +0700 Subject: [PATCH 033/224] fix battery notif --- modules/hardware/misc/battery-power.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/hardware/misc/battery-power.nix b/modules/hardware/misc/battery-power.nix index 3a2ca6b..8c529e1 100644 --- a/modules/hardware/misc/battery-power.nix +++ b/modules/hardware/misc/battery-power.nix @@ -17,8 +17,10 @@ BAT_PCT=`${pkgs.acpi}/bin/acpi -b | ${pkgs.gnugrep}/bin/grep -P -o '[0-9]+(?=%)'` BAT_STA=`${pkgs.acpi}/bin/acpi -b | ${pkgs.gnugrep}/bin/grep -P -o '\w+(?=,)'` echo "`date` battery status:$BAT_STA percentage:$BAT_PCT" - test $BAT_PCT -le 30 && test $BAT_PCT -gt 15 && test $BAT_STA = "Discharging" && DISPLAY=:0.0 ${pkgs.libnotify}/bin/notify-send "Low Battery" "Battery remaining: $BAT_PCT%." - test $BAT_PCT -le 15 && test $BAT_STA = "Discharging" && DISPLAY=:0.0 ${pkgs.libnotify}/bin/notify-send -u critical "Low Battery" "Shutdown at 10%." + export DISPLAY=:0 + export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus + test $BAT_PCT -le 30 && test $BAT_PCT -gt 15 && test $BAT_STA = "Discharging" && ${pkgs.libnotify}/bin/notify-send "Low Battery" "Battery remaining: $BAT_PCT%." + test $BAT_PCT -le 15 && test $BAT_STA = "Discharging" && ${pkgs.libnotify}/bin/notify-send -u critical "Low Battery" "Shutdown at 10%." ''} > /tmp/cron.batt.log 2>&1" ]; }; From 23d4592783c0fc2991375912b8b1b890ddd7bf81 Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 11 May 2026 16:26:43 +0700 Subject: [PATCH 034/224] cleanup flag config and update modpack --- modules/system/homelab/mc.nix | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 70c9dc0..d545f0b 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -2,9 +2,9 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "918b281754d4c289a3567cca083774087b2a2ec0"; + commit = "506050af820a4cf370c6f2021c5991d665ba902a"; in pkgs.fetchPackwizModpack { - packHash = "sha256-HmTDQac9FCQXBPWiZIxu9zmHyl2vqMVQpZpDHp+2lBA="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; @@ -38,23 +38,17 @@ in { jvmOpts = let flags = [ "-Xms${toString ram-allocation-mb}M" "-Xmx${toString ram-allocation-mb}M" - - # Exposes SIMD instructions (requires full JDK, useful with performance mods) - "--add-modules=jdk.incubator.vector" - - # ZGC flags (requires Java v25+, 8+ CPU cores, 10GB+ RAM) - "-XX:+UseZGC" - "-XX:+UseLargePages" - "-XX:+AlwaysPreTouch" - "-XX:+DisableExplicitGC" - "-XX:+PerfDisableSharedMem" - "-XX:+UseCompactObjectHeaders" - "-XX:ZAllocationSpikeTolerance=5" - "-XX:SoftMaxHeapSize=${toString (ram-allocation-mb - 2048)}M" - - # High MSPT due to ZGC pauses - "-XX:ZUncommitDelay=300" - "-XX:ZCollectionInterval=5" + + "-XX:+UseZGC" # Use ZGC (requires Java v25+, 8+ CPU cores, 10GB+ RAM) + "-XX:+UseCompactObjectHeaders" # Use compact object headers (requires Java v16+, saves a couple of bits per object) + + "--add-modules=jdk.incubator.vector" # Exposes SIMD instructions (requires full JDK, useful with performance mods) + "-XX:+UseLargePages" # Large pages support (requires hugepages configured on the system) + "-XX:+AlwaysPreTouch" # Pre-allocates memory on startup, OS claims it immediately for JVM instead of negotiating it + "-XX:+DisableExplicitGC" # Disables mods from manually invoking the GC + "-XX:+PerfDisableSharedMem" # Disables constant /tmp writes for JVM metrics + "-XX:ZAllocationSpikeTolerance=5" # Helps when server is active with many players (causes unnecessary GC load at idle) + "-XX:SoftMaxHeapSize=${toString (ram-allocation-mb - 2048)}M" # Leave 2GB headroom for off-heap memory (native code, mods, and ZGC overhead) ]; in lib.concatStringsSep " " flags; # extraStartPost = let gamerules = { From 33f323d1ec2ede8aeb11f98e9818a2a31ae55ea8 Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 11 May 2026 16:39:50 +0700 Subject: [PATCH 035/224] cleanup config, use new dir, update hash --- modules/system/homelab/mc.nix | 87 +++++++++++++++-------------------- 1 file changed, 36 insertions(+), 51 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index d545f0b..cc44d20 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,7 +4,7 @@ modpack = let commit = "506050af820a4cf370c6f2021c5991d665ba902a"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-Haonn1K74z0aREXCfb/t88DtYD6Kboq23kS6wxqKc3Y="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; @@ -21,14 +21,46 @@ in { services.minecraft-servers = { enable = true; eula = true; - managementSystem.systemd-socket.enable = true; # Referenced but unset environment variable evaluates to an empty string: MAINPID + managementSystem.systemd-socket.enable = true; # ^^^ https://github.com/Infinidoge/nix-minecraft/issues/119 + + # TODO: figure out how to set gamerules on start (script above runs **before** server ready) + # gamerules to disable: locator_bar, mob_explosion_drop_decay - servers.mc0-explorers-creativity = { + servers.da-s3 = { enable = true; autoStart = true; restart = "always"; - enableReload = true; # NOTE: development phase, disable in production + enableReload = false; + + serverProperties = { + server-port = 25565; + server-name = "Minecraft Server"; + motd = "§lSeason 3§r - §dExplorers Creativity 🔥"; + + difficulty = "normal"; + gamemode = "survival"; + max-world-size = 25000; + spawn-protection = 0; + pvp = true; + + online-mode = true; + enable-query = true; + enforce-secure-profile = false; + pevent-proxy-connections = false; + allow-flight = false; + player-idle-timeout = 0; + + view-distance = 12; + simulation-distance = 4; + + enable-rcon = true; + sync-chunk-writes = false; + "rcon.password" = rcon-pass; + "rcon.port" = 25575; + }; + + symlinks."mods" = "${modpack}/mods"; package = pkgs.fabricServers.fabric-1_21_11.override { jre_headless = pkgs.javaPackages.compiler.temurin-bin.jdk-25; @@ -50,53 +82,6 @@ in { "-XX:ZAllocationSpikeTolerance=5" # Helps when server is active with many players (causes unnecessary GC load at idle) "-XX:SoftMaxHeapSize=${toString (ram-allocation-mb - 2048)}M" # Leave 2GB headroom for off-heap memory (native code, mods, and ZGC overhead) ]; in lib.concatStringsSep " " flags; - - # extraStartPost = let gamerules = { - # "locator_bar" = false; - # "mob_explosion_drop_decay" = false; - # # "reduced_debug_info" = false; - # # "global_sound_events" = false; - # }; in lib.concatStringsSep "\n" (map - # (rule: "${pkgs.rcon-cli}/bin/rcon-cli --password ${rcon-pass} gamerule ${rule} ${toString (gamerules.${rule})}") - # (lib.attrNames gamerules) - # ); - # TODO: figure out how to set gamerules on start (script above runs **before** server ready) - - serverProperties = { - server-port = 25565; - server-name = "Minecraft Server"; - motd = "§lSeason 3 TESTING§r - §dExplorers Creativity 🔥"; - - difficulty = "normal"; - gamemode = "survival"; - max-world-size = 25000; - spawn-protection = 0; - pvp = true; - - online-mode = true; - enable-query = true; - enforce-secure-profile = false; - pevent-proxy-connections = false; - allow-flight = false; - player-idle-timeout = 0; - - # resource-pack = "https://cdn.satr14.my.id/public/fullslide-1.21.11.zip"; - # resource-pack-sha1 = "e0958dcef5755286f390c22280700c471ec34a65"; - # resource-pack-enforce = false; - - view-distance = 12; - simulation-distance = 4; - - enable-rcon = true; - sync-chunk-writes = false; - "rcon.password" = rcon-pass; - "rcon.port" = 25575; - }; - - symlinks = { - # "server-icon.png" = "${modpack}/server-icon.png"; - "mods" = "${modpack}/mods"; - }; }; }; } \ No newline at end of file From 3ac6b06f434621f34edfae825e13768708595244 Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 12 May 2026 21:28:06 +0700 Subject: [PATCH 036/224] fix luckperms error --- modules/system/homelab/mc.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index cc44d20..ece3dec 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -60,7 +60,9 @@ in { "rcon.port" = 25575; }; - symlinks."mods" = "${modpack}/mods"; + symlinks = lib.mapAttrs' + (name: _: lib.nameValuePair "mods/${name}" "${modpack}/mods/${name}") + (builtins.readDir "${modpack}/mods"); package = pkgs.fabricServers.fabric-1_21_11.override { jre_headless = pkgs.javaPackages.compiler.temurin-bin.jdk-25; From c2924a2a58d45cb6b22087944f2d9d363077cfeb Mon Sep 17 00:00:00 2001 From: satr14 Date: Wed, 13 May 2026 15:15:01 +0700 Subject: [PATCH 037/224] enable jstat --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index ece3dec..7c35d85 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -80,7 +80,7 @@ in { "-XX:+UseLargePages" # Large pages support (requires hugepages configured on the system) "-XX:+AlwaysPreTouch" # Pre-allocates memory on startup, OS claims it immediately for JVM instead of negotiating it "-XX:+DisableExplicitGC" # Disables mods from manually invoking the GC - "-XX:+PerfDisableSharedMem" # Disables constant /tmp writes for JVM metrics + # "-XX:+PerfDisableSharedMem" # Disables constant /tmp writes for JVM metrics "-XX:ZAllocationSpikeTolerance=5" # Helps when server is active with many players (causes unnecessary GC load at idle) "-XX:SoftMaxHeapSize=${toString (ram-allocation-mb - 2048)}M" # Leave 2GB headroom for off-heap memory (native code, mods, and ZGC overhead) ]; in lib.concatStringsSep " " flags; From 7791a235909caf9a3670184872f25927ba1bfa38 Mon Sep 17 00:00:00 2001 From: satr14 Date: Wed, 13 May 2026 15:18:29 +0700 Subject: [PATCH 038/224] shorten journal output --- modules/home/core/shell.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/home/core/shell.nix b/modules/home/core/shell.nix index 2a23a42..7c69e47 100644 --- a/modules/home/core/shell.nix +++ b/modules/home/core/shell.nix @@ -37,9 +37,9 @@ "cd" = "z"; "sys" = "sudo systemctl --runtime"; - "sys-log" = "journalctl -f -b -u"; + "sys-log" = "journalctl -o cat -f -b -u"; "user" = "systemctl --user --runtime"; - "user-log" = "journalctl -f -b --user-unit"; + "user-log" = "journalctl -o cat -f -b --user-unit"; "ts" = "sudo tailscale"; "tsip" = "tailscale ip -4"; From d97d291c981753666b7925ba32c506f6aa2fe680 Mon Sep 17 00:00:00 2001 From: satr14 Date: Thu, 14 May 2026 09:08:05 +0700 Subject: [PATCH 039/224] set to perf overclock --- modules/system/homelab/mc.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 7c35d85..0834b82 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -12,7 +12,7 @@ in { imports = [ inputs.mc.nixosModules.minecraft-servers ]; nixpkgs.overlays = [ inputs.mc.overlay ]; - powerManagement.cpuFreqGovernor = "schedutil"; + powerManagement.cpuFreqGovernor = "performance"; boot.kernel.sysctl = { "vm.nr_hugepages" = (ram-allocation-mb / 2) + 512; # (heap_mb / 2MB per page) + 512 pages (1GB) for ZGC off-heap overhead "vm.swappiness" = 10; @@ -83,6 +83,8 @@ in { # "-XX:+PerfDisableSharedMem" # Disables constant /tmp writes for JVM metrics "-XX:ZAllocationSpikeTolerance=5" # Helps when server is active with many players (causes unnecessary GC load at idle) "-XX:SoftMaxHeapSize=${toString (ram-allocation-mb - 2048)}M" # Leave 2GB headroom for off-heap memory (native code, mods, and ZGC overhead) + "-XX:ZCollectionInterval=1" # Force a GC cycle at minimum every 1s — prevents allocation stalls when ZGC falls behind Minecraft's bursty allocation + "-XX:ConcGCThreads=4" # Threads ZGC uses for concurrent work; default (cpu/8+1) is often just 2, too slow to keep up with allocation rate ]; in lib.concatStringsSep " " flags; }; }; From c3db68fad698a12efb507bbf5ef3189bcb15ef5c Mon Sep 17 00:00:00 2001 From: satr14 Date: Thu, 14 May 2026 09:21:54 +0700 Subject: [PATCH 040/224] try powersave --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 0834b82..8682e1d 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -12,7 +12,7 @@ in { imports = [ inputs.mc.nixosModules.minecraft-servers ]; nixpkgs.overlays = [ inputs.mc.overlay ]; - powerManagement.cpuFreqGovernor = "performance"; + powerManagement.cpuFreqGovernor = "powersave"; boot.kernel.sysctl = { "vm.nr_hugepages" = (ram-allocation-mb / 2) + 512; # (heap_mb / 2MB per page) + 512 pages (1GB) for ZGC off-heap overhead "vm.swappiness" = 10; From 0ebe87c5c376ff4f0b6927611c79f227dbc57a1f Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 15 May 2026 21:01:29 +0700 Subject: [PATCH 041/224] update modpack --- modules/system/homelab/mc.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 8682e1d..2362e61 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -2,9 +2,9 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "506050af820a4cf370c6f2021c5991d665ba902a"; + commit = "c7d1a2d8d181104707dd549fc65fffda956b8f40"; in pkgs.fetchPackwizModpack { - packHash = "sha256-Haonn1K74z0aREXCfb/t88DtYD6Kboq23kS6wxqKc3Y="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; From 05b6c5f45074bdc262a6a5b6c9f0cb0e68c0a0d6 Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 15 May 2026 21:02:56 +0700 Subject: [PATCH 042/224] update hash --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 2362e61..20b8b5f 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,7 +4,7 @@ modpack = let commit = "c7d1a2d8d181104707dd549fc65fffda956b8f40"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-h/hQalxd8C5D5LADgsok3bMeQSb2Bgpg6UIbZWM0fw8="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; From 6a106d606c28cdffe6e0d82aed9f1b93a25776b9 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 17 May 2026 07:23:54 +0700 Subject: [PATCH 043/224] add clipboard support --- modules/home/core/cli.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/home/core/cli.nix b/modules/home/core/cli.nix index 86b3c08..4f2dbf6 100644 --- a/modules/home/core/cli.nix +++ b/modules/home/core/cli.nix @@ -49,10 +49,20 @@ initLua = '' vim.opt.clipboard = "unnamedplus" vim.opt.termguicolors = true + vim.g.clipboard = { + name = "OSC 52", + copy = { + ["+"] = require("vim.ui.clipboard.osc52").copy("+"), + ["*"] = require("vim.ui.clipboard.osc52").copy("*"), + }, + paste = { + ["+"] = require("vim.ui.clipboard.osc52").paste("+"), + ["*"] = require("vim.ui.clipboard.osc52").paste("*"), + }, + } require("nvim-tree").setup() vim.api.nvim_create_autocmd("VimEnter", { callback = function() - -- vim.cmd("NvimTreeOpen") vim.cmd("set nu") vim.cmd.wincmd 'p' end, From 70fa5793315a4202dcf3fe2d4e794967d8cc0289 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 17 May 2026 07:35:48 +0700 Subject: [PATCH 044/224] update modpack and add me as an op --- modules/system/homelab/mc.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 20b8b5f..be0d461 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -2,9 +2,9 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "c7d1a2d8d181104707dd549fc65fffda956b8f40"; + commit = "81067d9cea4e3c48acceb42c8c62c252ab1bd3b2"; in pkgs.fetchPackwizModpack { - packHash = "sha256-h/hQalxd8C5D5LADgsok3bMeQSb2Bgpg6UIbZWM0fw8="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; @@ -33,6 +33,13 @@ in { restart = "always"; enableReload = false; + operators."satr14" = { + uuid = "54441a30-fe73-46e7-adca-c476bd4fc6d2"; + bypassesPlayerLimit = true; + level = 4; + }; + # ^^ DISABLE ON PROD + serverProperties = { server-port = 25565; server-name = "Minecraft Server"; From 9993ed52a750e83df48070c918ea4e74dcbce83e Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 17 May 2026 07:36:43 +0700 Subject: [PATCH 045/224] update hash --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index be0d461..2c85010 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,7 +4,7 @@ modpack = let commit = "81067d9cea4e3c48acceb42c8c62c252ab1bd3b2"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-D34uF8LUPNM1LTvOM3V8tvo4yfG++UODxW2qH2tXs/8="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; From df27e80f4a0d51202150f8ab6afe550986492da7 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 17 May 2026 07:37:57 +0700 Subject: [PATCH 046/224] [skip ci] small note --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 2c85010..ca92440 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -12,7 +12,7 @@ in { imports = [ inputs.mc.nixosModules.minecraft-servers ]; nixpkgs.overlays = [ inputs.mc.overlay ]; - powerManagement.cpuFreqGovernor = "powersave"; + powerManagement.cpuFreqGovernor = "powersave"; # performance governor causes overheating and thermal throttling, works fine with powesave boot.kernel.sysctl = { "vm.nr_hugepages" = (ram-allocation-mb / 2) + 512; # (heap_mb / 2MB per page) + 512 pages (1GB) for ZGC off-heap overhead "vm.swappiness" = 10; From 858e77735fe3cdf1cec7543212f2dd94914c30be Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 17 May 2026 07:51:20 +0700 Subject: [PATCH 047/224] [skip ci] add extra notes --- modules/system/homelab/mc.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index ca92440..6a0cdf3 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -26,6 +26,7 @@ in { # TODO: figure out how to set gamerules on start (script above runs **before** server ready) # gamerules to disable: locator_bar, mob_explosion_drop_decay + # gamerules to enable (temporarily): noend:disable_end servers.da-s3 = { enable = true; From 3db7568fa65f527a0e2264b9cb47e2b92f426e5f Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 17 May 2026 07:51:48 +0700 Subject: [PATCH 048/224] [skip ci] fix comment --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 6a0cdf3..944ea4a 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -24,7 +24,7 @@ in { managementSystem.systemd-socket.enable = true; # ^^^ https://github.com/Infinidoge/nix-minecraft/issues/119 - # TODO: figure out how to set gamerules on start (script above runs **before** server ready) + # TODO: figure out how to set gamerules on start # gamerules to disable: locator_bar, mob_explosion_drop_decay # gamerules to enable (temporarily): noend:disable_end From 180521963ab5ed0dc27d6ecd1ffb37393e05f00e Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 17 May 2026 07:53:54 +0700 Subject: [PATCH 049/224] [skip ci] todo comments --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 944ea4a..0baf6cc 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -25,7 +25,7 @@ in { # ^^^ https://github.com/Infinidoge/nix-minecraft/issues/119 # TODO: figure out how to set gamerules on start - # gamerules to disable: locator_bar, mob_explosion_drop_decay + # gamerules to disable: locator_bar, mob_explosion_drop_decay, (and possibly) reduced_debug_info, global_sound_events # gamerules to enable (temporarily): noend:disable_end servers.da-s3 = { From 287458eec01d0e12beec8d386959a051d59be691 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 17 May 2026 07:59:29 +0700 Subject: [PATCH 050/224] disable ip logging --- modules/system/homelab/mc.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 0baf6cc..f63a1fb 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -42,9 +42,11 @@ in { # ^^ DISABLE ON PROD serverProperties = { + # server-ip = "localhost"; server-port = 25565; server-name = "Minecraft Server"; motd = "§lSeason 3§r - §dExplorers Creativity 🔥"; + log-ips = false; # TODO: figure out how to get ips from cloudflared tunnel difficulty = "normal"; gamemode = "survival"; From 092883606a36dca791e9a69582dc40ec3659a562 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 17 May 2026 08:57:32 +0700 Subject: [PATCH 051/224] switch dashboard to be main page --- modules/system/homelab/dash.nix | 190 ++++++++++++++++---------------- 1 file changed, 95 insertions(+), 95 deletions(-) diff --git a/modules/system/homelab/dash.nix b/modules/system/homelab/dash.nix index d973699..e7d62bf 100644 --- a/modules/system/homelab/dash.nix +++ b/modules/system/homelab/dash.nix @@ -89,6 +89,101 @@ in { }; pages = [ + { + name = "Dashboard"; + show-mobile-header = true; + width = "slim"; + columns = [ + { + size = "small"; + widgets = [ + { + type = "monitor"; + title = "Critical Systems"; + cache = "15s"; + style = "compact"; + show-failing-only = true; + sites = map (e: { + same-tab = true; + allow-insecure = true; + title = builtins.elemAt e 0; + url = builtins.elemAt e 1; + }) monitor; + } + { + type = "dns-stats"; + title = "DNS Stats"; + service = "adguard"; + url = "http://localhost:8088/"; + hour-format = "12h"; + } + { + type = "bookmarks"; + groups = [ + { + links = [{ + same-tab = true; + title = "NixFlake"; + icon = "si:nixos"; + url = "https://flake.satr14.my.id"; + }]; + } + { + links = map (e: { + same-tab = true; + title = builtins.elemAt e 0; + icon = "si:${builtins.elemAt e 1}"; + url = builtins.elemAt e 2; + alt-status-codes = [ 401 ]; + }) bookmarks; + } + ]; + } + { + type = "to-do"; + id = "tasks"; + } + ]; + } + { + size = "full"; + widgets = [ + { + type = "server-stats"; + servers = [{ + type = "local"; + mountpoints = { + "/boot".hide = true; + "/nix/store".hide = true; + "/var/lib/vaultwarden".hide = true; + "/var/lib/private/cryptpad".hide = true; + "/var/lib/acme/proxy.satr14.my.id".hide = true; + }; + }]; + } + { + type = "monitor"; + cache = "1m"; + title = "Services"; + sites = map (e: { + same-tab = true; + allow-insecure = true; + title = builtins.elemAt e 0; + icon = "si:${builtins.elemAt e 1}"; + url = builtins.elemAt e 2; + check-url = builtins.elemAt e 3; + }) homelab.dash; + } + { + type = "docker-containers"; + title = "Containers"; + format-container-names = true; + hide-by-default = true; + } + ]; + } + ]; + } { name = "Home"; show-mobile-header = true; @@ -187,101 +282,6 @@ in { } ]; } - { - name = "Dashboard"; - show-mobile-header = true; - width = "slim"; - columns = [ - { - size = "small"; - widgets = [ - { - type = "monitor"; - title = "Critical Systems"; - cache = "15s"; - style = "compact"; - show-failing-only = true; - sites = map (e: { - same-tab = true; - allow-insecure = true; - title = builtins.elemAt e 0; - url = builtins.elemAt e 1; - }) monitor; - } - { - type = "dns-stats"; - title = "DNS Stats"; - service = "adguard"; - url = "http://localhost:8088/"; - hour-format = "12h"; - } - { - type = "bookmarks"; - groups = [ - { - links = [{ - same-tab = true; - title = "NixFlake"; - icon = "si:nixos"; - url = "https://flake.satr14.my.id"; - }]; - } - { - links = map (e: { - same-tab = true; - title = builtins.elemAt e 0; - icon = "si:${builtins.elemAt e 1}"; - url = builtins.elemAt e 2; - alt-status-codes = [ 401 ]; - }) bookmarks; - } - ]; - } - { - type = "to-do"; - id = "tasks"; - } - ]; - } - { - size = "full"; - widgets = [ - { - type = "server-stats"; - servers = [{ - type = "local"; - mountpoints = { - "/boot".hide = true; - "/nix/store".hide = true; - "/var/lib/vaultwarden".hide = true; - "/var/lib/private/cryptpad".hide = true; - "/var/lib/acme/proxy.satr14.my.id".hide = true; - }; - }]; - } - { - type = "monitor"; - cache = "1m"; - title = "Services"; - sites = map (e: { - same-tab = true; - allow-insecure = true; - title = builtins.elemAt e 0; - icon = "si:${builtins.elemAt e 1}"; - url = builtins.elemAt e 2; - check-url = builtins.elemAt e 3; - }) homelab.dash; - } - { - type = "docker-containers"; - title = "Containers"; - format-container-names = true; - hide-by-default = true; - } - ]; - } - ]; - } ]; }; }; From b349172b599782b41da2fc54961d2794511d2319 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 17 May 2026 13:11:18 +0700 Subject: [PATCH 052/224] jvm tuning --- modules/system/homelab/mc.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index f63a1fb..3923e3a 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -90,11 +90,11 @@ in { "-XX:+UseLargePages" # Large pages support (requires hugepages configured on the system) "-XX:+AlwaysPreTouch" # Pre-allocates memory on startup, OS claims it immediately for JVM instead of negotiating it "-XX:+DisableExplicitGC" # Disables mods from manually invoking the GC - # "-XX:+PerfDisableSharedMem" # Disables constant /tmp writes for JVM metrics - "-XX:ZAllocationSpikeTolerance=5" # Helps when server is active with many players (causes unnecessary GC load at idle) - "-XX:SoftMaxHeapSize=${toString (ram-allocation-mb - 2048)}M" # Leave 2GB headroom for off-heap memory (native code, mods, and ZGC overhead) - "-XX:ZCollectionInterval=1" # Force a GC cycle at minimum every 1s — prevents allocation stalls when ZGC falls behind Minecraft's bursty allocation - "-XX:ConcGCThreads=4" # Threads ZGC uses for concurrent work; default (cpu/8+1) is often just 2, too slow to keep up with allocation rate + "-XX:+PerfDisableSharedMem" # Disables constant /tmp writes for JVM metrics + "-XX:ZAllocationSpikeTolerance=5" # Helps when server is active with many players + "-XX:SoftMaxHeapSize=${toString (ram-allocation-mb - 2048)}M" # Leave 2GB headroom + "-XX:ZCollectionInterval=1" # Force a GC cycle at minimum every second + "-XX:ConcGCThreads=8" # Threads ZGC uses for concurrent work ]; in lib.concatStringsSep " " flags; }; }; From 79fd698e12845f87c0231fcd2d00b057d686c61f Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 19 May 2026 17:28:15 +0700 Subject: [PATCH 053/224] update modpack --- modules/system/homelab/mc.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 3923e3a..cf6b40c 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -2,9 +2,9 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "81067d9cea4e3c48acceb42c8c62c252ab1bd3b2"; + commit = "8523f89493ace13087eb68cd9fe3b5eb4f669440"; in pkgs.fetchPackwizModpack { - packHash = "sha256-D34uF8LUPNM1LTvOM3V8tvo4yfG++UODxW2qH2tXs/8="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; From 8745a66a2a00828c358a3899f9247751dd8a0c4b Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 19 May 2026 17:37:50 +0700 Subject: [PATCH 054/224] update hash --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index cf6b40c..2084d2e 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,7 +4,7 @@ modpack = let commit = "8523f89493ace13087eb68cd9fe3b5eb4f669440"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-xB9Oc/aneogSQ9r7L42vyVM6xwq+QkoTaXYNuUzeo6M="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; }; From 89931de313b72ff38235ea8f82d261cf11cf5a5c Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 30 May 2026 18:29:01 +0700 Subject: [PATCH 055/224] enable netbird --- modules/system/server.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/modules/system/server.nix b/modules/system/server.nix index 57a3ff0..a2cef9f 100644 --- a/modules/system/server.nix +++ b/modules/system/server.nix @@ -35,14 +35,17 @@ in { users.users.root.openssh.authorizedKeys.keys = homelab.ssh-keys; - services.tailscale = { - enable = true; - authKeyFile = "/mnt/data/apps/tailscale/authkey"; - useRoutingFeatures = "server"; - extraUpFlags = ts-flags; - extraSetFlags = ts-flags; + services = { + netbird.enable = true; + tailscale = { + enable = true; + authKeyFile = "/mnt/data/apps/tailscale/authkey"; + useRoutingFeatures = "server"; + extraUpFlags = ts-flags; + extraSetFlags = ts-flags; + }; }; - + virtualisation = { oci-containers.backend = "docker"; docker = { From dced4e3a58e48f5387d0deebb3321b919f3211d8 Mon Sep 17 00:00:00 2001 From: satr14 Date: Thu, 4 Jun 2026 13:51:24 +0700 Subject: [PATCH 056/224] add bun --- modules/system/homelab/git.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/git.nix b/modules/system/homelab/git.nix index db30c7a..2544f90 100644 --- a/modules/system/homelab/git.nix +++ b/modules/system/homelab/git.nix @@ -45,7 +45,7 @@ url = "http://localhost:5080"; #"https://git.proxy.${homelab.domain}"; tokenFile = "/mnt/data/apps/forgejo/token-runner"; labels = [ "self-hosted:host" ]; - hostPackages = with pkgs; [ bash coreutils git nix openssh nodejs ]; + hostPackages = with pkgs; [ bash coreutils git nix openssh bun ]; }; }; systemd.services = { From cabd26d2323b6b8a733a11c4d89ef06324cc9d4a Mon Sep 17 00:00:00 2001 From: satr14 Date: Thu, 4 Jun 2026 13:51:57 +0700 Subject: [PATCH 057/224] prod toggle --- modules/system/homelab/mc.nix | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 2084d2e..90e2e76 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -1,11 +1,13 @@ { inputs, lib, pkgs, ... }: let + production = true; ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let commit = "8523f89493ace13087eb68cd9fe3b5eb4f669440"; + path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { packHash = "sha256-xB9Oc/aneogSQ9r7L42vyVM6xwq+QkoTaXYNuUzeo6M="; - url = "https://git.satr14.my.id/satr14/server-modpack/raw/commit/${commit}/pack.toml"; + url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { @@ -32,14 +34,25 @@ in { enable = true; autoStart = true; restart = "always"; - enableReload = false; + enableReload = production; + # extraReload = '' + # function rcon() { + # ${pkgs.rcon-cli}/bin/rcon-cli -p ${rcon-pass} $@ + # } + + # rcon "gamerule locator_bar false" + # rcon "gamerule mob_explosion_drop_decay false" + # rcon "gamerule reduced_debug_info false" + # rcon "gamerule global_sound_events false" + # ''; - operators."satr14" = { - uuid = "54441a30-fe73-46e7-adca-c476bd4fc6d2"; - bypassesPlayerLimit = true; - level = 4; + operators = lib.mkIf (!production) { + "satr14" = { + uuid = "54441a30-fe73-46e7-adca-c476bd4fc6d2"; + bypassesPlayerLimit = true; + level = 4; + }; }; - # ^^ DISABLE ON PROD serverProperties = { # server-ip = "localhost"; From 598737859c3473fb72e52a303ba72a0438e3ff0b Mon Sep 17 00:00:00 2001 From: satr14 Date: Thu, 4 Jun 2026 13:52:20 +0700 Subject: [PATCH 058/224] todo --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 9172fc5..f8496c7 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,11 @@ - `thinkpad` - Thinkpad T480, i5 8350U, 16GB RAM, 256GB NVME - `homelab` - i7 8700T, 32GB RAM, 512GB NVME, 1TB 2.5" SATA +## Todo +- Automatic backups to external drives. +- Better documentation and code structure. +- Use NixOS modules system. + ## Credits - [orangc's flake](https://git.orangc.net/c/dots) - [vimjoyer's tutorials](https://www.youtube.com/@vimjoyer) From 2e38a8834faa6d972f66ac381b4a4c0033e4da44 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 6 Jun 2026 09:21:09 +0700 Subject: [PATCH 059/224] git tweaks --- modules/home/core/cli.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/home/core/cli.nix b/modules/home/core/cli.nix index 4f2dbf6..b88d171 100644 --- a/modules/home/core/cli.nix +++ b/modules/home/core/cli.nix @@ -94,6 +94,7 @@ enable = true; signing.format = null; settings = { + push.autoSetupRemote = true; pull.rebase = "true"; credential.helper = "cache --timeout=3600"; user = { From 604e74c074fbe6a1dd188fe5a7adb8b87e7635a3 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 6 Jun 2026 09:42:13 +0700 Subject: [PATCH 060/224] [skip ci] add extra labels --- modules/system/homelab/git.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/system/homelab/git.nix b/modules/system/homelab/git.nix index 2544f90..1d3409c 100644 --- a/modules/system/homelab/git.nix +++ b/modules/system/homelab/git.nix @@ -44,7 +44,12 @@ name = "nixos-server-runner"; url = "http://localhost:5080"; #"https://git.proxy.${homelab.domain}"; tokenFile = "/mnt/data/apps/forgejo/token-runner"; - labels = [ "self-hosted:host" ]; + labels = [ + "self-hosted:host" + "bun:docker://docker.io/oven/bun" + "debian:docker://docker.io/library/debian:trixie-slim" + "aio:docker://git.satr14.my.id/satr14/aio-container:latest" + ]; hostPackages = with pkgs; [ bash coreutils git nix openssh bun ]; }; }; From b25a385ec36ae338070d074250f4de5d29b664cb Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 6 Jun 2026 10:03:56 +0700 Subject: [PATCH 061/224] [skip ci] change image --- modules/system/homelab/git.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/git.nix b/modules/system/homelab/git.nix index 1d3409c..7341d16 100644 --- a/modules/system/homelab/git.nix +++ b/modules/system/homelab/git.nix @@ -47,7 +47,7 @@ labels = [ "self-hosted:host" "bun:docker://docker.io/oven/bun" - "debian:docker://docker.io/library/debian:trixie-slim" + "debian:docker://docker.io/library/node:26-trixie-slim" "aio:docker://git.satr14.my.id/satr14/aio-container:latest" ]; hostPackages = with pkgs; [ bash coreutils git nix openssh bun ]; From 56293e353c34c6a87f25ad682c6bbfda79906281 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 6 Jun 2026 10:13:12 +0700 Subject: [PATCH 062/224] fix actions url --- modules/system/homelab/git.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/system/homelab/git.nix b/modules/system/homelab/git.nix index 7341d16..5f6bfa7 100644 --- a/modules/system/homelab/git.nix +++ b/modules/system/homelab/git.nix @@ -20,7 +20,8 @@ ROOT_URL = "https://git.${homelab.domain}"; LANDING_PAGE = "explore"; }; - oauth2_client.ENABLE_AUTO_REGISTRATION=true; + actions.DEFAULT_ACTIONS_URL = "https://git.satr14.my.id"; + oauth2_client.ENABLE_AUTO_REGISTRATION = true; service = { DISABLE_REGISTRATION = true; ENABLE_OPENID_SIGNIN = false; From 2a180db15394ae0e7a253d62fd1bc1485c462cb4 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 6 Jun 2026 10:42:24 +0700 Subject: [PATCH 063/224] hide players --- modules/system/homelab/mc.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 90e2e76..e0296a2 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -60,6 +60,7 @@ in { server-name = "Minecraft Server"; motd = "§lSeason 3§r - §dExplorers Creativity 🔥"; log-ips = false; # TODO: figure out how to get ips from cloudflared tunnel + hide-online-players = true; difficulty = "normal"; gamemode = "survival"; From 21246f1c67a71c568a67411adfed0f7ef3e85177 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 6 Jun 2026 11:09:50 +0700 Subject: [PATCH 064/224] motd faker --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index e0296a2..dd53017 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -58,7 +58,7 @@ in { # server-ip = "localhost"; server-port = 25565; server-name = "Minecraft Server"; - motd = "§lSeason 3§r - §dExplorers Creativity 🔥"; + motd = "§cCan't connect to server"; log-ips = false; # TODO: figure out how to get ips from cloudflared tunnel hide-online-players = true; From bfb714119aa3055b9d2379db90d75a860aeef7fa Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 6 Jun 2026 22:48:45 +0700 Subject: [PATCH 065/224] set mc client mem --- modules/home/core/shell.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/core/shell.nix b/modules/home/core/shell.nix index 7c69e47..74bfd8f 100644 --- a/modules/home/core/shell.nix +++ b/modules/home/core/shell.nix @@ -67,7 +67,7 @@ "fg-create-repo" = "git remote add origin ${git.server}/${git.username}/$(basename $PWDw).git && git push"; "convert-pdf" = "libreoffice --headless --convert-to pdf"; - "mcl" = "portablemc start -l $(cat ~/.minecraft/portablemc-launch-params.json | jq -r .email) $(cat ~/.minecraft/portablemc-launch-params.json | jq -r .version)"; + "mcl" = "portablemc start -l $(cat ~/.minecraft/portablemc-launch-params.json | jq -r .email) $(cat ~/.minecraft/portablemc-launch-params.json | jq -r .version) --jvm-arg=-Xmx6G"; "mc" = "ferium upgrade; mcl"; }; initContent = '' From acc6d5b85398120cd3c2edb399205286d6b36f4f Mon Sep 17 00:00:00 2001 From: satr14 Date: Thu, 11 Jun 2026 13:07:43 +0700 Subject: [PATCH 066/224] inc sim distance --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index dd53017..0bbb83d 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -76,7 +76,7 @@ in { player-idle-timeout = 0; view-distance = 12; - simulation-distance = 4; + simulation-distance = 6; enable-rcon = true; sync-chunk-writes = false; From 946109445df09278790298fff7b0c55a6b42d594 Mon Sep 17 00:00:00 2001 From: satr14 Date: Thu, 11 Jun 2026 16:40:14 +0700 Subject: [PATCH 067/224] add suda vim --- modules/home/core/cli.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/home/core/cli.nix b/modules/home/core/cli.nix index b88d171..d6a8ee9 100644 --- a/modules/home/core/cli.nix +++ b/modules/home/core/cli.nix @@ -78,6 +78,7 @@ nvim-cmp indent-blankline-nvim markdown-preview-nvim + suda-vim ]; }; gh = { From 70db3cc58e0a0a244d10e873c6344ecef5f13fa7 Mon Sep 17 00:00:00 2001 From: satr14 Date: Thu, 11 Jun 2026 18:45:52 +0700 Subject: [PATCH 068/224] use built in systray --- modules/home/desktop.nix | 2 +- modules/home/rice/compositor.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/home/desktop.nix b/modules/home/desktop.nix index 9e34895..bad0b65 100644 --- a/modules/home/desktop.nix +++ b/modules/home/desktop.nix @@ -24,7 +24,7 @@ home = { packages = with pkgs; [ playerctl brightnessctl - networkmanagerapplet tailscale-systray + networkmanagerapplet qt6Packages.qt6ct kdePackages.qtstyleplugin-kvantum nwg-displays lxqt.pcmanfm-qt diff --git a/modules/home/rice/compositor.nix b/modules/home/rice/compositor.nix index 00f19e0..17c16c0 100644 --- a/modules/home/rice/compositor.nix +++ b/modules/home/rice/compositor.nix @@ -36,7 +36,7 @@ "uwsm app -s b -- blueman-applet &" "uwsm app -s b -- nm-applet &" - "uwsm app -s b -- tailscale-systray &" + "uwsm app -s b -- tailscale systray &" #"keepassxc &" ]; From c573a72350001dff53ea5e625be0db3be8f40471 Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 12 Jun 2026 19:12:19 +0700 Subject: [PATCH 069/224] packsquash binary --- modules/system/homelab/mc.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 0bbb83d..13e3ada 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -9,7 +9,18 @@ packHash = "sha256-xB9Oc/aneogSQ9r7L42vyVM6xwq+QkoTaXYNuUzeo6M="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; - + + packsquash-binary = pkgs.runCommand "packsquash" { + src = pkgs.fetchurl { + url = "https://github.com/ComunidadAylas/PackSquash/releases/download/v0.4.1/packsquash-x86_64-unknown-linux-gnu.zip"; + sha256 = "sha256-VsGZewoiO5MjhIhwjlLO5d5uHynlAK5Jh16jH2k2rPs="; + }; + nativeBuildInputs = [ pkgs.unzip ]; + } '' + mkdir -p $out/bin + unzip $src -d $out/bin + chmod +x $out/bin/packsquash + ''; in { imports = [ inputs.mc.nixosModules.minecraft-servers ]; nixpkgs.overlays = [ inputs.mc.overlay ]; @@ -86,7 +97,8 @@ in { symlinks = lib.mapAttrs' (name: _: lib.nameValuePair "mods/${name}" "${modpack}/mods/${name}") - (builtins.readDir "${modpack}/mods"); + (builtins.readDir "${modpack}/mods") + // { "polymer/packsquash" = "${packsquash-binary}/bin/packsquash"; }; package = pkgs.fabricServers.fabric-1_21_11.override { jre_headless = pkgs.javaPackages.compiler.temurin-bin.jdk-25; From 0ed0ebb3856c6a8258ef098d71f5ced57c5d2f8e Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 12 Jun 2026 19:44:11 +0700 Subject: [PATCH 070/224] fix typo --- modules/home/core/shell.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/core/shell.nix b/modules/home/core/shell.nix index 74bfd8f..a8d0e67 100644 --- a/modules/home/core/shell.nix +++ b/modules/home/core/shell.nix @@ -67,7 +67,7 @@ "fg-create-repo" = "git remote add origin ${git.server}/${git.username}/$(basename $PWDw).git && git push"; "convert-pdf" = "libreoffice --headless --convert-to pdf"; - "mcl" = "portablemc start -l $(cat ~/.minecraft/portablemc-launch-params.json | jq -r .email) $(cat ~/.minecraft/portablemc-launch-params.json | jq -r .version) --jvm-arg=-Xmx6G"; + "mcl" = "portablemc start -l $(cat ~/.minecraft/portablemc-launch-params.json | jq -r .email) $(cat ~/.minecraft/portablemc-launch-params.json | jq -r .version) --jvm-args=-Xmx6G"; "mc" = "ferium upgrade; mcl"; }; initContent = '' From 3d9cd77735b902237e8e2d43411f485ec27e8f57 Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 12 Jun 2026 20:25:22 +0700 Subject: [PATCH 071/224] update route --- lib/options.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/options.nix b/lib/options.nix index 9cc0282..c2bfd16 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -54,7 +54,7 @@ in { [ "Dockge" "docker" "https://containers.proxy.${domain}" "http://localhost:5001/" ] ]; routes = { - "mc0.${domain}" = "tcp://localhost:25565"; + "mc.${domain}" = "tcp://localhost:25565"; "docs-sandbox.${domain}" = "http://localhost:7090"; "docs.${domain}" = "http://localhost:7090"; From d2ec32a73e737e12cad5c07f344bdfad2555e6f9 Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 12 Jun 2026 20:47:01 +0700 Subject: [PATCH 072/224] dockge fix --- modules/system/homelab/containers.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/system/homelab/containers.nix b/modules/system/homelab/containers.nix index 2ca748c..44bec89 100644 --- a/modules/system/homelab/containers.nix +++ b/modules/system/homelab/containers.nix @@ -32,10 +32,8 @@ in { RestartSec = lib.mkOverride 500 "100ms"; RestartSteps = lib.mkOverride 500 9; }; - wantedBy = [ - "multi-user.target" - "network.target" - "docker.service" - ]; + after = [ "docker.service" "docker.socket" ]; + requires = [ "docker.service" "docker.socket" ]; + wantedBy = [ "multi-user.target" ]; }; } From 2d8b290cb59866624e4ba769c3a11b750717441e Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 13 Jun 2026 07:34:32 +0700 Subject: [PATCH 073/224] add prism launcher --- modules/home/core/apps.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/home/core/apps.nix b/modules/home/core/apps.nix index 14d3701..b2c848b 100644 --- a/modules/home/core/apps.nix +++ b/modules/home/core/apps.nix @@ -60,6 +60,10 @@ ]; }) + (prismlauncher.override { + jdks = [ javaPackages.compiler.temurin-bin.jdk-25 ]; + }) + ferium packwiz portablemc From 2fd983225d71895222ad802a573ae8210bf7ac68 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 13 Jun 2026 08:07:48 +0700 Subject: [PATCH 074/224] add more runtimes --- modules/home/core/apps.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/core/apps.nix b/modules/home/core/apps.nix index b2c848b..ea867c0 100644 --- a/modules/home/core/apps.nix +++ b/modules/home/core/apps.nix @@ -61,7 +61,7 @@ }) (prismlauncher.override { - jdks = [ javaPackages.compiler.temurin-bin.jdk-25 ]; + jdks = with javaPackages.compiler.temurin-bin; [ jre-25 jre-21 ]; }) ferium From df94792d9c5486e1a5dfa68383962aeda9381eca Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 13 Jun 2026 08:08:39 +0700 Subject: [PATCH 075/224] evaluation warning fix --- modules/home/core/cli.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/core/cli.nix b/modules/home/core/cli.nix index d6a8ee9..17a6dfa 100644 --- a/modules/home/core/cli.nix +++ b/modules/home/core/cli.nix @@ -78,7 +78,7 @@ nvim-cmp indent-blankline-nvim markdown-preview-nvim - suda-vim + vim-suda ]; }; gh = { From c80266e25d091e33967187844d2e396b6723d72d Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 14 Jun 2026 08:15:36 +0700 Subject: [PATCH 076/224] update modpack s3.1 --- modules/system/homelab/mc.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 13e3ada..c0fe22f 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -3,10 +3,10 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "8523f89493ace13087eb68cd9fe3b5eb4f669440"; + commit = "6dc66117471b4f290e0d6776ac449d9f7f870c90"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = "sha256-xB9Oc/aneogSQ9r7L42vyVM6xwq+QkoTaXYNuUzeo6M="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; From 39cdbdc2393f673bf4badaa3c7f26c73b568fe9a Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 14 Jun 2026 08:35:49 +0700 Subject: [PATCH 077/224] add proxy prot conf and update hash --- modules/system/homelab/mc.nix | 52 ++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index c0fe22f..a95f0cb 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -6,21 +6,10 @@ commit = "6dc66117471b4f290e0d6776ac449d9f7f870c90"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-J3KdjRer1d8jOeO84rET05nFdjCXjgz5A7mJysFwu6Q="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; - packsquash-binary = pkgs.runCommand "packsquash" { - src = pkgs.fetchurl { - url = "https://github.com/ComunidadAylas/PackSquash/releases/download/v0.4.1/packsquash-x86_64-unknown-linux-gnu.zip"; - sha256 = "sha256-VsGZewoiO5MjhIhwjlLO5d5uHynlAK5Jh16jH2k2rPs="; - }; - nativeBuildInputs = [ pkgs.unzip ]; - } '' - mkdir -p $out/bin - unzip $src -d $out/bin - chmod +x $out/bin/packsquash - ''; in { imports = [ inputs.mc.nixosModules.minecraft-servers ]; nixpkgs.overlays = [ inputs.mc.overlay ]; @@ -46,16 +35,6 @@ in { autoStart = true; restart = "always"; enableReload = production; - # extraReload = '' - # function rcon() { - # ${pkgs.rcon-cli}/bin/rcon-cli -p ${rcon-pass} $@ - # } - - # rcon "gamerule locator_bar false" - # rcon "gamerule mob_explosion_drop_decay false" - # rcon "gamerule reduced_debug_info false" - # rcon "gamerule global_sound_events false" - # ''; operators = lib.mkIf (!production) { "satr14" = { @@ -66,11 +45,10 @@ in { }; serverProperties = { - # server-ip = "localhost"; server-port = 25565; server-name = "Minecraft Server"; motd = "§cCan't connect to server"; - log-ips = false; # TODO: figure out how to get ips from cloudflared tunnel + log-ips = true; hide-online-players = true; difficulty = "normal"; @@ -98,7 +76,31 @@ in { symlinks = lib.mapAttrs' (name: _: lib.nameValuePair "mods/${name}" "${modpack}/mods/${name}") (builtins.readDir "${modpack}/mods") - // { "polymer/packsquash" = "${packsquash-binary}/bin/packsquash"; }; + // { + "polymer/packsquash" = let + packsquash-binary = pkgs.runCommand "packsquash" { + src = pkgs.fetchurl { + url = "https://github.com/ComunidadAylas/PackSquash/releases/download/v0.4.1/packsquash-x86_64-unknown-linux-gnu.zip"; + sha256 = "sha256-VsGZewoiO5MjhIhwjlLO5d5uHynlAK5Jh16jH2k2rPs="; + }; + nativeBuildInputs = [ pkgs.unzip ]; + } '' + mkdir -p $out/bin + unzip $src -d $out/bin + chmod +x $out/bin/packsquash + ''; + in "${packsquash-binary}/bin/packsquash"; + "config/proxy_protocol_support.json" = { + enableProxyProtocol = true; + whitelistTCPShieldServers = false; + proxyServerIPs = [ "127.0.0.1" "::1" ]; + directAccessIPs = [ + "127.0.0.1" "::1" # localhost + "100.64.0.0/10" "fd7a:115c:a1e0::/48" # tailscale + "192.168.1.0/24" "10.3.14.0/24" # lan + ]; + }; + }; package = pkgs.fabricServers.fabric-1_21_11.override { jre_headless = pkgs.javaPackages.compiler.temurin-bin.jdk-25; From 9025adc997f2af39754a750bf07e489f45f693e0 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 14 Jun 2026 08:38:36 +0700 Subject: [PATCH 078/224] fix proxy prot conf --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index a95f0cb..70d4fd5 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -90,7 +90,7 @@ in { chmod +x $out/bin/packsquash ''; in "${packsquash-binary}/bin/packsquash"; - "config/proxy_protocol_support.json" = { + "config/proxy_protocol_support.json".value = { enableProxyProtocol = true; whitelistTCPShieldServers = false; proxyServerIPs = [ "127.0.0.1" "::1" ]; From 2624881507fbac1cbbf8b386a04b310ee6b0a401 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 14 Jun 2026 08:47:22 +0700 Subject: [PATCH 079/224] fix read only error --- modules/system/homelab/mc.nix | 56 +++++++++++++++++------------------ 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 70d4fd5..8b02ac2 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -9,7 +9,7 @@ packHash = "sha256-J3KdjRer1d8jOeO84rET05nFdjCXjgz5A7mJysFwu6Q="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; - + inherit (inputs.nix-minecraft.lib) collectFilesAt; in { imports = [ inputs.mc.nixosModules.minecraft-servers ]; nixpkgs.overlays = [ inputs.mc.overlay ]; @@ -73,34 +73,32 @@ in { "rcon.port" = 25575; }; - symlinks = lib.mapAttrs' - (name: _: lib.nameValuePair "mods/${name}" "${modpack}/mods/${name}") - (builtins.readDir "${modpack}/mods") - // { - "polymer/packsquash" = let - packsquash-binary = pkgs.runCommand "packsquash" { - src = pkgs.fetchurl { - url = "https://github.com/ComunidadAylas/PackSquash/releases/download/v0.4.1/packsquash-x86_64-unknown-linux-gnu.zip"; - sha256 = "sha256-VsGZewoiO5MjhIhwjlLO5d5uHynlAK5Jh16jH2k2rPs="; - }; - nativeBuildInputs = [ pkgs.unzip ]; - } '' - mkdir -p $out/bin - unzip $src -d $out/bin - chmod +x $out/bin/packsquash - ''; - in "${packsquash-binary}/bin/packsquash"; - "config/proxy_protocol_support.json".value = { - enableProxyProtocol = true; - whitelistTCPShieldServers = false; - proxyServerIPs = [ "127.0.0.1" "::1" ]; - directAccessIPs = [ - "127.0.0.1" "::1" # localhost - "100.64.0.0/10" "fd7a:115c:a1e0::/48" # tailscale - "192.168.1.0/24" "10.3.14.0/24" # lan - ]; - }; - }; + symlinks = collectFilesAt modpack "mods" // { + "polymer/packsquash" = let + packsquash-binary = pkgs.runCommand "packsquash" { + src = pkgs.fetchurl { + url = "https://github.com/ComunidadAylas/PackSquash/releases/download/v0.4.1/packsquash-x86_64-unknown-linux-gnu.zip"; + sha256 = "sha256-VsGZewoiO5MjhIhwjlLO5d5uHynlAK5Jh16jH2k2rPs="; + }; + nativeBuildInputs = [ pkgs.unzip ]; + } '' + mkdir -p $out/bin + unzip $src -d $out/bin + chmod +x $out/bin/packsquash + ''; + in "${packsquash-binary}/bin/packsquash"; + }; + + files."config/proxy_protocol_support.json".value = { + enableProxyProtocol = true; + whitelistTCPShieldServers = false; + proxyServerIPs = [ "127.0.0.1" "::1" ]; + directAccessIPs = [ + "127.0.0.1" "::1" # localhost + "100.64.0.0/10" "fd7a:115c:a1e0::/48" # tailscale + "192.168.1.0/24" "10.3.14.0/24" # lan + ]; + }; package = pkgs.fabricServers.fabric-1_21_11.override { jre_headless = pkgs.javaPackages.compiler.temurin-bin.jdk-25; From d99b01efd29870c2213eaa619fa2b85a398ec8a8 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 14 Jun 2026 08:50:45 +0700 Subject: [PATCH 080/224] fix import err --- modules/system/homelab/mc.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 8b02ac2..29b45ba 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -9,7 +9,6 @@ packHash = "sha256-J3KdjRer1d8jOeO84rET05nFdjCXjgz5A7mJysFwu6Q="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; - inherit (inputs.nix-minecraft.lib) collectFilesAt; in { imports = [ inputs.mc.nixosModules.minecraft-servers ]; nixpkgs.overlays = [ inputs.mc.overlay ]; @@ -73,7 +72,7 @@ in { "rcon.port" = 25575; }; - symlinks = collectFilesAt modpack "mods" // { + symlinks = inputs.mc.lib.collectFilesAt modpack "mods" // { "polymer/packsquash" = let packsquash-binary = pkgs.runCommand "packsquash" { src = pkgs.fetchurl { From 426bb80002cb722f423074108886a104d83561ce Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 14 Jun 2026 09:15:41 +0700 Subject: [PATCH 081/224] fix ip range --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 29b45ba..e8b8c53 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -93,7 +93,7 @@ in { whitelistTCPShieldServers = false; proxyServerIPs = [ "127.0.0.1" "::1" ]; directAccessIPs = [ - "127.0.0.1" "::1" # localhost + "127.0.0.0/8" "::1/128" # localhost "100.64.0.0/10" "fd7a:115c:a1e0::/48" # tailscale "192.168.1.0/24" "10.3.14.0/24" # lan ]; From 4a70c0c122995aa383edae66339151aa818628ba Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 14 Jun 2026 10:09:49 +0700 Subject: [PATCH 082/224] add proxy ip --- modules/system/homelab/mc.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index e8b8c53..5342df8 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -91,7 +91,10 @@ in { files."config/proxy_protocol_support.json".value = { enableProxyProtocol = true; whitelistTCPShieldServers = false; - proxyServerIPs = [ "127.0.0.1" "::1" ]; + proxyServerIPs = [ + "127.0.0.1" "::1" + "127.185.172.53" # playit + ]; directAccessIPs = [ "127.0.0.0/8" "::1/128" # localhost "100.64.0.0/10" "fd7a:115c:a1e0::/48" # tailscale From 56c74b2a7916182c54cfb8f97733dc83a5c5333b Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 16 Jun 2026 07:45:48 +0700 Subject: [PATCH 083/224] switch to jdk --- modules/home/core/apps.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/core/apps.nix b/modules/home/core/apps.nix index ea867c0..b8e09d6 100644 --- a/modules/home/core/apps.nix +++ b/modules/home/core/apps.nix @@ -61,7 +61,7 @@ }) (prismlauncher.override { - jdks = with javaPackages.compiler.temurin-bin; [ jre-25 jre-21 ]; + jdks = with javaPackages.compiler.temurin-bin; [ jre-21 jdk-25 ]; }) ferium From 342ab4f76a6264d2c14673d86ebe4617ce17f7e3 Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 16 Jun 2026 07:52:32 +0700 Subject: [PATCH 084/224] nvim transparent bg --- modules/home/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/home/default.nix b/modules/home/default.nix index 00bbbb6..d3a590f 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -6,10 +6,11 @@ catppuccin = { enable = true; - hyprlock.useDefaultConfig = false; - flavor = ctp-opt.flavor; accent = ctp-opt.accent; + + hyprlock.useDefaultConfig = false; + nvim.settings.transparent_background = true; }; home = { From daf77251f7657a8b57b4e3f23442f893f40f146f Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 16 Jun 2026 07:52:43 +0700 Subject: [PATCH 085/224] tmux clipboard --- modules/home/core/cli.nix | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/modules/home/core/cli.nix b/modules/home/core/cli.nix index 17a6dfa..1714f16 100644 --- a/modules/home/core/cli.nix +++ b/modules/home/core/cli.nix @@ -8,7 +8,14 @@ home.packages = with pkgs; [ bun ]; programs = { - tmux.enable = true; + tmux = { + enable = true; + extraConfig = '' + set -g set-clipboard on + set -ag terminal-overrides ",*:Ms=\\E[52;%p1%s;%p2%s\\007" + set -g allow-passthrough on + ''; + }; vim.enable = true; bat.enable = true; kitty = { @@ -49,16 +56,11 @@ initLua = '' vim.opt.clipboard = "unnamedplus" vim.opt.termguicolors = true + local osc52 = require("vim.ui.clipboard.osc52") vim.g.clipboard = { name = "OSC 52", - copy = { - ["+"] = require("vim.ui.clipboard.osc52").copy("+"), - ["*"] = require("vim.ui.clipboard.osc52").copy("*"), - }, - paste = { - ["+"] = require("vim.ui.clipboard.osc52").paste("+"), - ["*"] = require("vim.ui.clipboard.osc52").paste("*"), - }, + copy = { ["+"] = osc52.copy("+"), ["*"] = osc52.copy("*") }, + paste = { ["+"] = osc52.paste("+"), ["*"] = osc52.paste("*") }, } require("nvim-tree").setup() vim.api.nvim_create_autocmd("VimEnter", { From da1de4a9f5a76c1e956f2684c936d8a185de3fb0 Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 16 Jun 2026 07:52:52 +0700 Subject: [PATCH 086/224] blur tweaks --- modules/home/rice/compositor.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/home/rice/compositor.nix b/modules/home/rice/compositor.nix index 17c16c0..dbf640e 100644 --- a/modules/home/rice/compositor.nix +++ b/modules/home/rice/compositor.nix @@ -87,9 +87,15 @@ blur = { enabled = true; - size = 3; - passes = 1; - vibrancy = 0.1696; + size = 7; + passes = 3; + ignore_opacity = true; + + noise = 0.05; + contrast = 1.5; + + xray = false; + new_optimizations = true; }; }; From 13b3ce6f3340ced154fb469158028bbd4c8bea54 Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 16 Jun 2026 07:57:55 +0700 Subject: [PATCH 087/224] [skip ci] flake update --- flake.lock | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/flake.lock b/flake.lock index 5ab99ba..4a9bf3d 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1777734189, - "narHash": "sha256-kbIhdhDPaTP6gxAPkcRYeB+cqPFDpTM/bnw+m+26vkI=", + "lastModified": 1781255309, + "narHash": "sha256-n2P5xkAYGylrJ3feu7L6uaCUw/+jW8rk+HO127gDbFA=", "owner": "catppuccin", "repo": "nix", - "rev": "e68cf5deaf1a7afed2e548835dba2ae99f5a3ccb", + "rev": "036c78ea4cd8a42c8546c6316a944fd7d59d4341", "type": "github" }, "original": { @@ -78,11 +78,11 @@ ] }, "locked": { - "lastModified": 1777977606, - "narHash": "sha256-8ceIdvijN2tm9fIAUgnIZ8BM8TlsFx7pRYKRoxNsi1k=", + "lastModified": 1781557312, + "narHash": "sha256-QOIRYSUFSq7L5mY3dZymaVhcnne3tPgoR9riB0WocjA=", "owner": "nix-community", "repo": "home-manager", - "rev": "7ef1c04d11f7ef69fd946b118c768c32de0b89a5", + "rev": "c03e4752899e55705dfa63979abd885c582a5c48", "type": "github" }, "original": { @@ -99,11 +99,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1777952170, - "narHash": "sha256-8dQ/DOUvQI8x5i6MZ309/xZLLVfV1CgWbD2+JiQ7Hd4=", + "lastModified": 1780375694, + "narHash": "sha256-TznzgYVONg28KiSFB2rVdf/eLVIMtEQOxKt13Kzyrp8=", "owner": "Infinidoge", "repo": "nix-minecraft", - "rev": "34a46e4de360c5004ee1866f5e3de78bf5e8b289", + "rev": "e6f8bec35104ca5955efe73742da58d2823684f7", "type": "github" }, "original": { @@ -114,18 +114,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1777268161, - "narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76", - "type": "github" + "lastModified": 1781173989, + "narHash": "sha256-zqS1Hjp9o14nN/YhXu/uqm36ot058fF9wmd7/H/hRKc=", + "rev": "8c91a71d13451abc40eb9dae8910f972f979852f", + "type": "tarball", + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1015022.8c91a71d1345/nixexprs.tar.xz" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" } }, "nixpkgs_2": { @@ -161,11 +158,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1777578337, - "narHash": "sha256-Ad49moKWeXtKBJNy2ebiTQUEgdLyvGmTeykAQ9xM+Z4=", + "lastModified": 1781074563, + "narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "15f4ee454b1dce334612fa6843b3e05cf546efab", + "rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca", "type": "github" }, "original": { From afdf350a88181bd71a4cce27533e318260bee02b Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 16 Jun 2026 10:37:55 +0700 Subject: [PATCH 088/224] hyprland half fix --- modules/home/rice/compositor.nix | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/modules/home/rice/compositor.nix b/modules/home/rice/compositor.nix index dbf640e..786afbc 100644 --- a/modules/home/rice/compositor.nix +++ b/modules/home/rice/compositor.nix @@ -6,18 +6,18 @@ wayland.windowManager.hyprland = { enable = true; package = pkgs.hyprland; # inputs.hl.packages."${pkgs.system}".hyprland; + configType = "hyprlang"; # keep legacy config format (home.stateVersion < 26.05) systemd.enable = false; xwayland.enable = true; settings = { + dwindle.preserve_split = true; + debug = { error_position = 1; disable_logs = true; + vfr = true; }; - # monitor = [ - # "eDP-1,preferred,auto,1" - # ",preferred,auto,1" - # ]; source = [ "~/.config/hypr/monitors.conf" "~/.config/hypr/workspaces.conf" @@ -28,16 +28,11 @@ "wl-paste --type text --watch cliphist store" "wl-paste --type image --watch cliphist store" - #"dunst &" - #"hypridle &" - #"awww-daemon &" "uwsm app -s s -- waybar &" "uwsm app -s b -- sunshine &" - "uwsm app -s b -- blueman-applet &" "uwsm app -s b -- nm-applet &" "uwsm app -s b -- tailscale systray &" - #"keepassxc &" ]; env = [ @@ -66,11 +61,6 @@ "col.inactive_border" = if rice.borders.colored then "$overlay2" else "$crust"; }; - dwindle = { - preserve_split = true; - pseudotile = true; - }; - decoration = { rounding = rice.borders.rounded; rounding_power = 2; @@ -130,7 +120,6 @@ exit_window_retains_fullscreen = true; on_focus_under_fullscreen = 1; background_color = "$base"; - vfr = true; }; input = { From 81368080778012b9ee24580ac0b1b5a37e581790 Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 16 Jun 2026 10:38:11 +0700 Subject: [PATCH 089/224] catppuccin eval warning fix --- modules/home/default.nix | 1 + modules/system/misc/theme.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/home/default.nix b/modules/home/default.nix index d3a590f..b6c5e9d 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -6,6 +6,7 @@ catppuccin = { enable = true; + autoEnable = true; flavor = ctp-opt.flavor; accent = ctp-opt.accent; diff --git a/modules/system/misc/theme.nix b/modules/system/misc/theme.nix index e0754ff..2c588fd 100644 --- a/modules/system/misc/theme.nix +++ b/modules/system/misc/theme.nix @@ -7,6 +7,7 @@ catppuccin = { enable = true; + autoEnable = true; flavor = ctp-opt.flavor; accent = ctp-opt.accent; }; From 36acd0c5b05893feb3e091c6618cd6548f1e87b2 Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 16 Jun 2026 10:40:21 +0700 Subject: [PATCH 090/224] app debloat --- modules/home/core/apps.nix | 28 +++------------------------- modules/home/core/cli.nix | 2 +- 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/modules/home/core/apps.nix b/modules/home/core/apps.nix index b8e09d6..bcb3363 100644 --- a/modules/home/core/apps.nix +++ b/modules/home/core/apps.nix @@ -27,47 +27,25 @@ home.packages = with pkgs; [ zed-editor - # kicad-small - # arduino-ide slack discord - # protonmail-desktop # https://www.reddit.com/r/NixOS/comments/1rm9alf/protonmail_in_nixos/ + protonmail-desktop vlc brave flameshot libreoffice appimage-run - # keepassxc virt-manager - # winboat - remmina moonlight-qt - # rustdesk - - - # inkscape - # davinci-resolve - # kdePackages.kdenlive - (wrapOBS { - plugins = with obs-studio-plugins; [ - wlrobs - obs-backgroundremoval - obs-pipewire-audio-capture - ]; - }) + gpu-screen-recorder + gpu-screen-recorder-gtk (prismlauncher.override { jdks = with javaPackages.compiler.temurin-bin; [ jre-21 jdk-25 ]; }) - - ferium - packwiz - portablemc - steamguard-cli - # modrinth-app ]; } diff --git a/modules/home/core/cli.nix b/modules/home/core/cli.nix index 1714f16..c1ed15f 100644 --- a/modules/home/core/cli.nix +++ b/modules/home/core/cli.nix @@ -5,7 +5,7 @@ TERMINAL = "kitty"; }; - home.packages = with pkgs; [ bun ]; + home.packages = with pkgs; [ bun packwiz ]; programs = { tmux = { From 781e364ec637852563a276481f27e0608e0864f8 Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 16 Jun 2026 22:28:45 +0700 Subject: [PATCH 091/224] browser config --- modules/home/core/browser.nix | 25 +++++++++++++++++++++++++ modules/home/desktop.nix | 1 + 2 files changed, 26 insertions(+) create mode 100644 modules/home/core/browser.nix diff --git a/modules/home/core/browser.nix b/modules/home/core/browser.nix new file mode 100644 index 0000000..6cf4809 --- /dev/null +++ b/modules/home/core/browser.nix @@ -0,0 +1,25 @@ +{ pkgs, ... }: { + programs.chromium = { + enable = true; + package = pkgs.brave; + extensions = map (id: { inherit id; }) [ + "nngceckbapebfimnlniiiahkandclblb" # bitwarden + "kokhpbhfeokchmbimdlaldcmlinjpipm" # 2fauth + "gppongmhjkpfnbhagpmjfkannfbllamg" # wappalyzer + + "cejckpjfigehbeecbbfhangbknpidcnh" # timezone changer + "dmghijelimhndkbmpgbldicpogfkceaj" # dark mode + "cebifddlogbjhoibpjobhlamopmlpckl" # disable page visibility + "efknglbfhoddmmfabeihlemgekhhnabb" # json viewer + "bhchdcejhohfmigjafbampogmaanbfkg" # user agent switcher + + "ocabkmapohekeifbkoelpmppmfbcibna" # xoom redirector + "fkagelmloambgokoeokbpihmgpkbgbfm" # indie wiki buddy + "bggfcpfjbdkhfhfmkjpbhnkhnpjjeomc" # github material icons + "hfckonpdalooejghjpbpimhcgighijck" # chess move confirm + "babnnfmbjokkeieobamoifmeapbbfhje" # medium unlock + "mnjggcdmjocbbbhaepdhchncahnbgone" # sponsor block + "ekcgkejcjdcmonfpmnljobemcbpnkamh" # whatsapp web plus + ]; + }; +} \ No newline at end of file diff --git a/modules/home/desktop.nix b/modules/home/desktop.nix index bad0b65..1a151d3 100644 --- a/modules/home/desktop.nix +++ b/modules/home/desktop.nix @@ -14,6 +14,7 @@ ./misc/phone.nix ./core/apps.nix ./core/code.nix + ./core/browser.nix ]; services = { From 8b1c10335ad72d197c51b0000fcac4ea64cf6bab Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 16 Jun 2026 22:29:48 +0700 Subject: [PATCH 092/224] temp fix cuz too lazy to migrate to lua --- modules/home/rice/compositor.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/home/rice/compositor.nix b/modules/home/rice/compositor.nix index 786afbc..7133dc9 100644 --- a/modules/home/rice/compositor.nix +++ b/modules/home/rice/compositor.nix @@ -3,6 +3,8 @@ ./keybinds.nix ]; + catppuccin.hyprland.enable = false; # temp fix until i get things migrated to lua + wayland.windowManager.hyprland = { enable = true; package = pkgs.hyprland; # inputs.hl.packages."${pkgs.system}".hyprland; @@ -57,8 +59,8 @@ allow_tearing = false; layout = "dwindle"; - "col.active_border" = if rice.borders.colored then "$accent" else "$overlay0"; - "col.inactive_border" = if rice.borders.colored then "$overlay2" else "$crust"; + "col.active_border" = if rice.borders.colored then "$accent" else "rgb(108,112,134)"; # accent overlay0 + "col.inactive_border" = if rice.borders.colored then "rgb(147,153,178)" else "rgb(17,17,27)"; # overlay2 crust }; decoration = { @@ -71,8 +73,8 @@ enabled = true; range = 6; render_power = 3; - color_inactive = "rgba($crustAlpha99)"; - color = "rgba($crustAlphaee)"; + color_inactive = "rgba(17,17,27,99)"; # crust alpha 99 + color = "rgba(17,17,27,238)"; # crust alpha ee }; blur = { @@ -119,7 +121,7 @@ middle_click_paste = false; exit_window_retains_fullscreen = true; on_focus_under_fullscreen = 1; - background_color = "$base"; + background_color = "rgb(17, 17, 27)"; # crust }; input = { From 2e11be00c4daae472c79aa7bbe2517d44c11b9c8 Mon Sep 17 00:00:00 2001 From: satr14 Date: Wed, 17 Jun 2026 18:42:41 +0700 Subject: [PATCH 093/224] remove unnecesarry things --- modules/system/homelab/dash.nix | 62 --------------------------------- 1 file changed, 62 deletions(-) diff --git a/modules/system/homelab/dash.nix b/modules/system/homelab/dash.nix index e7d62bf..c6c14bb 100644 --- a/modules/system/homelab/dash.nix +++ b/modules/system/homelab/dash.nix @@ -1,18 +1,4 @@ { timezone, homelab, ... }: let - rss = [ - "https://www.raspberrypi.com/news/feed/" - "https://www.jeffgeerling.com/blog.xml" - "https://www.howtogeek.com/feed/" - "https://hackaday.com/feed/rss" - "https://www.xda-developers.com/feed/" - "https://9to5mac.com/feed/" - "https://9to5google.com/feed/" - "https://www.cnx-software.com/feed/" - "https://selfh.st/rss/" - "https://www.joshwcomeau.com/rss.xml" - "https://samwho.dev/rss.xml" - "https://ishadeed.com/feed.xml" - ]; yt = [ "UCXuqSBlHAE6Xw-yeJA0Tunw" # LinusTechTips "UCsBjURrPoezykLs9EqgamOA" # Fireship @@ -34,24 +20,6 @@ "UCGKEMK3s-ZPbjVOIuAV8clQ" # CoreDumped "UCWQaM7SpSECp9FELz-cHzuQ" # DreamsOfCode ]; - gh = [ - "tailscale/tailscale" - "glanceapp/glance" - "nixos/nixpkgs" - "ollama/ollama" - "nginx/nginx" - "oven-sh/bun" - ]; - search = [ - [ "Website" "!!" "https://{QUERY}" ] - [ "CVE" "!cve" "https://securityvulnerability.io/vulnerability/CVE-{QUERY}" ] - [ "YouTube" "!yt" "https://www.youtube.com/results?search_query={QUERY}" ] - [ "GitHub" "!gh" "https://github.com/search?q={QUERY}" ] - [ "Nix Packages" "!nix" "https://search.nixos.org/packages?channel=unstable&type=packages&query={QUERY}" ] - [ "Nix Options" "!opt" "https://mynixos.com/search?q={QUERY}" ] - [ "Flight Radar 24" "!f" "https://www.flightradar24.com/data/flights/{QUERY}" ] - [ "Google Web Results Only" "!s" "https://google.com/search?udm=14&q={QUERY}" ] - ]; monitor = [ [ "DNS" "http://localhost:8088/" ] [ "Proxy" "https://proxy.${homelab.domain}/" ] @@ -202,30 +170,11 @@ in { hide-header = true; first-day-of-week = "monday"; } - { - type = "rss"; - hide-header = true; - title = "rss"; - limit = 12; - cache = "12h"; - feeds = map (e: { url = e; }) rss; - } ]; } { size = "full"; widgets = [ - { - type = "search"; - hide-header = true; - autofocus = true; - search-engine = "google"; - bangs = map (e: { - title = builtins.elemAt e 0; - shortcut = builtins.elemAt e 1; - url = builtins.elemAt e 2; - }) search; - } { type = "hacker-news"; hide-header = true; @@ -251,11 +200,6 @@ in { units = "metric"; hour-format = "12h"; } - { - type = "to-do"; - id = "tasks"; - hide-header = true; - } { type = "repository"; repository = "is-a-dev/register"; @@ -272,12 +216,6 @@ in { commits-limit = 0; hide-header = true; } - { - type = "releases"; - cache = "1d"; - hide-header = true; - repositories = gh; - } ]; } ]; From b4edc1439e07f18623a9c3f01b84b6c74cf8f86f Mon Sep 17 00:00:00 2001 From: satr14 Date: Wed, 17 Jun 2026 18:54:36 +0700 Subject: [PATCH 094/224] ntfy notif --- .forgejo/workflows/activate.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.forgejo/workflows/activate.yml b/.forgejo/workflows/activate.yml index 869f0f4..05eee76 100644 --- a/.forgejo/workflows/activate.yml +++ b/.forgejo/workflows/activate.yml @@ -27,14 +27,15 @@ jobs: root@localhost \ "bash -lc 'nixos-rebuild switch --refresh --flake git+http://localhost:5080/satr14/nix-flake#homelab -L'" - - name: Show generation - if: always() + - name: Notify on failure + if: failure() run: | - ssh -i ./ssh/deploy_key \ - -o PasswordAuthentication=no \ - -o StrictHostKeyChecking=no \ - -o UserKnownHostsFile=/dev/null \ - root@localhost "bash -lc 'nixos-version'" + curl -s -X POST https://notify.proxy.satr14.my.id/git-flake-updates \ + -H "Title: NixOS Homelab Rebuild Failed" \ + -H "Priority: high" \ + -H "Tags: x" \ + -H "Actions: view, View Logs, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}; view, View Commit, ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}" \ + -d "${{ github.event.head_commit.message }}" - name: Clean Up if: always() From 5bb61fc69dfbf5eb5ea24e9ae0f644a3c3e00b52 Mon Sep 17 00:00:00 2001 From: satr14 Date: Wed, 17 Jun 2026 18:55:32 +0700 Subject: [PATCH 095/224] syntax error test --- modules/system/homelab/dash.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/dash.nix b/modules/system/homelab/dash.nix index c6c14bb..d8972a0 100644 --- a/modules/system/homelab/dash.nix +++ b/modules/system/homelab/dash.nix @@ -1,4 +1,4 @@ -{ timezone, homelab, ... }: let +{ timezone, homelab, ... }:$ let yt = [ "UCXuqSBlHAE6Xw-yeJA0Tunw" # LinusTechTips "UCsBjURrPoezykLs9EqgamOA" # Fireship From 1fab087ccbf034692bbedb7f6a33223b779db68a Mon Sep 17 00:00:00 2001 From: satr14 Date: Wed, 17 Jun 2026 18:56:51 +0700 Subject: [PATCH 096/224] fix url --- .forgejo/workflows/activate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/activate.yml b/.forgejo/workflows/activate.yml index 05eee76..a3b99d4 100644 --- a/.forgejo/workflows/activate.yml +++ b/.forgejo/workflows/activate.yml @@ -34,7 +34,7 @@ jobs: -H "Title: NixOS Homelab Rebuild Failed" \ -H "Priority: high" \ -H "Tags: x" \ - -H "Actions: view, View Logs, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}; view, View Commit, ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}" \ + -H "Actions: view, View Logs, https://git.satr14.my.id/${{ github.repository }}/actions/runs/${{ github.run_id }}" \ -d "${{ github.event.head_commit.message }}" - name: Clean Up From e1d8f209bcb3bf910ea2a8f2f72eba034cb97144 Mon Sep 17 00:00:00 2001 From: satr14 Date: Wed, 17 Jun 2026 19:00:27 +0700 Subject: [PATCH 097/224] fix buttons --- .forgejo/workflows/activate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/activate.yml b/.forgejo/workflows/activate.yml index a3b99d4..456285f 100644 --- a/.forgejo/workflows/activate.yml +++ b/.forgejo/workflows/activate.yml @@ -34,7 +34,7 @@ jobs: -H "Title: NixOS Homelab Rebuild Failed" \ -H "Priority: high" \ -H "Tags: x" \ - -H "Actions: view, View Logs, https://git.satr14.my.id/${{ github.repository }}/actions/runs/${{ github.run_id }}" \ + -H "Actions: view, Action Runs, https://git.satr14.my.id/${{ github.repository }}/actions?workflow=activate.yml; view, View Commit, https://git.satr14.my.id/${{ github.repository }}/commit/${{ github.sha }}" \ -d "${{ github.event.head_commit.message }}" - name: Clean Up From 4bb9be86c413bdfcb4bb0d27b2113e7995c3d471 Mon Sep 17 00:00:00 2001 From: satr14 Date: Wed, 17 Jun 2026 19:02:05 +0700 Subject: [PATCH 098/224] syntax fix and success notif --- .forgejo/workflows/activate.yml | 9 +++++++++ modules/system/homelab/dash.nix | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/activate.yml b/.forgejo/workflows/activate.yml index 456285f..f338572 100644 --- a/.forgejo/workflows/activate.yml +++ b/.forgejo/workflows/activate.yml @@ -37,6 +37,15 @@ jobs: -H "Actions: view, Action Runs, https://git.satr14.my.id/${{ github.repository }}/actions?workflow=activate.yml; view, View Commit, https://git.satr14.my.id/${{ github.repository }}/commit/${{ github.sha }}" \ -d "${{ github.event.head_commit.message }}" + - name: Notify on success + if: success() + run: | + curl -s -X POST https://notify.proxy.satr14.my.id/git-flake-updates \ + -H "Title: NixOS Homelab Rebuild Succeeded" \ + -H "Tags: white_check_mark" \ + -H "Actions: view, View Commit, https://git.satr14.my.id/${{ github.repository }}/commit/${{ github.sha }}" \ + -d "${{ github.event.head_commit.message }}" + - name: Clean Up if: always() run: rm -f ./ssh/deploy_key \ No newline at end of file diff --git a/modules/system/homelab/dash.nix b/modules/system/homelab/dash.nix index d8972a0..c6c14bb 100644 --- a/modules/system/homelab/dash.nix +++ b/modules/system/homelab/dash.nix @@ -1,4 +1,4 @@ -{ timezone, homelab, ... }:$ let +{ timezone, homelab, ... }: let yt = [ "UCXuqSBlHAE6Xw-yeJA0Tunw" # LinusTechTips "UCsBjURrPoezykLs9EqgamOA" # Fireship From 0dd0277755e0aacebd786d37b06c6bccecabb4d2 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 20 Jun 2026 15:05:20 +0700 Subject: [PATCH 099/224] add extension --- modules/home/core/browser.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/home/core/browser.nix b/modules/home/core/browser.nix index 6cf4809..b4a0f82 100644 --- a/modules/home/core/browser.nix +++ b/modules/home/core/browser.nix @@ -12,6 +12,7 @@ "cebifddlogbjhoibpjobhlamopmlpckl" # disable page visibility "efknglbfhoddmmfabeihlemgekhhnabb" # json viewer "bhchdcejhohfmigjafbampogmaanbfkg" # user agent switcher + "bbppejejjfancffmhncgkhjdaikdgagc" # undisposition "ocabkmapohekeifbkoelpmppmfbcibna" # xoom redirector "fkagelmloambgokoeokbpihmgpkbgbfm" # indie wiki buddy From bb99c22324842a81a169416cd30a3e7690499085 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 20 Jun 2026 15:05:41 +0700 Subject: [PATCH 100/224] remove non effective flags --- modules/system/homelab/mc.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 5342df8..f320d31 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -121,8 +121,6 @@ in { "-XX:+PerfDisableSharedMem" # Disables constant /tmp writes for JVM metrics "-XX:ZAllocationSpikeTolerance=5" # Helps when server is active with many players "-XX:SoftMaxHeapSize=${toString (ram-allocation-mb - 2048)}M" # Leave 2GB headroom - "-XX:ZCollectionInterval=1" # Force a GC cycle at minimum every second - "-XX:ConcGCThreads=8" # Threads ZGC uses for concurrent work ]; in lib.concatStringsSep " " flags; }; }; From ee1ef1350330b33d9d9b94993eb6c7c6d35239a6 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 21 Jun 2026 13:44:36 +0700 Subject: [PATCH 101/224] new mc server --- modules/system/homelab/mc.nix | 46 +++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index f320d31..8928efd 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -3,10 +3,10 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "6dc66117471b4f290e0d6776ac449d9f7f870c90"; + commit = "3956a42f139b93b049ff5004bba62cf29c9d3b99"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = "sha256-J3KdjRer1d8jOeO84rET05nFdjCXjgz5A7mJysFwu6Q="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { @@ -29,7 +29,7 @@ in { # gamerules to disable: locator_bar, mob_explosion_drop_decay, (and possibly) reduced_debug_info, global_sound_events # gamerules to enable (temporarily): noend:disable_end - servers.da-s3 = { + servers.mc0-vanilla-plus = { enable = true; autoStart = true; restart = "always"; @@ -88,20 +88,36 @@ in { in "${packsquash-binary}/bin/packsquash"; }; - files."config/proxy_protocol_support.json".value = { - enableProxyProtocol = true; - whitelistTCPShieldServers = false; - proxyServerIPs = [ - "127.0.0.1" "::1" - "127.185.172.53" # playit - ]; - directAccessIPs = [ - "127.0.0.0/8" "::1/128" # localhost - "100.64.0.0/10" "fd7a:115c:a1e0::/48" # tailscale - "192.168.1.0/24" "10.3.14.0/24" # lan - ]; + files = inputs.mc.lib.collectFilesAt modpack "config" // { + "config/proxy_protocol_support.json".value = { + enableProxyProtocol = false; # polymer auto host has issues with proxy protocol + whitelistTCPShieldServers = false; + proxyServerIPs = [ + "127.0.0.1" "::1" + "127.185.172.53" # playit + ]; + directAccessIPs = [ + "127.0.0.0/8" "::1/128" # localhost + "100.64.0.0/10" "fd7a:115c:a1e0::/48" # tailscale + "192.168.1.0/24" "10.3.14.0/24" # lan + ]; + }; }; + extraStartPre = let sed-commands = lib.concatStringsSep "\n" ( + lib.mapAttrsToList (placeholder: file: + ''sed -i "s|${placeholder}|''${${placeholder}}|g" ${file}'' + ) { + "REPLACE_SVC_HOST" = "config/voicechat/voicechat-server.properties"; + "REPLACE_RP_LINK" = "config/welcomemessage.json5"; + "REPLACE_DC_BOT_TOKEN" = "config/simple-discord-link/simple-discord-link.toml"; + "REPLACE_DC_OWNER_ROLE" = "config/simple-discord-link/simple-discord-link.toml"; + } + ); in '' + source modpack-config.env + ${sed-commands} + ''; + package = pkgs.fabricServers.fabric-1_21_11.override { jre_headless = pkgs.javaPackages.compiler.temurin-bin.jdk-25; loaderVersion = "0.19.2"; From e91ad01c947169fc3712c98b2be69009087368cd Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 21 Jun 2026 13:49:36 +0700 Subject: [PATCH 102/224] update hash --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 8928efd..a893a0d 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -6,7 +6,7 @@ commit = "3956a42f139b93b049ff5004bba62cf29c9d3b99"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-g3PNwhFJkF8pSAx8sp2TLE3RH2vjgDuFElSS/ok8EfI="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { From 958adf4037d078fcb75be305b75bec2b09838d54 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 21 Jun 2026 13:56:37 +0700 Subject: [PATCH 103/224] shellcheck fix --- modules/system/homelab/mc.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index a893a0d..86acd00 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -114,6 +114,7 @@ in { "REPLACE_DC_OWNER_ROLE" = "config/simple-discord-link/simple-discord-link.toml"; } ); in '' + # shellcheck disable=SC1091 source modpack-config.env ${sed-commands} ''; From e78eb16fe622fce6f56efc8a9dc058d19e04640b Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 21 Jun 2026 14:03:57 +0700 Subject: [PATCH 104/224] relative line numbers --- modules/home/core/cli.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/core/cli.nix b/modules/home/core/cli.nix index c1ed15f..9e9b94e 100644 --- a/modules/home/core/cli.nix +++ b/modules/home/core/cli.nix @@ -65,7 +65,7 @@ require("nvim-tree").setup() vim.api.nvim_create_autocmd("VimEnter", { callback = function() - vim.cmd("set nu") + vim.cmd("set nu rnu") vim.cmd.wincmd 'p' end, }) From acaafb21243a111e4f723a4450cbace03dfa7c8b Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 21 Jun 2026 14:07:28 +0700 Subject: [PATCH 105/224] fix libstdc++ not found --- modules/system/homelab/mc.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 86acd00..d73c44a 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -1,4 +1,5 @@ { inputs, lib, pkgs, ... }: let + name = "mc0-vanilla-plus"; production = true; ram-allocation-mb = 12288; rcon-pass = "howdy"; @@ -18,6 +19,10 @@ in { "vm.nr_hugepages" = (ram-allocation-mb / 2) + 512; # (heap_mb / 2MB per page) + 512 pages (1GB) for ZGC off-heap overhead "vm.swappiness" = 10; }; + + systemd.services."minecraft-server-${name}".environment = { + LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib"; + }; services.minecraft-servers = { enable = true; @@ -29,7 +34,7 @@ in { # gamerules to disable: locator_bar, mob_explosion_drop_decay, (and possibly) reduced_debug_info, global_sound_events # gamerules to enable (temporarily): noend:disable_end - servers.mc0-vanilla-plus = { + servers.${name} = { enable = true; autoStart = true; restart = "always"; @@ -45,7 +50,7 @@ in { serverProperties = { server-port = 25565; - server-name = "Minecraft Server"; + server-name = name; motd = "§cCan't connect to server"; log-ips = true; hide-online-players = true; From 9b69189570e6718ac3a84db8ee40fba3d40e2281 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 21 Jun 2026 14:10:34 +0700 Subject: [PATCH 106/224] remove mc cf --- lib/options.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/options.nix b/lib/options.nix index c2bfd16..15876ec 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -54,7 +54,7 @@ in { [ "Dockge" "docker" "https://containers.proxy.${domain}" "http://localhost:5001/" ] ]; routes = { - "mc.${domain}" = "tcp://localhost:25565"; + # "mc.${domain}" = "tcp://localhost:25565"; "docs-sandbox.${domain}" = "http://localhost:7090"; "docs.${domain}" = "http://localhost:7090"; From 28737db2cf0f61f28c46cfe0f44b41c75536fe93 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 21 Jun 2026 14:20:22 +0700 Subject: [PATCH 107/224] [skip ci] add comment note --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index d73c44a..c95cd55 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -22,7 +22,7 @@ in { systemd.services."minecraft-server-${name}".environment = { LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib"; - }; + }; # ^^^ physics mod fix services.minecraft-servers = { enable = true; From 11b2c7315a5a8fbd9fa3be5976f18faf043629e9 Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 22 Jun 2026 14:44:04 +0700 Subject: [PATCH 108/224] update modpack and remove success notif --- .forgejo/workflows/activate.yml | 16 ++++++++-------- modules/system/homelab/mc.nix | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.forgejo/workflows/activate.yml b/.forgejo/workflows/activate.yml index f338572..329cd4f 100644 --- a/.forgejo/workflows/activate.yml +++ b/.forgejo/workflows/activate.yml @@ -37,14 +37,14 @@ jobs: -H "Actions: view, Action Runs, https://git.satr14.my.id/${{ github.repository }}/actions?workflow=activate.yml; view, View Commit, https://git.satr14.my.id/${{ github.repository }}/commit/${{ github.sha }}" \ -d "${{ github.event.head_commit.message }}" - - name: Notify on success - if: success() - run: | - curl -s -X POST https://notify.proxy.satr14.my.id/git-flake-updates \ - -H "Title: NixOS Homelab Rebuild Succeeded" \ - -H "Tags: white_check_mark" \ - -H "Actions: view, View Commit, https://git.satr14.my.id/${{ github.repository }}/commit/${{ github.sha }}" \ - -d "${{ github.event.head_commit.message }}" + # - name: Notify on success + # if: success() + # run: | + # curl -s -X POST https://notify.proxy.satr14.my.id/git-flake-updates \ + # -H "Title: NixOS Homelab Rebuild Succeeded" \ + # -H "Tags: white_check_mark" \ + # -H "Actions: view, View Commit, https://git.satr14.my.id/${{ github.repository }}/commit/${{ github.sha }}" \ + # -d "${{ github.event.head_commit.message }}" - name: Clean Up if: always() diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index c95cd55..2555b67 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,10 +4,10 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "3956a42f139b93b049ff5004bba62cf29c9d3b99"; + commit = "e47a428b61fc087f4c733258e5a282c21b32d9c3"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = "sha256-g3PNwhFJkF8pSAx8sp2TLE3RH2vjgDuFElSS/ok8EfI="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { From f191ba452187581bfa8c157d8a32090a3bbb81a2 Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 23 Jun 2026 06:44:34 +0700 Subject: [PATCH 109/224] update hash and add back args --- modules/system/homelab/mc.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 2555b67..941e939 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -7,7 +7,7 @@ commit = "e47a428b61fc087f4c733258e5a282c21b32d9c3"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-/gQw/FeNv/jbschhFzujloO9jaqTmfvBbzouWUJGr6w="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { @@ -143,6 +143,8 @@ in { "-XX:+PerfDisableSharedMem" # Disables constant /tmp writes for JVM metrics "-XX:ZAllocationSpikeTolerance=5" # Helps when server is active with many players "-XX:SoftMaxHeapSize=${toString (ram-allocation-mb - 2048)}M" # Leave 2GB headroom + "-XX:ZCollectionInterval=1" # Force a GC cycle at minimum every second + "-XX:ConcGCThreads=8" # Threads ZGC uses for concurrent work ]; in lib.concatStringsSep " " flags; }; }; From 91b40f534453dff8b11243f3ac458dea7bc8490f Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 23 Jun 2026 08:22:45 +0700 Subject: [PATCH 110/224] add opencode --- modules/home/core/apps.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/home/core/apps.nix b/modules/home/core/apps.nix index bcb3363..214a70c 100644 --- a/modules/home/core/apps.nix +++ b/modules/home/core/apps.nix @@ -27,6 +27,7 @@ home.packages = with pkgs; [ zed-editor + opencode slack discord From 1a059b929bc510837d7c7d8c6567e91a1d3789e2 Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 23 Jun 2026 08:25:22 +0700 Subject: [PATCH 111/224] add spell check --- modules/home/core/code.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/home/core/code.nix b/modules/home/core/code.nix index 21268ff..fa074e5 100644 --- a/modules/home/core/code.nix +++ b/modules/home/core/code.nix @@ -3,12 +3,12 @@ enable = true; package = pkgs.zed-editor; extensions = [ - "html" "html-snippets" - "svelte" "svelte-snippets" "wakatime" "discord-presence" "catppuccin" "catppuccin-icons" - "git-firefly" - "nix" + "codebook" + "git-firefly" "nix" + "html" "html-snippets" + "svelte" "svelte-snippets" ]; userSettings = { diff_view_style = "unified"; From 8187e32d5dab9070c46ad3e6a3d9750818140b73 Mon Sep 17 00:00:00 2001 From: satr14 Date: Wed, 24 Jun 2026 09:41:37 +0700 Subject: [PATCH 112/224] reenable tunnel --- lib/options.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/options.nix b/lib/options.nix index 15876ec..c2bfd16 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -54,7 +54,7 @@ in { [ "Dockge" "docker" "https://containers.proxy.${domain}" "http://localhost:5001/" ] ]; routes = { - # "mc.${domain}" = "tcp://localhost:25565"; + "mc.${domain}" = "tcp://localhost:25565"; "docs-sandbox.${domain}" = "http://localhost:7090"; "docs.${domain}" = "http://localhost:7090"; From 2fa86ba6b2114973ab101afb1563f09ecdd34af2 Mon Sep 17 00:00:00 2001 From: satr14 Date: Wed, 24 Jun 2026 11:33:49 +0700 Subject: [PATCH 113/224] update modpack and perf tweaks --- modules/system/homelab/mc.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 941e939..10f2e34 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,10 +4,10 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "e47a428b61fc087f4c733258e5a282c21b32d9c3"; + commit = "583df6751eb0b88830fa7e4a424587aedc241653"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = "sha256-/gQw/FeNv/jbschhFzujloO9jaqTmfvBbzouWUJGr6w="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { @@ -20,9 +20,10 @@ in { "vm.swappiness" = 10; }; - systemd.services."minecraft-server-${name}".environment = { - LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib"; - }; # ^^^ physics mod fix + systemd.services."minecraft-server-${name}" = { + environment.LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib"; # physics toys mod fix + serviceConfig.Nice = -5; # higher scheduling priority + }; services.minecraft-servers = { enable = true; @@ -141,10 +142,10 @@ in { "-XX:+AlwaysPreTouch" # Pre-allocates memory on startup, OS claims it immediately for JVM instead of negotiating it "-XX:+DisableExplicitGC" # Disables mods from manually invoking the GC "-XX:+PerfDisableSharedMem" # Disables constant /tmp writes for JVM metrics - "-XX:ZAllocationSpikeTolerance=5" # Helps when server is active with many players "-XX:SoftMaxHeapSize=${toString (ram-allocation-mb - 2048)}M" # Leave 2GB headroom - "-XX:ZCollectionInterval=1" # Force a GC cycle at minimum every second - "-XX:ConcGCThreads=8" # Threads ZGC uses for concurrent work + # "-XX:ZAllocationSpikeTolerance=5" # Helps when server is active with many players + # "-XX:ZCollectionInterval=1" # Force a GC cycle at minimum every second + # "-XX:ConcGCThreads=8" # Threads ZGC uses for concurrent work ]; in lib.concatStringsSep " " flags; }; }; From 9b4016b2f714ffc4a55d64a1b7f77c47de9c8d3c Mon Sep 17 00:00:00 2001 From: satr14 Date: Wed, 24 Jun 2026 11:42:41 +0700 Subject: [PATCH 114/224] update modpack --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 10f2e34..61a7d38 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,7 +4,7 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "583df6751eb0b88830fa7e4a424587aedc241653"; + commit = "de8b0138c870fda24f1dbe1a8ebbe3c1a55734d4"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { packHash = ""; From ea57dcb9f6fb32fe2e1d04064c64cdf2663ce36d Mon Sep 17 00:00:00 2001 From: satr14 Date: Wed, 24 Jun 2026 11:50:03 +0700 Subject: [PATCH 115/224] update modpack --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 61a7d38..4ae7a3b 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,7 +4,7 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "de8b0138c870fda24f1dbe1a8ebbe3c1a55734d4"; + commit = "9b9111cd1f0508c268b7972ee6226e882a3e6595"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { packHash = ""; From de0179e95a21aa6ef74fa62915c0658173401971 Mon Sep 17 00:00:00 2001 From: satr14 Date: Wed, 24 Jun 2026 11:52:22 +0700 Subject: [PATCH 116/224] update hash --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 4ae7a3b..8b26988 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -7,7 +7,7 @@ commit = "9b9111cd1f0508c268b7972ee6226e882a3e6595"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-QzetffsXC9kqv8RQrckYbbBkl4csEuzYKxR9YnfxgHk="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { From 4322fa53107be5f7e4c11c00f80fde522e2b07de Mon Sep 17 00:00:00 2001 From: satr14 Date: Wed, 24 Jun 2026 12:02:00 +0700 Subject: [PATCH 117/224] update modpack --- modules/system/homelab/mc.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 8b26988..2e7b74b 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,10 +4,10 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "9b9111cd1f0508c268b7972ee6226e882a3e6595"; + commit = "25d32f01168e787a8a7c9136d5a026fccd5d9925"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = "sha256-QzetffsXC9kqv8RQrckYbbBkl4csEuzYKxR9YnfxgHk="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { From edcbd1dbc7eef9603586e46765ddf34b3c1649f6 Mon Sep 17 00:00:00 2001 From: satr14 Date: Wed, 24 Jun 2026 12:03:55 +0700 Subject: [PATCH 118/224] update hash --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 2e7b74b..9652a38 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -7,7 +7,7 @@ commit = "25d32f01168e787a8a7c9136d5a026fccd5d9925"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-roe5MxbmEKoly3rJkm7ICYeHSNy77r0Cxs+TXPvTbv8="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { From e543796e79b86a6fc9a8c19cee19ccdf3d3d4245 Mon Sep 17 00:00:00 2001 From: satr14 Date: Wed, 24 Jun 2026 12:53:58 +0700 Subject: [PATCH 119/224] update modpack --- modules/system/homelab/mc.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 9652a38..f5ccdb3 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,10 +4,10 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "25d32f01168e787a8a7c9136d5a026fccd5d9925"; + commit = "36be7619e1c5fb0ee312c6ccb5913aef8c83e3d7"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = "sha256-roe5MxbmEKoly3rJkm7ICYeHSNy77r0Cxs+TXPvTbv8="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { From ede3381d6619cb47c93793259a09e9c247e96058 Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 26 Jun 2026 07:54:39 +0700 Subject: [PATCH 120/224] update modpack --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index f5ccdb3..482759c 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,7 +4,7 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "36be7619e1c5fb0ee312c6ccb5913aef8c83e3d7"; + commit = "bd5c266b2aaaf293aa4b0b0fbefd363fe1ef4a36"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { packHash = ""; From 527d34a533b3c1b93ae57bf4b05e6c7a29e3ce7d Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 26 Jun 2026 08:00:13 +0700 Subject: [PATCH 121/224] [skip ci] fix ssh key leaked and roll --- .forgejo/workflows/activate.yml | 3 ++- lib/options.nix | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/activate.yml b/.forgejo/workflows/activate.yml index 329cd4f..fab8702 100644 --- a/.forgejo/workflows/activate.yml +++ b/.forgejo/workflows/activate.yml @@ -7,6 +7,7 @@ on: env: PATH: /run/current-system/sw/bin:/run/wrappers/bin + SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }} jobs: rebuild: @@ -15,7 +16,7 @@ jobs: - name: Setup SSH key run: | mkdir -p ./ssh - echo "${{ secrets.DEPLOY_SSH_KEY }}" > ./ssh/deploy_key + echo "$SSH_KEY" > ./ssh/deploy_key chmod 600 ./ssh/deploy_key - name: Rebuild and switch diff --git a/lib/options.nix b/lib/options.nix index c2bfd16..cef1177 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -25,7 +25,7 @@ in { domain = "satr14.my.id"; # root domain for dns, ssl certs, reverse proxy, etc. ssh-keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIESvQFXoUBafatqnxTd6qk3WEOcfwb3AIWVTstR3lHzX forgejo" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJtdH1YqRH9xhuHMivezLvj/hpH77yfH3HUCaRboB/hb forgejo-deploy-runner" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC7nkis5iB9qJ0OLi8YO4MX1F/ISmBng/xYdNcupGAJC forgejo-actions" ]; disks = { # gallery = ext4 "/dev/disk/by-uuid/834f51c1-90ee-4601-ba76-ef0419198d67"; # disk for photo gallery From 2728a6e83d41ff3ae2ad3c7741f81e23bbd3fe7e Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 26 Jun 2026 08:02:45 +0700 Subject: [PATCH 122/224] [skip ci] update hash --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 482759c..429be36 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -7,7 +7,7 @@ commit = "bd5c266b2aaaf293aa4b0b0fbefd363fe1ef4a36"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-JqO8oSWCGvSKcB91sb64889q3zinjUH0jrSfpKPfvt8="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { From b855713365298488f9780fc932e5c9e4becafe32 Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 26 Jun 2026 08:13:44 +0700 Subject: [PATCH 123/224] test actions From 0796dec27461b97146fc59756259275d9d2a95bd Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 26 Jun 2026 18:49:38 +0700 Subject: [PATCH 124/224] generational zgc --- modules/system/homelab/mc.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 429be36..35a136e 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -135,6 +135,7 @@ in { "-Xmx${toString ram-allocation-mb}M" "-XX:+UseZGC" # Use ZGC (requires Java v25+, 8+ CPU cores, 10GB+ RAM) + "-XX:+ZGenerational" # Use generational ZGC "-XX:+UseCompactObjectHeaders" # Use compact object headers (requires Java v16+, saves a couple of bits per object) "--add-modules=jdk.incubator.vector" # Exposes SIMD instructions (requires full JDK, useful with performance mods) From f2030a5e2fbd9b6dc340346549e2aae89368728b Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 26 Jun 2026 18:54:05 +0700 Subject: [PATCH 125/224] [skip ci] add comments --- modules/system/homelab/mc.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 35a136e..4074dea 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -135,10 +135,10 @@ in { "-Xmx${toString ram-allocation-mb}M" "-XX:+UseZGC" # Use ZGC (requires Java v25+, 8+ CPU cores, 10GB+ RAM) - "-XX:+ZGenerational" # Use generational ZGC + "-XX:+ZGenerational" # Use generational ZGC (newer and better ZGC, requires Java v21+) "-XX:+UseCompactObjectHeaders" # Use compact object headers (requires Java v16+, saves a couple of bits per object) - "--add-modules=jdk.incubator.vector" # Exposes SIMD instructions (requires full JDK, useful with performance mods) + "--add-modules=jdk.incubator.vector" # Exposes SIMD instructions (requires full JDK, useful with performance mods like C2ME) "-XX:+UseLargePages" # Large pages support (requires hugepages configured on the system) "-XX:+AlwaysPreTouch" # Pre-allocates memory on startup, OS claims it immediately for JVM instead of negotiating it "-XX:+DisableExplicitGC" # Disables mods from manually invoking the GC From e236078e9e5e73eef85030bda6d7676d9d999dca Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 27 Jun 2026 19:36:50 +0700 Subject: [PATCH 126/224] update modpack --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 4074dea..d8f6ca4 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,7 +4,7 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "bd5c266b2aaaf293aa4b0b0fbefd363fe1ef4a36"; + commit = "1271207650d091b510b92044a28de486c1176a35"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { packHash = "sha256-JqO8oSWCGvSKcB91sb64889q3zinjUH0jrSfpKPfvt8="; From a2c055b182f2d38bc1f195821124aa94e0603a9c Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 27 Jun 2026 20:08:40 +0700 Subject: [PATCH 127/224] remove hash to trigger rebuild --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index d8f6ca4..fbc37eb 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -7,7 +7,7 @@ commit = "1271207650d091b510b92044a28de486c1176a35"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = "sha256-JqO8oSWCGvSKcB91sb64889q3zinjUH0jrSfpKPfvt8="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { From bd9c290f7d4c4cb334e459d93acc7ce5065ce95d Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 27 Jun 2026 20:15:38 +0700 Subject: [PATCH 128/224] update hash --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index fbc37eb..af57404 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -7,7 +7,7 @@ commit = "1271207650d091b510b92044a28de486c1176a35"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-yEVxsTyu9g3sDFnQM2KC2bU98ojJPUzJT3GiOEoAXbM="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { From 8084af3e68fe2848c9aee82f5213aa14b6f077dd Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 28 Jun 2026 14:23:30 +0700 Subject: [PATCH 129/224] update modpack --- modules/system/homelab/mc.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index af57404..4afb315 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,10 +4,10 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "1271207650d091b510b92044a28de486c1176a35"; + commit = "a22477190ee93aed8d1c33687f1824550f0712cf"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = "sha256-yEVxsTyu9g3sDFnQM2KC2bU98ojJPUzJT3GiOEoAXbM="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { From 544140b778504e59cbc7a613a19d96a9b7481cdf Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 28 Jun 2026 14:39:55 +0700 Subject: [PATCH 130/224] update hash --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 4afb315..9ec4c66 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -7,7 +7,7 @@ commit = "a22477190ee93aed8d1c33687f1824550f0712cf"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-9bPnK3xohEcwrFc5LoXemIzQwQullJmuoJ8zjEoIV/U="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { From 7c0166bd4228b57b2341b2de287cad9bb30e4ee1 Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 29 Jun 2026 09:15:29 +0700 Subject: [PATCH 131/224] lazymc config --- modules/system/homelab/mc.nix | 92 ++++++++++++++++++++++++++--------- 1 file changed, 68 insertions(+), 24 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 9ec4c66..7e20a9a 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -20,9 +20,56 @@ in { "vm.swappiness" = 10; }; - systemd.services."minecraft-server-${name}" = { - environment.LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib"; # physics toys mod fix - serviceConfig.Nice = -5; # higher scheduling priority + systemd.services = { + lazymc = let + wrapperCommand = pkgs.writeShellScript "lazymc-${name}-wrapper" '' + #!/usr/bin/env bash + trap 'systemctl stop --wait "minecraft-server-${name}"; exit 0' SIGTERM + systemctl start "minecraft-server-${name}" + while systemctl is-active --quiet "minecraft-server-${name}"; do sleep 1; done + ''; + config = { + public = { + address = "0.0.0.0:25565"; # external proxy port + version = "1.21.11"; + }; + server = { + wake_whitelist = true; + address = "127.0.0.1:25566"; # internal server port + directory = "/srv/minecraft/${name}"; + command = wrapperCommand; + }; + time.sleep_after = 600; + motd.from_server = true; + join = { + methods = [ "hold" ]; + hold.timeout = 60; + }; + advanced.rewrite_server_properties = false; # might get overridden by nix-minecraft + config.version = "0.2.11"; + }; + in { + description = "Wake-up Proxy for Minecraft Server"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + Type = "simple"; + User = "root"; + Group = "root"; + ExecStart = let + toml = pkgs.formats.toml {}; + configFile = toml.generate "lazymc-${name}.toml" config; + in "${pkgs.lazymc}/bin/lazymc --config ${configFile}"; + Restart = "always"; + }; + }; + "minecraft-server-${name}" = { + environment.LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib"; # physics toys mod fix + serviceConfig = { + # Nice = -5; # higher scheduling priority + TimeoutStopSec = 180; # just in case saving takes a while + }; + }; }; services.minecraft-servers = { @@ -37,7 +84,7 @@ in { servers.${name} = { enable = true; - autoStart = true; + autoStart = false; restart = "always"; enableReload = production; @@ -50,7 +97,8 @@ in { }; serverProperties = { - server-port = 25565; + server-ip = "127.0.0.1"; + server-port = 25566; server-name = name; motd = "§cCan't connect to server"; log-ips = true; @@ -79,19 +127,17 @@ in { }; symlinks = inputs.mc.lib.collectFilesAt modpack "mods" // { - "polymer/packsquash" = let - packsquash-binary = pkgs.runCommand "packsquash" { - src = pkgs.fetchurl { - url = "https://github.com/ComunidadAylas/PackSquash/releases/download/v0.4.1/packsquash-x86_64-unknown-linux-gnu.zip"; - sha256 = "sha256-VsGZewoiO5MjhIhwjlLO5d5uHynlAK5Jh16jH2k2rPs="; - }; - nativeBuildInputs = [ pkgs.unzip ]; - } '' - mkdir -p $out/bin - unzip $src -d $out/bin - chmod +x $out/bin/packsquash - ''; - in "${packsquash-binary}/bin/packsquash"; + "polymer/packsquash" = let packsquash-binary = pkgs.runCommand "packsquash" { + src = pkgs.fetchurl { + url = "https://github.com/ComunidadAylas/PackSquash/releases/download/v0.4.1/packsquash-x86_64-unknown-linux-gnu.zip"; + sha256 = "sha256-VsGZewoiO5MjhIhwjlLO5d5uHynlAK5Jh16jH2k2rPs="; + }; + nativeBuildInputs = [ pkgs.unzip ]; + } '' + mkdir -p $out/bin + unzip $src -d $out/bin + chmod +x $out/bin/packsquash + ''; in "${packsquash-binary}/bin/packsquash"; }; files = inputs.mc.lib.collectFilesAt modpack "config" // { @@ -100,12 +146,9 @@ in { whitelistTCPShieldServers = false; proxyServerIPs = [ "127.0.0.1" "::1" - "127.185.172.53" # playit ]; directAccessIPs = [ "127.0.0.0/8" "::1/128" # localhost - "100.64.0.0/10" "fd7a:115c:a1e0::/48" # tailscale - "192.168.1.0/24" "10.3.14.0/24" # lan ]; }; }; @@ -120,9 +163,10 @@ in { "REPLACE_DC_OWNER_ROLE" = "config/simple-discord-link/simple-discord-link.toml"; } ); in '' - # shellcheck disable=SC1091 - source modpack-config.env - ${sed-commands} + if [ -f modpack-config.env ]; then + source modpack-config.env + ${sed-commands} + fi ''; package = pkgs.fabricServers.fabric-1_21_11.override { From e82d9f84e8915965582690617a532c15227496a3 Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 29 Jun 2026 09:26:33 +0700 Subject: [PATCH 132/224] fix dup opt --- modules/system/homelab/mc.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 7e20a9a..d72b998 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -65,10 +65,7 @@ in { }; "minecraft-server-${name}" = { environment.LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib"; # physics toys mod fix - serviceConfig = { - # Nice = -5; # higher scheduling priority - TimeoutStopSec = 180; # just in case saving takes a while - }; + # serviceConfig.Nice = -5; # higher scheduling priority }; }; From 80fc0e0d8316b71a9eccb8e7f01a22e9d7761aec Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 29 Jun 2026 09:32:45 +0700 Subject: [PATCH 133/224] shellcheck fix --- modules/system/homelab/mc.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index d72b998..429ceb4 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -160,6 +160,7 @@ in { "REPLACE_DC_OWNER_ROLE" = "config/simple-discord-link/simple-discord-link.toml"; } ); in '' + # shellcheck disable=SC1091 if [ -f modpack-config.env ]; then source modpack-config.env ${sed-commands} From 9df3f14e4743b028553326dee41df50c0f6afb42 Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 30 Jun 2026 07:41:41 +0800 Subject: [PATCH 134/224] update modpack --- modules/system/homelab/mc.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 429ceb4..0e7da88 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -4,10 +4,10 @@ ram-allocation-mb = 12288; rcon-pass = "howdy"; modpack = let - commit = "a22477190ee93aed8d1c33687f1824550f0712cf"; + commit = "b128b9f93b365570ad650d9b6fea149c54b586c5"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = "sha256-9bPnK3xohEcwrFc5LoXemIzQwQullJmuoJ8zjEoIV/U="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { From 7e0cc853eb501623f7e6b58ab0e8a37f4adfa08f Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 30 Jun 2026 07:43:25 +0800 Subject: [PATCH 135/224] update hash --- modules/system/homelab/mc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 0e7da88..8295853 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -7,7 +7,7 @@ commit = "b128b9f93b365570ad650d9b6fea149c54b586c5"; path = if production then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-i0N/Yb4dgSpJLfazm6KSZC9dehU53AmvhXWLKHCU0aA="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { From a2de33cb91b703df244177f1e2ae95179adf9134 Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 30 Jun 2026 07:16:41 +0700 Subject: [PATCH 136/224] add rcon --- modules/system/homelab/mc.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 8295853..562e5ab 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -45,6 +45,11 @@ in { methods = [ "hold" ]; hold.timeout = 60; }; + rcon = { + enabled = true; + port = 25575; + password = rcon-pass; + }; advanced.rewrite_server_properties = false; # might get overridden by nix-minecraft config.version = "0.2.11"; }; From a625259f20f66fd2017747384d811ea64f9eb518 Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 30 Jun 2026 07:22:06 +0700 Subject: [PATCH 137/224] fix error --- modules/system/homelab/mc.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 562e5ab..84cf79d 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -49,6 +49,7 @@ in { enabled = true; port = 25575; password = rcon-pass; + randomize_password = false; }; advanced.rewrite_server_properties = false; # might get overridden by nix-minecraft config.version = "0.2.11"; From 806f8d01de88275921ffaea9db2815a3d0705e2e Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 30 Jun 2026 11:50:02 +0800 Subject: [PATCH 138/224] remove lazymc due to complexity --- modules/system/homelab/mc.nix | 70 ++++------------------------------- 1 file changed, 8 insertions(+), 62 deletions(-) diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix index 84cf79d..4ffdee7 100644 --- a/modules/system/homelab/mc.nix +++ b/modules/system/homelab/mc.nix @@ -20,59 +20,9 @@ in { "vm.swappiness" = 10; }; - systemd.services = { - lazymc = let - wrapperCommand = pkgs.writeShellScript "lazymc-${name}-wrapper" '' - #!/usr/bin/env bash - trap 'systemctl stop --wait "minecraft-server-${name}"; exit 0' SIGTERM - systemctl start "minecraft-server-${name}" - while systemctl is-active --quiet "minecraft-server-${name}"; do sleep 1; done - ''; - config = { - public = { - address = "0.0.0.0:25565"; # external proxy port - version = "1.21.11"; - }; - server = { - wake_whitelist = true; - address = "127.0.0.1:25566"; # internal server port - directory = "/srv/minecraft/${name}"; - command = wrapperCommand; - }; - time.sleep_after = 600; - motd.from_server = true; - join = { - methods = [ "hold" ]; - hold.timeout = 60; - }; - rcon = { - enabled = true; - port = 25575; - password = rcon-pass; - randomize_password = false; - }; - advanced.rewrite_server_properties = false; # might get overridden by nix-minecraft - config.version = "0.2.11"; - }; - in { - description = "Wake-up Proxy for Minecraft Server"; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; - serviceConfig = { - Type = "simple"; - User = "root"; - Group = "root"; - ExecStart = let - toml = pkgs.formats.toml {}; - configFile = toml.generate "lazymc-${name}.toml" config; - in "${pkgs.lazymc}/bin/lazymc --config ${configFile}"; - Restart = "always"; - }; - }; - "minecraft-server-${name}" = { - environment.LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib"; # physics toys mod fix - # serviceConfig.Nice = -5; # higher scheduling priority - }; + systemd.services."minecraft-server-${name}" = { + environment.LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib"; # physics toys mod fix + # serviceConfig.Nice = -5; # higher scheduling priority (causes fan noise even when idle) }; services.minecraft-servers = { @@ -87,7 +37,7 @@ in { servers.${name} = { enable = true; - autoStart = false; + autoStart = true; restart = "always"; enableReload = production; @@ -100,8 +50,8 @@ in { }; serverProperties = { - server-ip = "127.0.0.1"; - server-port = 25566; + server-ip = "0.0.0.0"; + server-port = 25565; server-name = name; motd = "§cCan't connect to server"; log-ips = true; @@ -147,12 +97,8 @@ in { "config/proxy_protocol_support.json".value = { enableProxyProtocol = false; # polymer auto host has issues with proxy protocol whitelistTCPShieldServers = false; - proxyServerIPs = [ - "127.0.0.1" "::1" - ]; - directAccessIPs = [ - "127.0.0.0/8" "::1/128" # localhost - ]; + proxyServerIPs = [ "127.0.0.1" "::1" ]; + directAccessIPs = [ "127.0.0.0/8" "::1/128" ]; }; }; From 5ba636a0965a944ca3d44a0625d1beee76946651 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 5 Jul 2026 11:11:32 +0800 Subject: [PATCH 139/224] new mc server and config structuring --- modules/system/homelab/mc.nix | 147 ------------------ modules/system/homelab/mc/default.nix | 17 ++ .../system/homelab/mc/mc0-vanilla-plus.nix | 115 ++++++++++++++ .../system/homelab/mc/mc1-pure-vanilla.nix | 71 +++++++++ modules/system/server.nix | 2 +- 5 files changed, 204 insertions(+), 148 deletions(-) delete mode 100644 modules/system/homelab/mc.nix create mode 100644 modules/system/homelab/mc/default.nix create mode 100644 modules/system/homelab/mc/mc0-vanilla-plus.nix create mode 100644 modules/system/homelab/mc/mc1-pure-vanilla.nix diff --git a/modules/system/homelab/mc.nix b/modules/system/homelab/mc.nix deleted file mode 100644 index 4ffdee7..0000000 --- a/modules/system/homelab/mc.nix +++ /dev/null @@ -1,147 +0,0 @@ -{ inputs, lib, pkgs, ... }: let - name = "mc0-vanilla-plus"; - production = true; - ram-allocation-mb = 12288; - rcon-pass = "howdy"; - modpack = let - commit = "b128b9f93b365570ad650d9b6fea149c54b586c5"; - path = if production then "commit/${commit}" else "branch/main"; - in pkgs.fetchPackwizModpack { - packHash = "sha256-i0N/Yb4dgSpJLfazm6KSZC9dehU53AmvhXWLKHCU0aA="; - url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; - }; -in { - imports = [ inputs.mc.nixosModules.minecraft-servers ]; - nixpkgs.overlays = [ inputs.mc.overlay ]; - - powerManagement.cpuFreqGovernor = "powersave"; # performance governor causes overheating and thermal throttling, works fine with powesave - boot.kernel.sysctl = { - "vm.nr_hugepages" = (ram-allocation-mb / 2) + 512; # (heap_mb / 2MB per page) + 512 pages (1GB) for ZGC off-heap overhead - "vm.swappiness" = 10; - }; - - systemd.services."minecraft-server-${name}" = { - environment.LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib"; # physics toys mod fix - # serviceConfig.Nice = -5; # higher scheduling priority (causes fan noise even when idle) - }; - - services.minecraft-servers = { - enable = true; - eula = true; - managementSystem.systemd-socket.enable = true; - # ^^^ https://github.com/Infinidoge/nix-minecraft/issues/119 - - # TODO: figure out how to set gamerules on start - # gamerules to disable: locator_bar, mob_explosion_drop_decay, (and possibly) reduced_debug_info, global_sound_events - # gamerules to enable (temporarily): noend:disable_end - - servers.${name} = { - enable = true; - autoStart = true; - restart = "always"; - enableReload = production; - - operators = lib.mkIf (!production) { - "satr14" = { - uuid = "54441a30-fe73-46e7-adca-c476bd4fc6d2"; - bypassesPlayerLimit = true; - level = 4; - }; - }; - - serverProperties = { - server-ip = "0.0.0.0"; - server-port = 25565; - server-name = name; - motd = "§cCan't connect to server"; - log-ips = true; - hide-online-players = true; - - difficulty = "normal"; - gamemode = "survival"; - max-world-size = 25000; - spawn-protection = 0; - pvp = true; - - online-mode = true; - enable-query = true; - enforce-secure-profile = false; - pevent-proxy-connections = false; - allow-flight = false; - player-idle-timeout = 0; - - view-distance = 12; - simulation-distance = 6; - - enable-rcon = true; - sync-chunk-writes = false; - "rcon.password" = rcon-pass; - "rcon.port" = 25575; - }; - - symlinks = inputs.mc.lib.collectFilesAt modpack "mods" // { - "polymer/packsquash" = let packsquash-binary = pkgs.runCommand "packsquash" { - src = pkgs.fetchurl { - url = "https://github.com/ComunidadAylas/PackSquash/releases/download/v0.4.1/packsquash-x86_64-unknown-linux-gnu.zip"; - sha256 = "sha256-VsGZewoiO5MjhIhwjlLO5d5uHynlAK5Jh16jH2k2rPs="; - }; - nativeBuildInputs = [ pkgs.unzip ]; - } '' - mkdir -p $out/bin - unzip $src -d $out/bin - chmod +x $out/bin/packsquash - ''; in "${packsquash-binary}/bin/packsquash"; - }; - - files = inputs.mc.lib.collectFilesAt modpack "config" // { - "config/proxy_protocol_support.json".value = { - enableProxyProtocol = false; # polymer auto host has issues with proxy protocol - whitelistTCPShieldServers = false; - proxyServerIPs = [ "127.0.0.1" "::1" ]; - directAccessIPs = [ "127.0.0.0/8" "::1/128" ]; - }; - }; - - extraStartPre = let sed-commands = lib.concatStringsSep "\n" ( - lib.mapAttrsToList (placeholder: file: - ''sed -i "s|${placeholder}|''${${placeholder}}|g" ${file}'' - ) { - "REPLACE_SVC_HOST" = "config/voicechat/voicechat-server.properties"; - "REPLACE_RP_LINK" = "config/welcomemessage.json5"; - "REPLACE_DC_BOT_TOKEN" = "config/simple-discord-link/simple-discord-link.toml"; - "REPLACE_DC_OWNER_ROLE" = "config/simple-discord-link/simple-discord-link.toml"; - } - ); in '' - # shellcheck disable=SC1091 - if [ -f modpack-config.env ]; then - source modpack-config.env - ${sed-commands} - fi - ''; - - package = pkgs.fabricServers.fabric-1_21_11.override { - jre_headless = pkgs.javaPackages.compiler.temurin-bin.jdk-25; - loaderVersion = "0.19.2"; - }; - - jvmOpts = let flags = [ - "-Xms${toString ram-allocation-mb}M" - "-Xmx${toString ram-allocation-mb}M" - - "-XX:+UseZGC" # Use ZGC (requires Java v25+, 8+ CPU cores, 10GB+ RAM) - "-XX:+ZGenerational" # Use generational ZGC (newer and better ZGC, requires Java v21+) - "-XX:+UseCompactObjectHeaders" # Use compact object headers (requires Java v16+, saves a couple of bits per object) - - "--add-modules=jdk.incubator.vector" # Exposes SIMD instructions (requires full JDK, useful with performance mods like C2ME) - "-XX:+UseLargePages" # Large pages support (requires hugepages configured on the system) - "-XX:+AlwaysPreTouch" # Pre-allocates memory on startup, OS claims it immediately for JVM instead of negotiating it - "-XX:+DisableExplicitGC" # Disables mods from manually invoking the GC - "-XX:+PerfDisableSharedMem" # Disables constant /tmp writes for JVM metrics - "-XX:SoftMaxHeapSize=${toString (ram-allocation-mb - 2048)}M" # Leave 2GB headroom - # "-XX:ZAllocationSpikeTolerance=5" # Helps when server is active with many players - # "-XX:ZCollectionInterval=1" # Force a GC cycle at minimum every second - # "-XX:ConcGCThreads=8" # Threads ZGC uses for concurrent work - ]; in lib.concatStringsSep " " flags; - }; - }; -} \ No newline at end of file diff --git a/modules/system/homelab/mc/default.nix b/modules/system/homelab/mc/default.nix new file mode 100644 index 0000000..b2a0af4 --- /dev/null +++ b/modules/system/homelab/mc/default.nix @@ -0,0 +1,17 @@ +{ inputs, ... }: { + imports = [ + ./mc0-vanilla-plus.nix + inputs.mc.nixosModules.minecraft-servers + ]; + nixpkgs.overlays = [ inputs.mc.overlay ]; + + powerManagement.cpuFreqGovernor = "powersave"; # performance governor causes overheating and thermal throttling, works fine with powesave + boot.kernel.sysctl."vm.swappiness" = 10; # reduce swap usage and keep memory performance smooth + + services.minecraft-servers = { + enable = true; + eula = true; + managementSystem.systemd-socket.enable = true; + # ^^^ https://github.com/Infinidoge/nix-minecraft/issues/119 + }; +} \ No newline at end of file diff --git a/modules/system/homelab/mc/mc0-vanilla-plus.nix b/modules/system/homelab/mc/mc0-vanilla-plus.nix new file mode 100644 index 0000000..f98d9bc --- /dev/null +++ b/modules/system/homelab/mc/mc0-vanilla-plus.nix @@ -0,0 +1,115 @@ +{ inputs, lib, pkgs, ... }: let + name = "mc0-vanilla-plus"; + ram-allocation-mb = 12288; + headroom-allocation-mb = 2048; + rcon-pass = "howdy"; + modpack = let + useLatest = false; + commit = "b128b9f93b365570ad650d9b6fea149c54b586c5"; + path = if !useLatest then "commit/${commit}" else "branch/main"; + in pkgs.fetchPackwizModpack { + packHash = "sha256-i0N/Yb4dgSpJLfazm6KSZC9dehU53AmvhXWLKHCU0aA="; + url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; + }; +in { + systemd.services."minecraft-server-${name}" = { + environment.LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib"; # physics toys mod fix + # serviceConfig.Nice = -5; # higher scheduling priority (causes fan noise even when idle) + }; + + services.minecraft-servers.servers.${name} = { + enable = true; + autoStart = true; + restart = "always"; + + serverProperties = { + server-ip = "0.0.0.0"; + server-port = 25565; + server-name = name; + motd = "§cCan't connect to server"; + log-ips = false; + hide-online-players = true; + + difficulty = "normal"; + gamemode = "survival"; + max-world-size = 25000; + spawn-protection = 0; + pvp = true; + + online-mode = true; + enable-query = true; + enforce-secure-profile = false; + pevent-proxy-connections = false; + allow-flight = false; + player-idle-timeout = 0; + + view-distance = 12; + simulation-distance = 6; + + enable-rcon = true; + sync-chunk-writes = false; + "rcon.password" = rcon-pass; + "rcon.port" = 25575; + }; + + symlinks = inputs.mc.lib.collectFilesAt modpack "mods" // { + "polymer/packsquash" = let packsquash-binary = pkgs.runCommand "packsquash" { + src = pkgs.fetchurl { + url = "https://github.com/ComunidadAylas/PackSquash/releases/download/v0.4.1/packsquash-x86_64-unknown-linux-gnu.zip"; + sha256 = "sha256-VsGZewoiO5MjhIhwjlLO5d5uHynlAK5Jh16jH2k2rPs="; + }; + nativeBuildInputs = [ pkgs.unzip ]; + } '' + mkdir -p $out/bin + unzip $src -d $out/bin + chmod +x $out/bin/packsquash + ''; in "${packsquash-binary}/bin/packsquash"; + }; + + files = inputs.mc.lib.collectFilesAt modpack "config" // { + "config/proxy_protocol_support.json".value = { + enableProxyProtocol = false; # polymer auto host has issues with proxy protocol + whitelistTCPShieldServers = false; + proxyServerIPs = [ "127.0.0.1" "::1" ]; + directAccessIPs = [ "127.0.0.0/8" "::1/128" ]; + }; + }; + + extraStartPre = let sed-commands = lib.concatStringsSep "\n" ( + lib.mapAttrsToList (substitution: file: + ''sed -i "s|${substitution}|''${${substitution}}|g" ${file}'' + ) { + "REPLACE_SVC_HOST" = "config/voicechat/voicechat-server.properties"; + "REPLACE_RP_LINK" = "config/welcomemessage.json5"; + "REPLACE_DC_BOT_TOKEN" = "config/simple-discord-link/simple-discord-link.toml"; + "REPLACE_DC_OWNER_ROLE" = "config/simple-discord-link/simple-discord-link.toml"; + } + ); in '' + # shellcheck disable=SC1091 + if [ -f modpack-config.env ]; then + source modpack-config.env + ${sed-commands} + fi + ''; + + package = pkgs.fabricServers.fabric-1_21_11.override { + jre_headless = pkgs.javaPackages.compiler.temurin-bin.jdk-25; + loaderVersion = "0.19.2"; + }; + + jvmOpts = let flags = [ + "-Xms${toString ram-allocation-mb}M" + "-Xmx${toString ram-allocation-mb}M" + + "-XX:+UseZGC" # Use ZGC (requires Java v25+, 8+ CPU cores, 10GB+ RAM) + "-XX:+ZGenerational" # Use generational ZGC (newer and better ZGC, requires Java v21+) + "-XX:+UseCompactObjectHeaders" # Use compact object headers (requires Java v16+, saves a couple of bits per object) + + "--add-modules=jdk.incubator.vector" # Exposes SIMD instructions (requires full JDK, useful with performance mods like C2ME) + "-XX:+AlwaysPreTouch" # Pre-allocates memory on startup, OS claims it immediately for JVM instead of negotiating it + "-XX:+DisableExplicitGC" # Disables mods from manually invoking the GC + "-XX:+PerfDisableSharedMem" # Disables constant /tmp writes for JVM metrics + "-XX:SoftMaxHeapSize=${toString (ram-allocation-mb - headroom-allocation-mb)}M" # Leave 2GB headroom + ]; in lib.concatStringsSep " " flags; + }; +} \ No newline at end of file diff --git a/modules/system/homelab/mc/mc1-pure-vanilla.nix b/modules/system/homelab/mc/mc1-pure-vanilla.nix new file mode 100644 index 0000000..1c2f491 --- /dev/null +++ b/modules/system/homelab/mc/mc1-pure-vanilla.nix @@ -0,0 +1,71 @@ +{ inputs, lib, pkgs, ... }: let + name = "mc1-pure-vanilla"; + ram-allocation-mb = 8192; + headroom-allocation-mb = 1024; + rcon-pass = "howdy"; + + modpack = pkgs.fetchModrinthModpack { + url = "https://cdn.modrinth.com/data/2wkV8mHp/versions/mFGJP1Ye/Server%20Optimization%201.21.11-2.1.mrpack"; + packHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; + side = "server"; + }; +in { + services.minecraft-servers.servers.${name} = { + enable = true; + autoStart = true; + restart = "always"; + + serverProperties = { + server-ip = "0.0.0.0"; + server-port = 25566; + server-name = name; + motd = "Season 4 - §6§lPure Vanilla ⛏"; + log-ips = false; + hide-online-players = true; + + difficulty = "normal"; + gamemode = "survival"; + max-world-size = 25000; + spawn-protection = 0; + pvp = true; + + online-mode = true; + enable-query = true; + enforce-secure-profile = false; + pevent-proxy-connections = false; + allow-flight = false; + player-idle-timeout = 0; + + view-distance = 10; + simulation-distance = 4; + + enable-rcon = true; + sync-chunk-writes = false; + "rcon.password" = rcon-pass; + "rcon.port" = 25576; + }; + + symlinks = inputs.mc.lib.collectFilesAt modpack "mods"; # TODO: add cracked support + files = inputs.mc.lib.collectFilesAt modpack "config"; + + package = pkgs.fabricServers.fabric-1_21_11.override { + jre_headless = pkgs.javaPackages.compiler.temurin-bin.jdk-25; + loaderVersion = "0.19.2"; + }; + + jvmOpts = let flags = [ + "-Xms${toString ram-allocation-mb}M" + "-Xmx${toString ram-allocation-mb}M" + + "-XX:+UseZGC" # Use ZGC (requires Java v25+, 8+ CPU cores, 10GB+ RAM) + "-XX:+ZGenerational" # Use generational ZGC (newer and better ZGC, requires Java v21+) + "-XX:+UseCompactObjectHeaders" # Use compact object headers (requires Java v16+, saves a couple of bits per object) + + "--add-modules=jdk.incubator.vector" # Exposes SIMD instructions (requires full JDK, useful with performance mods like C2ME) + "-XX:+AlwaysPreTouch" # Pre-allocates memory on startup, OS claims it immediately for JVM instead of negotiating it + "-XX:+DisableExplicitGC" # Disables mods from manually invoking the GC + "-XX:+PerfDisableSharedMem" # Disables constant /tmp writes for JVM metrics + "-XX:SoftMaxHeapSize=${toString (ram-allocation-mb - headroom-allocation-mb)}M" # Leave 2GB headroom + ]; in lib.concatStringsSep " " flags; + }; +} \ No newline at end of file diff --git a/modules/system/server.nix b/modules/system/server.nix index a2cef9f..9db8dfa 100644 --- a/modules/system/server.nix +++ b/modules/system/server.nix @@ -25,7 +25,7 @@ in { ./homelab/cdn.nix ./homelab/ai.nix ./homelab/db.nix - ./homelab/mc.nix + ./homelab/mc ./core/swapfile.nix ./core/oom.nix From 543b99ffe28b03f9321b42eb7af3ea809b6bb0f9 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 5 Jul 2026 10:40:43 +0700 Subject: [PATCH 140/224] activate second server --- modules/system/homelab/mc/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/system/homelab/mc/default.nix b/modules/system/homelab/mc/default.nix index b2a0af4..ae55545 100644 --- a/modules/system/homelab/mc/default.nix +++ b/modules/system/homelab/mc/default.nix @@ -1,6 +1,7 @@ { inputs, ... }: { imports = [ ./mc0-vanilla-plus.nix + ./mc1-pure-vanilla.nix inputs.mc.nixosModules.minecraft-servers ]; nixpkgs.overlays = [ inputs.mc.overlay ]; From 2e2d1c1d8b9b12c8d05fbc74858ce5313793d5b6 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 5 Jul 2026 11:26:04 +0700 Subject: [PATCH 141/224] minimize ram usage --- modules/system/homelab/mc/mc0-vanilla-plus.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc/mc0-vanilla-plus.nix b/modules/system/homelab/mc/mc0-vanilla-plus.nix index f98d9bc..b4d19c3 100644 --- a/modules/system/homelab/mc/mc0-vanilla-plus.nix +++ b/modules/system/homelab/mc/mc0-vanilla-plus.nix @@ -1,7 +1,7 @@ { inputs, lib, pkgs, ... }: let name = "mc0-vanilla-plus"; - ram-allocation-mb = 12288; - headroom-allocation-mb = 2048; + ram-allocation-mb = 8192; + headroom-allocation-mb = 1024; rcon-pass = "howdy"; modpack = let useLatest = false; From cc13b146aac49e5c5ac5dae59ed155c49cf4c027 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 5 Jul 2026 11:26:40 +0700 Subject: [PATCH 142/224] update hash --- modules/system/homelab/mc/mc1-pure-vanilla.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc/mc1-pure-vanilla.nix b/modules/system/homelab/mc/mc1-pure-vanilla.nix index 1c2f491..3ea2b96 100644 --- a/modules/system/homelab/mc/mc1-pure-vanilla.nix +++ b/modules/system/homelab/mc/mc1-pure-vanilla.nix @@ -6,7 +6,7 @@ modpack = pkgs.fetchModrinthModpack { url = "https://cdn.modrinth.com/data/2wkV8mHp/versions/mFGJP1Ye/Server%20Optimization%201.21.11-2.1.mrpack"; - packHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; + packHash = "sha256-odvJs6s1/T13RQhE3NnpCIrulc98nd9vo9Alg/aU404="; side = "server"; }; in { From 52e1801f73095ac519e881628da1748e8dcfac45 Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 6 Jul 2026 07:25:29 +0700 Subject: [PATCH 143/224] simplify home page --- modules/system/homelab/git.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/system/homelab/git.nix b/modules/system/homelab/git.nix index 5f6bfa7..c392c0c 100644 --- a/modules/system/homelab/git.nix +++ b/modules/system/homelab/git.nix @@ -31,6 +31,10 @@ ALLOW_ONLY_EXTERNAL_REGISTRATION = true; ALLOW_ONLY_INTERNAL_REGISTRATION = false; REQUIRE_EXTERNAL_REGISTRATION_PASSWORD = true; + explore = { + DISABLE_USERS_PAGE = true; + DISABLE_ORGANIZATIONS_PAGE = true; + }; }; user.ENABLE_FOLLOWING = false; repository = { From b395e631d497c6b0e85832aea025ca8ce6c4e53e Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 6 Jul 2026 15:19:00 +0800 Subject: [PATCH 144/224] add offline and bedrock support --- modules/system/homelab/mc/mc1-pure-vanilla.nix | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/modules/system/homelab/mc/mc1-pure-vanilla.nix b/modules/system/homelab/mc/mc1-pure-vanilla.nix index 3ea2b96..951b5f9 100644 --- a/modules/system/homelab/mc/mc1-pure-vanilla.nix +++ b/modules/system/homelab/mc/mc1-pure-vanilla.nix @@ -5,10 +5,10 @@ rcon-pass = "howdy"; modpack = pkgs.fetchModrinthModpack { - url = "https://cdn.modrinth.com/data/2wkV8mHp/versions/mFGJP1Ye/Server%20Optimization%201.21.11-2.1.mrpack"; - packHash = "sha256-odvJs6s1/T13RQhE3NnpCIrulc98nd9vo9Alg/aU404="; - side = "server"; - }; + url = "https://cdn.modrinth.com/data/2wkV8mHp/versions/mFGJP1Ye/Server%20Optimization%201.21.11-2.1.mrpack"; + packHash = "sha256-odvJs6s1/T13RQhE3NnpCIrulc98nd9vo9Alg/aU404="; + side = "server"; + }; in { services.minecraft-servers.servers.${name} = { enable = true; @@ -19,7 +19,7 @@ in { server-ip = "0.0.0.0"; server-port = 25566; server-name = name; - motd = "Season 4 - §6§lPure Vanilla ⛏"; + motd = "§cCan't connect to server"; log-ips = false; hide-online-players = true; @@ -45,8 +45,14 @@ in { "rcon.port" = 25576; }; - symlinks = inputs.mc.lib.collectFilesAt modpack "mods"; # TODO: add cracked support files = inputs.mc.lib.collectFilesAt modpack "config"; + symlinks = inputs.mc.lib.collectFilesAt modpack "mods" // { + mods = pkgs.linkFarmFromDrvs "mods" (builtins.attrValues { + EasyAuth = pkgs.fetchurl { url = "https://cdn.modrinth.com/data/aZj58GfX/versions/R4EX0C3V/easyauth-mc1.21.11-3.4.3.jar"; hash = "sha256-T1PfPlyfkieOCsfoab+BpW8pB/CSDKlxGrS5FMgSMEU="; }; + Floodgate = pkgs.fetchurl { url = "https://cdn.modrinth.com/data/bWrNNfkb/versions/81EuNxeZ/Floodgate-Fabric-2.2.6-b60.jar"; hash = "sha256-voH1QWv5GVm6EziJ3ERPjn5cx09/et73QiZlJ7l3foM="; }; + Geyser = pkgs.fetchurl { url = "https://cdn.modrinth.com/data/wKkoqHrH/versions/6uw7I3Qj/geyser-fabric-Geyser-Fabric-2.9.6-b1133.jar"; hash = "sha256-aWMlDdHvNz6VaLVPdmO01YBAlQ7m4w8aUe47TbXxM60="; }; + }); + }; package = pkgs.fabricServers.fabric-1_21_11.override { jre_headless = pkgs.javaPackages.compiler.temurin-bin.jdk-25; From 3b4ba3be3fae92f406dac4f413270889a8dcf4a6 Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 6 Jul 2026 15:19:21 +0800 Subject: [PATCH 145/224] switch to sonnet 5 --- modules/home/core/code.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/core/code.nix b/modules/home/core/code.nix index fa074e5..8596eb2 100644 --- a/modules/home/core/code.nix +++ b/modules/home/core/code.nix @@ -43,7 +43,7 @@ tool_permissions.default = "allow"; default_model = { provider = "copilot_chat"; - model = "claude-sonnet-4.6"; + model = "claude-sonnet-5"; effort = "high"; enable_thinking = false; }; From 5d762091f14c8e5a4598c45a2664e5622a4e8331 Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 6 Jul 2026 15:19:40 +0800 Subject: [PATCH 146/224] enable sway --- modules/home/rice/compositor.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/home/rice/compositor.nix b/modules/home/rice/compositor.nix index 7133dc9..ced7eb7 100644 --- a/modules/home/rice/compositor.nix +++ b/modules/home/rice/compositor.nix @@ -5,6 +5,10 @@ catppuccin.hyprland.enable = false; # temp fix until i get things migrated to lua + wayland.windowManager.sway = { + enable = true; + }; + wayland.windowManager.hyprland = { enable = true; package = pkgs.hyprland; # inputs.hl.packages."${pkgs.system}".hyprland; From 1d42c7d3fa54b6c07461a9b052766423dfc16585 Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 6 Jul 2026 15:21:32 +0800 Subject: [PATCH 147/224] fix error forgejo --- modules/system/homelab/git.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/system/homelab/git.nix b/modules/system/homelab/git.nix index c392c0c..42048ac 100644 --- a/modules/system/homelab/git.nix +++ b/modules/system/homelab/git.nix @@ -31,10 +31,10 @@ ALLOW_ONLY_EXTERNAL_REGISTRATION = true; ALLOW_ONLY_INTERNAL_REGISTRATION = false; REQUIRE_EXTERNAL_REGISTRATION_PASSWORD = true; - explore = { - DISABLE_USERS_PAGE = true; - DISABLE_ORGANIZATIONS_PAGE = true; - }; + }; + "service.explore" = { + DISABLE_USERS_PAGE = true; + DISABLE_ORGANIZATIONS_PAGE = true; }; user.ENABLE_FOLLOWING = false; repository = { From 862c89a49959c59969952a6b4cfdf1306528ad66 Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 6 Jul 2026 15:38:09 +0800 Subject: [PATCH 148/224] enable ctp cache --- modules/home/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/home/default.nix b/modules/home/default.nix index b6c5e9d..4a7a95c 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -7,6 +7,7 @@ catppuccin = { enable = true; autoEnable = true; + cache.enable = true; flavor = ctp-opt.flavor; accent = ctp-opt.accent; From c144591d59027c2713e369108a36fc8cc451791c Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 6 Jul 2026 15:38:17 +0800 Subject: [PATCH 149/224] update modpack --- modules/system/homelab/mc/mc0-vanilla-plus.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc/mc0-vanilla-plus.nix b/modules/system/homelab/mc/mc0-vanilla-plus.nix index b4d19c3..a7fe356 100644 --- a/modules/system/homelab/mc/mc0-vanilla-plus.nix +++ b/modules/system/homelab/mc/mc0-vanilla-plus.nix @@ -5,10 +5,10 @@ rcon-pass = "howdy"; modpack = let useLatest = false; - commit = "b128b9f93b365570ad650d9b6fea149c54b586c5"; + commit = "bf95d65e758963899f9d5a4eba6b589c50faffc9"; path = if !useLatest then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = "sha256-i0N/Yb4dgSpJLfazm6KSZC9dehU53AmvhXWLKHCU0aA="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { From 66e234654ce19d8e0072768fa7c0118b1d34c764 Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 6 Jul 2026 15:53:18 +0800 Subject: [PATCH 150/224] update hash --- modules/system/homelab/mc/mc0-vanilla-plus.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc/mc0-vanilla-plus.nix b/modules/system/homelab/mc/mc0-vanilla-plus.nix index a7fe356..2b93dd4 100644 --- a/modules/system/homelab/mc/mc0-vanilla-plus.nix +++ b/modules/system/homelab/mc/mc0-vanilla-plus.nix @@ -8,7 +8,7 @@ commit = "bf95d65e758963899f9d5a4eba6b589c50faffc9"; path = if !useLatest then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-4AbpwvbzndeQC18sCKbWkIo8npQRHTftOJ69au3AjXc="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { From e13d03d3625af18c9cc63d5e0853942036d92266 Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 7 Jul 2026 09:28:08 +0800 Subject: [PATCH 151/224] skip discord updater --- modules/home/desktop.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/home/desktop.nix b/modules/home/desktop.nix index 1a151d3..e007ef6 100644 --- a/modules/home/desktop.nix +++ b/modules/home/desktop.nix @@ -17,6 +17,10 @@ ./core/browser.nix ]; + home.file.".config/discord/settings.json".text = builtins.toJSON { + SKIP_HOST_UPDATE = true; + }; + services = { awww.enable = true; hyprpolkitagent.enable = true; From a7781200a0e01c1dd8b528e582464d0f6a5f82f3 Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 7 Jul 2026 09:55:57 +0800 Subject: [PATCH 152/224] base niri config --- flake.lock | 124 ++++++++++++++++++++++++++++++- flake.nix | 1 + modules/home/rice/compositor.nix | 35 ++++++++- modules/home/rice/keybinds.nix | 25 +++++++ modules/system/desktop.nix | 20 +++-- 5 files changed, 193 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 4a9bf3d..2893c06 100644 --- a/flake.lock +++ b/flake.lock @@ -112,6 +112,62 @@ "type": "github" } }, + "niri": { + "inputs": { + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": "nixpkgs_4", + "nixpkgs-stable": "nixpkgs-stable", + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1783267733, + "narHash": "sha256-DTvaM+0vanneOcKg3NKXV7ilf0ShY4BOBz/nde5GHos=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "74053f79cad0f6c3a4a0be6b7928795d2e6a9f4b", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1756556321, + "narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v25.08", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1783248941, + "narHash": "sha256-citgYJbvR1iUKXpiWlFq3NO+fw6hXGL3Qk1ampU7lhA=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "a30ca7983b2f1fc3ddeb209b3fe18fa78e0dbd25", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1781173989, @@ -125,6 +181,22 @@ "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" } }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1782847189, + "narHash": "sha256-twXPFqFsrrY5r28Zh7Homgcp2gUMBgQ6WDS98Q/3xFI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b6018f87da91d19d0ab4cf979885689b469cdd41", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1746378225, @@ -157,6 +229,22 @@ } }, "nixpkgs_4": { + "locked": { + "lastModified": 1783224372, + "narHash": "sha256-8i/87eeoqiGE4yOTjwSA3Eh/ziJRQEmd/unYU+K27sk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d407951447dcd00442e97087bf374aad70c04cea", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { "locked": { "lastModified": 1781074563, "narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=", @@ -178,7 +266,8 @@ "gl": "gl", "hm": "hm", "mc": "mc", - "nixpkgs": "nixpkgs_4" + "niri": "niri", + "nixpkgs": "nixpkgs_5" } }, "systems": { @@ -210,6 +299,39 @@ "repo": "default", "type": "github" } + }, + "xwayland-satellite-stable": { + "flake": false, + "locked": { + "lastModified": 1755491097, + "narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "388d291e82ffbc73be18169d39470f340707edaa", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "ref": "v0.7", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "xwayland-satellite-unstable": { + "flake": false, + "locked": { + "lastModified": 1781226823, + "narHash": "sha256-28696iIw8uE0ZUyFTtzhEM8xMh85clCYypMxkvUi+sc=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "8575d0ef55d70f9b4c46b6bffb3accf912217e1e", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 3ccbd5c..6f756b4 100644 --- a/flake.nix +++ b/flake.nix @@ -10,6 +10,7 @@ gl.url = "github:nix-community/nixGL"; ctp.url = "github:catppuccin/nix"; + niri.url = "github:sodiboo/niri-flake"; mc.url = "github:Infinidoge/nix-minecraft"; }; diff --git a/modules/home/rice/compositor.nix b/modules/home/rice/compositor.nix index ced7eb7..add66fc 100644 --- a/modules/home/rice/compositor.nix +++ b/modules/home/rice/compositor.nix @@ -3,12 +3,39 @@ ./keybinds.nix ]; - catppuccin.hyprland.enable = false; # temp fix until i get things migrated to lua - - wayland.windowManager.sway = { - enable = true; + programs.niri = { + settings = { + outputs."eDP-1" = { + mode = { width=1920; height=1080; refresh=60.006; }; + position = { x=0; y=0; }; + scale = 1.0; + }; + environment = { + XCURSOR_SIZE = "24"; + XCURSOR_THEME = "catppuccin-${ctp-opt.flavor}-light-cursors"; + + CLIPHIST_MAX_ITEMS = "36"; + + GTK_APPLICATION_PREFER_DARK_THEME = "1"; + GTK_THEME = "Adwaita:dark"; + QT_QPA_PLATFORMTHEME = "kvantum"; + QT_STYLE_OVERRIDE = "kvantum"; + }; + spawn-at-startup = map (sh: { inherit sh; }) [ + "wl-paste --type text --watch cliphist store" + "wl-paste --type image --watch cliphist store" + + "waybar &" + "sunshine &" + "blueman-applet &" + "nm-applet &" + "tailscale systray &" + ]; + }; }; + catppuccin.hyprland.enable = false; # temp fix until i get things migrated to lua + wayland.windowManager.hyprland = { enable = true; package = pkgs.hyprland; # inputs.hl.packages."${pkgs.system}".hyprland; diff --git a/modules/home/rice/keybinds.nix b/modules/home/rice/keybinds.nix index c0d4634..6a9c841 100644 --- a/modules/home/rice/keybinds.nix +++ b/modules/home/rice/keybinds.nix @@ -18,6 +18,31 @@ }; }; }; + + programs.niri.settings.binds = { + "XF86AudioRaiseVolume" = { action.spawn = [ "wpctl" "set-volume" "-l" "1" "@DEFAULT_AUDIO_SINK@" "5%+" ]; allow-when-locked = true; }; + "XF86AudioLowerVolume" = { action.spawn = [ "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-" ]; allow-when-locked = true; }; + "XF86AudioMute" = { action.spawn = [ "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle" ]; allow-when-locked = true; }; + "XF86AudioMicMute" = { action.spawn = [ "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle" ]; allow-when-locked = true; }; + "XF86MonBrightnessUp" = { action.spawn = [ "brightnessctl" "s" "10%+" ]; allow-when-locked = true; }; + "XF86MonBrightnessDown" = { action.spawn = [ "brightnessctl" "s" "10%-" ]; allow-when-locked = true; }; + + "Mod+Q".action.close-window = {}; + "Mod+W".action.maximize-column = {}; + "Print".action.screenshot-screen = {}; + + "Mod+Up".action.focus-workspace-up = {}; + "Mod+Down".action.focus-workspace-down = {}; + "Mod+Left".action.focus-column-left = {}; + "Mod+Right".action.focus-column-right = {}; + + "Mod+R".action.spawn = [ "rofi" "-show" "drun" "-show-icons" "-display-drun" ":" "-run-command" "uwsm app -- {cmd}" ]; + "Mod+E".action.spawn = [ "pcmanfm-qt" ]; + "Mod+T".action.spawn = [ "kitty" ]; + "Mod+Y".action.spawn = [ "brave" "--restore-last-session" ]; + "Mod+Return".action.spawn-sh = "ls ~/Projects | rofi -dmenu -p \"Open Project\" | xargs -I {} sh -c 'mkdir -p ~/Projects/\"{}\" && zeditor ~/Projects/\"{}\"'"; + }; + wayland.windowManager.hyprland = { settings = { gestures = { diff --git a/modules/system/desktop.nix b/modules/system/desktop.nix index 9f31a27..933e8b7 100644 --- a/modules/system/desktop.nix +++ b/modules/system/desktop.nix @@ -1,5 +1,8 @@ -{ pkgs, enable-dm, ... }: { +{ inputs, pkgs, enable-dm, ... }: { + nixpkgs.overlays = [ inputs.niri.overlays.niri ]; imports = [ + inputs.niri.nixosModules.niri + ./misc/programs.nix ./misc/graphics.nix ./misc/theme.nix @@ -7,12 +10,15 @@ ./base.nix ]; - programs.hyprland = { - enable = true; - withUWSM = true; - xwayland.enable = true; - package = pkgs.hyprland; # if rice.enable then inputs.hl.packages."${pkgs.system}".hyprland else pkgs.hyprland; - portalPackage = pkgs.xdg-desktop-portal-hyprland; # inputs.hl.packages.${pkgs.system}.xdg-desktop-portal-hyprland; + programs = { + niri.enable = true; + hyprland = { + enable = true; + withUWSM = true; + xwayland.enable = true; + package = pkgs.hyprland; # if rice.enable then inputs.hl.packages."${pkgs.system}".hyprland else pkgs.hyprland; + portalPackage = pkgs.xdg-desktop-portal-hyprland; # inputs.hl.packages.${pkgs.system}.xdg-desktop-portal-hyprland; + }; }; xdg.portal = { From e1f7fb5c5f9e5276645a42cb387c442f06336919 Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 7 Jul 2026 12:51:41 +0800 Subject: [PATCH 153/224] migrate waybar to niri --- modules/home/rice/bar.nix | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/modules/home/rice/bar.nix b/modules/home/rice/bar.nix index 27a04dd..686523f 100644 --- a/modules/home/rice/bar.nix +++ b/modules/home/rice/bar.nix @@ -12,15 +12,15 @@ modules-left = [ "custom/start" - "hyprland/workspaces" - "hyprland/window" + "niri/workspaces" + "niri/window" "mpris" ]; modules-center = if rice.bar.minimal then [] else [ "custom/dunst" "clock" "tray" - "hyprland/submap" + # "hyprland/submap" ]; modules-right = if rice.bar.minimal then [ "tray" @@ -91,15 +91,10 @@ balanced = ""; }; }; - "hyprland/workspaces" = { - format = "{name}"; - format-icons = { - default = " "; - active = " "; - urgent = " "; - }; - on-scroll-down = "hyprctl dispatch workspace e+1"; - on-scroll-up = "hyprctl dispatch workspace e-1"; + "niri/workspaces" = { + format = "{value}"; + on-scroll-down = "niri msg action focus-workspace-down"; + on-scroll-up = "niri msg action focus-workspace-up"; }; "custom/dunst" = { format = "{}"; @@ -119,7 +114,7 @@ on-click-right = "playerctl next"; on-click = "playerctl previous"; }; - "hyprland/window" = { + "niri/window" = { icon = true; max-length = 35; separate-outputs = false; @@ -128,16 +123,14 @@ "~" = "${username}@${hostname}"; "btop" = "${username}@${hostname}"; }; - on-click-right = "hyprctl dispatch fullscreen 0"; - on-click-middle = "hyprctl dispatch killactive"; - on-click = "hyprctl dispatch fullscreen 1"; - on-scroll-up = "hyprctl dispatch cyclenext"; - on-scroll-down = "hyprctl dispatch cyclenext prev"; - }; - "hyprland/submap" = { - format = " {}"; - on-click = "hyprctl dispatch submap reset"; + on-click-right = "niri msg action fullscreen-window"; + on-click-middle = "niri msg action close-window"; + on-click = "niri msg action maximize-column"; }; + # "hyprland/submap" = { + # format = " {}"; + # on-click = "hyprctl dispatch submap reset"; + # }; "clock" = { format = "{:%b %d, %I:%M:%S %p}"; interval = 1; @@ -234,6 +227,7 @@ #workspaces button { border-radius: 0px; margin: 0px; + padding: 4px; background: none; border: none; } From e3070b231cf80428520690f5b86ba96af6245ecc Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 7 Jul 2026 13:05:45 +0800 Subject: [PATCH 154/224] use unstable, migrate the rest of the keybinds, a bit of styling config --- modules/home/rice/compositor.nix | 14 ++++++++++++++ modules/home/rice/keybinds.nix | 25 +++++++++++++++++++++++++ modules/system/desktop.nix | 5 ++++- 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/modules/home/rice/compositor.nix b/modules/home/rice/compositor.nix index add66fc..04e0eb0 100644 --- a/modules/home/rice/compositor.nix +++ b/modules/home/rice/compositor.nix @@ -3,6 +3,8 @@ ./keybinds.nix ]; + # TODO: https://github.com/sodiboo/niri-flake/issues/1393 for nwg-displays monitor dynamic config + programs.niri = { settings = { outputs."eDP-1" = { @@ -10,6 +12,7 @@ position = { x=0; y=0; }; scale = 1.0; }; + environment = { XCURSOR_SIZE = "24"; XCURSOR_THEME = "catppuccin-${ctp-opt.flavor}-light-cursors"; @@ -31,6 +34,17 @@ "nm-applet &" "tailscale systray &" ]; + + prefer-no-csd = true; + layout = { + tab-indicator.enable = false; + gaps = rice.gap.outer; + border = { + enable = true; + width = rice.borders.size; + + }; + }; }; }; diff --git a/modules/home/rice/keybinds.nix b/modules/home/rice/keybinds.nix index 6a9c841..a8c838f 100644 --- a/modules/home/rice/keybinds.nix +++ b/modules/home/rice/keybinds.nix @@ -29,6 +29,7 @@ "Mod+Q".action.close-window = {}; "Mod+W".action.maximize-column = {}; + "Mod+S".action.fullscreen-window = {}; "Print".action.screenshot-screen = {}; "Mod+Up".action.focus-workspace-up = {}; @@ -36,11 +37,35 @@ "Mod+Left".action.focus-column-left = {}; "Mod+Right".action.focus-column-right = {}; + "Mod+Space" = { action.spawn = [ "playerctl" "play-pause" ]; allow-when-locked = true; }; "Mod+R".action.spawn = [ "rofi" "-show" "drun" "-show-icons" "-display-drun" ":" "-run-command" "uwsm app -- {cmd}" ]; + "Mod+E".action.spawn = [ "pcmanfm-qt" ]; "Mod+T".action.spawn = [ "kitty" ]; "Mod+Y".action.spawn = [ "brave" "--restore-last-session" ]; "Mod+Return".action.spawn-sh = "ls ~/Projects | rofi -dmenu -p \"Open Project\" | xargs -I {} sh -c 'mkdir -p ~/Projects/\"{}\" && zeditor ~/Projects/\"{}\"'"; + + "Mod+M".action.spawn = [ "wlogout" ]; + "Mod+Tab".action.spawn = [ "pkill" "-SIGUSR1" "waybar" ]; + + "XF86Bluetooth".action.spawn = [ "blueman-manager" ]; + "XF86Display".action.spawn = [ "nwg-displays" ]; + "Ctrl+Alt+Delete".action.spawn = [ "wlogout" ]; + "Ctrl+Shift+Escape".action.spawn = [ "kitty" "btop" ]; + "Mod+Grave".action.spawn = [ "dunstctl" "set-paused" "toggle" ]; + + "Mod+N".action.spawn = [ "rofi-network-manager" ]; + "Mod+J".action.spawn-sh = "notify-send -u critical ${hostname} 'Caffein Mode' && notify-send '(SUPER+X to reset)' && systemctl --user stop hypridle"; + "Mod+Z".action.spawn = [ "dunstctl" "close-all" ]; + + "Mod+V".action.spawn = [ "rofi" "-modi" "clipboard:cliphist-rofi-img" "-show" "clipboard" "-show-icons" ]; + "Mod+A".action.spawn = [ "zeditor" ]; + "Mod+C".action.spawn = [ "kitty" "btop" ]; + "Mod+Shift+C".action.spawn = [ "kitty" "zsh" "-c" "fastfetch; exec zsh -i" ]; + "Mod+D".action.spawn = [ "steam" "steam://open/bigpicture" ]; + "Mod+Shift+D".action.spawn = [ "steam" ]; + + "Mod+L".action.spawn = [ "loginctl" "lock-session" ]; }; wayland.windowManager.hyprland = { diff --git a/modules/system/desktop.nix b/modules/system/desktop.nix index 933e8b7..04cb286 100644 --- a/modules/system/desktop.nix +++ b/modules/system/desktop.nix @@ -11,7 +11,10 @@ ]; programs = { - niri.enable = true; + niri = { + enable = true; + package = pkgs.niri-unstable; + }; hyprland = { enable = true; withUWSM = true; From 67df930504239c5deefa61e7dd8f16aa5ee6c87c Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 7 Jul 2026 13:10:24 +0800 Subject: [PATCH 155/224] cleanup hyprlan specifics --- modules/home/rice/bar.nix | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/modules/home/rice/bar.nix b/modules/home/rice/bar.nix index 686523f..4360e9c 100644 --- a/modules/home/rice/bar.nix +++ b/modules/home/rice/bar.nix @@ -20,7 +20,6 @@ "custom/dunst" "clock" "tray" - # "hyprland/submap" ]; modules-right = if rice.bar.minimal then [ "tray" @@ -54,7 +53,7 @@ }; interval = 1; format = " {used:0.1f}GiB"; - on-click = "hyprctl dispatch exec '[float; size 75%]' kitty btop"; + on-click = "kitty btop"; }; "disk" = { states = { @@ -62,7 +61,7 @@ }; interval = 5; format = " {used}"; - on-click = "hyprctl dispatch exec '[float; size 75%]' kitty btop"; + on-click = "kitty btop"; on-click-right = "kitty sh -c 'sudo nix-collect-garbage -d; nix-collect-garbage -d; nix store optimise; sudo journalctl --rotate --vacuum-time=1s --vacuum-files=1; read'"; }; "network" = { @@ -81,7 +80,7 @@ critical-threshold = 80; format = " {temperatureC}°C"; interval = 1; - on-click = "hyprctl dispatch exec '[float; size 75%]' kitty btop"; + on-click = "kitty btop"; }; "power-profiles-daemon" = { format = "{icon} {profile}"; @@ -127,10 +126,6 @@ on-click-middle = "niri msg action close-window"; on-click = "niri msg action maximize-column"; }; - # "hyprland/submap" = { - # format = " {}"; - # on-click = "hyprctl dispatch submap reset"; - # }; "clock" = { format = "{:%b %d, %I:%M:%S %p}"; interval = 1; @@ -177,8 +172,7 @@ }; "custom/start" = { format = ""; - on-click-middle = "wlogout"; - on-click-right = "hyprctl dispatch togglespecialworkspace hidden"; + on-click-right = "wlogout"; on-click = "rofi -show drun -show-icons -display-drun '' -run-command \"uwsm app -- {cmd}\""; }; } @@ -221,8 +215,8 @@ border: ${toString rice.borders.size}px solid transparent; } - #window, #submap { padding: 0px 5px; } - #submap, #workspaces, #cpu, #memory, #disk, #clock, #window, #tray, #pulseaudio, #battery, #network, #temperature, #power-profiles-daemon, #custom-exit, #custom-start, #custom-dunst, #mpris { padding: 0px 5px; margin: 0px 5px; } + #window { padding: 0px 5px; } + #workspaces, #cpu, #memory, #disk, #clock, #window, #tray, #pulseaudio, #battery, #network, #temperature, #power-profiles-daemon, #custom-exit, #custom-start, #custom-dunst, #mpris { padding: 0px 5px; margin: 0px 5px; } #workspaces button { border-radius: 0px; @@ -241,7 +235,7 @@ background: @base; } - #workspaces button.active, #submap { + #workspaces button.active { background: @surface0; } From 02caf6655d919013412a9eee6484ca4232810582 Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 7 Jul 2026 13:47:22 +0800 Subject: [PATCH 156/224] input tweak --- modules/home/rice/compositor.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/home/rice/compositor.nix b/modules/home/rice/compositor.nix index 04e0eb0..0b59e39 100644 --- a/modules/home/rice/compositor.nix +++ b/modules/home/rice/compositor.nix @@ -12,6 +12,13 @@ position = { x=0; y=0; }; scale = 1.0; }; + input = { + warp-mouse-to-focus.enable = true; + focus-follows-mouse = { + max-scroll-amount = "5%"; + enable = true; + }; + }; environment = { XCURSOR_SIZE = "24"; From 0b4bc2569aea4e145cba9b1079b8e2344e895faa Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 7 Jul 2026 13:53:30 +0800 Subject: [PATCH 157/224] update modpack --- modules/system/homelab/mc/mc0-vanilla-plus.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc/mc0-vanilla-plus.nix b/modules/system/homelab/mc/mc0-vanilla-plus.nix index 2b93dd4..52b9608 100644 --- a/modules/system/homelab/mc/mc0-vanilla-plus.nix +++ b/modules/system/homelab/mc/mc0-vanilla-plus.nix @@ -5,10 +5,10 @@ rcon-pass = "howdy"; modpack = let useLatest = false; - commit = "bf95d65e758963899f9d5a4eba6b589c50faffc9"; + commit = "86bf13316ed1352a676d9056d284448ea5e5a079"; path = if !useLatest then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = "sha256-4AbpwvbzndeQC18sCKbWkIo8npQRHTftOJ69au3AjXc="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { From 0f853620c1618e91408481e698b6be04bff80f3d Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 7 Jul 2026 13:54:28 +0800 Subject: [PATCH 158/224] update hash --- modules/system/homelab/mc/mc0-vanilla-plus.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/mc/mc0-vanilla-plus.nix b/modules/system/homelab/mc/mc0-vanilla-plus.nix index 52b9608..79f86bc 100644 --- a/modules/system/homelab/mc/mc0-vanilla-plus.nix +++ b/modules/system/homelab/mc/mc0-vanilla-plus.nix @@ -8,7 +8,7 @@ commit = "86bf13316ed1352a676d9056d284448ea5e5a079"; path = if !useLatest then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = ""; + packHash = "sha256-sc6vekjddYpwY2Hp3uZ/xFiXyPd4kfwcZVO/pKRRBwQ="; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in { From 6cf91a260a46a9a86d8f829ba3a9a0c8ca4a1773 Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 7 Jul 2026 19:22:35 +0800 Subject: [PATCH 159/224] xwayland support. rofi inconsistenxy fix, remove hyprlogout --- modules/home/rice/compositor.nix | 8 +++++++- modules/home/rice/keybinds.nix | 2 +- modules/home/rice/logout.nix | 6 +++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/modules/home/rice/compositor.nix b/modules/home/rice/compositor.nix index 0b59e39..a01997b 100644 --- a/modules/home/rice/compositor.nix +++ b/modules/home/rice/compositor.nix @@ -1,4 +1,4 @@ -{ pkgs, rice, ctp-opt, ... }: { +{ lib, pkgs, rice, ctp-opt, ... }: { imports = [ ./keybinds.nix ]; @@ -18,6 +18,7 @@ max-scroll-amount = "5%"; enable = true; }; + keyboard.xkb.options = "caps:none"; }; environment = { @@ -42,6 +43,11 @@ "tailscale systray &" ]; + xwayland-satellite = { + enable = true; + path = lib.getExe pkgs.xwayland-satellite; + }; + prefer-no-csd = true; layout = { tab-indicator.enable = false; diff --git a/modules/home/rice/keybinds.nix b/modules/home/rice/keybinds.nix index a8c838f..5cd72ee 100644 --- a/modules/home/rice/keybinds.nix +++ b/modules/home/rice/keybinds.nix @@ -38,7 +38,7 @@ "Mod+Right".action.focus-column-right = {}; "Mod+Space" = { action.spawn = [ "playerctl" "play-pause" ]; allow-when-locked = true; }; - "Mod+R".action.spawn = [ "rofi" "-show" "drun" "-show-icons" "-display-drun" ":" "-run-command" "uwsm app -- {cmd}" ]; + "Mod+R".action.spawn = [ "rofi" "-show" "drun" "-show-icons" "-display-drun" "" "-run-command" "uwsm app -- {cmd}" ]; "Mod+E".action.spawn = [ "pcmanfm-qt" ]; "Mod+T".action.spawn = [ "kitty" ]; diff --git a/modules/home/rice/logout.nix b/modules/home/rice/logout.nix index da57d5a..cad5b72 100644 --- a/modules/home/rice/logout.nix +++ b/modules/home/rice/logout.nix @@ -4,13 +4,13 @@ layout = [ { label = "shutdown"; - action = "hyprshutdown -t 'Shutting down...' --post-cmd 'systemctl poweroff'"; + action = "systemctl poweroff"; text = "(S)hutdown"; keybind = "s"; } { label = "reboot"; - action = "hyprshutdown -t 'Rebooting...' --post-cmd 'systemctl reboot'"; + action = "systemctl reboot"; text = "(R)eboot"; keybind = "r"; } @@ -28,7 +28,7 @@ } { label = "logout"; - action = "hyprshutdown -t 'Logging Out...' --post-cmd 'uwsm stop'"; + action = "niri msg action quit"; text = "L(o)gout"; keybind = "o"; } From c39e13eebd8220845bc88ab3dd94164df1fa0580 Mon Sep 17 00:00:00 2001 From: satr14 Date: Thu, 9 Jul 2026 16:27:07 +0700 Subject: [PATCH 160/224] extra keybinds, disable fusuma, hypridle for niri, looks tweaks --- modules/home/rice/compositor.nix | 8 +++---- modules/home/rice/idle.nix | 8 +++---- modules/home/rice/keybinds.nix | 39 +++++++++++++------------------- 3 files changed, 24 insertions(+), 31 deletions(-) diff --git a/modules/home/rice/compositor.nix b/modules/home/rice/compositor.nix index a01997b..10e0813 100644 --- a/modules/home/rice/compositor.nix +++ b/modules/home/rice/compositor.nix @@ -15,7 +15,7 @@ input = { warp-mouse-to-focus.enable = true; focus-follows-mouse = { - max-scroll-amount = "5%"; + max-scroll-amount = "35%"; enable = true; }; keyboard.xkb.options = "caps:none"; @@ -52,11 +52,11 @@ layout = { tab-indicator.enable = false; gaps = rice.gap.outer; - border = { + focus-ring = { enable = true; - width = rice.borders.size; - + width = rice.borders.size; }; + border.enable = false; }; }; }; diff --git a/modules/home/rice/idle.nix b/modules/home/rice/idle.nix index 80434de..4b2d029 100644 --- a/modules/home/rice/idle.nix +++ b/modules/home/rice/idle.nix @@ -5,8 +5,8 @@ general = { lock_cmd = "hyprlock"; unlock_cmd = "pkill -USR1 hyprlock"; - before_sleep_cmd = "hyprctl dispatch dpms off && hyprlock"; - after_sleep_cmd = "hyprctl dispatch dpms on"; + before_sleep_cmd = "niri msg action power-off-monitors && hyprlock"; + after_sleep_cmd = "niri msg action power-on-monitors"; }; listener = [ { @@ -21,8 +21,8 @@ } { timeout = 420; - on-timeout = "hyprctl dispatch dpms off"; - on-resume = "hyprctl dispatch dpms on"; + on-timeout = "niri msg action power-off-monitors"; + on-resume = "niri msg action power-on-monitors"; } { timeout = 600; diff --git a/modules/home/rice/keybinds.nix b/modules/home/rice/keybinds.nix index 5cd72ee..6a96c10 100644 --- a/modules/home/rice/keybinds.nix +++ b/modules/home/rice/keybinds.nix @@ -1,24 +1,4 @@ -{ pkgs, hostname, ... }: { - services.fusuma = { - extraPackages = with pkgs; [ systemd coreutils-full xprop ]; - enable = true; - settings = { - swipe = { - "4".down.sendkey = "LEFTMETA+L"; - "4".up.sendkey = "LEFTMETA+M"; - "3".up.sendkey = "LEFTMETA+W"; - - "3".down.sendkey = "LEFTMETA+DOWN"; - "3".right.sendkey = "LEFTMETA+LEFT"; - "3".left.sendkey = "LEFTMETA+RIGHT"; - }; - hold = { - "3".sendkey = "LEFTMETA+TAB"; - "4".sendkey = "LEFTMETA+SPACE"; - }; - }; - }; - +{ hostname, ... }: { programs.niri.settings.binds = { "XF86AudioRaiseVolume" = { action.spawn = [ "wpctl" "set-volume" "-l" "1" "@DEFAULT_AUDIO_SINK@" "5%+" ]; allow-when-locked = true; }; "XF86AudioLowerVolume" = { action.spawn = [ "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-" ]; allow-when-locked = true; }; @@ -30,12 +10,22 @@ "Mod+Q".action.close-window = {}; "Mod+W".action.maximize-column = {}; "Mod+S".action.fullscreen-window = {}; + "Alt+Print".action.screenshot-window = {}; "Print".action.screenshot-screen = {}; "Mod+Up".action.focus-workspace-up = {}; "Mod+Down".action.focus-workspace-down = {}; "Mod+Left".action.focus-column-left = {}; "Mod+Right".action.focus-column-right = {}; + + "Mod+Shift+Up".action.move-window-up-or-to-workspace-up = {}; + "Mod+Shift+Down".action.move-window-down-or-to-workspace-down = {}; + "Mod+Shift+Left".action.move-column-left = {}; + "Mod+Shift+Right".action.move-column-right = {}; + + "Mod+G".action.center-column = {}; + "Mod+F".action.toggle-window-floating = {}; + "Alt+Space".action.toggle-overview = {}; "Mod+Space" = { action.spawn = [ "playerctl" "play-pause" ]; allow-when-locked = true; }; "Mod+R".action.spawn = [ "rofi" "-show" "drun" "-show-icons" "-display-drun" "" "-run-command" "uwsm app -- {cmd}" ]; @@ -47,6 +37,7 @@ "Mod+M".action.spawn = [ "wlogout" ]; "Mod+Tab".action.spawn = [ "pkill" "-SIGUSR1" "waybar" ]; + "Mod+H".action.show-hotkey-overlay = {}; "XF86Bluetooth".action.spawn = [ "blueman-manager" ]; "XF86Display".action.spawn = [ "nwg-displays" ]; @@ -62,9 +53,11 @@ "Mod+A".action.spawn = [ "zeditor" ]; "Mod+C".action.spawn = [ "kitty" "btop" ]; "Mod+Shift+C".action.spawn = [ "kitty" "zsh" "-c" "fastfetch; exec zsh -i" ]; - "Mod+D".action.spawn = [ "steam" "steam://open/bigpicture" ]; - "Mod+Shift+D".action.spawn = [ "steam" ]; + "Mod+Shift+D".action.spawn = [ "steam" "-system-composer" "steam://open/bigpicture" ]; + "Mod+D".action.spawn = [ "prismlauncher" ]; + "Mod+X".action.spawn-sh = "dunstctl close-all && pkill -SIGUSR2 waybar && systemctl --user restart awww hypridle"; + "Mod+K".action.spawn-sh = "notify-send -u critical ${hostname} 'Focus Mode' && notify-send '(SUPER+X to reset)' && systemctl --user stop awww && pkill -SIGUSR1 waybar"; "Mod+L".action.spawn = [ "loginctl" "lock-session" ]; }; From 232aae838b78f93d518f41b74c213cbdb9e8a65a Mon Sep 17 00:00:00 2001 From: satr14 Date: Thu, 9 Jul 2026 16:43:11 +0700 Subject: [PATCH 161/224] update flake --- flake.lock | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/flake.lock b/flake.lock index 2893c06..da78932 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1781255309, - "narHash": "sha256-n2P5xkAYGylrJ3feu7L6uaCUw/+jW8rk+HO127gDbFA=", + "lastModified": 1783545128, + "narHash": "sha256-APzF91kOgKOHwx/KRu7710A8MYihVtKmUbjK5dAIltc=", "owner": "catppuccin", "repo": "nix", - "rev": "036c78ea4cd8a42c8546c6316a944fd7d59d4341", + "rev": "28731a367cfd8fb1eaec31d72bb75fee43971db4", "type": "github" }, "original": { @@ -78,11 +78,11 @@ ] }, "locked": { - "lastModified": 1781557312, - "narHash": "sha256-QOIRYSUFSq7L5mY3dZymaVhcnne3tPgoR9riB0WocjA=", + "lastModified": 1783550008, + "narHash": "sha256-qbbZUk9IG9dLNwCPwdPBs6I5clxwugRpP+1YU+GPK20=", "owner": "nix-community", "repo": "home-manager", - "rev": "c03e4752899e55705dfa63979abd885c582a5c48", + "rev": "f4d01c1d87c7c2ec909549165d5a8338f1bd3315", "type": "github" }, "original": { @@ -99,11 +99,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1780375694, - "narHash": "sha256-TznzgYVONg28KiSFB2rVdf/eLVIMtEQOxKt13Kzyrp8=", + "lastModified": 1783481424, + "narHash": "sha256-nUhKyzWO6YiyeTA+M/dNDGT2eLp8t5KIij8oIPlIUnw=", "owner": "Infinidoge", "repo": "nix-minecraft", - "rev": "e6f8bec35104ca5955efe73742da58d2823684f7", + "rev": "c0e5c94056ff42c1671aac5398c5d71df39c4e74", "type": "github" }, "original": { @@ -122,11 +122,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1783267733, - "narHash": "sha256-DTvaM+0vanneOcKg3NKXV7ilf0ShY4BOBz/nde5GHos=", + "lastModified": 1783526091, + "narHash": "sha256-Zkkil0e8Wg5BcBmJkWJwBXlETefYQbYKw72xJUIBPLE=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "74053f79cad0f6c3a4a0be6b7928795d2e6a9f4b", + "rev": "a24d4c0dce53fd8dbeb9ad20411e282c7b9875f1", "type": "github" }, "original": { @@ -155,11 +155,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1783248941, - "narHash": "sha256-citgYJbvR1iUKXpiWlFq3NO+fw6hXGL3Qk1ampU7lhA=", + "lastModified": 1783522755, + "narHash": "sha256-dI0HkX1djETia7cD/Y64h8BNIsSOfTRMzfNum2J6UhE=", "owner": "YaLTeR", "repo": "niri", - "rev": "a30ca7983b2f1fc3ddeb209b3fe18fa78e0dbd25", + "rev": "0777769e719b7c9b7c980d4ea66288bfbb4da5b3", "type": "github" }, "original": { @@ -170,11 +170,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1781173989, - "narHash": "sha256-zqS1Hjp9o14nN/YhXu/uqm36ot058fF9wmd7/H/hRKc=", - "rev": "8c91a71d13451abc40eb9dae8910f972f979852f", + "lastModified": 1782918843, + "narHash": "sha256-mFP086y1bNA1g9AsY/pCue3H3W2R7ayroHyRbZrcMf0=", + "rev": "e8273b29fe1390ec8d4603f2477357555291432e", "type": "tarball", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1015022.8c91a71d1345/nixexprs.tar.xz" + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1025900.e8273b29fe13/nixexprs.tar.xz" }, "original": { "type": "tarball", @@ -246,11 +246,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1781074563, - "narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=", + "lastModified": 1783224372, + "narHash": "sha256-8i/87eeoqiGE4yOTjwSA3Eh/ziJRQEmd/unYU+K27sk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca", + "rev": "d407951447dcd00442e97087bf374aad70c04cea", "type": "github" }, "original": { From bb515001916a7e37e0c013311aaeac183ea4f777 Mon Sep 17 00:00:00 2001 From: satr14 Date: Thu, 9 Jul 2026 16:43:38 +0700 Subject: [PATCH 162/224] add keybinds --- modules/home/rice/keybinds.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/home/rice/keybinds.nix b/modules/home/rice/keybinds.nix index 6a96c10..aea5e72 100644 --- a/modules/home/rice/keybinds.nix +++ b/modules/home/rice/keybinds.nix @@ -22,6 +22,8 @@ "Mod+Shift+Down".action.move-window-down-or-to-workspace-down = {}; "Mod+Shift+Left".action.move-column-left = {}; "Mod+Shift+Right".action.move-column-right = {}; + "Mod+Ctrl+Left".action.set-column-width = [ "-5%" ]; + "Mod+Ctrl+Right".action.set-column-width = [ "+5%" ]; "Mod+G".action.center-column = {}; "Mod+F".action.toggle-window-floating = {}; From cdfdddcfeccfd1141cea2e780384ea56e05d88c9 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 11 Jul 2026 22:10:30 +0700 Subject: [PATCH 163/224] copyparty flake --- flake.nix | 1 + modules/system/homelab/cdn.nix | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 6f756b4..10f586b 100644 --- a/flake.nix +++ b/flake.nix @@ -12,6 +12,7 @@ niri.url = "github:sodiboo/niri-flake"; mc.url = "github:Infinidoge/nix-minecraft"; + cp.url = "github:9001/copyparty"; }; outputs = inputs: let diff --git a/modules/system/homelab/cdn.nix b/modules/system/homelab/cdn.nix index a2bd042..85b4537 100644 --- a/modules/system/homelab/cdn.nix +++ b/modules/system/homelab/cdn.nix @@ -1,5 +1,7 @@ -{ pkgs, ... }: { +{ inputs, pkgs, ... }: { environment.systemPackages = with pkgs; [ copyparty-most ]; + nixpkgs.overlays = [ inputs.cp.overlays.default ]; + imports = [ inputs.cp.nixosModules.default ]; systemd.services.copyparty = { description = "File Sharing Service"; @@ -7,7 +9,7 @@ after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { - ExecStart = "${pkgs.copyparty-most}/bin/copyparty -c /mnt/share/cfg/files.conf"; + ExecStart = "${pkgs.copyparty}/bin/copyparty -c /mnt/share/cfg/files.conf"; Restart = "on-failure"; }; }; From 5175119fee992fab124d0f1723510bebf538ab51 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 11 Jul 2026 22:16:04 +0700 Subject: [PATCH 164/224] push lock file --- flake.lock | 82 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 66 insertions(+), 16 deletions(-) diff --git a/flake.lock b/flake.lock index da78932..ed5bf65 100644 --- a/flake.lock +++ b/flake.lock @@ -1,8 +1,27 @@ { "nodes": { + "cp": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1783637983, + "narHash": "sha256-zKYemA+ZGFiW7ac5+9w8FEounKLt4eOb7HI17wp1Rxs=", + "owner": "9001", + "repo": "copyparty", + "rev": "96bafb8f4af83bb7473b75e4b77ab8e1445e6b46", + "type": "github" + }, + "original": { + "owner": "9001", + "repo": "copyparty", + "type": "github" + } + }, "ctp": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1783545128, @@ -35,6 +54,21 @@ } }, "flake-utils": { + "locked": { + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { "inputs": { "systems": "systems" }, @@ -54,8 +88,8 @@ }, "gl": { "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_2" + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1762090880, @@ -95,7 +129,7 @@ "mc": { "inputs": { "flake-compat": "flake-compat", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "systems": "systems_2" }, "locked": { @@ -116,7 +150,7 @@ "inputs": { "niri-stable": "niri-stable", "niri-unstable": "niri-unstable", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "nixpkgs-stable": "nixpkgs-stable", "xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-unstable": "xwayland-satellite-unstable" @@ -170,15 +204,17 @@ }, "nixpkgs": { "locked": { - "lastModified": 1782918843, - "narHash": "sha256-mFP086y1bNA1g9AsY/pCue3H3W2R7ayroHyRbZrcMf0=", - "rev": "e8273b29fe1390ec8d4603f2477357555291432e", - "type": "tarball", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1025900.e8273b29fe13/nixexprs.tar.xz" + "lastModified": 1748162331, + "narHash": "sha256-rqc2RKYTxP3tbjA+PB3VMRQNnjesrT0pEofXQTrMsS8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "7c43f080a7f28b2774f3b3f43234ca11661bf334", + "type": "github" }, "original": { - "type": "tarball", - "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" + "id": "nixpkgs", + "ref": "nixos-25.05", + "type": "indirect" } }, "nixpkgs-stable": { @@ -198,6 +234,19 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1782918843, + "narHash": "sha256-mFP086y1bNA1g9AsY/pCue3H3W2R7ayroHyRbZrcMf0=", + "rev": "e8273b29fe1390ec8d4603f2477357555291432e", + "type": "tarball", + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1025900.e8273b29fe13/nixexprs.tar.xz" + }, + "original": { + "type": "tarball", + "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1746378225, "narHash": "sha256-OeRSuL8PUjIfL3Q0fTbNJD/fmv1R+K2JAOqWJd3Oceg=", @@ -212,7 +261,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1769461804, "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", @@ -228,7 +277,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1783224372, "narHash": "sha256-8i/87eeoqiGE4yOTjwSA3Eh/ziJRQEmd/unYU+K27sk=", @@ -244,7 +293,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1783224372, "narHash": "sha256-8i/87eeoqiGE4yOTjwSA3Eh/ziJRQEmd/unYU+K27sk=", @@ -262,12 +311,13 @@ }, "root": { "inputs": { + "cp": "cp", "ctp": "ctp", "gl": "gl", "hm": "hm", "mc": "mc", "niri": "niri", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_6" } }, "systems": { From 99bf98c716455306935857137fab277611318b87 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 11 Jul 2026 22:20:57 +0700 Subject: [PATCH 165/224] deactivate all mc servers --- modules/system/homelab/mc/mc0-vanilla-plus.nix | 2 +- modules/system/homelab/mc/mc1-pure-vanilla.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc/mc0-vanilla-plus.nix b/modules/system/homelab/mc/mc0-vanilla-plus.nix index 79f86bc..bbcc0e0 100644 --- a/modules/system/homelab/mc/mc0-vanilla-plus.nix +++ b/modules/system/homelab/mc/mc0-vanilla-plus.nix @@ -18,7 +18,7 @@ in { }; services.minecraft-servers.servers.${name} = { - enable = true; + enable = false; autoStart = true; restart = "always"; diff --git a/modules/system/homelab/mc/mc1-pure-vanilla.nix b/modules/system/homelab/mc/mc1-pure-vanilla.nix index 951b5f9..6b64a85 100644 --- a/modules/system/homelab/mc/mc1-pure-vanilla.nix +++ b/modules/system/homelab/mc/mc1-pure-vanilla.nix @@ -11,7 +11,7 @@ }; in { services.minecraft-servers.servers.${name} = { - enable = true; + enable = false; autoStart = true; restart = "always"; From 3fc3bdc325bf3919498a233514d97d85763d29a2 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 11 Jul 2026 22:30:48 +0700 Subject: [PATCH 166/224] fix lockfile --- flake.lock | 49 ++++++++++++++++++------------------------------- flake.nix | 5 ++++- 2 files changed, 22 insertions(+), 32 deletions(-) diff --git a/flake.lock b/flake.lock index ed5bf65..520c537 100644 --- a/flake.lock +++ b/flake.lock @@ -3,7 +3,9 @@ "cp": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { "lastModified": 1783637983, @@ -21,7 +23,7 @@ }, "ctp": { "inputs": { - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" }, "locked": { "lastModified": 1783545128, @@ -89,7 +91,7 @@ "gl": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1762090880, @@ -129,7 +131,7 @@ "mc": { "inputs": { "flake-compat": "flake-compat", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "systems": "systems_2" }, "locked": { @@ -150,7 +152,7 @@ "inputs": { "niri-stable": "niri-stable", "niri-unstable": "niri-unstable", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_4", "nixpkgs-stable": "nixpkgs-stable", "xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-unstable": "xwayland-satellite-unstable" @@ -204,17 +206,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1748162331, - "narHash": "sha256-rqc2RKYTxP3tbjA+PB3VMRQNnjesrT0pEofXQTrMsS8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "7c43f080a7f28b2774f3b3f43234ca11661bf334", - "type": "github" + "lastModified": 1782918843, + "narHash": "sha256-mFP086y1bNA1g9AsY/pCue3H3W2R7ayroHyRbZrcMf0=", + "rev": "e8273b29fe1390ec8d4603f2477357555291432e", + "type": "tarball", + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1025900.e8273b29fe13/nixexprs.tar.xz" }, "original": { - "id": "nixpkgs", - "ref": "nixos-25.05", - "type": "indirect" + "type": "tarball", + "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" } }, "nixpkgs-stable": { @@ -234,19 +234,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1782918843, - "narHash": "sha256-mFP086y1bNA1g9AsY/pCue3H3W2R7ayroHyRbZrcMf0=", - "rev": "e8273b29fe1390ec8d4603f2477357555291432e", - "type": "tarball", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1025900.e8273b29fe13/nixexprs.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1746378225, "narHash": "sha256-OeRSuL8PUjIfL3Q0fTbNJD/fmv1R+K2JAOqWJd3Oceg=", @@ -261,7 +248,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { "lastModified": 1769461804, "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", @@ -277,7 +264,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { "lastModified": 1783224372, "narHash": "sha256-8i/87eeoqiGE4yOTjwSA3Eh/ziJRQEmd/unYU+K27sk=", @@ -293,7 +280,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_5": { "locked": { "lastModified": 1783224372, "narHash": "sha256-8i/87eeoqiGE4yOTjwSA3Eh/ziJRQEmd/unYU+K27sk=", @@ -317,7 +304,7 @@ "hm": "hm", "mc": "mc", "niri": "niri", - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_5" } }, "systems": { diff --git a/flake.nix b/flake.nix index 10f586b..4e43887 100644 --- a/flake.nix +++ b/flake.nix @@ -12,7 +12,10 @@ niri.url = "github:sodiboo/niri-flake"; mc.url = "github:Infinidoge/nix-minecraft"; - cp.url = "github:9001/copyparty"; + cp = { + url = "github:9001/copyparty"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = inputs: let From 83d1f4086dee92c02abbd88a806bb9e6799b7420 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 11 Jul 2026 22:35:42 +0700 Subject: [PATCH 167/224] cp: follow root nixpkgs to fix copyparty eval error --- modules/home/core/code.nix | 4 ++-- modules/home/rice/cursor.nix | 6 ++++-- modules/home/rice/keybinds.nix | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/home/core/code.nix b/modules/home/core/code.nix index 8596eb2..044f3a7 100644 --- a/modules/home/core/code.nix +++ b/modules/home/core/code.nix @@ -44,8 +44,8 @@ default_model = { provider = "copilot_chat"; model = "claude-sonnet-5"; - effort = "high"; - enable_thinking = false; + effort = "low"; + enable_thinking = true; }; }; theme = { diff --git a/modules/home/rice/cursor.nix b/modules/home/rice/cursor.nix index 9a193c5..d2f0963 100644 --- a/modules/home/rice/cursor.nix +++ b/modules/home/rice/cursor.nix @@ -1,8 +1,10 @@ -{ pkgs, ctp-opt, ... }: { +{ lib, pkgs, ctp-opt, ... }: { + catppuccin.cursors.enable = false; # managed manually below to use the "Light" cursor variant + home.pointerCursor = { gtk.enable = true; package = pkgs.catppuccin-cursors."${ctp-opt.flavor}Light"; - name = "catppuccin-${ctp-opt.flavor}-light-cursors"; + name = lib.mkOverride 30 "catppuccin-${ctp-opt.flavor}-light-cursors"; size = 24; }; } \ No newline at end of file diff --git a/modules/home/rice/keybinds.nix b/modules/home/rice/keybinds.nix index aea5e72..0f00ca9 100644 --- a/modules/home/rice/keybinds.nix +++ b/modules/home/rice/keybinds.nix @@ -1,4 +1,4 @@ -{ hostname, ... }: { +{ pkgs, lib, hostname, ... }: { programs.niri.settings.binds = { "XF86AudioRaiseVolume" = { action.spawn = [ "wpctl" "set-volume" "-l" "1" "@DEFAULT_AUDIO_SINK@" "5%+" ]; allow-when-locked = true; }; "XF86AudioLowerVolume" = { action.spawn = [ "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-" ]; allow-when-locked = true; }; @@ -54,6 +54,7 @@ "Mod+V".action.spawn = [ "rofi" "-modi" "clipboard:cliphist-rofi-img" "-show" "clipboard" "-show-icons" ]; "Mod+A".action.spawn = [ "zeditor" ]; "Mod+C".action.spawn = [ "kitty" "btop" ]; + "Mod+Shift+F".action.spawn-sh = "${lib.getExe pkgs.labwc} $$ WAYLAND_DISPLAY=wayland-1 ${lib.getExe pkgs.kitty}"; "Mod+Shift+C".action.spawn = [ "kitty" "zsh" "-c" "fastfetch; exec zsh -i" ]; "Mod+Shift+D".action.spawn = [ "steam" "-system-composer" "steam://open/bigpicture" ]; "Mod+D".action.spawn = [ "prismlauncher" ]; From 9248d2d424d1f7e74a6a03d64934b27aa6552fd7 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 12 Jul 2026 11:49:14 +0700 Subject: [PATCH 168/224] give it time, update lock file --- flake.lock | 49 ++++++++++++------- flake.nix | 5 +- .../system/homelab/mc/mc0-vanilla-plus.nix | 2 +- 3 files changed, 33 insertions(+), 23 deletions(-) diff --git a/flake.lock b/flake.lock index 520c537..19c0928 100644 --- a/flake.lock +++ b/flake.lock @@ -3,9 +3,7 @@ "cp": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": [ - "nixpkgs" - ] + "nixpkgs": "nixpkgs" }, "locked": { "lastModified": 1783637983, @@ -23,7 +21,7 @@ }, "ctp": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1783545128, @@ -91,7 +89,7 @@ "gl": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1762090880, @@ -131,7 +129,7 @@ "mc": { "inputs": { "flake-compat": "flake-compat", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "systems": "systems_2" }, "locked": { @@ -152,7 +150,7 @@ "inputs": { "niri-stable": "niri-stable", "niri-unstable": "niri-unstable", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "nixpkgs-stable": "nixpkgs-stable", "xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-unstable": "xwayland-satellite-unstable" @@ -206,15 +204,17 @@ }, "nixpkgs": { "locked": { - "lastModified": 1782918843, - "narHash": "sha256-mFP086y1bNA1g9AsY/pCue3H3W2R7ayroHyRbZrcMf0=", - "rev": "e8273b29fe1390ec8d4603f2477357555291432e", - "type": "tarball", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1025900.e8273b29fe13/nixexprs.tar.xz" + "lastModified": 1767313136, + "narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d", + "type": "github" }, "original": { - "type": "tarball", - "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" + "id": "nixpkgs", + "ref": "nixos-25.05", + "type": "indirect" } }, "nixpkgs-stable": { @@ -234,6 +234,19 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1782918843, + "narHash": "sha256-mFP086y1bNA1g9AsY/pCue3H3W2R7ayroHyRbZrcMf0=", + "rev": "e8273b29fe1390ec8d4603f2477357555291432e", + "type": "tarball", + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1025900.e8273b29fe13/nixexprs.tar.xz" + }, + "original": { + "type": "tarball", + "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1746378225, "narHash": "sha256-OeRSuL8PUjIfL3Q0fTbNJD/fmv1R+K2JAOqWJd3Oceg=", @@ -248,7 +261,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1769461804, "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", @@ -264,7 +277,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1783224372, "narHash": "sha256-8i/87eeoqiGE4yOTjwSA3Eh/ziJRQEmd/unYU+K27sk=", @@ -280,7 +293,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1783224372, "narHash": "sha256-8i/87eeoqiGE4yOTjwSA3Eh/ziJRQEmd/unYU+K27sk=", @@ -304,7 +317,7 @@ "hm": "hm", "mc": "mc", "niri": "niri", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_6" } }, "systems": { diff --git a/flake.nix b/flake.nix index 4e43887..10f586b 100644 --- a/flake.nix +++ b/flake.nix @@ -12,10 +12,7 @@ niri.url = "github:sodiboo/niri-flake"; mc.url = "github:Infinidoge/nix-minecraft"; - cp = { - url = "github:9001/copyparty"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + cp.url = "github:9001/copyparty"; }; outputs = inputs: let diff --git a/modules/system/homelab/mc/mc0-vanilla-plus.nix b/modules/system/homelab/mc/mc0-vanilla-plus.nix index bbcc0e0..79f86bc 100644 --- a/modules/system/homelab/mc/mc0-vanilla-plus.nix +++ b/modules/system/homelab/mc/mc0-vanilla-plus.nix @@ -18,7 +18,7 @@ in { }; services.minecraft-servers.servers.${name} = { - enable = false; + enable = true; autoStart = true; restart = "always"; From b3e154a0b63e9f20784354871d8dc75efb7beb30 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 12 Jul 2026 11:49:30 +0700 Subject: [PATCH 169/224] copyparty package change --- modules/system/homelab/cdn.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/system/homelab/cdn.nix b/modules/system/homelab/cdn.nix index 85b4537..7ec0b81 100644 --- a/modules/system/homelab/cdn.nix +++ b/modules/system/homelab/cdn.nix @@ -1,6 +1,5 @@ { inputs, pkgs, ... }: { environment.systemPackages = with pkgs; [ copyparty-most ]; - nixpkgs.overlays = [ inputs.cp.overlays.default ]; imports = [ inputs.cp.nixosModules.default ]; systemd.services.copyparty = { @@ -9,7 +8,7 @@ after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { - ExecStart = "${pkgs.copyparty}/bin/copyparty -c /mnt/share/cfg/files.conf"; + ExecStart = "${pkgs.copyparty-most}/bin/copyparty -c /mnt/share/cfg/files.conf"; Restart = "on-failure"; }; }; From 8a16b161d9cd060380839c9be29ac1053d8f9f3b Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 12 Jul 2026 11:52:04 +0700 Subject: [PATCH 170/224] extra user groups --- modules/system/user.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/system/user.nix b/modules/system/user.nix index 5f50a54..74a8b45 100644 --- a/modules/system/user.nix +++ b/modules/system/user.nix @@ -17,6 +17,8 @@ "plugdev" "adbusers" "kvm" + "video" + "render" ]; }; } From 85c19f8b433a1fde5e1685a2e96660a834f1a491 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 12 Jul 2026 11:52:57 +0700 Subject: [PATCH 171/224] nix ld --- modules/system/desktop.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/system/desktop.nix b/modules/system/desktop.nix index 04cb286..ec264eb 100644 --- a/modules/system/desktop.nix +++ b/modules/system/desktop.nix @@ -11,6 +11,12 @@ ]; programs = { + nix-ld = { + enable = true; + libraries = with pkgs; [ + libxcursor libx11 libxi libxkbcommon + ]; + }; niri = { enable = true; package = pkgs.niri-unstable; From 309ef2ecfe61a55f93f0c7bb6ac0d3dbc5aa6e9f Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 12 Jul 2026 12:14:08 +0700 Subject: [PATCH 172/224] cursor fix --- modules/home/rice/cursor.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/home/rice/cursor.nix b/modules/home/rice/cursor.nix index d2f0963..293907a 100644 --- a/modules/home/rice/cursor.nix +++ b/modules/home/rice/cursor.nix @@ -2,9 +2,10 @@ catppuccin.cursors.enable = false; # managed manually below to use the "Light" cursor variant home.pointerCursor = { + enable = true; gtk.enable = true; package = pkgs.catppuccin-cursors."${ctp-opt.flavor}Light"; name = lib.mkOverride 30 "catppuccin-${ctp-opt.flavor}-light-cursors"; size = 24; }; -} \ No newline at end of file +} From 595e177ea8a4245056117650f351d6a5c4631ba8 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 12 Jul 2026 12:11:55 +0700 Subject: [PATCH 173/224] fix throttled dbus fail --- modules/hardware/thinkpad.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/hardware/thinkpad.nix b/modules/hardware/thinkpad.nix index f7e193a..c976402 100644 --- a/modules/hardware/thinkpad.nix +++ b/modules/hardware/thinkpad.nix @@ -28,6 +28,13 @@ "nvme_core.default_ps_max_latency_us=0" ]; }; + nixpkgs.overlays = [ + (final: prev: { + throttled = prev.throttled.overrideAttrs (old: { + pythonPath = (old.pythonPath or []) ++ [ final.python3Packages.dbus-next ]; + }); + }) + ]; hardware.bluetooth = { enable = true; powerOnBoot = false; From fe1820fdb88b6cb4a02d2c7402f2b735790ed43b Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 12 Jul 2026 12:16:39 +0700 Subject: [PATCH 174/224] fix typo --- modules/home/rice/keybinds.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/rice/keybinds.nix b/modules/home/rice/keybinds.nix index 0f00ca9..99f5405 100644 --- a/modules/home/rice/keybinds.nix +++ b/modules/home/rice/keybinds.nix @@ -54,7 +54,7 @@ "Mod+V".action.spawn = [ "rofi" "-modi" "clipboard:cliphist-rofi-img" "-show" "clipboard" "-show-icons" ]; "Mod+A".action.spawn = [ "zeditor" ]; "Mod+C".action.spawn = [ "kitty" "btop" ]; - "Mod+Shift+F".action.spawn-sh = "${lib.getExe pkgs.labwc} $$ WAYLAND_DISPLAY=wayland-1 ${lib.getExe pkgs.kitty}"; + "Mod+Shift+F".action.spawn-sh = "${lib.getExe pkgs.labwc} & WAYLAND_DISPLAY=wayland-1 ${lib.getExe pkgs.kitty}"; "Mod+Shift+C".action.spawn = [ "kitty" "zsh" "-c" "fastfetch; exec zsh -i" ]; "Mod+Shift+D".action.spawn = [ "steam" "-system-composer" "steam://open/bigpicture" ]; "Mod+D".action.spawn = [ "prismlauncher" ]; From 2e44ab13f46c2b657c18c15b793a21ed3b1f7d1d Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 12 Jul 2026 15:02:02 +0700 Subject: [PATCH 175/224] labwc fallback for x11 --- modules/home/rice/keybinds.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/home/rice/keybinds.nix b/modules/home/rice/keybinds.nix index 99f5405..8e01baa 100644 --- a/modules/home/rice/keybinds.nix +++ b/modules/home/rice/keybinds.nix @@ -54,7 +54,8 @@ "Mod+V".action.spawn = [ "rofi" "-modi" "clipboard:cliphist-rofi-img" "-show" "clipboard" "-show-icons" ]; "Mod+A".action.spawn = [ "zeditor" ]; "Mod+C".action.spawn = [ "kitty" "btop" ]; - "Mod+Shift+F".action.spawn-sh = "${lib.getExe pkgs.labwc} & WAYLAND_DISPLAY=wayland-1 ${lib.getExe pkgs.kitty}"; + "Mod+Shift+T".action.spawn-sh = "WAYLAND_DISPLAY=wayland-0 ${lib.getExe pkgs.kitty}"; + "Mod+Shift+F".action.spawn = [ (lib.getExe pkgs.labwc) ]; "Mod+Shift+C".action.spawn = [ "kitty" "zsh" "-c" "fastfetch; exec zsh -i" ]; "Mod+Shift+D".action.spawn = [ "steam" "-system-composer" "steam://open/bigpicture" ]; "Mod+D".action.spawn = [ "prismlauncher" ]; From 1d6b887eaaf9a0e917b3806a89d6278616eb9f7d Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 12 Jul 2026 15:02:12 +0700 Subject: [PATCH 176/224] alias tweaks --- modules/home/core/shell.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/home/core/shell.nix b/modules/home/core/shell.nix index a8d0e67..a26d6d1 100644 --- a/modules/home/core/shell.nix +++ b/modules/home/core/shell.nix @@ -49,8 +49,6 @@ "fetch-update" ="rm -f ~/.fetch.sh && wget https://raw.githubusercontent.com/SX-9/fetch.sh/master/fetch.sh -O ~/.fetch.sh && chmod +x ~/.fetch.sh"; "fetch" = "~/.fetch.sh"; - "hm-sw" = "home-manager switch -b bak-hm --flake"; - "nix-sw" = "sudo nixos-rebuild switch --flake"; "nix-hw-conf" = "nixos-generate-config --show-hardware-config"; "nixos-diff" = "nix build .#nixosConfigurations.$(hostname).config.system.build.toplevel -o /tmp/nix-flake-diff && nvd diff /run/current-system /tmp/nix-flake-diff"; "cd-conf" = "cd ${flake-path}"; @@ -66,6 +64,8 @@ "gh-author-setup" = "git config user.name $(gh api -H \"Accept: application/vnd.github+json\" -H \"X-GitHub-Api-Version: 2022-11-28\" /user | jq -r .login) && git config user.email $(gh api -H \"Accept: application/vnd.github+json\" -H \"X-GitHub-Api-Version: 2022-11-28\" /user/emails | jq -r \".[1].email\")"; "fg-create-repo" = "git remote add origin ${git.server}/${git.username}/$(basename $PWDw).git && git push"; "convert-pdf" = "libreoffice --headless --convert-to pdf"; + "nix-fetch-hash" = "nix store prefetch-url --json"; + "git-fix" = "git rebase --continue"; "mcl" = "portablemc start -l $(cat ~/.minecraft/portablemc-launch-params.json | jq -r .email) $(cat ~/.minecraft/portablemc-launch-params.json | jq -r .version) --jvm-args=-Xmx6G"; "mc" = "ferium upgrade; mcl"; From e90b71760fdfecfc197ad34cebb6539726cc0685 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 12 Jul 2026 15:05:12 +0700 Subject: [PATCH 177/224] use raw script --- flake.lock | 82 +++++++--------------------------- flake.nix | 1 - modules/system/homelab/cdn.nix | 14 +++--- 3 files changed, 25 insertions(+), 72 deletions(-) diff --git a/flake.lock b/flake.lock index 19c0928..da78932 100644 --- a/flake.lock +++ b/flake.lock @@ -1,27 +1,8 @@ { "nodes": { - "cp": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1783637983, - "narHash": "sha256-zKYemA+ZGFiW7ac5+9w8FEounKLt4eOb7HI17wp1Rxs=", - "owner": "9001", - "repo": "copyparty", - "rev": "96bafb8f4af83bb7473b75e4b77ab8e1445e6b46", - "type": "github" - }, - "original": { - "owner": "9001", - "repo": "copyparty", - "type": "github" - } - }, "ctp": { "inputs": { - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" }, "locked": { "lastModified": 1783545128, @@ -54,21 +35,6 @@ } }, "flake-utils": { - "locked": { - "lastModified": 1678901627, - "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { "inputs": { "systems": "systems" }, @@ -88,8 +54,8 @@ }, "gl": { "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_3" + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1762090880, @@ -129,7 +95,7 @@ "mc": { "inputs": { "flake-compat": "flake-compat", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "systems": "systems_2" }, "locked": { @@ -150,7 +116,7 @@ "inputs": { "niri-stable": "niri-stable", "niri-unstable": "niri-unstable", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_4", "nixpkgs-stable": "nixpkgs-stable", "xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-unstable": "xwayland-satellite-unstable" @@ -204,17 +170,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1767313136, - "narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d", - "type": "github" + "lastModified": 1782918843, + "narHash": "sha256-mFP086y1bNA1g9AsY/pCue3H3W2R7ayroHyRbZrcMf0=", + "rev": "e8273b29fe1390ec8d4603f2477357555291432e", + "type": "tarball", + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1025900.e8273b29fe13/nixexprs.tar.xz" }, "original": { - "id": "nixpkgs", - "ref": "nixos-25.05", - "type": "indirect" + "type": "tarball", + "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" } }, "nixpkgs-stable": { @@ -234,19 +198,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1782918843, - "narHash": "sha256-mFP086y1bNA1g9AsY/pCue3H3W2R7ayroHyRbZrcMf0=", - "rev": "e8273b29fe1390ec8d4603f2477357555291432e", - "type": "tarball", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1025900.e8273b29fe13/nixexprs.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1746378225, "narHash": "sha256-OeRSuL8PUjIfL3Q0fTbNJD/fmv1R+K2JAOqWJd3Oceg=", @@ -261,7 +212,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { "lastModified": 1769461804, "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", @@ -277,7 +228,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { "lastModified": 1783224372, "narHash": "sha256-8i/87eeoqiGE4yOTjwSA3Eh/ziJRQEmd/unYU+K27sk=", @@ -293,7 +244,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_5": { "locked": { "lastModified": 1783224372, "narHash": "sha256-8i/87eeoqiGE4yOTjwSA3Eh/ziJRQEmd/unYU+K27sk=", @@ -311,13 +262,12 @@ }, "root": { "inputs": { - "cp": "cp", "ctp": "ctp", "gl": "gl", "hm": "hm", "mc": "mc", "niri": "niri", - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_5" } }, "systems": { diff --git a/flake.nix b/flake.nix index 10f586b..6f756b4 100644 --- a/flake.nix +++ b/flake.nix @@ -12,7 +12,6 @@ niri.url = "github:sodiboo/niri-flake"; mc.url = "github:Infinidoge/nix-minecraft"; - cp.url = "github:9001/copyparty"; }; outputs = inputs: let diff --git a/modules/system/homelab/cdn.nix b/modules/system/homelab/cdn.nix index 7ec0b81..407863e 100644 --- a/modules/system/homelab/cdn.nix +++ b/modules/system/homelab/cdn.nix @@ -1,14 +1,18 @@ -{ inputs, pkgs, ... }: { - environment.systemPackages = with pkgs; [ copyparty-most ]; - imports = [ inputs.cp.nixosModules.default ]; - +{ pkgs, ... }: let + version = "v1.20.18"; + executable = pkgs.fetchurl { + url = "https://github.com/9001/copyparty/releases/download/${version}/copyparty-en.py"; + hash = "sha256-8SBrKaLPat80n8sONKQYFeFSQXUnCYtwcOU7SR52h7E="; + }; +in { systemd.services.copyparty = { description = "File Sharing Service"; enable = true; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { - ExecStart = "${pkgs.copyparty-most}/bin/copyparty -c /mnt/share/cfg/files.conf"; + # ExecStart = "${pkgs.copyparty-most}/bin/copyparty -c /mnt/share/cfg/files.conf"; + ExecStart = "${pkgs.python3}/bin/python3 ${executable} -c /mnt/share/cfg/files.conf"; Restart = "on-failure"; }; }; From 564fc0778f74f770db8f7b2cee39310b335ad271 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 12 Jul 2026 15:06:09 +0700 Subject: [PATCH 178/224] add renovate --- modules/system/homelab/git.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/modules/system/homelab/git.nix b/modules/system/homelab/git.nix index 42048ac..e2ca799 100644 --- a/modules/system/homelab/git.nix +++ b/modules/system/homelab/git.nix @@ -57,6 +57,24 @@ ]; hostPackages = with pkgs; [ bash coreutils git nix openssh bun ]; }; + renovate = { + enable = true; + schedule = "*:0"; # every hour + credentials.RENOVATE_TOKEN = "/mnt/data/apps/renovate/token.env"; + settings = { + platform = "forgejo"; + endpoint = "https://git.${homelab.domain}"; + gitAuthor = "renovate "; + autodiscover = true; + nix.enabled = true; + lockFileMaintenance = { + enabled = true; + commitMessageAction = "update lock file(s)"; + schedule = [ "0 0 * * 0" ]; # weekly + }; + }; + runtimePackages = with pkgs; [ bun nodejs npm nix ]; + }; }; systemd.services = { "gitea-runner-nixos-deploy".restartIfChanged = false; From 005ef5bd18c274bb56bc4a7a158bc67b57bb9bf2 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 12 Jul 2026 15:12:36 +0700 Subject: [PATCH 179/224] fix runtime pkgs --- modules/system/homelab/git.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/git.nix b/modules/system/homelab/git.nix index e2ca799..7db62d1 100644 --- a/modules/system/homelab/git.nix +++ b/modules/system/homelab/git.nix @@ -73,7 +73,7 @@ schedule = [ "0 0 * * 0" ]; # weekly }; }; - runtimePackages = with pkgs; [ bun nodejs npm nix ]; + runtimePackages = with pkgs; [ bun nix ]; }; }; systemd.services = { From f45b30fd282569e732f2d1edf344424e593a731b Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 12 Jul 2026 15:15:07 +0700 Subject: [PATCH 180/224] tweak to every midnight saturday --- modules/system/homelab/git.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/git.nix b/modules/system/homelab/git.nix index 7db62d1..94f6230 100644 --- a/modules/system/homelab/git.nix +++ b/modules/system/homelab/git.nix @@ -70,7 +70,7 @@ lockFileMaintenance = { enabled = true; commitMessageAction = "update lock file(s)"; - schedule = [ "0 0 * * 0" ]; # weekly + schedule = [ "0 0 * * 6" ]; # weekly, start of weekend (Saturday) }; }; runtimePackages = with pkgs; [ bun nix ]; From 7ea7a14cf4ec40c5bb3f4e83438edf9d35095331 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 12 Jul 2026 15:16:50 +0700 Subject: [PATCH 181/224] fix cron --- modules/system/homelab/git.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/git.nix b/modules/system/homelab/git.nix index 94f6230..e2a2c2e 100644 --- a/modules/system/homelab/git.nix +++ b/modules/system/homelab/git.nix @@ -70,7 +70,7 @@ lockFileMaintenance = { enabled = true; commitMessageAction = "update lock file(s)"; - schedule = [ "0 0 * * 6" ]; # weekly, start of weekend (Saturday) + schedule = [ "* 0 * * 6" ]; # weekly, midnight Saturday }; }; runtimePackages = with pkgs; [ bun nix ]; From 526406b9828591bda78f693df1f0c801bf54b651 Mon Sep 17 00:00:00 2001 From: renovate Date: Sun, 12 Jul 2026 15:27:10 +0700 Subject: [PATCH 182/224] Add renovate.json --- renovate.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 renovate.json diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..7190a60 --- /dev/null +++ b/renovate.json @@ -0,0 +1,3 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json" +} From 6b27d852ff3320913c810614ec9a29ee762f7557 Mon Sep 17 00:00:00 2001 From: renovate Date: Sat, 18 Jul 2026 00:01:20 +0700 Subject: [PATCH 183/224] update lock file(s) --- flake.lock | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/flake.lock b/flake.lock index da78932..1b69fe1 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1783545128, - "narHash": "sha256-APzF91kOgKOHwx/KRu7710A8MYihVtKmUbjK5dAIltc=", + "lastModified": 1783674541, + "narHash": "sha256-vmUhEF/jBCZJeK0dInOls+HOAR0yiiQusN1+FZKaJss=", "owner": "catppuccin", "repo": "nix", - "rev": "28731a367cfd8fb1eaec31d72bb75fee43971db4", + "rev": "96799f24cf1366fe88e1293c3d27521a8f2129cf", "type": "github" }, "original": { @@ -78,11 +78,11 @@ ] }, "locked": { - "lastModified": 1783550008, - "narHash": "sha256-qbbZUk9IG9dLNwCPwdPBs6I5clxwugRpP+1YU+GPK20=", + "lastModified": 1784129366, + "narHash": "sha256-N5JiyICSeQF14x+OQebNyPpYowOT9Rs1iKyeCylSzOA=", "owner": "nix-community", "repo": "home-manager", - "rev": "f4d01c1d87c7c2ec909549165d5a8338f1bd3315", + "rev": "165228b0efefc3e635e5174020c40ea64271dc25", "type": "github" }, "original": { @@ -99,11 +99,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1783481424, - "narHash": "sha256-nUhKyzWO6YiyeTA+M/dNDGT2eLp8t5KIij8oIPlIUnw=", + "lastModified": 1784258664, + "narHash": "sha256-/1hkRunsSzVmbKKIS84k09ss8kqvNG/gYKqnIOUGkXA=", "owner": "Infinidoge", "repo": "nix-minecraft", - "rev": "c0e5c94056ff42c1671aac5398c5d71df39c4e74", + "rev": "0d9d58d2024d823ea167503e26d38a16be0d1e26", "type": "github" }, "original": { @@ -122,11 +122,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1783526091, - "narHash": "sha256-Zkkil0e8Wg5BcBmJkWJwBXlETefYQbYKw72xJUIBPLE=", + "lastModified": 1784189744, + "narHash": "sha256-D8oh9imibOynWAOUnvgG3w2EKDYqf8OTTaLCcTA4ePg=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "a24d4c0dce53fd8dbeb9ad20411e282c7b9875f1", + "rev": "f4b479398c967d2c8d5a38b6d2c87283ae5078c4", "type": "github" }, "original": { @@ -170,11 +170,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1782918843, - "narHash": "sha256-mFP086y1bNA1g9AsY/pCue3H3W2R7ayroHyRbZrcMf0=", - "rev": "e8273b29fe1390ec8d4603f2477357555291432e", + "lastModified": 1783279667, + "narHash": "sha256-2l8yOB5aYd+05Q9V9Y1YhgbSa1j1o5QX+nvYs5FL80A=", + "rev": "f205b5574fd0cb7da5b702a2da51507b7f4fdd1b", "type": "tarball", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1025900.e8273b29fe13/nixexprs.tar.xz" + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1028110.f205b5574fd0/nixexprs.tar.xz" }, "original": { "type": "tarball", @@ -230,11 +230,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1783224372, - "narHash": "sha256-8i/87eeoqiGE4yOTjwSA3Eh/ziJRQEmd/unYU+K27sk=", + "lastModified": 1784120854, + "narHash": "sha256-KesHgItiZPgGX740axSiQLcIQ8D24MDqNpkKYWIek8k=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d407951447dcd00442e97087bf374aad70c04cea", + "rev": "753cc8a3a87467296ddd1fa93f0cc3e81120ee46", "type": "github" }, "original": { @@ -246,11 +246,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1783224372, - "narHash": "sha256-8i/87eeoqiGE4yOTjwSA3Eh/ziJRQEmd/unYU+K27sk=", + "lastModified": 1784120854, + "narHash": "sha256-KesHgItiZPgGX740axSiQLcIQ8D24MDqNpkKYWIek8k=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d407951447dcd00442e97087bf374aad70c04cea", + "rev": "753cc8a3a87467296ddd1fa93f0cc3e81120ee46", "type": "github" }, "original": { @@ -320,11 +320,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1781226823, - "narHash": "sha256-28696iIw8uE0ZUyFTtzhEM8xMh85clCYypMxkvUi+sc=", + "lastModified": 1783895132, + "narHash": "sha256-Dl0Gvrig3EpE962hzF3ETPhUztlfuRhcmlpd8ioHN54=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "8575d0ef55d70f9b4c46b6bffb3accf912217e1e", + "rev": "a2b5c635d8c8c99b286967658d0d177044887eb8", "type": "github" }, "original": { From 4c902d0dcbf81e7a35820aa9bfb9f7fb40d5f833 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 18 Jul 2026 18:34:34 +0700 Subject: [PATCH 184/224] mc server update and new aeronautics server (modpack in progress) --- .../system/homelab/mc/mc0-vanilla-plus.nix | 11 +- .../system/homelab/mc/mc1-pure-vanilla.nix | 8 +- .../homelab/mc/mc2-create-aeronautics.nix | 120 ++++++++++++++++++ 3 files changed, 134 insertions(+), 5 deletions(-) create mode 100644 modules/system/homelab/mc/mc2-create-aeronautics.nix diff --git a/modules/system/homelab/mc/mc0-vanilla-plus.nix b/modules/system/homelab/mc/mc0-vanilla-plus.nix index 79f86bc..5240835 100644 --- a/modules/system/homelab/mc/mc0-vanilla-plus.nix +++ b/modules/system/homelab/mc/mc0-vanilla-plus.nix @@ -3,6 +3,11 @@ ram-allocation-mb = 8192; headroom-allocation-mb = 1024; rcon-pass = "howdy"; + ports = { + minecraft = 25565; + rcon = 25575; + }; + modpack = let useLatest = false; commit = "86bf13316ed1352a676d9056d284448ea5e5a079"; @@ -18,13 +23,13 @@ in { }; services.minecraft-servers.servers.${name} = { - enable = true; + enable = false; autoStart = true; restart = "always"; serverProperties = { server-ip = "0.0.0.0"; - server-port = 25565; + server-port = ports.minecraft; server-name = name; motd = "§cCan't connect to server"; log-ips = false; @@ -49,7 +54,7 @@ in { enable-rcon = true; sync-chunk-writes = false; "rcon.password" = rcon-pass; - "rcon.port" = 25575; + "rcon.port" = ports.rcon; }; symlinks = inputs.mc.lib.collectFilesAt modpack "mods" // { diff --git a/modules/system/homelab/mc/mc1-pure-vanilla.nix b/modules/system/homelab/mc/mc1-pure-vanilla.nix index 6b64a85..9268e35 100644 --- a/modules/system/homelab/mc/mc1-pure-vanilla.nix +++ b/modules/system/homelab/mc/mc1-pure-vanilla.nix @@ -3,6 +3,10 @@ ram-allocation-mb = 8192; headroom-allocation-mb = 1024; rcon-pass = "howdy"; + ports = { + minecraft = 25566; + rcon = 25576; + }; modpack = pkgs.fetchModrinthModpack { url = "https://cdn.modrinth.com/data/2wkV8mHp/versions/mFGJP1Ye/Server%20Optimization%201.21.11-2.1.mrpack"; @@ -17,7 +21,7 @@ in { serverProperties = { server-ip = "0.0.0.0"; - server-port = 25566; + server-port = ports.minecraft; server-name = name; motd = "§cCan't connect to server"; log-ips = false; @@ -42,7 +46,7 @@ in { enable-rcon = true; sync-chunk-writes = false; "rcon.password" = rcon-pass; - "rcon.port" = 25576; + "rcon.port" = ports.rcon; }; files = inputs.mc.lib.collectFilesAt modpack "config"; diff --git a/modules/system/homelab/mc/mc2-create-aeronautics.nix b/modules/system/homelab/mc/mc2-create-aeronautics.nix new file mode 100644 index 0000000..0e557c7 --- /dev/null +++ b/modules/system/homelab/mc/mc2-create-aeronautics.nix @@ -0,0 +1,120 @@ +{ inputs, lib, pkgs, ... }: let + name = "mc2-create-aeronautics"; + ram-allocation-mb = 12288; + headroom-allocation-mb = 2048; + rcon-pass = "howdy"; + ports = { + minecraft = 25567; + rcon = 25577; + }; + + modpack = let + useLatest = true; + commit = ""; + path = if !useLatest then "commit/${commit}" else "branch/main"; + in pkgs.fetchPackwizModpack { + packHash = ""; + url = "https://git.satr14.my.id/satr14/create-modpack/raw/${path}/pack.toml"; + }; +in { + systemd.services."minecraft-server-${name}" = { + environment.LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib"; # physics toys mod fix + # serviceConfig.Nice = -5; # higher scheduling priority (causes fan noise even when idle) + }; + + services.minecraft-servers.servers.${name} = { + enable = true; + autoStart = true; + restart = "always"; + + serverProperties = { + server-ip = "0.0.0.0"; + server-port = ports.minecraft; + server-name = name; + motd = "§cCan't connect to server"; + log-ips = false; + hide-online-players = true; + + difficulty = "normal"; + gamemode = "survival"; + max-world-size = 25000; + spawn-protection = 0; + pvp = true; + + online-mode = true; + enable-query = true; + enforce-secure-profile = false; + pevent-proxy-connections = false; + allow-flight = false; + player-idle-timeout = 0; + + view-distance = 12; + simulation-distance = 6; + + enable-rcon = true; + sync-chunk-writes = false; + "rcon.password" = rcon-pass; + "rcon.port" = ports.rcon; + }; + + symlinks = inputs.mc.lib.collectFilesAt modpack "mods" // { + "polymer/packsquash" = let packsquash-binary = pkgs.runCommand "packsquash" { + src = pkgs.fetchurl { + url = "https://github.com/ComunidadAylas/PackSquash/releases/download/v0.4.1/packsquash-x86_64-unknown-linux-gnu.zip"; + sha256 = "sha256-VsGZewoiO5MjhIhwjlLO5d5uHynlAK5Jh16jH2k2rPs="; + }; + nativeBuildInputs = [ pkgs.unzip ]; + } '' + mkdir -p $out/bin + unzip $src -d $out/bin + chmod +x $out/bin/packsquash + ''; in "${packsquash-binary}/bin/packsquash"; + }; + + files = inputs.mc.lib.collectFilesAt modpack "config" // { + "config/proxy_protocol_support.json".value = { + enableProxyProtocol = false; # polymer auto host has issues with proxy protocol + whitelistTCPShieldServers = false; + proxyServerIPs = [ "127.0.0.1" "::1" ]; + directAccessIPs = [ "127.0.0.0/8" "::1/128" ]; + }; + }; + + extraStartPre = let sed-commands = lib.concatStringsSep "\n" ( + lib.mapAttrsToList (substitution: file: + ''sed -i "s|${substitution}|''${${substitution}}|g" ${file}'' + ) { + "REPLACE_SVC_HOST" = "config/voicechat/voicechat-server.properties"; + "REPLACE_RP_LINK" = "config/welcomemessage.json5"; + "REPLACE_DC_BOT_TOKEN" = "config/simple-discord-link/simple-discord-link.toml"; + "REPLACE_DC_OWNER_ROLE" = "config/simple-discord-link/simple-discord-link.toml"; + } + ); in '' + # shellcheck disable=SC1091 + if [ -f modpack-config.env ]; then + source modpack-config.env + ${sed-commands} + fi + ''; + + package = pkgs.fabricServers.fabric-1_21_11.override { + jre_headless = pkgs.javaPackages.compiler.temurin-bin.jdk-25; + loaderVersion = "0.19.2"; + }; + + jvmOpts = let flags = [ + "-Xms${toString ram-allocation-mb}M" + "-Xmx${toString ram-allocation-mb}M" + + "-XX:+UseZGC" # Use ZGC (requires Java v25+, 8+ CPU cores, 10GB+ RAM) + "-XX:+ZGenerational" # Use generational ZGC (newer and better ZGC, requires Java v21+) + "-XX:+UseCompactObjectHeaders" # Use compact object headers (requires Java v16+, saves a couple of bits per object) + + "--add-modules=jdk.incubator.vector" # Exposes SIMD instructions (requires full JDK, useful with performance mods like C2ME) + "-XX:+AlwaysPreTouch" # Pre-allocates memory on startup, OS claims it immediately for JVM instead of negotiating it + "-XX:+DisableExplicitGC" # Disables mods from manually invoking the GC + "-XX:+PerfDisableSharedMem" # Disables constant /tmp writes for JVM metrics + "-XX:SoftMaxHeapSize=${toString (ram-allocation-mb - headroom-allocation-mb)}M" # Leave 2GB headroom + ]; in lib.concatStringsSep " " flags; + }; +} \ No newline at end of file From 610183cd85c9413e3d1fd380e172836443fe9fc6 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 18 Jul 2026 18:34:48 +0700 Subject: [PATCH 185/224] keybind tweaks and additions --- modules/home/rice/keybinds.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/home/rice/keybinds.nix b/modules/home/rice/keybinds.nix index 8e01baa..a738878 100644 --- a/modules/home/rice/keybinds.nix +++ b/modules/home/rice/keybinds.nix @@ -10,8 +10,9 @@ "Mod+Q".action.close-window = {}; "Mod+W".action.maximize-column = {}; "Mod+S".action.fullscreen-window = {}; - "Alt+Print".action.screenshot-window = {}; - "Print".action.screenshot-screen = {}; + "Ctrl+Print".action.screenshot-window = {}; + "Alt+Print".action.screenshot-screen = {}; + "Print".action.screenshot = {}; "Mod+Up".action.focus-workspace-up = {}; "Mod+Down".action.focus-workspace-down = {}; @@ -30,7 +31,8 @@ "Alt+Space".action.toggle-overview = {}; "Mod+Space" = { action.spawn = [ "playerctl" "play-pause" ]; allow-when-locked = true; }; - "Mod+R".action.spawn = [ "rofi" "-show" "drun" "-show-icons" "-display-drun" "" "-run-command" "uwsm app -- {cmd}" ]; + "Mod+R".action.spawn = [ "rofi" "-show" "drun" "-show-icons" "-display-drun" "" "-run-command" "{cmd}" ]; + "Mod+Shift+R".action.spawn = [ "rofi" "-show" "drun" "-show-icons" "-display-drun" "wayland-0" "-run-command" "sh -c 'WAYLAND_DISPLAY=wayland-0 DISPLAY=:1 exec {cmd}'" ]; "Mod+E".action.spawn = [ "pcmanfm-qt" ]; "Mod+T".action.spawn = [ "kitty" ]; From 7b9ce69c76c752eb41efa47a0c463922151d4f44 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 18 Jul 2026 18:52:01 +0700 Subject: [PATCH 186/224] LOCK IN: disable all distractions --- modules/home/core/apps.nix | 7 ++++--- modules/system/homelab/dns.nix | 8 ++++++++ modules/system/homelab/mc/default.nix | 3 ++- modules/system/homelab/media.nix | 3 ++- modules/system/misc/programs.nix | 3 ++- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/modules/home/core/apps.nix b/modules/home/core/apps.nix index 214a70c..736f4a8 100644 --- a/modules/home/core/apps.nix +++ b/modules/home/core/apps.nix @@ -45,8 +45,9 @@ gpu-screen-recorder gpu-screen-recorder-gtk - (prismlauncher.override { - jdks = with javaPackages.compiler.temurin-bin; [ jre-21 jdk-25 ]; - }) + # LOCK IN + # (prismlauncher.override { + # jdks = with javaPackages.compiler.temurin-bin; [ jre-21 jdk-25 ]; + # }) ]; } diff --git a/modules/system/homelab/dns.nix b/modules/system/homelab/dns.nix index a1ddbb3..4f208da 100644 --- a/modules/system/homelab/dns.nix +++ b/modules/system/homelab/dns.nix @@ -21,6 +21,13 @@ whitelist = [ "https://gist.githubusercontent.com/mul14/eb05e88fcec5bb195cbb/raw/75a1fe122a4502e8d5a5268c9d0ec28332b19d5d/hosts" ]; + blocked = [ + # LOCK IN + "instagram" + "youtube" + "minecraft" + "steam" + ]; in { services.adguardhome = { enable = true; @@ -31,6 +38,7 @@ in { dns = { upstream_dns = [ "https://security.cloudflare-dns.com/dns-query" ]; bootstrap_dns = [ "1.1.1.2" "1.0.0.2" ]; + blocked_services = blocked; }; querylog = { interval = "2160h"; diff --git a/modules/system/homelab/mc/default.nix b/modules/system/homelab/mc/default.nix index ae55545..2217a08 100644 --- a/modules/system/homelab/mc/default.nix +++ b/modules/system/homelab/mc/default.nix @@ -10,7 +10,8 @@ boot.kernel.sysctl."vm.swappiness" = 10; # reduce swap usage and keep memory performance smooth services.minecraft-servers = { - enable = true; + # LOCK IN + enable = false; eula = true; managementSystem.systemd-socket.enable = true; # ^^^ https://github.com/Infinidoge/nix-minecraft/issues/119 diff --git a/modules/system/homelab/media.nix b/modules/system/homelab/media.nix index 0c7a17f..8274d1e 100644 --- a/modules/system/homelab/media.nix +++ b/modules/system/homelab/media.nix @@ -4,7 +4,8 @@ ]; services = { jellyfin = { - enable = true; + # LOCK IN + enable = false; dataDir = "/mnt/data/apps/jellyfin"; hardwareAcceleration = { enable = true; diff --git a/modules/system/misc/programs.nix b/modules/system/misc/programs.nix index 778858b..acc3a7e 100644 --- a/modules/system/misc/programs.nix +++ b/modules/system/misc/programs.nix @@ -16,7 +16,8 @@ }; programs = { - steam.enable = true; + # LOCK IN + # steam.enable = true; gdk-pixbuf.modulePackages = [ pkgs.librsvg ]; appimage = { enable = true; From 8953a22954b3364e45dd2cba4d9fa8ef79ccd3b8 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 18 Jul 2026 18:57:56 +0700 Subject: [PATCH 187/224] extra aliases --- modules/home/core/shell.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/home/core/shell.nix b/modules/home/core/shell.nix index a26d6d1..70dab70 100644 --- a/modules/home/core/shell.nix +++ b/modules/home/core/shell.nix @@ -61,6 +61,9 @@ "wm-lock" = "wm-ctl dispatch exec loginctl lock-session && notify-send ${hostname} 'Manual lock triggered'"; "wm-disp" = "wm-ctl dispatch dpms"; + "gz-compress" = "tar -czhf"; + "gz-extract" = "tar -xzf"; + "gh-author-setup" = "git config user.name $(gh api -H \"Accept: application/vnd.github+json\" -H \"X-GitHub-Api-Version: 2022-11-28\" /user | jq -r .login) && git config user.email $(gh api -H \"Accept: application/vnd.github+json\" -H \"X-GitHub-Api-Version: 2022-11-28\" /user/emails | jq -r \".[1].email\")"; "fg-create-repo" = "git remote add origin ${git.server}/${git.username}/$(basename $PWDw).git && git push"; "convert-pdf" = "libreoffice --headless --convert-to pdf"; From 34f882e95c1919345017a5430f972c1abd81966e Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 18 Jul 2026 19:04:32 +0700 Subject: [PATCH 188/224] fix adguard conf --- modules/system/homelab/dns.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/dns.nix b/modules/system/homelab/dns.nix index 4f208da..3fd1acc 100644 --- a/modules/system/homelab/dns.nix +++ b/modules/system/homelab/dns.nix @@ -38,7 +38,7 @@ in { dns = { upstream_dns = [ "https://security.cloudflare-dns.com/dns-query" ]; bootstrap_dns = [ "1.1.1.2" "1.0.0.2" ]; - blocked_services = blocked; + blocked_services.ids = blocked; }; querylog = { interval = "2160h"; From 2ecf41785c0f8359c5460bc2e3b5025c2623289e Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 18 Jul 2026 19:09:48 +0700 Subject: [PATCH 189/224] fix wrong option --- modules/system/homelab/dns.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/dns.nix b/modules/system/homelab/dns.nix index 3fd1acc..ee7e512 100644 --- a/modules/system/homelab/dns.nix +++ b/modules/system/homelab/dns.nix @@ -38,13 +38,13 @@ in { dns = { upstream_dns = [ "https://security.cloudflare-dns.com/dns-query" ]; bootstrap_dns = [ "1.1.1.2" "1.0.0.2" ]; - blocked_services.ids = blocked; }; querylog = { interval = "2160h"; enabled = true; }; filtering = { + blocked_services.ids = blocked; blocking_mode = "null_ip"; protection_enabled = true; safebrowsing_enabled = true; From 4d4ee35941bbfddc04b6f529c14bb099b4a964d1 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 18 Jul 2026 19:18:45 +0700 Subject: [PATCH 190/224] enable polkit --- modules/system/base.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/system/base.nix b/modules/system/base.nix index 2cdea36..49a6995 100644 --- a/modules/system/base.nix +++ b/modules/system/base.nix @@ -17,6 +17,7 @@ environment.localBinInPath = true; security = { + polkit.enable = true; sudo.configFile = '' Defaults insults Defaults passwd_tries = 5 From b2a83760fc8aa83a2550dcdec6459355cae18a55 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 18 Jul 2026 19:52:37 +0700 Subject: [PATCH 191/224] disable hyprland and fix duplicate sunshine --- modules/home/rice/compositor.nix | 1 - modules/system/desktop.nix | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/home/rice/compositor.nix b/modules/home/rice/compositor.nix index 10e0813..1316c62 100644 --- a/modules/home/rice/compositor.nix +++ b/modules/home/rice/compositor.nix @@ -89,7 +89,6 @@ "wl-paste --type image --watch cliphist store" "uwsm app -s s -- waybar &" - "uwsm app -s b -- sunshine &" "uwsm app -s b -- blueman-applet &" "uwsm app -s b -- nm-applet &" "uwsm app -s b -- tailscale systray &" diff --git a/modules/system/desktop.nix b/modules/system/desktop.nix index ec264eb..f1e729d 100644 --- a/modules/system/desktop.nix +++ b/modules/system/desktop.nix @@ -22,7 +22,7 @@ package = pkgs.niri-unstable; }; hyprland = { - enable = true; + enable = false; withUWSM = true; xwayland.enable = true; package = pkgs.hyprland; # if rice.enable then inputs.hl.packages."${pkgs.system}".hyprland else pkgs.hyprland; From 74a739b4e61cf066c5d5ab72a24d41a770ad80cc Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 18 Jul 2026 20:30:35 +0700 Subject: [PATCH 192/224] activation fix --- .forgejo/workflows/activate.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.forgejo/workflows/activate.yml b/.forgejo/workflows/activate.yml index fab8702..29bfb2d 100644 --- a/.forgejo/workflows/activate.yml +++ b/.forgejo/workflows/activate.yml @@ -19,14 +19,24 @@ jobs: echo "$SSH_KEY" > ./ssh/deploy_key chmod 600 ./ssh/deploy_key - - name: Rebuild and switch + - name: Build and set boot configuration run: | ssh -i ./ssh/deploy_key \ -o PasswordAuthentication=no \ -o StrictHostKeyChecking=no \ -o UserKnownHostsFile=/dev/null \ root@localhost \ - "bash -lc 'nixos-rebuild switch --refresh --flake git+http://localhost:5080/satr14/nix-flake#homelab -L'" + "bash -lc 'nixos-rebuild boot --refresh --flake git+http://localhost:5080/satr14/nix-flake#homelab -L'" + + - name: Activate configuration + continue-on-error: true + run: | + ssh -i ./ssh/deploy_key \ + -o PasswordAuthentication=no \ + -o StrictHostKeyChecking=no \ + -o UserKnownHostsFile=/dev/null \ + root@localhost \ + "bash -lc 'setsid nohup /nix/var/nix/profiles/system/bin/switch-to-configuration switch > /var/log/nixos-switch.log 2>&1 < /dev/null & disown'" - name: Notify on failure if: failure() @@ -38,15 +48,6 @@ jobs: -H "Actions: view, Action Runs, https://git.satr14.my.id/${{ github.repository }}/actions?workflow=activate.yml; view, View Commit, https://git.satr14.my.id/${{ github.repository }}/commit/${{ github.sha }}" \ -d "${{ github.event.head_commit.message }}" - # - name: Notify on success - # if: success() - # run: | - # curl -s -X POST https://notify.proxy.satr14.my.id/git-flake-updates \ - # -H "Title: NixOS Homelab Rebuild Succeeded" \ - # -H "Tags: white_check_mark" \ - # -H "Actions: view, View Commit, https://git.satr14.my.id/${{ github.repository }}/commit/${{ github.sha }}" \ - # -d "${{ github.event.head_commit.message }}" - - name: Clean Up if: always() run: rm -f ./ssh/deploy_key \ No newline at end of file From af7663c618cebc96fd5c5f54338bc2f3f8674056 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 18 Jul 2026 20:45:09 +0700 Subject: [PATCH 193/224] add gh copilot cli --- modules/home/core/apps.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/home/core/apps.nix b/modules/home/core/apps.nix index 736f4a8..974a602 100644 --- a/modules/home/core/apps.nix +++ b/modules/home/core/apps.nix @@ -28,6 +28,7 @@ home.packages = with pkgs; [ zed-editor opencode + github-copilot-cli slack discord From 15c912d324834af5e0261c68195b0978ee8f8000 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 19 Jul 2026 06:26:33 +0700 Subject: [PATCH 194/224] cdn thumbnail support --- modules/system/homelab/cdn.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/system/homelab/cdn.nix b/modules/system/homelab/cdn.nix index 407863e..573f55c 100644 --- a/modules/system/homelab/cdn.nix +++ b/modules/system/homelab/cdn.nix @@ -1,18 +1,21 @@ { pkgs, ... }: let - version = "v1.20.18"; - executable = pkgs.fetchurl { + python = pkgs.python3.withPackages (ps: [ ps.pillow ]); + script = let + version = "v1.20.18"; + in pkgs.fetchurl { url = "https://github.com/9001/copyparty/releases/download/${version}/copyparty-en.py"; hash = "sha256-8SBrKaLPat80n8sONKQYFeFSQXUnCYtwcOU7SR52h7E="; - }; + }; in { systemd.services.copyparty = { description = "File Sharing Service"; enable = true; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; + path = [ pkgs.ffmpeg ]; serviceConfig = { # ExecStart = "${pkgs.copyparty-most}/bin/copyparty -c /mnt/share/cfg/files.conf"; - ExecStart = "${pkgs.python3}/bin/python3 ${executable} -c /mnt/share/cfg/files.conf"; + ExecStart = "${python}/bin/python3 ${script} -c /mnt/share/cfg/files.conf"; Restart = "on-failure"; }; }; From 19ac0c1f66d3fa5d6615307f33300f5d56f5322c Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 19 Jul 2026 18:25:26 +0700 Subject: [PATCH 195/224] add copyparty to shell PATH --- modules/system/homelab/cdn.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/system/homelab/cdn.nix b/modules/system/homelab/cdn.nix index 573f55c..f06114a 100644 --- a/modules/system/homelab/cdn.nix +++ b/modules/system/homelab/cdn.nix @@ -6,7 +6,11 @@ url = "https://github.com/9001/copyparty/releases/download/${version}/copyparty-en.py"; hash = "sha256-8SBrKaLPat80n8sONKQYFeFSQXUnCYtwcOU7SR52h7E="; }; + executable = pkgs.writeShellScriptBin "copyparty" '' + exec ${python}/bin/python3 ${scriptSrc} "$@" + ''; in { + environment.systemPackages = [ executable ]; systemd.services.copyparty = { description = "File Sharing Service"; enable = true; From ea1c5b81c5bb51ecc10e9e400092d954f0c87e85 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 19 Jul 2026 18:26:20 +0700 Subject: [PATCH 196/224] fix var naming --- modules/system/homelab/cdn.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/cdn.nix b/modules/system/homelab/cdn.nix index f06114a..2a0c9d1 100644 --- a/modules/system/homelab/cdn.nix +++ b/modules/system/homelab/cdn.nix @@ -7,7 +7,7 @@ hash = "sha256-8SBrKaLPat80n8sONKQYFeFSQXUnCYtwcOU7SR52h7E="; }; executable = pkgs.writeShellScriptBin "copyparty" '' - exec ${python}/bin/python3 ${scriptSrc} "$@" + exec ${python}/bin/python3 ${script} "$@" ''; in { environment.systemPackages = [ executable ]; From bce3e9681838263a95930fc71ebbc530ff1a8b45 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 19 Jul 2026 18:28:46 +0700 Subject: [PATCH 197/224] add argon to deps --- modules/system/homelab/cdn.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/cdn.nix b/modules/system/homelab/cdn.nix index 2a0c9d1..af13867 100644 --- a/modules/system/homelab/cdn.nix +++ b/modules/system/homelab/cdn.nix @@ -1,5 +1,5 @@ { pkgs, ... }: let - python = pkgs.python3.withPackages (ps: [ ps.pillow ]); + python = pkgs.python3.withPackages (ps: with ps; [ pillow argon2 ]); script = let version = "v1.20.18"; in pkgs.fetchurl { From fd452f0f051e4791a4363ad4d04187a9a1c8ff62 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 19 Jul 2026 18:30:35 +0700 Subject: [PATCH 198/224] fix naming --- modules/system/homelab/cdn.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/cdn.nix b/modules/system/homelab/cdn.nix index af13867..cce2941 100644 --- a/modules/system/homelab/cdn.nix +++ b/modules/system/homelab/cdn.nix @@ -1,5 +1,5 @@ { pkgs, ... }: let - python = pkgs.python3.withPackages (ps: with ps; [ pillow argon2 ]); + python = pkgs.python3.withPackages (ps: with ps; [ pillow argon2-cffi ]); script = let version = "v1.20.18"; in pkgs.fetchurl { From 5ca814be31230a5c3a350e78d3cdd4b66f47fb92 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 19 Jul 2026 18:37:10 +0700 Subject: [PATCH 199/224] enable hashing --- modules/system/homelab/cdn.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/cdn.nix b/modules/system/homelab/cdn.nix index cce2941..28925f5 100644 --- a/modules/system/homelab/cdn.nix +++ b/modules/system/homelab/cdn.nix @@ -19,7 +19,7 @@ in { path = [ pkgs.ffmpeg ]; serviceConfig = { # ExecStart = "${pkgs.copyparty-most}/bin/copyparty -c /mnt/share/cfg/files.conf"; - ExecStart = "${python}/bin/python3 ${script} -c /mnt/share/cfg/files.conf"; + ExecStart = "${python}/bin/python3 ${script} --ah-alg argon2 -c /mnt/share/cfg/files.conf"; Restart = "on-failure"; }; }; From c609d530627c35d4446bf3a14fa43093a17d6f44 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 19 Jul 2026 20:01:53 +0700 Subject: [PATCH 200/224] add fix --- modules/system/homelab/gallery.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/system/homelab/gallery.nix b/modules/system/homelab/gallery.nix index 1b52208..c809408 100644 --- a/modules/system/homelab/gallery.nix +++ b/modules/system/homelab/gallery.nix @@ -1,4 +1,10 @@ { lib, ... }: { + # fix every update causing error: + # > microservices worker error: PostgresError: must be owner of function album_user_after_insert, stack: PostgresError: must be owner of function album_user_after_insert + systemd.services.postgresql.postStart = pkgs.lib.mkAfter '' + $PSQL -d immich -c "ALTER FUNCTION album_user_after_insert() OWNER TO immich;" || true + ''; + users.users.immich.extraGroups = [ "video" "render" ]; services = { From 1bf75d2f1f633ab755bb58654462c5de72faa384 Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 20 Jul 2026 11:18:38 +0700 Subject: [PATCH 201/224] cockpit enable --- modules/system/homelab/control.nix | 9 +++++++++ modules/system/server.nix | 1 + 2 files changed, 10 insertions(+) create mode 100644 modules/system/homelab/control.nix diff --git a/modules/system/homelab/control.nix b/modules/system/homelab/control.nix new file mode 100644 index 0000000..82e55c3 --- /dev/null +++ b/modules/system/homelab/control.nix @@ -0,0 +1,9 @@ +{ homelab, pkgs, ... }: { + services.cockpit = { + enable = true; + allowed-origins = [ "control.${homelab.proxy.base}" ]; + plugins = with pkgs; [ + cockpit-files cockpit-machines + ]; + }; +} \ No newline at end of file diff --git a/modules/system/server.nix b/modules/system/server.nix index 9db8dfa..b59dffe 100644 --- a/modules/system/server.nix +++ b/modules/system/server.nix @@ -11,6 +11,7 @@ in { ./homelab/containers.nix ./homelab/gallery.nix ./homelab/tunnels.nix + ./homelab/control.nix ./homelab/notify.nix ./homelab/search.nix ./homelab/media.nix From bcd8e6e7dedc688eea4e09712ea54411e5d85ae2 Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 20 Jul 2026 11:21:16 +0700 Subject: [PATCH 202/224] fix evaluation error --- modules/system/homelab/gallery.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/gallery.nix b/modules/system/homelab/gallery.nix index c809408..74d2ea2 100644 --- a/modules/system/homelab/gallery.nix +++ b/modules/system/homelab/gallery.nix @@ -1,4 +1,4 @@ -{ lib, ... }: { +{ pkgs, lib, ... }: { # fix every update causing error: # > microservices worker error: PostgresError: must be owner of function album_user_after_insert, stack: PostgresError: must be owner of function album_user_after_insert systemd.services.postgresql.postStart = pkgs.lib.mkAfter '' From b39151dd8e3031d09bdc05939e528b69e0b6802b Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 20 Jul 2026 11:59:20 +0700 Subject: [PATCH 203/224] add proxy entry --- lib/options.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/options.nix b/lib/options.nix index cef1177..3c723a5 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -74,6 +74,7 @@ in { "code" = da "http://localhost:8443"; "dns" = da "http://localhost:8088"; + "control" = d "https://localhost:9090"; "gallery" = d "http://localhost:2283"; "dynamic" = d "http://localhost:8082"; "search" = d "http://localhost:8091"; From 72a2679474c9fd347a550fea674207e064d4a715 Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 20 Jul 2026 18:47:34 +0700 Subject: [PATCH 204/224] cockpit ssl fix --- modules/system/homelab/proxy.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/system/homelab/proxy.nix b/modules/system/homelab/proxy.nix index d977892..5a03057 100644 --- a/modules/system/homelab/proxy.nix +++ b/modules/system/homelab/proxy.nix @@ -8,6 +8,7 @@ proxy_cache off; send_timeout 600s; client_max_body_size 50000M; + proxy_ssl_session_reuse off; ''; in { users.users = { From 3e67b774a3c747ad7d86d2114874c3193b960539 Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 20 Jul 2026 18:48:52 +0700 Subject: [PATCH 205/224] waybar icon fix --- lib/options.nix | 2 +- modules/home/rice/bar.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/options.nix b/lib/options.nix index 3c723a5..b17825f 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -105,7 +105,7 @@ in { }; rice = { - font = "monospace"; # global font for rice GUIs, leave empty to use monospace + font = "DroidSansM Nerd Font"; # global font for rice GUIs, must be a Nerd Font for icon glyphs to render correctly bar = { top = true; # false will put the bar at the bottom fragmented = true; # enable fragmented bar, false will make it a single block diff --git a/modules/home/rice/bar.nix b/modules/home/rice/bar.nix index 4360e9c..cc6b175 100644 --- a/modules/home/rice/bar.nix +++ b/modules/home/rice/bar.nix @@ -180,7 +180,7 @@ style = '' * { font-size: 12px; - font-family: Font Awesome, ${rice.font}; + font-family: ${rice.font}; font-weight: bold; color: @text; transition: none; From 882cc40d54748b2fea55164f97d979b1c1459e64 Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 20 Jul 2026 18:51:08 +0700 Subject: [PATCH 206/224] add cockpit to glance and fully rm cryptpad --- lib/options.nix | 5 +--- modules/system/homelab/docs.nix | 46 --------------------------------- modules/system/server.nix | 1 - 3 files changed, 1 insertion(+), 51 deletions(-) delete mode 100644 modules/system/homelab/docs.nix diff --git a/lib/options.nix b/lib/options.nix index b17825f..55863b8 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -41,7 +41,7 @@ in { [ "PocketID" "authentik" "https://auth.${domain}" "http://localhost:1411/" ] [ "Forgejo" "forgejo" "https://git.${domain}" "http://localhost:5080/" ] [ "Copyparty" "files" "https://cdn.${domain}" "http://localhost:3923/" ] - [ "CryptPad" "cryptpad" "https://docs.${domain}" "http://localhost:7090/" ] + [ "Cockpit" "cockpit" "https://control.${domain}" "http://localhost:9090/" ] [ "CodeServer" "coder" "https://code.proxy.${domain}" "http://localhost:8443/" ] [ "AdGuardHome" "adguard" "https://dns.proxy.${domain}" "http://localhost:8088/" ] [ "Traefik" "traefikproxy" "https://dynamic.proxy.${domain}/dashboard/" "" ] @@ -56,9 +56,6 @@ in { routes = { "mc.${domain}" = "tcp://localhost:25565"; - "docs-sandbox.${domain}" = "http://localhost:7090"; - "docs.${domain}" = "http://localhost:7090"; - "cdn.${domain}" = selfSigned "https://localhost:3923"; "git.${domain}" = "http://localhost:5080"; diff --git a/modules/system/homelab/docs.nix b/modules/system/homelab/docs.nix deleted file mode 100644 index 58d6738..0000000 --- a/modules/system/homelab/docs.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ lib, pkgs, homelab, ... }: let - domain = "docs.${homelab.domain}"; - sandbox = "docs-sandbox.${homelab.domain}"; -in { - services.cryptpad = { - enable = true; - settings = { - websocketPort = 7091; - httpPort = 7090; - httpAddress = "127.0.0.1"; - httpUnsafeOrigin = "https://${domain}"; - httpSafeOrigin = "https://${sandbox}"; - blockDailyCheck = true; - disableIntegratedEviction = true; - adminKeys = [ - "[satr14@docs.satr14.my.id/f1A82fmBuqQka2bNqrCb1WbB9r2ex5A3rdys5xLX3Hc=]" - ]; - }; - }; - - systemd.tmpfiles.rules = lib.singleton "L+ /var/lib/cryptpad/customize/application_config.js - - - - ${pkgs.writeText "cryptpad-application-config.js" '' - (() => { - const factory = (AppConfig) => { - AppConfig.disableAnonymousPadCreation = true; - AppConfig.disableAnonymousStore = true; - AppConfig.defaultDarkTheme = true; - return AppConfig; - }; - - if (typeof(module) !== 'undefined' && module.exports) { - module.exports = factory( - require('../www/common/application_config_internal.js') - ); - } else if ((typeof(define) !== 'undefined' && define !== null) && (define.amd !== null)) { - define(['/common/application_config_internal.js'], factory); - } - })(); - ''}"; - - fileSystems."/var/lib/private/cryptpad" = { - device = "/mnt/data/apps/cryptpad"; - depends = [ "/mnt/data" ]; - options = [ "bind" "nofail" ]; - fsType = "none"; - }; -} diff --git a/modules/system/server.nix b/modules/system/server.nix index b59dffe..7213cdc 100644 --- a/modules/system/server.nix +++ b/modules/system/server.nix @@ -20,7 +20,6 @@ in { ./homelab/pass.nix ./homelab/dash.nix ./homelab/code.nix - ./homelab/docs.nix ./homelab/dns.nix ./homelab/git.nix ./homelab/cdn.nix From 6d7cbb1066b013ec0877368c5bca2b1554d1591a Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 20 Jul 2026 18:52:33 +0700 Subject: [PATCH 207/224] fix domain url --- lib/options.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/options.nix b/lib/options.nix index 55863b8..433cc0b 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -41,7 +41,7 @@ in { [ "PocketID" "authentik" "https://auth.${domain}" "http://localhost:1411/" ] [ "Forgejo" "forgejo" "https://git.${domain}" "http://localhost:5080/" ] [ "Copyparty" "files" "https://cdn.${domain}" "http://localhost:3923/" ] - [ "Cockpit" "cockpit" "https://control.${domain}" "http://localhost:9090/" ] + [ "Cockpit" "cockpit" "https://control.proxy.${domain}" "http://localhost:9090/" ] [ "CodeServer" "coder" "https://code.proxy.${domain}" "http://localhost:8443/" ] [ "AdGuardHome" "adguard" "https://dns.proxy.${domain}" "http://localhost:8088/" ] [ "Traefik" "traefikproxy" "https://dynamic.proxy.${domain}/dashboard/" "" ] From 30f3ef32fadbbab480012615e157d6ec428c8965 Mon Sep 17 00:00:00 2001 From: satr14 Date: Mon, 20 Jul 2026 18:55:44 +0700 Subject: [PATCH 208/224] fix origins --- modules/system/homelab/control.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/homelab/control.nix b/modules/system/homelab/control.nix index 82e55c3..9522910 100644 --- a/modules/system/homelab/control.nix +++ b/modules/system/homelab/control.nix @@ -1,7 +1,7 @@ { homelab, pkgs, ... }: { services.cockpit = { enable = true; - allowed-origins = [ "control.${homelab.proxy.base}" ]; + allowed-origins = [ "https://control.proxy.${homelab.domain}" ]; plugins = with pkgs; [ cockpit-files cockpit-machines ]; From 9daa21567239b3933add540fa43162150dfa6c94 Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 21 Jul 2026 12:43:34 +0700 Subject: [PATCH 209/224] reenable games --- modules/home/core/apps.nix | 6 +++--- modules/system/homelab/dns.nix | 4 ++-- modules/system/homelab/mc/default.nix | 2 +- modules/system/homelab/mc/mc2-create-aeronautics.nix | 2 +- modules/system/homelab/media.nix | 2 +- modules/system/misc/programs.nix | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/home/core/apps.nix b/modules/home/core/apps.nix index 974a602..47614b8 100644 --- a/modules/home/core/apps.nix +++ b/modules/home/core/apps.nix @@ -47,8 +47,8 @@ gpu-screen-recorder-gtk # LOCK IN - # (prismlauncher.override { - # jdks = with javaPackages.compiler.temurin-bin; [ jre-21 jdk-25 ]; - # }) + (prismlauncher.override { + jdks = with javaPackages.compiler.temurin-bin; [ jre-21 jdk-25 ]; + }) ]; } diff --git a/modules/system/homelab/dns.nix b/modules/system/homelab/dns.nix index ee7e512..9eb0004 100644 --- a/modules/system/homelab/dns.nix +++ b/modules/system/homelab/dns.nix @@ -25,8 +25,8 @@ # LOCK IN "instagram" "youtube" - "minecraft" - "steam" + # "minecraft" + # "steam" ]; in { services.adguardhome = { diff --git a/modules/system/homelab/mc/default.nix b/modules/system/homelab/mc/default.nix index 2217a08..09c7e41 100644 --- a/modules/system/homelab/mc/default.nix +++ b/modules/system/homelab/mc/default.nix @@ -11,7 +11,7 @@ services.minecraft-servers = { # LOCK IN - enable = false; + enable = true; eula = true; managementSystem.systemd-socket.enable = true; # ^^^ https://github.com/Infinidoge/nix-minecraft/issues/119 diff --git a/modules/system/homelab/mc/mc2-create-aeronautics.nix b/modules/system/homelab/mc/mc2-create-aeronautics.nix index 0e557c7..03f96f8 100644 --- a/modules/system/homelab/mc/mc2-create-aeronautics.nix +++ b/modules/system/homelab/mc/mc2-create-aeronautics.nix @@ -23,7 +23,7 @@ in { }; services.minecraft-servers.servers.${name} = { - enable = true; + enable = false; autoStart = true; restart = "always"; diff --git a/modules/system/homelab/media.nix b/modules/system/homelab/media.nix index 8274d1e..760d2c4 100644 --- a/modules/system/homelab/media.nix +++ b/modules/system/homelab/media.nix @@ -5,7 +5,7 @@ services = { jellyfin = { # LOCK IN - enable = false; + enable = true; dataDir = "/mnt/data/apps/jellyfin"; hardwareAcceleration = { enable = true; diff --git a/modules/system/misc/programs.nix b/modules/system/misc/programs.nix index acc3a7e..ccdbaa1 100644 --- a/modules/system/misc/programs.nix +++ b/modules/system/misc/programs.nix @@ -17,7 +17,7 @@ programs = { # LOCK IN - # steam.enable = true; + steam.enable = true; gdk-pixbuf.modulePackages = [ pkgs.librsvg ]; appimage = { enable = true; From 4da395076525f9cac7767a73ffb88fcc810d09ee Mon Sep 17 00:00:00 2001 From: satr14 Date: Wed, 22 Jul 2026 18:03:14 +0700 Subject: [PATCH 210/224] fix ctrl backspace --- modules/home/core/cli.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/home/core/cli.nix b/modules/home/core/cli.nix index 9e9b94e..2dc4b10 100644 --- a/modules/home/core/cli.nix +++ b/modules/home/core/cli.nix @@ -30,6 +30,9 @@ cursor_trail = 10; copy_on_select = true; }; + keybindings = { + "ctrl+backspace" = "send_text all \\x17"; + }; }; ranger = { enable = true; From bbfbfc4d183bfc03433c3d58be16def815653272 Mon Sep 17 00:00:00 2001 From: satr14 Date: Wed, 22 Jul 2026 18:12:39 +0700 Subject: [PATCH 211/224] add keybinds --- modules/home/rice/keybinds.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/home/rice/keybinds.nix b/modules/home/rice/keybinds.nix index a738878..00041fe 100644 --- a/modules/home/rice/keybinds.nix +++ b/modules/home/rice/keybinds.nix @@ -23,8 +23,10 @@ "Mod+Shift+Down".action.move-window-down-or-to-workspace-down = {}; "Mod+Shift+Left".action.move-column-left = {}; "Mod+Shift+Right".action.move-column-right = {}; - "Mod+Ctrl+Left".action.set-column-width = [ "-5%" ]; - "Mod+Ctrl+Right".action.set-column-width = [ "+5%" ]; + "Mod+Ctrl+Left".action.set-window-width = [ "-5%" ]; + "Mod+Ctrl+Right".action.set-window-width = [ "+5%" ]; + "Mod+Ctrl+Down".action.set-window-height = [ "+5%" ]; + "Mod+Ctrl+Up".action.set-window-height = [ "-5%" ]; "Mod+G".action.center-column = {}; "Mod+F".action.toggle-window-floating = {}; From 62ede598434a888c67474c02eb6e7cf63741aa73 Mon Sep 17 00:00:00 2001 From: satr14 Date: Thu, 23 Jul 2026 12:37:49 +0700 Subject: [PATCH 212/224] fix polki --- modules/system/base.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/system/base.nix b/modules/system/base.nix index 49a6995..3a20057 100644 --- a/modules/system/base.nix +++ b/modules/system/base.nix @@ -17,7 +17,10 @@ environment.localBinInPath = true; security = { - polkit.enable = true; + polkit = { + enable = true; + enablePkexecWrapper = true; + }; sudo.configFile = '' Defaults insults Defaults passwd_tries = 5 From 22a641b29c6e7ce155a13ae1c9cfbff5391cd070 Mon Sep 17 00:00:00 2001 From: satr14 Date: Thu, 23 Jul 2026 17:35:48 +0700 Subject: [PATCH 213/224] disable plymouth --- modules/system/core/bootloader.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/system/core/bootloader.nix b/modules/system/core/bootloader.nix index cca3d3f..20d65ec 100644 --- a/modules/system/core/bootloader.nix +++ b/modules/system/core/bootloader.nix @@ -1,12 +1,11 @@ { pkgs, legacy-boot, ... }: { boot = { - plymouth.enable = true; loader = { efi.canTouchEfiVariables = true; systemd-boot = { enable = !legacy-boot; configurationLimit = 3; - sortKey = "z-nixos"; + sortKey = "nixos"; editor = false; }; grub = { From a69e94597dd5c169dd2c2e30df7a6a7642c505c3 Mon Sep 17 00:00:00 2001 From: satr14 Date: Thu, 23 Jul 2026 17:36:52 +0700 Subject: [PATCH 214/224] re-lock in --- modules/home/core/apps.nix | 6 +++--- modules/system/homelab/dns.nix | 4 ++-- modules/system/homelab/mc/default.nix | 2 +- modules/system/homelab/media.nix | 1 - modules/system/misc/programs.nix | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/modules/home/core/apps.nix b/modules/home/core/apps.nix index 47614b8..974a602 100644 --- a/modules/home/core/apps.nix +++ b/modules/home/core/apps.nix @@ -47,8 +47,8 @@ gpu-screen-recorder-gtk # LOCK IN - (prismlauncher.override { - jdks = with javaPackages.compiler.temurin-bin; [ jre-21 jdk-25 ]; - }) + # (prismlauncher.override { + # jdks = with javaPackages.compiler.temurin-bin; [ jre-21 jdk-25 ]; + # }) ]; } diff --git a/modules/system/homelab/dns.nix b/modules/system/homelab/dns.nix index 9eb0004..ee7e512 100644 --- a/modules/system/homelab/dns.nix +++ b/modules/system/homelab/dns.nix @@ -25,8 +25,8 @@ # LOCK IN "instagram" "youtube" - # "minecraft" - # "steam" + "minecraft" + "steam" ]; in { services.adguardhome = { diff --git a/modules/system/homelab/mc/default.nix b/modules/system/homelab/mc/default.nix index 09c7e41..2217a08 100644 --- a/modules/system/homelab/mc/default.nix +++ b/modules/system/homelab/mc/default.nix @@ -11,7 +11,7 @@ services.minecraft-servers = { # LOCK IN - enable = true; + enable = false; eula = true; managementSystem.systemd-socket.enable = true; # ^^^ https://github.com/Infinidoge/nix-minecraft/issues/119 diff --git a/modules/system/homelab/media.nix b/modules/system/homelab/media.nix index 760d2c4..0c7a17f 100644 --- a/modules/system/homelab/media.nix +++ b/modules/system/homelab/media.nix @@ -4,7 +4,6 @@ ]; services = { jellyfin = { - # LOCK IN enable = true; dataDir = "/mnt/data/apps/jellyfin"; hardwareAcceleration = { diff --git a/modules/system/misc/programs.nix b/modules/system/misc/programs.nix index ccdbaa1..acc3a7e 100644 --- a/modules/system/misc/programs.nix +++ b/modules/system/misc/programs.nix @@ -17,7 +17,7 @@ programs = { # LOCK IN - steam.enable = true; + # steam.enable = true; gdk-pixbuf.modulePackages = [ pkgs.librsvg ]; appimage = { enable = true; From 627405c572b5767c8874c848b642c43e5bb3265b Mon Sep 17 00:00:00 2001 From: satr14 Date: Thu, 23 Jul 2026 17:44:29 +0700 Subject: [PATCH 215/224] disable performance profiles --- modules/hardware/misc/cpu-freq.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/hardware/misc/cpu-freq.nix b/modules/hardware/misc/cpu-freq.nix index ad87022..63323a3 100644 --- a/modules/hardware/misc/cpu-freq.nix +++ b/modules/hardware/misc/cpu-freq.nix @@ -49,23 +49,27 @@ }; auto-cpufreq = { enable = true; # wait for fix: https://github.com/AdnanHodzic/auto-cpufreq/issues/906 - settings = { - charger = { - governor = "powersave"; # "performance"; + settings = let + performance = { + governor = "performance"; energy_performance_preference = "performance"; turbo = "always"; platform_profile = "performance"; scaling_min_freq = 800000; scaling_max_freq = 3600000; }; - battery = { + balanced = { governor = "powersave"; energy_performance_preference = "balance-power"; - platform_profile = "low-power"; turbo = "never"; + platform_profile = "balanced"; scaling_min_freq = 400000; scaling_max_freq = 1700000; }; + in { + battery = balanced; + charger = balanced; # performance; + # ^^ disable overclocking for purely productivity use so low temps and fan noise }; }; }; From 2e50f4940031766d8d607785f0edb776481c013a Mon Sep 17 00:00:00 2001 From: satr14 Date: Thu, 23 Jul 2026 17:58:24 +0700 Subject: [PATCH 216/224] small ide tweak --- modules/home/core/code.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/home/core/code.nix b/modules/home/core/code.nix index 044f3a7..6803152 100644 --- a/modules/home/core/code.nix +++ b/modules/home/core/code.nix @@ -40,6 +40,7 @@ }; }; agent = { + sidebar_side = "right"; tool_permissions.default = "allow"; default_model = { provider = "copilot_chat"; From 800a2f4ad18f5195938a884540769eecac6ded27 Mon Sep 17 00:00:00 2001 From: satr14 Date: Thu, 23 Jul 2026 18:01:41 +0700 Subject: [PATCH 217/224] increase cliphist --- modules/home/rice/compositor.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/rice/compositor.nix b/modules/home/rice/compositor.nix index 1316c62..cca6797 100644 --- a/modules/home/rice/compositor.nix +++ b/modules/home/rice/compositor.nix @@ -25,7 +25,7 @@ XCURSOR_SIZE = "24"; XCURSOR_THEME = "catppuccin-${ctp-opt.flavor}-light-cursors"; - CLIPHIST_MAX_ITEMS = "36"; + CLIPHIST_MAX_ITEMS = "90"; GTK_APPLICATION_PREFER_DARK_THEME = "1"; GTK_THEME = "Adwaita:dark"; From 5d538562d57bb4a03e05db5481ce1ed9be7f1cde Mon Sep 17 00:00:00 2001 From: satr14 Date: Thu, 23 Jul 2026 19:21:00 +0700 Subject: [PATCH 218/224] adjust value inc and dec --- modules/home/rice/keybinds.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/home/rice/keybinds.nix b/modules/home/rice/keybinds.nix index 00041fe..71a7928 100644 --- a/modules/home/rice/keybinds.nix +++ b/modules/home/rice/keybinds.nix @@ -1,11 +1,11 @@ { pkgs, lib, hostname, ... }: { programs.niri.settings.binds = { - "XF86AudioRaiseVolume" = { action.spawn = [ "wpctl" "set-volume" "-l" "1" "@DEFAULT_AUDIO_SINK@" "5%+" ]; allow-when-locked = true; }; - "XF86AudioLowerVolume" = { action.spawn = [ "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-" ]; allow-when-locked = true; }; + "XF86AudioRaiseVolume" = { action.spawn = [ "wpctl" "set-volume" "-l" "1" "@DEFAULT_AUDIO_SINK@" "2%+" ]; allow-when-locked = true; }; + "XF86AudioLowerVolume" = { action.spawn = [ "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "2%-" ]; allow-when-locked = true; }; "XF86AudioMute" = { action.spawn = [ "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle" ]; allow-when-locked = true; }; "XF86AudioMicMute" = { action.spawn = [ "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle" ]; allow-when-locked = true; }; - "XF86MonBrightnessUp" = { action.spawn = [ "brightnessctl" "s" "10%+" ]; allow-when-locked = true; }; - "XF86MonBrightnessDown" = { action.spawn = [ "brightnessctl" "s" "10%-" ]; allow-when-locked = true; }; + "XF86MonBrightnessUp" = { action.spawn = [ "brightnessctl" "s" "2%+" ]; allow-when-locked = true; }; + "XF86MonBrightnessDown" = { action.spawn = [ "brightnessctl" "s" "2%-" ]; allow-when-locked = true; }; "Mod+Q".action.close-window = {}; "Mod+W".action.maximize-column = {}; @@ -23,10 +23,10 @@ "Mod+Shift+Down".action.move-window-down-or-to-workspace-down = {}; "Mod+Shift+Left".action.move-column-left = {}; "Mod+Shift+Right".action.move-column-right = {}; - "Mod+Ctrl+Left".action.set-window-width = [ "-5%" ]; - "Mod+Ctrl+Right".action.set-window-width = [ "+5%" ]; - "Mod+Ctrl+Down".action.set-window-height = [ "+5%" ]; - "Mod+Ctrl+Up".action.set-window-height = [ "-5%" ]; + "Mod+Ctrl+Left".action.set-window-width = [ "-2%" ]; + "Mod+Ctrl+Right".action.set-window-width = [ "+2%" ]; + "Mod+Ctrl+Down".action.set-window-height = [ "+2%" ]; + "Mod+Ctrl+Up".action.set-window-height = [ "-2%" ]; "Mod+G".action.center-column = {}; "Mod+F".action.toggle-window-floating = {}; From c9f4ad0e13037bf53e304767134ce74d854c49c2 Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 24 Jul 2026 15:21:07 +0700 Subject: [PATCH 219/224] revert brightness --- modules/home/rice/keybinds.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/home/rice/keybinds.nix b/modules/home/rice/keybinds.nix index 71a7928..d63a7d3 100644 --- a/modules/home/rice/keybinds.nix +++ b/modules/home/rice/keybinds.nix @@ -4,8 +4,8 @@ "XF86AudioLowerVolume" = { action.spawn = [ "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "2%-" ]; allow-when-locked = true; }; "XF86AudioMute" = { action.spawn = [ "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle" ]; allow-when-locked = true; }; "XF86AudioMicMute" = { action.spawn = [ "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle" ]; allow-when-locked = true; }; - "XF86MonBrightnessUp" = { action.spawn = [ "brightnessctl" "s" "2%+" ]; allow-when-locked = true; }; - "XF86MonBrightnessDown" = { action.spawn = [ "brightnessctl" "s" "2%-" ]; allow-when-locked = true; }; + "XF86MonBrightnessUp" = { action.spawn = [ "brightnessctl" "s" "10%+" ]; allow-when-locked = true; }; + "XF86MonBrightnessDown" = { action.spawn = [ "brightnessctl" "s" "10%-" ]; allow-when-locked = true; }; "Mod+Q".action.close-window = {}; "Mod+W".action.maximize-column = {}; From d4b19a279ec94b8846190368fa3f4eb5c1839871 Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 24 Jul 2026 15:22:47 +0700 Subject: [PATCH 220/224] put swappiness and governor in base --- modules/system/base.nix | 3 +++ modules/system/homelab/mc/default.nix | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/system/base.nix b/modules/system/base.nix index 3a20057..d62b589 100644 --- a/modules/system/base.nix +++ b/modules/system/base.nix @@ -16,6 +16,9 @@ i18n.defaultLocale = locale; environment.localBinInPath = true; + powerManagement.cpuFreqGovernor = "powersave"; + boot.kernel.sysctl."vm.swappiness" = 10; # only swap when necessary + security = { polkit = { enable = true; diff --git a/modules/system/homelab/mc/default.nix b/modules/system/homelab/mc/default.nix index 2217a08..a452cfd 100644 --- a/modules/system/homelab/mc/default.nix +++ b/modules/system/homelab/mc/default.nix @@ -5,9 +5,6 @@ inputs.mc.nixosModules.minecraft-servers ]; nixpkgs.overlays = [ inputs.mc.overlay ]; - - powerManagement.cpuFreqGovernor = "powersave"; # performance governor causes overheating and thermal throttling, works fine with powesave - boot.kernel.sysctl."vm.swappiness" = 10; # reduce swap usage and keep memory performance smooth services.minecraft-servers = { # LOCK IN From c3d19551ee4e4cc404c5cf9b39b626d6955540e3 Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 24 Jul 2026 15:26:59 +0700 Subject: [PATCH 221/224] lowbat brightness adjust --- modules/hardware/misc/battery-power.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/hardware/misc/battery-power.nix b/modules/hardware/misc/battery-power.nix index 8c529e1..1727fe4 100644 --- a/modules/hardware/misc/battery-power.nix +++ b/modules/hardware/misc/battery-power.nix @@ -19,7 +19,7 @@ echo "`date` battery status:$BAT_STA percentage:$BAT_PCT" export DISPLAY=:0 export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus - test $BAT_PCT -le 30 && test $BAT_PCT -gt 15 && test $BAT_STA = "Discharging" && ${pkgs.libnotify}/bin/notify-send "Low Battery" "Battery remaining: $BAT_PCT%." + test $BAT_PCT -le 30 && test $BAT_PCT -gt 15 && test $BAT_STA = "Discharging" && ${pkgs.libnotify}/bin/notify-send "Low Battery" "Battery remaining: $BAT_PCT%." && brightnessctl s 30% test $BAT_PCT -le 15 && test $BAT_STA = "Discharging" && ${pkgs.libnotify}/bin/notify-send -u critical "Low Battery" "Shutdown at 10%." ''} > /tmp/cron.batt.log 2>&1" ]; From eabea04a1426bfc3b692ff8f111a43892d3d3bfa Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 24 Jul 2026 15:31:37 +0700 Subject: [PATCH 222/224] script optimization --- modules/hardware/misc/battery-power.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/hardware/misc/battery-power.nix b/modules/hardware/misc/battery-power.nix index 1727fe4..80c6ec9 100644 --- a/modules/hardware/misc/battery-power.nix +++ b/modules/hardware/misc/battery-power.nix @@ -13,9 +13,10 @@ cron = { enable = true; systemCronJobs = [ - "* * * * * ${username} bash -x ${pkgs.writeShellScript "low-battery-notifier" '' - BAT_PCT=`${pkgs.acpi}/bin/acpi -b | ${pkgs.gnugrep}/bin/grep -P -o '[0-9]+(?=%)'` - BAT_STA=`${pkgs.acpi}/bin/acpi -b | ${pkgs.gnugrep}/bin/grep -P -o '\w+(?=,)'` + "*/2 * * * * ${username} bash ${pkgs.writeShellScript "low-battery-notifier" '' + ACPI_OUT=$(${pkgs.acpi}/bin/acpi -b) + BAT_PCT=`echo "$ACPI_OUT" | ${pkgs.gnugrep}/bin/grep -P -o '[0-9]+(?=%)'` + BAT_STA=`echo "$ACPI_OUT" | ${pkgs.gnugrep}/bin/grep -P -o '\w+(?=,)'` echo "`date` battery status:$BAT_STA percentage:$BAT_PCT" export DISPLAY=:0 export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus From 618a41bd8837733187a5d53c9bf5fbafc2eac5f4 Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 24 Jul 2026 16:47:39 +0700 Subject: [PATCH 223/224] add extra portal --- modules/system/desktop.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/desktop.nix b/modules/system/desktop.nix index f1e729d..0aeb936 100644 --- a/modules/system/desktop.nix +++ b/modules/system/desktop.nix @@ -33,7 +33,7 @@ xdg.portal = { enable = true; extraPortals = [ - pkgs.xdg-desktop-portal-hyprland #inputs.hl.packages.${pkgs.system}.xdg-desktop-portal-hyprland + pkgs.xdg-desktop-portal-luminous pkgs.xdg-desktop-portal-gtk ]; }; From 2b5b65168af365c858ce895d8485dd5d48eb2ae6 Mon Sep 17 00:00:00 2001 From: renovate Date: Sun, 26 Jul 2026 00:01:12 +0700 Subject: [PATCH 224/224] update lock file(s) --- flake.lock | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/flake.lock b/flake.lock index 1b69fe1..c741025 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1783674541, - "narHash": "sha256-vmUhEF/jBCZJeK0dInOls+HOAR0yiiQusN1+FZKaJss=", + "lastModified": 1784366307, + "narHash": "sha256-VKatYOZwLQ+MuNkWH6/gZYxrNeSK1Mqb7mC0H1WSu+M=", "owner": "catppuccin", "repo": "nix", - "rev": "96799f24cf1366fe88e1293c3d27521a8f2129cf", + "rev": "673f730d0fc8db3468c51575f1d3d777cc55e51f", "type": "github" }, "original": { @@ -78,11 +78,11 @@ ] }, "locked": { - "lastModified": 1784129366, - "narHash": "sha256-N5JiyICSeQF14x+OQebNyPpYowOT9Rs1iKyeCylSzOA=", + "lastModified": 1784913159, + "narHash": "sha256-JWq0BfjO4ktpH5USfQNQzdvHpIDT8fSKD5K7LvdMRFs=", "owner": "nix-community", "repo": "home-manager", - "rev": "165228b0efefc3e635e5174020c40ea64271dc25", + "rev": "079a3b5d1aa6a719920a51316253b7d6dd22738d", "type": "github" }, "original": { @@ -99,11 +99,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1784258664, - "narHash": "sha256-/1hkRunsSzVmbKKIS84k09ss8kqvNG/gYKqnIOUGkXA=", + "lastModified": 1784949919, + "narHash": "sha256-itGqjPYHqEUqabXbQb+eHguk1c6rBTRGZS4KImp45kM=", "owner": "Infinidoge", "repo": "nix-minecraft", - "rev": "0d9d58d2024d823ea167503e26d38a16be0d1e26", + "rev": "a58c1fa23ec0273eb085be1e7874e964aa3cd34f", "type": "github" }, "original": { @@ -122,11 +122,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1784189744, - "narHash": "sha256-D8oh9imibOynWAOUnvgG3w2EKDYqf8OTTaLCcTA4ePg=", + "lastModified": 1784874881, + "narHash": "sha256-u4jhSIf/Un0qZB+Cn3hTTaHSI20XeAxYbA5o4faqdJs=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "f4b479398c967d2c8d5a38b6d2c87283ae5078c4", + "rev": "ef7a2a3d719af46b906c22a3ebfb7d65627b2cd2", "type": "github" }, "original": { @@ -155,11 +155,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1783522755, - "narHash": "sha256-dI0HkX1djETia7cD/Y64h8BNIsSOfTRMzfNum2J6UhE=", + "lastModified": 1784570726, + "narHash": "sha256-9EMn69JBcFWFgUM7f0VBAX+jBby5b9H3M59U75+5yI4=", "owner": "YaLTeR", "repo": "niri", - "rev": "0777769e719b7c9b7c980d4ea66288bfbb4da5b3", + "rev": "7f26c3ee804fb6ed458ef7fb0e3c794f14e0b3bc", "type": "github" }, "original": { @@ -230,11 +230,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1784120854, - "narHash": "sha256-KesHgItiZPgGX740axSiQLcIQ8D24MDqNpkKYWIek8k=", + "lastModified": 1784796856, + "narHash": "sha256-wWFrV5/Qbm+lyt5x20E/bSbfJiGKMo4RCxZV8cl/WZI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "753cc8a3a87467296ddd1fa93f0cc3e81120ee46", + "rev": "e2587caef70cea85dd97d7daab492899902dbf5d", "type": "github" }, "original": { @@ -246,11 +246,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1784120854, - "narHash": "sha256-KesHgItiZPgGX740axSiQLcIQ8D24MDqNpkKYWIek8k=", + "lastModified": 1784796856, + "narHash": "sha256-wWFrV5/Qbm+lyt5x20E/bSbfJiGKMo4RCxZV8cl/WZI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "753cc8a3a87467296ddd1fa93f0cc3e81120ee46", + "rev": "e2587caef70cea85dd97d7daab492899902dbf5d", "type": "github" }, "original": { @@ -320,11 +320,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1783895132, - "narHash": "sha256-Dl0Gvrig3EpE962hzF3ETPhUztlfuRhcmlpd8ioHN54=", + "lastModified": 1784679892, + "narHash": "sha256-Mb7jpqnrcYCfNSItIkkHpuR3YxWFxPuIBfcwNKlRBkk=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "a2b5c635d8c8c99b286967658d0d177044887eb8", + "rev": "8d135d3b2854b30fd01ea6cd6c27e523dd50a839", "type": "github" }, "original": {