setup new system with amd-gpu

This commit is contained in:
Christoph Hollizeck 2025-08-15 17:14:55 +02:00
parent 0aa9032372
commit cbc2382c47
Signed by: Daholli
GPG key ID: 249300664F2AF2C7
4 changed files with 505 additions and 0 deletions

View file

@ -0,0 +1,291 @@
{
lib,
pkgs,
config,
namespace,
osConfig ? { },
format ? "unknown",
...
}:
with lib.${namespace};
{
wyrdgard = {
apps = {
kitty = enabled;
};
tools = {
direnv = enabled;
};
};
services.easyeffects = {
enable = true;
preset = "jtrv-preset";
extraPresets = {
jtrv-preset = {
input = {
blocklist = [
];
"compressor#0" = {
attack = 5;
boost-amount = 6;
boost-threshold = -72;
bypass = false;
dry = -100;
hpf-frequency = 10;
hpf-mode = "off";
input-gain = 0;
knee = -6;
lpf-frequency = 20000;
lpf-mode = "off";
makeup = 0;
mode = "Downward";
output-gain = 0;
ratio = 4;
release = 75;
release-threshold = -40;
sidechain = {
lookahead = 0;
mode = "RMS";
preamp = 0;
reactivity = 10;
source = "Middle";
stereo-split-source = "Left/Right";
type = "Feed-forward";
};
stereo-split = false;
threshold = -20;
wet = 0;
};
"deesser#0" = {
bypass = false;
detection = "RMS";
f1-freq = 3000.0;
f1-level = -6.0;
f2-freq = 5000.0;
f2-level = -6.0;
f2-q = 1.5000000000000004;
input-gain = 0.0;
laxity = 15;
makeup = 0;
mode = "Wide";
output-gain = 0;
ratio = 5;
sc-listen = false;
threshold = -20;
};
"equalizer#0" = {
balance = 0;
bypass = false;
input-gain = 0;
left = {
band0 = {
frequency = 50;
gain = 3;
mode = "RLC (BT)";
mute = false;
q = 0.7;
slope = "x1";
solo = false;
type = "Hi-pass";
width = 4;
};
band1 = {
frequency = 90;
gain = 3;
mode = "RLC (MT)";
mute = false;
q = 0.7;
slope = "x1";
solo = false;
type = "Lo-shelf";
width = 4;
};
band2 = {
frequency = 425;
gain = -2;
mode = "BWC (MT)";
mute = false;
q = 0.9999999999999998;
slope = "x2";
solo = false;
type = "Bell";
width = 4;
};
band3 = {
frequency = 3500;
gain = 3;
mode = "BWC (BT)";
mute = false;
q = 0.7;
slope = "x2";
solo = false;
type = "Bell";
width = 4;
};
band4 = {
frequency = 9000;
gain = 2;
mode = "LRX (MT)";
mute = false;
q = 0.7;
slope = "x1";
solo = false;
type = "Hi-shelf";
width = 4;
};
};
mode = "IIR";
num-bands = 5;
output-gain = 0;
pitch-left = 0;
pitch-right = 0;
right = {
band0 = {
frequency = 50;
gain = 3;
mode = "RLC (BT)";
mute = false;
q = 0.7;
slope = "x1";
solo = false;
type = "Hi-pass";
width = 4;
};
band1 = {
frequency = 90;
gain = 3;
mode = "RLC (MT)";
mute = false;
q = 0.9999999999999998;
slope = "x1";
solo = false;
type = "Lo-shelf";
width = 4;
};
band2 = {
frequency = 425;
gain = -2;
mode = "BWC (MT)";
mute = false;
q = 0.7;
slope = "x2";
solo = false;
type = "Bell";
width = 4;
};
band3 = {
frequency = 3500;
gain = 3;
mode = "BWC (BT)";
mute = false;
q = 0.7;
slope = "x2";
solo = false;
type = "Bell";
width = 4;
};
band4 = {
frequency = 9000;
gain = 2;
mode = "LRX (MT)";
mute = false;
q = 0.7;
slope = "x1";
solo = false;
type = "Hi-shelf";
width = 4;
};
};
split-channels = false;
};
"gate#0" = {
attack = 1;
bypass = false;
curve-threshold = -50;
curve-zone = -2;
dry = -100;
hpf-frequency = 10;
hpf-mode = "off";
hysteresis = true;
hysteresis-threshold = -3;
hysteresis-zone = -1;
input-gain = 0;
lpf-frequency = 20000;
lpf-mode = "off";
makeup = 1;
output-gain = 0;
reduction = -15;
release = 200;
sidechain = {
input = "Internal";
lookahead = 0;
mode = "RMS";
preamp = 0;
reactivity = 10;
source = "Middle";
stereo-split-source = "Left/Right";
};
stereo-split = false;
wet = -1;
};
"limiter#0" = {
alr = false;
alr-attack = 5;
alr-knee = 0;
alr-release = 50;
attack = 1;
bypass = false;
dithering = "16bit";
external-sidechain = false;
gain-boost = true;
input-gain = 0;
lookahead = 5;
mode = "Herm Wide";
output-gain = 0;
oversampling = "Half x2(2L)";
release = 5;
sidechain-preamp = 0;
stereo-link = 100;
threshold = -1;
};
plugins_order = [
"rnnoise#0"
"gate#0"
"deesser#0"
"compressor#0"
"equalizer#0"
"speex#0"
"limiter#0"
];
"rnnoise#0" = {
bypass = false;
enable-vad = false;
input-gain = 0;
model-path = "";
output-gain = 0;
release = 20;
vad-thres = 50;
wet = 0;
};
"speex#0" = {
bypass = false;
enable-agc = false;
enable-denoise = false;
enable-dereverb = false;
input-gain = 0;
noise-suppression = -70;
output-gain = 0;
vad = {
enable = true;
probability-continue = 90;
probability-start = 95;
};
};
};
};
};
};
}

