Compare commits

...
Sign in to create a new pull request.

21 commits
novr ... main

Author SHA1 Message Date
Chris (wolcen) Thompson
43a9eaed26 Switch conda->uv and add sqlite cli 2025-08-22 21:49:12 -04:00
Chris (wolcen) Thompson
e1b8df4a30 Update flake.lock 2025-08-22 21:48:50 -04:00
Chris (wolcen) Thompson
d2b21227a3 Update flake.lock 2025-08-15 14:48:13 -04:00
Chris (wolcen) Thompson
3213932772 Add a bunch of baby ducks 2025-08-15 14:48:05 -04:00
Chris (wolcen) Thompson
ba3052d4d2 Update flake.lock 2025-08-11 11:09:06 -04:00
Chris (wolcen) Thompson
866c7d3f8f Add conda 2025-08-11 11:04:51 -04:00
Chris (wolcen) Thompson
6ef1439545 Update flake.lock 2025-08-11 11:04:17 -04:00
Chris (wolcen) Thompson
f65be28fa7 Update flake.lock 2025-08-08 12:24:43 -04:00
Chris (wolcen) Thompson
c58549dc33 Add kdeconnect app 2025-07-28 22:44:15 -04:00
Chris (wolcen) Thompson
eced26c2ed Update flake.lock 2025-07-28 22:44:08 -04:00
Chris (wolcen) Thompson
92eeee91e0 Update flake.lock (previous did not build) 2025-07-19 20:47:41 -04:00
Chris (wolcen) Thompson
2411637159 Update flake.lock 2025-07-15 17:01:07 -04:00
Chris (wolcen) Thompson
ababc0bca5 Update flake.lock 2025-07-03 20:25:47 -04:00
Chris (wolcen) Thompson
c242703350 Finally realized I had these backwards 2025-06-30 15:28:00 -04:00
Chris (wolcen) Thompson
dcd50a4b96 Working VR
holy heck...never thought this would happen
2025-06-28 01:00:21 -04:00
Chris (wolcen) Thompson
cb97b90ca3 Attempt individual kernel module build 2025-06-27 21:05:08 -04:00
Chris (wolcen) Thompson
74f8e77311 Update flake.lock 2025-06-27 20:45:52 -04:00
Chris (wolcen) Thompson
aa5e020a30 Update firewall rules for Ollama server 2025-06-27 20:45:01 -04:00
Chris (wolcen) Thompson
6dc683484d Add disable panel self-refresh to fix AMDGPU bug/hang and switch back to zen kernel 2025-06-27 20:44:42 -04:00
Chris (wolcen) Thompson
72c8b7993f Clean up comments
and yes, it existed
2025-06-27 20:44:14 -04:00
Chris (wolcen) Thompson
c583bee02d Ensure firewall is active
...it was, but there's still a rule I don't understand, despite nmap results looking good
2025-06-27 20:43:45 -04:00
4 changed files with 120 additions and 24 deletions

