idk and get rid of sstupid warnings ig

This commit is contained in:
tulg 2026-05-15 01:15:57 +03:00
parent cb6af5e7c4
commit 2960c1fe90
17 changed files with 207 additions and 48 deletions

View file

@ -10,9 +10,8 @@
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = {
url = "github:ryantm/agenix";
};
agenix.url = "github:ryantm/agenix";
deploy-rs.url = "github:serokell/deploy-rs";
quickshell = {
url = "github:outfoxxed/quickshell";
@ -21,7 +20,6 @@
noctalia = {
url = "github:noctalia-dev/noctalia-shell";
inputs.nixpkgs.follows = "nixpkgs";
# inputs.quickshell.follows = "quickshell"; # Use same quickshell version
};
nix-colors.url = "github:misterio77/nix-colors";
@ -129,7 +127,7 @@
user = "root";
path =
deploy-rs.lib.${config.pkgs.system}.activate.nixos config;
deploy-rs.lib.${config.pkgs.stdenv.hostPlatform.system}.activate.nixos config;
};
})
self.nixosConfigurations;

View file

@ -18,6 +18,7 @@
../../modules/nixos/fonts.nix
../../modules/nixos/services.nix
../../modules/nixos/users/tulg.nix
../../modules/nixos/tlp.nix
];
# Bootloader.
@ -33,20 +34,5 @@
programs.gamemode.enable = true;
powerManagement.powertop.enable = true;
services.upower.enable = true;
services = {
tlp = {
enable = false;
settings = {
CPU_BOOST_ON_AC = 1;
CPU_BOOST_ON_BAT = 0;
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
STOP_CHARGE_THRESH_BAT0 = 95;
};
};
};
system.stateVersion = "25.05"; # Did you read the comment?
}

View file

@ -16,6 +16,7 @@
../../modules/nixos/fonts.nix
../../modules/nixos/services.nix
../../modules/nixos/users/tulg.nix
../../modules/nixos/tlp.nix
./home.nix
];
@ -30,21 +31,6 @@
xwayland.enable = true;
};
powerManagement.powertop.enable = true;
services.upower.enable = true;
services = {
power-profiles-daemon.enable = true;
tlp = {
enable = false;
settings = {
CPU_BOOST_ON_AC = 1;
CPU_BOOST_ON_BAT = 0;
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
STOP_CHARGE_THRESH_BAT0 = 95;
};
};
};
environment.systemPackages = [
pkgs.jdk17_headless
];

View file