View file

@ -0,0 +1,97 @@
{
inputs,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib.${namespace}) enabled disabled;
in
{
imports = [
./hardware.nix
./hyprland_config.nix
];
environment.systemPackages = with pkgs; [
path-of-building
teams-for-linux
obsidian
zed-editor
# eve
bottles
pyfa
# misc
diebahn
nixpkgs-review
];
environment.pathsToLink = [ "/libexec" ];
virtualisation.waydroid = enabled;
programs.ssh.extraConfig = ''
AddressFamily inet
'';
home-manager = {
backupFileExtension = ".bak";
};
nix = {
distributedBuilds = true;
settings.builders-use-substitutes = true;
buildMachines = [
{
hostName = "nixberry";
sshUser = "remotebuild";
sshKey = "/root/.ssh/remotebuild";
systems = [ "aarch64-linux" ];
protocol = "ssh-ng";
supportedFeatures = [
"nixos-test"
"big-parallel"
"kvm"
];
}
];
};
${namespace} = {
archetypes = {
gaming.enable = true;
};
apps = {
_1password = enabled;
obs-studio = enabled;
cli-apps.helix = enabled;
starsector = enabled;
};
desktop.hyprland = {
enable = true;
};
services = {
factorio-server = disabled;
};
tools.devenv = enabled;
system = {
hardware = {
bluetooth = enabled;
# gpu.nvidia = enabled;
};
};
security.gpg = enabled;
};
system.stateVersion = "23.11";
}

View file

@ -0,0 +1,69 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
modulesPath,
inputs,
...
}:
let
inherit (inputs) nixos-hardware;
in
{
imports = with nixos-hardware.nixosModules; [
(modulesPath + "/installer/scan/not-detected.nix")
common-cpu-amd
common-gpu-nvidia-nonprime
common-pc
common-pc-ssd
];
boot = {
initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
initrd.kernelModules = [ ];
kernelModules = [
"kvm-amd"
"btusb"
];
extraModulePackages = [ ];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/444a9216-59d1-46e0-9643-0b716a42ba0b";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/8310-585A";
fsType = "vfat";
};
"/storage" = {
device = "/dev/disk/by-uuid/c3c1dec1-7716-4c37-a3f2-bb60f9af84fd";
fsType = "ext4";
};
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp40s0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp42s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -0,0 +1,48 @@
{
lib,
namespace,
pkgs,
...
}:
let
in
{
${namespace}.desktop.hyprland.settings = {
monitor = [
#Ultrawide
"DP-2,3440x1440@144, 0x0, 1"
#Vertical
"HDMI-A-1, 1920x1080@144, auto-right, 1, transform, 1"
# nividia kernel issues
"Unknown-1, disable"
];
cursor = {
no_hardware_cursors = true;
};
exec-once = [
"[workspace 7 silent] obsidian"
"${lib.getExe pkgs.xorg.xrandr} --output DP-2 --primary"
];
workspace = [
"1, monitor:DP-2"
"2, monitor:DP-2"
"3, monitor:DP-2"
"4, monitor:DP-2"
"5, monitor:DP-2"
"6, monitor:DP-2"
"7, monitor:HDMI-A-1"
"8, monitor:HDMI-A-1"
"9, monitor:HDMI-A-1"
];
windowrulev2 = [
"workspace 8 silent, class:^(steam)$, title:^(Friends List)"
"workspace 8 silent, class:^(discord)$, title:^(Discord)"
"workspace 7 silent, class:^(com.obsproject.Studio)$"
];
};
}