This commit is contained in:
2026-02-05 22:06:04 +00:00
parent 59224e4dde
commit d36071134c
3 changed files with 72 additions and 48 deletions

View File

@@ -4,7 +4,6 @@
# man configuration.nix # man configuration.nix
{ {
config,
pkgs, pkgs,
inputs, inputs,
... ...
@@ -15,9 +14,15 @@
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
]; ];
nix.settings.trusted-users = [
"root"
"trude"
];
# Bootloader # Bootloader
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.kernelModules = [ "amdgpu" ];
# Use latest kernel # Use latest kernel
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
@@ -71,6 +76,7 @@
extraGroups = [ extraGroups = [
"networkmanager" "networkmanager"
"wheel" "wheel"
"dialout"
]; ];
packages = with pkgs; [ ]; packages = with pkgs; [ ];
}; };
@@ -80,9 +86,14 @@
useGlobalPkgs = true; useGlobalPkgs = true;
backupFileExtension = "~"; backupFileExtension = "~";
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };
users = { users.trude.imports = [
"trude" = import ./home.nix; ./home.nix
}; ];
};
hardware.graphics = {
enable = true;
enable32Bit = true;
}; };
# Packages # Packages
@@ -111,50 +122,28 @@
"flakes" "flakes"
]; ];
services.tailscale.enable = true;
# Steam and VR # Steam and VR
programs.steam = { programs.steam = {
enable = true; enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server dedicatedServer.openFirewall = true;
}; };
services.wivrn = { services.wivrn = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;
# Write information to /etc/xdg/openxr/1/active_runtime.json, VR applications
# will automatically read this and work with WiVRn (Note: This does not currently
# apply for games run in Valve's Proton)
defaultRuntime = true; defaultRuntime = true;
autoStart = true; autoStart = false;
}; };
# Kernel patch for SteamVR performance issues on AMD GPUs (recompiles the kernel)
boot.kernelPatches = [
{
name = "amdgpu-ignore-ctx-privileges";
patch = pkgs.fetchpatch {
name = "cap_sys_nice_begone.patch";
url = "https://github.com/Frogging-Family/community-patches/raw/master/linux61-tkg/cap_sys_nice_begone.mypatch";
hash = "sha256-Y3a0+x2xvHsfLax/uwycdJf3xLxvVfkfDVqjkxNaYEo=";
};
}
];
# Some programs need SUID wrappers, can be configured further or are # Set up virtualisation
# started in user sessions. virtualisation.libvirtd.enable = true;
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall. # Open ports in the firewall.
networking.firewall.enable = true; networking.firewall.enable = true;
# networking.firewall.allowedTCPPorts = [ ... ]; networking.firewall.allowedTCPPorts = [ 11434 ]; # LMStudio (must be manually configured)
# networking.firewall.allowedUDPPorts = [ ... ]; networking.firewall.allowedUDPPorts = [ 6969 ]; # SlimeVR
system.stateVersion = "25.11"; # Don't change after initial installation. system.stateVersion = "25.11"; # Don't change after initial installation.

12
nixos/flake.lock generated
View File

@@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1769397130, "lastModified": 1769622371,
"narHash": "sha256-TTM4KV9IHwa181X7afBRbhLJIrgynpDjAXJFMUOWfyU=", "narHash": "sha256-Cs1/+P3ntxl9mOIL7/QtItBAzQJ2xjvTMHv7qw0nFV0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "c37679d37bdbecf11bbe3c5eb238d89ca4f60641", "rev": "02d763228d8aff317e6e5a319474b6d4d9d826a5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -22,11 +22,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1769170682, "lastModified": 1769461804,
"narHash": "sha256-oMmN1lVQU0F0W2k6OI3bgdzp2YOHWYUAw79qzDSjenU=", "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c5296fdd05cfa2c187990dd909864da9658df755", "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -21,14 +21,14 @@
vesktop vesktop
google-chrome google-chrome
localsend localsend
tailscale
#stremio #stremio
opencode
# VR / Games # VR / Games
bs-manager bs-manager
slimevr slimevr
prismlauncher prismlauncher
protonup-qt
wayvr
# Gnome Extensions # Gnome Extensions
gnomeExtensions.caffeine gnomeExtensions.caffeine
@@ -49,6 +49,14 @@
wordbook wordbook
textpieces textpieces
# Virtualisation
gnome-boxes # VM management
dnsmasq # VM networking
# AI
lmstudio
nodejs
# Scripts # Scripts
(pkgs.writeShellScriptBin "colors" '' (pkgs.writeShellScriptBin "colors" ''
#! /bin/bash #! /bin/bash
@@ -75,9 +83,8 @@
'') '')
(pkgs.writeShellScriptBin "rebuild" '' (pkgs.writeShellScriptBin "rebuild" ''
#! /bin/bash #! /bin/bash
set -e
# ANSI color codes set -e
GRAY='\e[90m' GRAY='\e[90m'
ORANGE='\e[38;5;214m' ORANGE='\e[38;5;214m'
RESET='\e[0m' RESET='\e[0m'
@@ -85,15 +92,25 @@
pushd ~/dotfiles > /dev/null pushd ~/dotfiles > /dev/null
git diff -U0 *.nix git diff -U0 *.nix
echo -e "''${ORANGE}NixOS Rebuilding...''${RESET}" echo -e "''${ORANGE}NixOS Rebuilding...''${RESET}"
if ! sudo nixos-rebuild switch --flake ./nixos#TrudePC | tee ~/.nixos-rebuild.log; then if ! sudo nixos-rebuild switch --flake ./nixos#TrudePC; then
cat ~/.nixos-rebuild.log | grep --color error
exit 1 exit 1
fi fi
echo echo
echo -e "''${ORANGE}Cleaning up old generations...''${RESET}" echo -e "''${ORANGE}Cleaning up old generations...''${RESET}"
echo -e "''${GRAY}$(sudo nix-collect-garbage --delete-older-than 15d 2>&1)''${RESET}" sudo nix-collect-garbage --delete-older-than 15d &> /dev/null
popd > /dev/null popd > /dev/null
'') '')
(pkgs.writeShellScriptBin "update" ''
set -e
ORANGE='\e[38;5;214m'
RESET='\e[0m'
pushd ~/dotfiles > /dev/null
echo -e "''${ORANGE}Updating Flake...''${RESET}"
sudo nix flake update --flake ./nixos
popd > /dev/null
rebuild
'')
]; ];
home.sessionVariables = { home.sessionVariables = {
@@ -136,6 +153,16 @@
# Use keys from SSH agent instead of identity files # Use keys from SSH agent instead of identity files
identitiesOnly = false; identitiesOnly = false;
}; };
server = {
hostname = "192.168.0.2";
user = "trude";
port = 6022;
};
work = {
hostname = "100.109.38.42"; # Tailscale IP
user = "trude";
port = 6022;
};
}; };
}; };
@@ -410,6 +437,14 @@
}; };
}; };
programs.opencode = {
enable = true;
settings = {
autoshare = false; # No telemetry
};
};
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;
} }