Compare commits
3 commits
fe8666e729
...
7b9ce69c76
| Author | SHA1 | Date | |
|---|---|---|---|
| 7b9ce69c76 | |||
| 610183cd85 | |||
| 4c902d0dcb |
9 changed files with 157 additions and 14 deletions
|
|
@ -45,8 +45,9 @@
|
||||||
gpu-screen-recorder
|
gpu-screen-recorder
|
||||||
gpu-screen-recorder-gtk
|
gpu-screen-recorder-gtk
|
||||||
|
|
||||||
(prismlauncher.override {
|
# LOCK IN
|
||||||
jdks = with javaPackages.compiler.temurin-bin; [ jre-21 jdk-25 ];
|
# (prismlauncher.override {
|
||||||
})
|
# jdks = with javaPackages.compiler.temurin-bin; [ jre-21 jdk-25 ];
|
||||||
|
# })
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,9 @@
|
||||||
"Mod+Q".action.close-window = {};
|
"Mod+Q".action.close-window = {};
|
||||||
"Mod+W".action.maximize-column = {};
|
"Mod+W".action.maximize-column = {};
|
||||||
"Mod+S".action.fullscreen-window = {};
|
"Mod+S".action.fullscreen-window = {};
|
||||||
"Alt+Print".action.screenshot-window = {};
|
"Ctrl+Print".action.screenshot-window = {};
|
||||||
"Print".action.screenshot-screen = {};
|
"Alt+Print".action.screenshot-screen = {};
|
||||||
|
"Print".action.screenshot = {};
|
||||||
|
|
||||||
"Mod+Up".action.focus-workspace-up = {};
|
"Mod+Up".action.focus-workspace-up = {};
|
||||||
"Mod+Down".action.focus-workspace-down = {};
|
"Mod+Down".action.focus-workspace-down = {};
|
||||||
|
|
@ -30,7 +31,8 @@
|
||||||
"Alt+Space".action.toggle-overview = {};
|
"Alt+Space".action.toggle-overview = {};
|
||||||
|
|
||||||
"Mod+Space" = { action.spawn = [ "playerctl" "play-pause" ]; allow-when-locked = true; };
|
"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+E".action.spawn = [ "pcmanfm-qt" ];
|
||||||
"Mod+T".action.spawn = [ "kitty" ];
|
"Mod+T".action.spawn = [ "kitty" ];
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,13 @@
|
||||||
whitelist = [
|
whitelist = [
|
||||||
"https://gist.githubusercontent.com/mul14/eb05e88fcec5bb195cbb/raw/75a1fe122a4502e8d5a5268c9d0ec28332b19d5d/hosts"
|
"https://gist.githubusercontent.com/mul14/eb05e88fcec5bb195cbb/raw/75a1fe122a4502e8d5a5268c9d0ec28332b19d5d/hosts"
|
||||||
];
|
];
|
||||||
|
blocked = [
|
||||||
|
# LOCK IN
|
||||||
|
"instagram"
|
||||||
|
"youtube"
|
||||||
|
"minecraft"
|
||||||
|
"steam"
|
||||||
|
];
|
||||||
in {
|
in {
|
||||||
services.adguardhome = {
|
services.adguardhome = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -31,6 +38,7 @@ in {
|
||||||
dns = {
|
dns = {
|
||||||
upstream_dns = [ "https://security.cloudflare-dns.com/dns-query" ];
|
upstream_dns = [ "https://security.cloudflare-dns.com/dns-query" ];
|
||||||
bootstrap_dns = [ "1.1.1.2" "1.0.0.2" ];
|
bootstrap_dns = [ "1.1.1.2" "1.0.0.2" ];
|
||||||
|
blocked_services = blocked;
|
||||||
};
|
};
|
||||||
querylog = {
|
querylog = {
|
||||||
interval = "2160h";
|
interval = "2160h";
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,8 @@
|
||||||
boot.kernel.sysctl."vm.swappiness" = 10; # reduce swap usage and keep memory performance smooth
|
boot.kernel.sysctl."vm.swappiness" = 10; # reduce swap usage and keep memory performance smooth
|
||||||
|
|
||||||
services.minecraft-servers = {
|
services.minecraft-servers = {
|
||||||
enable = true;
|
# LOCK IN
|
||||||
|
enable = false;
|
||||||
eula = true;
|
eula = true;
|
||||||
managementSystem.systemd-socket.enable = true;
|
managementSystem.systemd-socket.enable = true;
|
||||||
# ^^^ https://github.com/Infinidoge/nix-minecraft/issues/119
|
# ^^^ https://github.com/Infinidoge/nix-minecraft/issues/119
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,11 @@
|
||||||
ram-allocation-mb = 8192;
|
ram-allocation-mb = 8192;
|
||||||
headroom-allocation-mb = 1024;
|
headroom-allocation-mb = 1024;
|
||||||
rcon-pass = "howdy";
|
rcon-pass = "howdy";
|
||||||
|
ports = {
|
||||||
|
minecraft = 25565;
|
||||||
|
rcon = 25575;
|
||||||
|
};
|
||||||
|
|
||||||
modpack = let
|
modpack = let
|
||||||
useLatest = false;
|
useLatest = false;
|
||||||
commit = "86bf13316ed1352a676d9056d284448ea5e5a079";
|
commit = "86bf13316ed1352a676d9056d284448ea5e5a079";
|
||||||
|
|
@ -18,13 +23,13 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
services.minecraft-servers.servers.${name} = {
|
services.minecraft-servers.servers.${name} = {
|
||||||
enable = true;
|
enable = false;
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
restart = "always";
|
restart = "always";
|
||||||
|
|
||||||
serverProperties = {
|
serverProperties = {
|
||||||
server-ip = "0.0.0.0";
|
server-ip = "0.0.0.0";
|
||||||
server-port = 25565;
|
server-port = ports.minecraft;
|
||||||
server-name = name;
|
server-name = name;
|
||||||
motd = "§cCan't connect to server";
|
motd = "§cCan't connect to server";
|
||||||
log-ips = false;
|
log-ips = false;
|
||||||
|
|
@ -49,7 +54,7 @@ in {
|
||||||
enable-rcon = true;
|
enable-rcon = true;
|
||||||
sync-chunk-writes = false;
|
sync-chunk-writes = false;
|
||||||
"rcon.password" = rcon-pass;
|
"rcon.password" = rcon-pass;
|
||||||
"rcon.port" = 25575;
|
"rcon.port" = ports.rcon;
|
||||||
};
|
};
|
||||||
|
|
||||||
symlinks = inputs.mc.lib.collectFilesAt modpack "mods" // {
|
symlinks = inputs.mc.lib.collectFilesAt modpack "mods" // {
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,10 @@
|
||||||
ram-allocation-mb = 8192;
|
ram-allocation-mb = 8192;
|
||||||
headroom-allocation-mb = 1024;
|
headroom-allocation-mb = 1024;
|
||||||
rcon-pass = "howdy";
|
rcon-pass = "howdy";
|
||||||
|
ports = {
|
||||||
|
minecraft = 25566;
|
||||||
|
rcon = 25576;
|
||||||
|
};
|
||||||
|
|
||||||
modpack = pkgs.fetchModrinthModpack {
|
modpack = pkgs.fetchModrinthModpack {
|
||||||
url = "https://cdn.modrinth.com/data/2wkV8mHp/versions/mFGJP1Ye/Server%20Optimization%201.21.11-2.1.mrpack";
|
url = "https://cdn.modrinth.com/data/2wkV8mHp/versions/mFGJP1Ye/Server%20Optimization%201.21.11-2.1.mrpack";
|
||||||
|
|
@ -17,7 +21,7 @@ in {
|
||||||
|
|
||||||
serverProperties = {
|
serverProperties = {
|
||||||
server-ip = "0.0.0.0";
|
server-ip = "0.0.0.0";
|
||||||
server-port = 25566;
|
server-port = ports.minecraft;
|
||||||
server-name = name;
|
server-name = name;
|
||||||
motd = "§cCan't connect to server";
|
motd = "§cCan't connect to server";
|
||||||
log-ips = false;
|
log-ips = false;
|
||||||
|
|
@ -42,7 +46,7 @@ in {
|
||||||
enable-rcon = true;
|
enable-rcon = true;
|
||||||
sync-chunk-writes = false;
|
sync-chunk-writes = false;
|
||||||
"rcon.password" = rcon-pass;
|
"rcon.password" = rcon-pass;
|
||||||
"rcon.port" = 25576;
|
"rcon.port" = ports.rcon;
|
||||||
};
|
};
|
||||||
|
|
||||||
files = inputs.mc.lib.collectFilesAt modpack "config";
|
files = inputs.mc.lib.collectFilesAt modpack "config";
|
||||||
|
|
|
||||||
120
modules/system/homelab/mc/mc2-create-aeronautics.nix
Normal file
120
modules/system/homelab/mc/mc2-create-aeronautics.nix
Normal file
|
|
@ -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;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
];
|
];
|
||||||
services = {
|
services = {
|
||||||
jellyfin = {
|
jellyfin = {
|
||||||
enable = true;
|
# LOCK IN
|
||||||
|
enable = false;
|
||||||
dataDir = "/mnt/data/apps/jellyfin";
|
dataDir = "/mnt/data/apps/jellyfin";
|
||||||
hardwareAcceleration = {
|
hardwareAcceleration = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
steam.enable = true;
|
# LOCK IN
|
||||||
|
# steam.enable = true;
|
||||||
gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
|
gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
|
||||||
appimage = {
|
appimage = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue