complete restructure

This commit is contained in:
Melvin Ragusa
2026-02-04 22:53:00 +01:00
parent d516c95d65
commit c4cd70fd20
43 changed files with 985 additions and 1229 deletions

View File

@@ -0,0 +1,70 @@
# modules/hardware/audio.nix
# PipeWire audio, Bluetooth, and media controls
{
config,
pkgs,
lib,
...
}:
{
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
wireplumber.extraConfig = {
"10-bluez" = {
"monitor.bluez.properties" = {
"bluez5.enable-sbc-xq" = true;
"bluez5.enable-msbc" = true;
"bluez5.enable-hw-volume" = true;
"bluez5.roles" = [
"a2dp_sink"
"a2dp_source"
"bap_sink"
"bap_source"
"hsp_hs"
"hsp_ag"
"hfp_hf"
"hfp_ag"
];
"bluez5.codecs" = [
"ldac"
"aac"
"aptx_hd"
"aptx"
"sbc_xq"
"sbc"
];
};
};
};
};
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
Experimental = false;
KernelExperimental = false;
};
Policy = {
AutoEnable = true;
};
};
};
environment.systemPackages = with pkgs; [
pwvucontrol
pavucontrol
playerctl
];
}

View File

@@ -0,0 +1,9 @@
# modules/hardware/default.nix
{
imports = [
./storage.nix
./audio.nix
./gpu-amd.nix
./power.nix
];
}

View File

@@ -0,0 +1,38 @@
# modules/hardware/gpu-amd.nix
# AMD GPU drivers, Vulkan, and video acceleration
{
config,
pkgs,
lib,
...
}:
{
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
libva-vdpau-driver
libvdpau-va-gl
rocmPackages.clr.icd
];
extraPackages32 = with pkgs.driversi686Linux; [
libva-vdpau-driver
libvdpau-va-gl
];
};
programs.corectrl.enable = true;
hardware.amdgpu.overdrive.enable = true;
environment.systemPackages = with pkgs; [
radeontop
nvtopPackages.amd
vulkan-tools
vulkan-loader
libva-utils
vdpauinfo
];
}

View File

@@ -0,0 +1,17 @@
# modules/hardware/power.nix
# Power management and CPU governor
{
config,
pkgs,
lib,
...
}:
{
services.power-profiles-daemon.enable = true;
powerManagement.cpuFreqGovernor = "schedutil";
environment.systemPackages = with pkgs; [
power-profiles-daemon
];
}

View File

@@ -0,0 +1,52 @@
# modules/hardware/storage.nix
# Filesystems, SSD maintenance, and swap
{
config,
pkgs,
lib,
username,
...
}:
{
fileSystems."/mnt/Intenso-SSD" = {
device = "/dev/disk/by-uuid/51c56376-8384-4762-a8e9-8151fe91173b";
fsType = "ext4";
options = [
"defaults"
"nofail"
"x-gvfs-show"
];
};
fileSystems."/mnt/Samsung-SSD" = {
device = "/dev/disk/by-uuid/343ea612-9305-4fb6-9d4c-7a7ca8b0e72c";
fsType = "ext4";
options = [
"defaults"
"nofail"
"x-gvfs-show"
];
};
fileSystems."/mnt/Extern-SSD" = {
device = "/dev/disk/by-uuid/4e233c88-e91b-480c-b795-6fffc1fbdc69";
fsType = "ext4";
options = [
"defaults"
"nofail"
"x-gvfs-show"
];
};
services.fstrim = {
enable = true;
interval = "weekly";
};
zramSwap = {
enable = true;
algorithm = "zstd";
memoryPercent = 100;
};
}