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

View file

@ -18,6 +18,7 @@
../../modules/nixos/fonts.nix ../../modules/nixos/fonts.nix
../../modules/nixos/services.nix ../../modules/nixos/services.nix
../../modules/nixos/users/tulg.nix ../../modules/nixos/users/tulg.nix
../../modules/nixos/tlp.nix
]; ];
# Bootloader. # Bootloader.
@ -33,20 +34,5 @@
programs.gamemode.enable = true; 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? system.stateVersion = "25.05"; # Did you read the comment?
} }

View file

@ -16,6 +16,7 @@
../../modules/nixos/fonts.nix ../../modules/nixos/fonts.nix
../../modules/nixos/services.nix ../../modules/nixos/services.nix
../../modules/nixos/users/tulg.nix ../../modules/nixos/users/tulg.nix
../../modules/nixos/tlp.nix
./home.nix ./home.nix
]; ];
@ -30,21 +31,6 @@
xwayland.enable = true; 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 = [ environment.systemPackages = [
pkgs.jdk17_headless pkgs.jdk17_headless
]; ];

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -8,14 +8,18 @@
programs.kitty.font.name = "Fira Code"; programs.kitty.font.name = "Fira Code";
stylix = { stylix = {
enable = true; enable = true;
targets.firefox.enable = false; targets = {
targets.zen-browser.enable = false; firefox.enable = false;
targets.zellij.enable = false; zen-browser.enable = false;
targets.tmux.enable = false; zellij.enable = false;
targets.kitty.enable = false; tmux.enable = false;
targets.gnome-text-editor.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 = { fonts = {
serif = { serif = {

View file

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

View file

@ -5,8 +5,6 @@
programs.xfconf.enable = true; programs.xfconf.enable = true;
services.displayManager.ly.enable = true; services.displayManager.ly.enable = true;
services.ratbagd.enable = true; # logitech mouse config backend thingy 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 = { services.avahi = {
enable = true; enable = true;
nssmdns4 = 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 fastfetch
kitty kitty
jdk17_headless jdk17_headless
autossh
btop
wget
]; ];
services.openssh = { services.openssh = {
enable = true;
settings = { settings = {
AllowTcpForwarding = true; AllowTcpForwarding = true;
X11Forwarding = true; X11Forwarding = true;

View file

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

View file

@ -5,5 +5,6 @@
./tunnel.nix ./tunnel.nix
./pz.nix ./pz.nix
./slopfarms.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"; overlordTunIp = "10.0.0.1";
kittykatTunIp = "10.0.0.2"; kittykatTunIp = "10.0.0.2";
minecraftTcpPorts = [
25565
25566
25567
25568
];
zomboidUdpPorts = [ zomboidUdpPorts = [
16261 16261
@ -41,6 +47,7 @@ in {
networking.firewall = { networking.firewall = {
enable = true; enable = true;
interfaces.tun0.allowedUDPPorts = zomboidUdpPorts; interfaces.tun0.allowedUDPPorts = zomboidUdpPorts;
interfaces.tun0.allowedTCPPorts = minecraftTcpPorts;
}; };
systemd.services.ssh-tun-kittykat = { systemd.services.ssh-tun-kittykat = {