12
flake.lock generated
View file

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1748737919,
"narHash": "sha256-5kvBbLYdp+n7Ftanjcs6Nv+UO6sBhelp6MIGJ9nWmjQ=",
"lastModified": 1755810213,
"narHash": "sha256-QdenO8f0PTg+tC6HuSvngKcbRZA5oZKmjUT+MXKOLQg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "5675a9686851d9626560052a032c4e14e533c1fa",
"rev": "6911d3e7f475f7b3558b4f5a6aba90fa86099baa",
"type": "github"
},
"original": {
@ -22,11 +22,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1748460289,
"narHash": "sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg=",
"lastModified": 1755615617,
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "96ec055edbe5ee227f28cdbc3f1ddf1df5965102",
"rev": "20075955deac2583bb12f07151c2df830ef346b4",
"type": "github"
},
"original": {

38
hosts/default/amdgpu.nix Normal file
View file

@ -0,0 +1,38 @@
{ pkgs
, lib
, kernel ? pkgs.linuxPackages_latest.kernel
}:
pkgs.stdenv.mkDerivation {
pname = "amdgpu-kernel-module";
inherit (kernel) src version postPatch nativeBuildInputs;
kernel_dev = kernel.dev;
kernelVersion = kernel.modDirVersion;
modulePath = "drivers/gpu/drm/amd/amdgpu";
buildPhase = ''
BUILT_KERNEL=$kernel_dev/lib/modules/$kernelVersion/build
cp $BUILT_KERNEL/Module.symvers .
cp $BUILT_KERNEL/.config .
cp $kernel_dev/vmlinux .
make "-j$NIX_BUILD_CORES" modules_prepare
make "-j$NIX_BUILD_CORES" M=$modulePath modules
'';
installPhase = ''
make \
INSTALL_MOD_PATH="$out" \
XZ="xz -T$NIX_BUILD_CORES" \
M="$modulePath" \
modules_install
'';
meta = {
description = "AMD GPU kernel module";
license = lib.licenses.gpl3;
};
}

View file

@ -10,6 +10,13 @@
{ config, pkgs, inputs, ... }:
# Direct patching to enable async reprojection (for SteamVR) on AMD
let
amdgpu-kernel-module = pkgs.callPackage ./amdgpu.nix {
# Make sure the module targets the same kernel as your system is using.
kernel = config.boot.kernelPackages.kernel;
};
in
{
imports =
[ # Include the results of the hardware scan.
@ -22,12 +29,12 @@
boot.initrd.luks.devices."altssd".device = "/dev/disk/by-partuuid/c0500656-1527-a84d-82f0-8ad764dddc92";
fileSystems."/mnt/arch" =
{ device = "/dev/disk/by-uuid/72db20ba-4dbd-4fb7-891c-b457e2cf9648";
{ device = "/dev/disk/by-uuid/4eda05c2-d434-495d-97a0-8a81e8a533ec";
fsType = "btrfs";
#options = [ "subvolid=5" ];
};
fileSystems."/mnt/arch/home" =
{ device = "/dev/disk/by-uuid/4eda05c2-d434-495d-97a0-8a81e8a533ec";
{ device = "/dev/disk/by-uuid/72db20ba-4dbd-4fb7-891c-b457e2cf9648";
fsType = "btrfs";
#options = [ "subvolid=5" ];
};
@ -55,11 +62,20 @@
# Temporarily pin to 6.12 to fix llvm/rocm build
# https://github.com/NixOS/nixpkgs/issues/368672#issuecomment-2608697421
# boot.kernelPackages = pkgs.linuxPackages_6_12;
# boot.kernelPackages = pkgs.linuxPackages_zen;
boot.kernelPackages = pkgs.linuxPackages_zen;
# nct6775 - for monitoring functions on ASUS ROG STRIX B550-F GAMING WIFI II
# kvm-amd - AMD virtualization support
boot.kernelModules = [ "kvm-amd" "nct6775" ];
# Fix problems with hanging on RX6700 (disables PSR - Panel Self Refresh)
boot.kernelParams = [ "amdgpu.dcdebugmask=0x10" ];
boot.extraModulePackages = [
(amdgpu-kernel-module.overrideAttrs (_: {
patches = [ ./patches/cap_sys_nice_begone.patch ];
}))
];
# Direct patching for enabling for async reprojection (for SteamVR) on AMD
# boot.kernelPatches = [
# {
@ -174,7 +190,8 @@
"wolcen" = import ./home.nix;
};
};
# Install kdeconnect (also opens firewall ports)
programs.kdeconnect.enable = true;
# Install firefox.
programs.firefox.enable = true;
@ -190,6 +207,7 @@
#networking.firewall.allowedTCPPorts = [ 9003 ];
networking.firewall = {
enable = true;
allowedTCPPorts = [ 9003 ];
allowedUDPPorts = [ 51820 ];
# if packets are still dropped, they will show up in dmesg
@ -197,8 +215,8 @@
checkReversePath = "loose";
extraCommands = ''
# Enable connections to Ollama for VPN users:
iptables -t filter -I INPUT --protocol TCP --source 10.40.4.0/24 --destination 10.40.4.2 --dport 8080 -j ACCEPT
iptables -t filter -I INPUT --protocol TCP --source 10.40.4.2/32 --destination 10.40.4.2 --dport 11434 -j ACCEPT
iptables -t filter -I INPUT --protocol TCP --source 10.0.7.0/24 --destination 10.40.4.2 --dport 11434 -j ACCEPT
'';
# wireguard trips rpfilter up
#extraCommands = ''
@ -217,6 +235,10 @@
# $ nix search wget
environment.systemPackages = with pkgs; [
binutils # gnu bin utils
# conda # python environment management
uv # alternative for python env management...
sqlite-interactive # sqlite cli
duckdb # wanted mostly as cli for SQL on csv files
neovim # next gen vim w/lua
wget # url fetcher/spider
curl # url fetcher
@ -249,7 +271,6 @@
libreoffice-qt # libreoffice - qt is best for KDE
hunspell # spell checking
hunspellDicts.en_US # spell check dictionary
#corectl # this doesn't exist????
magic-wormhole # transfer files with ease
screen # terminal multiplexer...from GNU
gnumake # build automation tool
@ -444,13 +465,30 @@
enable = true;
defaultRuntime = true; # Register as default OpenXR runtime
forceDefaultRuntime = true; # Register as default OpenXR runtime for each user (remove home-manager file)
highPriority = true;
package = (pkgs.monado.overrideAttrs {
pname = "monado-wmr-controllers"; # optional but helps distinguishing between packages
src = pkgs.fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "thaytan";
repo = "monado";
rev = "467166935eea0183a8c8f5884c4ecd20c0eeacfb";
hash = "sha256-IKO/bhUsISmRb3k+wAEscuTUXDyrzyVYQG1eJkLCIUI=";
};
patches = [];
});
};
systemd.user.services.monado.environment = {
WMR_HANDTRACKING = "0"; # Enable for hand tracking
XRT_PRINT_OPTIONS = "1"; # Enable printing env vars set/available
VIT_SYSTEM_LIBRARY_PATH = "${pkgs.basalt-monado}/lib/libbasalt.so";
XRT_COMPOSITOR_COMPUTE = "1";
STEAMVR_LH_ENABLE = "0";
U_PACING_COMP_MIN_TIME_MS = "5";
XRT_COMPOSITOR_DESIRED_MODE = "1";
};
#systemd.user.services.monado.environment = {
# WMR_HANDTRACKING = "0"; # Enable for hand tracking
# XRT_PRINT_OPTIONS = "1"; # Enable printing env vars set/available
# VIT_SYSTEM_LIBRARY_PATH = "${pkgs.basalt-monado}/lib/libbasalt.so";
# #U_PACING_COMP_MIN_TIME_MS = "5"; # This is a tweak for something...I forgot
#};
# allow clock adjustments/priority change, etc (gamemoderun ./game)
# https://wiki.nixos.org/wiki/GameMode
programs.gamemode.enable = true; # for performance mode
@ -459,12 +497,6 @@
programs.steam.gamescopeSession.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave

View file

@ -0,0 +1,26 @@
From fe059b4c373639fc5d69067e62de3f2a0e44a037 Mon Sep 17 00:00:00 2001
From: Sefa Eyeoglu <contact@scrumplex.net>
Date: Fri, 17 Mar 2023 16:50:57 +0100
Subject: [PATCH] amdgpu: allow any ctx priority
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
index d2139ac12159..c7f1d36329c8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
@@ -107,7 +107,7 @@ static int amdgpu_ctx_priority_permit(struct drm_file *filp,
if (drm_is_current_master(filp))
return 0;
- return -EACCES;
+ return 0;
}
static enum amdgpu_gfx_pipe_priority amdgpu_ctx_prio_to_gfx_pipe_prio(int32_t prio)
--
2.39.2