@ -1,4 +1,9 @@
{inputs, ...}: {
{
inputs,
config,
lib,
...
}: {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;

View file

@ -4,7 +4,7 @@
...
}: let
spicePkgs =
inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.system};
inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in {
imports = [
inputs.spicetify-nix.homeManagerModules.default
@ -12,5 +12,7 @@ in {
programs.spicetify = {
enable = true;
theme = spicePkgs.themes.ziro;
colorScheme = "rose-pine-moon";
};
}

View file

@ -9,6 +9,7 @@
pkgs.vscode-extensions.kamadorueda.alejandra
pkgs.vscode-extensions.jnoortheen.nix-ide
pkgs.vscode-extensions.leonardssh.vscord
pkgs.vscode-extensions.mvllow.rose-pine
];
profiles.default.userSettings = {
"nix.formatterPath" = "alejandra";

View file

@ -11,7 +11,7 @@
./stylix.nix
];
# Home Manager settings
#nix.nixPath = ["nixpkgs=${inputs.nixpkgs}"];
home.username = "tulg";
home.homeDirectory = "/home/tulg";
home.stateVersion = "25.05";

View file

@ -6,7 +6,7 @@
home.packages = with pkgs; [
quickshell
networkmanagerapplet
inputs.noctalia.packages.${pkgs.system}.default
inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default
wdisplays
nwg-look
restic

View file

@ -8,14 +8,18 @@
programs.kitty.font.name = "Fira Code";
stylix = {
enable = true;
targets.firefox.enable = false;
targets.zen-browser.enable = false;
targets.zellij.enable = false;
targets.tmux.enable = false;
targets.kitty.enable = false;
targets.gnome-text-editor.enable = false;
targets = {
firefox.enable = false;
zen-browser.enable = false;
zellij.enable = false;
tmux.enable = false;
kitty.enable = false;
gnome-text-editor.enable = false;
spicetify.enable = false;
};
overlays.enable = false; ## disables the useglobalpkgs warning goated line.
base16Scheme = "${pkgs.base16-schemes}/share/themes/rose-pine.yaml";
base16Scheme = "${pkgs.base16-schemes}/share/themes/rose-pine-moon.yaml";
fonts = {
serif = {

View file

@ -21,6 +21,7 @@
programs.localsend.enable = true;
networking.firewall.checkReversePath = "loose";
services.resolved.enable = true;
networking.networkmanager.enable = true;
hardware.graphics = {
enable = true;

View file

@ -5,8 +5,6 @@
programs.xfconf.enable = true;
services.displayManager.ly.enable = true;
services.ratbagd.enable = true; # logitech mouse config backend thingy
systemd.services.tailscaled.after = ["network-online.target"];
systemd.services.tailscaled.wants = ["network-online.target"];
services.avahi = {
enable = true;
nssmdns4 = true;

17
modules/nixos/tlp.nix Normal file
View file

@ -0,0 +1,17 @@
{...}: {
powerManagement.powertop.enable = true;
services.upower.enable = true;
services = {
power-profiles-daemon.enable = true;
tlp = {
enable = false;
settings = {
CPU_BOOST_ON_AC = 1;
CPU_BOOST_ON_BAT = 0;
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
STOP_CHARGE_THRESH_BAT0 = 95;
};
};
};
}

View file

@ -4,8 +4,12 @@
fastfetch
kitty
jdk17_headless
autossh
btop
wget
];
services.openssh = {
enable = true;
settings = {
AllowTcpForwarding = true;
X11Forwarding = true;

View file

@ -14,6 +14,12 @@
# 16261 = main game port
# 16262+ = player ports, using 16262-16272 as a sane test range
# 52015 = extra UDP port your server is listening on
minecraftTcpPorts = [
25565
25566
25567
25568
];
zomboidUdpPorts = [
16261
16262
@ -63,9 +69,11 @@ in {
# Public Zomboid UDP ports on kittykat.
allowedUDPPorts = zomboidUdpPorts;
allowedTCPPorts = minecraftTcpPorts;
# Allow tunnel-side packets too.
interfaces.tun0.allowedUDPPorts = zomboidUdpPorts;
interfaces.tun0.allowedTCPPorts = minecraftTcpPorts;
};
networking.nftables = {
@ -79,6 +87,8 @@ in {
# Public players -> kittykat public IP -> overlord over tun0
iifname "${publicInterface}" udp dport 16261-16272 dnat to ${overlordTunIp}
iifname "${publicInterface}" udp dport 52015 dnat to ${overlordTunIp}:52015
# Minecraft TCP
iifname "${publicInterface}" tcp dport 25565-25570 dnat to ${overlordTunIp}
}
chain postrouting {
@ -89,6 +99,7 @@ in {
# so replies go back through the tunnel instead of overlord's normal internet route.
oifname "tun0" ip daddr ${overlordTunIp} udp dport 16261-16272 snat to ${kittykatTunIp}
oifname "tun0" ip daddr ${overlordTunIp} udp dport 52015 snat to ${kittykatTunIp}
oifname "tun0" ip daddr ${overlordTunIp} tcp dport 25565-25570 snat to ${kittykatTunIp}
}
chain forward {
@ -97,6 +108,9 @@ in {
# Public -> tunnel
iifname "${publicInterface}" oifname "tun0" ip daddr ${overlordTunIp} udp dport 16261-16272 accept
iifname "${publicInterface}" oifname "tun0" ip daddr ${overlordTunIp} udp dport 52015 accept
# Minecraft TCP
iifname "${publicInterface}" oifname "tun0" ip daddr ${overlordTunIp} tcp dport 25565-25570 accept
# Tunnel replies -> public
iifname "tun0" oifname "${publicInterface}" ip saddr ${overlordTunIp} accept

View file

@ -5,5 +5,6 @@
./tunnel.nix
./pz.nix
./slopfarms.nix
#./kokoro.nix ts so fucking ass just using elevenlabs atp
];
}

View file

@ -0,0 +1,135 @@
{pkgs, ...}: let
python = pkgs.python312;
spacyModelEn = python.pkgs.buildPythonPackage rec {
pname = "en-core-web-sm";
version = "3.8.0";
format = "wheel";
src = pkgs.fetchurl {
url = "https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-${version}/en_core_web_sm-${version}-py3-none-any.whl";
hash = "sha256-GTJCnbcn1L/z3u1rNM/AXfF3lPSlLusmz4ko98Gg+4U=";
};
propagatedBuildInputs = with python.pkgs; [
spacy
];
doCheck = false;
pythonImportsCheck = ["en_core_web_sm"];
};
espeakngLoaderPkg = python.pkgs.buildPythonPackage rec {
pname = "espeakng-loader";
version = "0.2.4";
format = "wheel";
src = python.pkgs.fetchPypi {
pname = "espeakng_loader";
inherit version;
format = "wheel";
dist = "py3";
python = "py3";
abi = "none";
platform = "manylinux_2_17_x86_64.manylinux2014_x86_64";
hash = "sha256-CHIbryfRPUYfa+bu2aZSd+cNaCNP9IT9i5iXsiLNy20=";
};
doCheck = false;
pythonImportsCheck = ["espeakng_loader"];
};
misakiPkg = python.pkgs.buildPythonPackage rec {
pname = "misaki";
version = "0.9.4";
pyproject = true;
src = python.pkgs.fetchPypi {
inherit pname version;
hash = "sha256-OWD6Pm3heakO6OYoRGpKT2uMcwtuNBCZnPOWGJ9NnEA=";
};
nativeBuildInputs = with python.pkgs; [
hatchling
];
propagatedBuildInputs = with python.pkgs; [
spacyModelEn
num2words
addict
numpy
regex
requests
tqdm
spacy
espeakngLoaderPkg
];
doCheck = false;
pythonImportsCheck = ["misaki"];
};
kokoroPkg = python.pkgs.buildPythonPackage rec {
pname = "kokoro";
version = "0.9.4";
pyproject = true;
src = python.pkgs.fetchPypi {
inherit pname version;
hash = "sha256-+/YzJieX+M9G/awzFc+creZ9yLdiwP7M8zSJJ3L7msQ=";
};
nativeBuildInputs = with python.pkgs; [
hatchling
];
propagatedBuildInputs = with python.pkgs; [
torch
numpy
scipy
soundfile
huggingface-hub
loguru
tqdm
regex
requests
transformers
misakiPkg
phonemizer
];
doCheck = false;
pythonImportsCheck = ["kokoro"];
};
slopPython = python.withPackages (ps: [
ps.spacy
ps.num2words
ps.addict
ps.requests
ps.pillow
ps.numpy
ps.soundfile
ps.scipy
ps.tqdm
ps.regex
ps.torch
ps.transformers
ps.huggingface-hub
ps.phonemizer
kokoroPkg
misakiPkg
espeakngLoaderPkg
spacyModelEn
]);
in {
documentation.doc.enable = false;
environment.systemPackages = with pkgs; [
ffmpeg
git
yt-dlp
espeak-ng
slopPython
];
}

View file

@ -8,6 +8,12 @@
overlordTunIp = "10.0.0.1";
kittykatTunIp = "10.0.0.2";
minecraftTcpPorts = [
25565
25566
25567
25568
];
zomboidUdpPorts = [
16261
@ -41,6 +47,7 @@ in {
networking.firewall = {
enable = true;
interfaces.tun0.allowedUDPPorts = zomboidUdpPorts;
interfaces.tun0.allowedTCPPorts = minecraftTcpPorts;
};
systemd.services.ssh-tun-kittykat = {