Implemented custom system for creating and distributing color schemes based on wallpapers, and also cycling through wallpapers.

nixfmt'd the codebase
This commit is contained in:
2026-03-09 22:02:46 -04:00
parent 4308b8eb16
commit 8ee748a997
145 changed files with 2776 additions and 1125 deletions

View File

@@ -1,4 +1,9 @@
{ slash, pkgs, username, ... }:
{
slash,
pkgs,
username,
...
}:
let
kickstartServer =
@@ -17,30 +22,31 @@ let
'';
};
startTf2Server = pkgs.writeShellScript "start-srv.sh" ''
set -euo pipefail
export HOME=/home/tf2
export LD_LIBRARY_PATH=/usr/lib:/usr/lib32
mkdir -p "$HOME/tf2server"
mkdir -p "$HOME/tf2server"
set -euo pipefail
export HOME=/home/tf2
export LD_LIBRARY_PATH=/usr/lib:/usr/lib32
mkdir -p "$HOME/tf2server"
mkdir -p "$HOME/tf2server"
steamcmd +force_install_dir "$HOME/tf2server" \
+login anonymous \
+app_update 232250 validate \
+quit
steamcmd +force_install_dir "$HOME/tf2server" \
+login anonymous \
+app_update 232250 validate \
+quit
cd "$HOME/tf2server"
cd "$HOME/tf2server"
ln -sf "$HOME/.steam/steam/linux64" "$HOME/.steam/sdk64"
ln -sf "$HOME/.steam/steam/linux32" "$HOME/.steam/sdk32"
ln -sf "$HOME/.steam/steam/linux64" "$HOME/.steam/sdk64"
ln -sf "$HOME/.steam/steam/linux32" "$HOME/.steam/sdk32"
exec ./srcds_run -game tf -console -port 25565 +map cp_dustbowl \
+ip 10.233.1.2 -norestart \
+sv_setsteamaccount 8862FD4B30F401036B8AAC6A7FE6B123
exec ./srcds_run -game tf -console -port 25565 +map cp_dustbowl \
+ip 10.233.1.2 -norestart \
+sv_setsteamaccount 8862FD4B30F401036B8AAC6A7FE6B123
'';
in
pkgs.buildFHSEnv {
name = "srcds-env";
targetPkgs = pkgs: with pkgs; [
pkgs.buildFHSEnv {
name = "srcds-env";
targetPkgs =
pkgs: with pkgs; [
steamcmd
glibc
zlib
@@ -50,29 +56,30 @@ let
libnl
libsrcds
# Optional: link compat
stdenv.cc.cc.lib
];
multiPkgs = pkgs: with pkgs.pkgsi686Linux; [
glibc
zlib
ncurses5
libuuid
alsa-lib
libxcrypt-legacy
gcc
];
multiArch = true;
runScript = "${startTf2Server}";
# Optional: link compat
stdenv.cc.cc.lib
];
multiPkgs =
pkgs: with pkgs.pkgsi686Linux; [
glibc
zlib
ncurses5
libuuid
alsa-lib
libxcrypt-legacy
gcc
];
multiArch = true;
runScript = "${startTf2Server}";
};
};
in
{
networking = {
nat = {
enable = true;
internalInterfaces = ["ve-+"];
externalInterface = "enp8s0";
internalInterfaces = [ "ve-+" ];
externalInterface = "enp8s0";
};
};
containers.tf2server = {
@@ -84,7 +91,6 @@ in
imports = [ ];
nixpkgs.config.allowUnfree = true;
services.openssh.enable = true;
users.users.root.password = "root"; # For quick login, remove in prod
@@ -114,11 +120,19 @@ in
};
};
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Optional: open ports on the container
networking.firewall.allowedTCPPorts = [ 25565 ];
networking.firewall.allowedUDPPorts = [ 25565 27005 27015 27020 ];
networking.firewall.allowedUDPPorts = [
25565
27005
27015
27020
];
system.stateVersion = "25.11"; # or your NixOS version
};