From 4c902d0dcbf81e7a35820aa9bfb9f7fb40d5f833 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 18 Jul 2026 18:34:34 +0700 Subject: [PATCH 01/41] 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 02/41] 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 03/41] 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 04/41] 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 05/41] 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 06/41] 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 07/41] 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 08/41] 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 09/41] 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 10/41] 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 11/41] 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 12/41] 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 13/41] 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 14/41] 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 15/41] 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 16/41] 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 17/41] 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 18/41] 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 19/41] 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 20/41] 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 21/41] 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 22/41] 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 23/41] 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 24/41] 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 25/41] 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 26/41] 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 27/41] 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 28/41] 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 29/41] 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 30/41] 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 31/41] 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 32/41] 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 33/41] 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 34/41] 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 35/41] 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 36/41] 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 37/41] 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 38/41] 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 39/41] 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 40/41] 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 41/41] 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": {