refactor everything holy fuck

This commit is contained in:
k3t
2026-06-01 18:15:26 -06:00
parent 40d1c7f1e1
commit f9bbbcf96f
46 changed files with 696 additions and 387 deletions
+26
View File
@@ -0,0 +1,26 @@
{ pkgs, lib, ... }:
{
# Enable sound with pipewire.
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
wireplumber.extraConfig.bluetoothEnhancements = {
"monitor.bluez.properties" = {
"bluez5.enable-sbc-xq" = true;
"bluez5.enable-msbc" = true;
"bluez5.enable-hw-volume" = true;
"bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" "a2dp_sink" "a2dp_source" "bap_sink" "bap_source" ];
};
};
};
}
+23
View File
@@ -0,0 +1,23 @@
{
services.pipewire.extraConfig.pipewire-pulse = {
"10-zeroconf" = {
"pulse.cmd" = [
{
cmd = "load-module";
args = "module-zeroconf-discover";
flags = [];
}
{
cmd = "load-module";
args = "module-zeroconf-publish";
flags = [];
}
{
cmd = "load-module";
args = "module-native-protocol-tcp";
flags = ["auth-anonymous"];
}
];
};
};
}
+31
View File
@@ -0,0 +1,31 @@
{ pkgs, lib, ... }:
{
# desktop oriented bluetooth settings
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
# Shows battery charge of connected devices on supported
# Bluetooth adapters. Defaults to 'false'.
Experimental = true;
KernelExperimental = true;
# When enabled other devices can connect faster to us, however
# the tradeoff is increased power consumption. Defaults to
# 'false'.
FastConnectable = true;
ControllerMode = "both";
Testing = true;
};
Policy = {
# Enable all controllers when they are found. This includes
# adapters present on start as well as adapters that are plugged
# in later on. Defaults to 'true'.
AutoEnable = true;
};
};
};
}
+31
View File
@@ -0,0 +1,31 @@
{ pkgs, lib, ... }:
{
# desktop oriented bluetooth settings
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
# Shows battery charge of connected devices on supported
# Bluetooth adapters. Defaults to 'false'.
Experimental = true;
KernelExperimental = true;
# When enabled other devices can connect faster to us, however
# the tradeoff is increased power consumption. Defaults to
# 'false'.
FastConnectable = false;
ControllerMode = "both";
Testing = true;
};
Policy = {
# Enable all controllers when they are found. This includes
# adapters present on start as well as adapters that are plugged
# in later on. Defaults to 'true'.
AutoEnable = true;
};
};
};
}
-88
View File
@@ -1,88 +0,0 @@
{ pkgs, ... }: {
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
substituters = [
"https://nix-community.cachix.org"
"https://cache.nixos.org/"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
optimise.automatic = true;
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 2d";
};
};
nixpkgs.config.allowUnfree = true;
# auto upgrade from your public repo
system.autoUpgrade = {
#enable = true;
flake = "github:notquitek3t/nixconf";
};
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
# networking
networking.networkmanager.enable = true;
services.tailscale.enable = true;
# environment
programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;
environment.pathsToLink = [ "/share/zsh" ];
environment.systemPackages = with pkgs; [
git
neovim
caligula
openssl
topgrade
htop
mosh
btop
wget2
python314
];
# disable core dumps
systemd.coredump.enable = false;
# zram swap
zramSwap.enable = true;
zramSwap.memoryPercent = 80;
# security
security.polkit.enable = true;
users.users.k3t = {
description = "Kai Moore";
isNormalUser = true;
extraGroups = [ "audio" "video" "bluetooth" "wheel" "input" "networkmanager" ];
initialPassword = "password";
linger = true;
};
# locale / time — adjust as needed
time.timeZone = "America/Denver";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
system.stateVersion = "25.11";
}
+55
View File
@@ -0,0 +1,55 @@
{ pkgs, lib, ... }:
{
# X11
services.xserver = {
videoDrivers = [ "modesetting" "amdgpu" ];
enable = true;
xkb = {
layout = "us";
variant = "";
};
desktopManager = {
xterm.enable = false;
xfce = {
enable = true;
noDesktop = true;
enableXfwm = false;
};
};
libinput.enable = true;
windowManager.i3 = {
enable = true;
extraPackages = with pkgs; [
dmenu
i3status
i3lock
i3blocks
];
};
};
services.displayManager.defaultSession = "xfce+i3";
services.picom = {
enable = true;
fade = true;
#vSync = true;
shadow = true;
fadeDelta = 4 ;
inactiveOpacity = 1;
activeOpacity = 1;
#backend = "glx";
settings = {
blur = {
#method = "dual_kawase";
#background = true;
strength = 5;
};
};
};
# useful services
services.gvfs.enable = true;
services.tumbler.enable = true;
programs.dconf.enable = true;
}
+9
View File
@@ -0,0 +1,9 @@
{ pkgs, lib, ... }:
{
services = {
desktopManager.plasma6.enable = true;
displayManager.plasma-login-manager.enable = true;
xserver.enable = true;
};
}
-249
View File
@@ -1,262 +1,13 @@
{ pkgs, lib, spicetify-nix, ... }:
let
spicePkgs = spicetify-nix.legacyPackages.${pkgs.stdenv.system};
in
{
# Bootloader
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
boot.kernelParams = [ "i915.enable_guc=3" ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
# Avahi
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
publish = {
addresses = true;
domain = true;
enable = true;
hinfo = true;
userServices = true;
workstation = true;
};
};
# Self Maintenance
services.btrfs.autoScrub = {
enable = true;
interval = "weekly";
fileSystems = [ "/" ];
};
# Performance
services.system76-scheduler.enable = true;
#hardware.system76.power-daemon.enable = true;
services.thermald.enable = true;
services.power-profiles-daemon.enable = true;
# Support
fonts.packages = with pkgs; [ nerd-fonts.fira-code noto-fonts noto-fonts-cjk-sans liberation_ttf fira-code fira-code-symbols ];
services.gvfs.enable = true;
services.tumbler.enable = true;
programs.dconf.enable = true;
services.flatpak.enable = true;
boot.binfmt.preferStaticEmulators = true;
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
programs.nix-ld.enable = true;
programs.appimage.enable = true;
programs.appimage.binfmt = true;
# Printing
services.printing.enable = true;
# Graphics
hardware.enableRedistributableFirmware = true;
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
# Required for modern Intel GPUs (Xe iGPU and ARC)
intel-media-driver # VA-API (iHD) userspace
vpl-gpu-rt # oneVPL (QSV) runtime
# Optional (compute / tooling):
intel-compute-runtime # OpenCL (NEO) + Level Zero for Arc/Xe
# NOTE: 'intel-ocl' also exists as a legacy package; not recommended for Arc/Xe.
# libvdpau-va-gl # Only if you must run VDPAU-only apps
];
};
#environment.sessionVariables = {
# LIBVA_DRIVER_NAME = "iHD"; # Prefer the modern iHD backend
# # VDPAU_DRIVER = "va_gl"; # Only if using libvdpau-va-gl
#};
# X11
services.xserver = {
videoDrivers = [ "modesetting" "amdgpu" ];
enable = true;
xkb = {
layout = "us";
variant = "";
};
desktopManager = {
xterm.enable = false;
xfce = {
enable = true;
noDesktop = true;
enableXfwm = false;
};
};
libinput.enable = true;
#windowManager.i3.enable = true;
windowManager.i3 = {
#package = pkgs.i3-gaps;
enable = true;
extraPackages = with pkgs; [
dmenu
i3status
i3lock
i3blocks
];
};
};
services.displayManager.defaultSession = "xfce+i3";
services.picom = {
enable = true;
fade = true;
#vSync = true;
shadow = true;
fadeDelta = 4 ;
inactiveOpacity = 1;
activeOpacity = 1;
#backend = "glx";
settings = {
blur = {
#method = "dual_kawase";
#background = true;
strength = 5;
};
};
};
# desktop oriented bluetooth settings
hardware.bluetooth = {
settings = {
General = {
# Shows battery charge of connected devices on supported
# Bluetooth adapters. Defaults to 'false'.
Experimental = true;
KernelExperimental = true;
# When enabled other devices can connect faster to us, however
# the tradeoff is increased power consumption. Defaults to
# 'false'.
FastConnectable = true;
ControllerMode = "both";
};
Policy = {
# Enable all controllers when they are found. This includes
# adapters present on start as well as adapters that are plugged
# in later on. Defaults to 'true'.
AutoEnable = true;
};
};
};
# Sunshine (remote desktop)
services.sunshine = {
enable = true;
autoStart = true;
capSysAdmin = true;
openFirewall = true;
};
# Enable sound with pipewire.
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
wireplumber.extraConfig.bluetoothEnhancements = {
"monitor.bluez.properties" = {
"bluez5.enable-sbc-xq" = true;
"bluez5.enable-msbc" = true;
"bluez5.enable-hw-volume" = true;
"bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" "a2dp_sink" "a2dp_source" "bap_sink" "bap_source" ];
};
};
};
programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
programs.kdeconnect.enable = true;
environment.etc."firefox/policies/policies.json".target = "librewolf/policies/policies.json";
programs.firefox = {
enable = true;
package = pkgs.librewolf;
policies = {
DisableTelemetry = true;
DisableFirefoxStudies = true;
Preferences = {
"cookiebanners.service.mode.privateBrowsing" = 2; # Block cookie banners in private browsing
"cookiebanners.service.mode" = 2; # Block cookie banners
"privacy.donottrackheader.enabled" = true;
"privacy.fingerprintingProtection" = true;
"privacy.resistFingerprinting" = true;
"privacy.trackingprotection.emailtracking.enabled" = true;
"privacy.trackingprotection.enabled" = true;
"privacy.trackingprotection.fingerprinting.enabled" = true;
"privacy.trackingprotection.socialtracking.enabled" = true;
};
ExtensionSettings = {
"jid1-ZAdIEUB7XOzOJw@jetpack" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/duckduckgo-for-firefox/latest.xpi";
installation_mode = "force_installed";
};
"uBlock0@raymondhill.net" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
installation_mode = "force_installed";
};
};
};
};
networking.firewall = {
enable = false;
allowedTCPPortRanges = [
{ from = 8000; to = 9000; }
];
allowedUDPPortRanges = [
{ from = 8000; to = 9000; }
];
};
programs.spicetify = {
enable = true;
enabledExtensions = with spicePkgs.extensions; [
adblock
hidePodcasts
shuffle # shuffle+ (special characters are sanitized out of extension names)
];
enabledCustomApps = with spicePkgs.apps; [
newReleases
ncsVisualizer
];
enabledSnippets = with spicePkgs.snippets; [
rotatingCoverart
pointer
];
theme = spicePkgs.themes.catppuccin;
colorScheme = "mocha";
};
security.pam.services.k3t.kwallet.enable = true;
security.pam.services.k3t.kwallet.forceRun = true;
users.users.k3t = {
packages = with pkgs; [
moonlight-qt
+34
View File
@@ -0,0 +1,34 @@
{ pkgs, lib, ... }:
{
environment.etc."firefox/policies/policies.json".target = "librewolf/policies/policies.json";
programs.firefox = {
enable = true;
package = pkgs.librewolf;
policies = {
DisableTelemetry = true;
DisableFirefoxStudies = true;
Preferences = {
"cookiebanners.service.mode.privateBrowsing" = 2; # Block cookie banners in private browsing
"cookiebanners.service.mode" = 2; # Block cookie banners
"privacy.donottrackheader.enabled" = true;
"privacy.fingerprintingProtection" = true;
"privacy.resistFingerprinting" = true;
"privacy.trackingprotection.emailtracking.enabled" = true;
"privacy.trackingprotection.enabled" = true;
"privacy.trackingprotection.fingerprinting.enabled" = true;
"privacy.trackingprotection.socialtracking.enabled" = true;
};
ExtensionSettings = {
"jid1-ZAdIEUB7XOzOJw@jetpack" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/duckduckgo-for-firefox/latest.xpi";
installation_mode = "force_installed";
};
"uBlock0@raymondhill.net" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
installation_mode = "force_installed";
};
};
};
};
}
+28
View File
@@ -0,0 +1,28 @@
{ pkgs, lib, spicetify-nix, ... }:
let
spicePkgs = spicetify-nix.legacyPackages.${pkgs.stdenv.system};
in
{
programs.spicetify = {
enable = true;
enabledExtensions = with spicePkgs.extensions; [
adblock
hidePodcasts
shuffle # shuffle+ (special characters are sanitized out of extension names)
];
enabledCustomApps = with spicePkgs.apps; [
newReleases
ncsVisualizer
];
enabledSnippets = with spicePkgs.snippets; [
rotatingCoverart
pointer
];
theme = spicePkgs.themes.catppuccin;
colorScheme = "mocha";
};
}
+4
View File
@@ -0,0 +1,4 @@
{ pkgs, ... }:
{
fonts.packages = with pkgs; [ nerd-fonts.fira-code noto-fonts noto-fonts-cjk-sans liberation_ttf fira-code fira-code-symbols ];
}
+3
View File
@@ -0,0 +1,3 @@
{
services.flatpak.enable = true;
}
+3
View File
@@ -0,0 +1,3 @@
{
programs.kdeconnect.enable = true;
}
+4
View File
@@ -0,0 +1,4 @@
{
security.pam.services.k3t.kwallet.enable = true;
security.pam.services.k3t.kwallet.forceRun = true;
}
+3
View File
@@ -0,0 +1,3 @@
{
xdg.portal.enable = true;
}
+16
View File
@@ -0,0 +1,16 @@
{
# Avahi
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
publish = {
addresses = true;
domain = true;
enable = true;
hinfo = true;
userServices = true;
workstation = true;
};
};
}
+6
View File
@@ -0,0 +1,6 @@
{
networking.networkmanager = {
enable = true;
wifi.powersave = true;
};
}
+3
View File
@@ -0,0 +1,3 @@
{
services.printing.enable = true;
}
+5
View File
@@ -0,0 +1,5 @@
{
services.tailscale = {
enable = true;
};
}
-12
View File
@@ -26,16 +26,4 @@
raspberrypi-eeprom
];
# ssh so you can manage them remotely
services.openssh = {
enable = true;
settings.PasswordAuthentication = true;
};
# auto upgrade on pis can reboot unattended
system.autoUpgrade = {
#operation = "boot";
allowReboot = true;
rebootWindow = { lower = "02:00"; upper = "05:00"; };
};
}
+6
View File
@@ -0,0 +1,6 @@
{
programs.nix-ld.enable = true;
programs.appimage.enable = true;
programs.appimage.binfmt = true;
services.dbus.implementation = "broker";
}
+13
View File
@@ -0,0 +1,13 @@
{
networking.firewall = {
enable = true;
allowedTCPPorts = [ 4713 ];
#allowedUDPPorts = [ 80 443 ];
allowedTCPPortRanges = [
{ from = 8000; to = 9000; }
];
allowedUDPPortRanges = [
{ from = 8000; to = 9000; }
];
};
}
+7
View File
@@ -0,0 +1,7 @@
{
services.btrfs.autoScrub = {
enable = true;
interval = "weekly";
fileSystems = [ "/" ];
};
}
+9
View File
@@ -0,0 +1,9 @@
{ pkgs, ... }:
{
boot.loader.limine.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
}
+5
View File
@@ -0,0 +1,5 @@
{
boot.binfmt.preferStaticEmulators = true;
boot.binfmt.emulatedSystems = [ "aarch64-linux" "x86_64-windows" ];
boot.kernelModules = [ "kvm-amd" ];
}
+4
View File
@@ -0,0 +1,4 @@
{
boot.binfmt.preferStaticEmulators = true;
boot.binfmt.emulatedSystems = [ "x86_64-linux" "i386-linux" ];
}
+5
View File
@@ -0,0 +1,5 @@
{
boot.binfmt.preferStaticEmulators = true;
boot.binfmt.emulatedSystems = [ "aarch64-linux" "x86_64-windows" ];
boot.kernelModules = [ "kvm-intel" ];
}
+3
View File
@@ -0,0 +1,3 @@
{
}
+20
View File
@@ -0,0 +1,20 @@
{ pkgs, ... }:
{
boot.kernelParams = [ "i915.enable_guc=3" ];
# Graphics
hardware.enableRedistributableFirmware = true;
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
# Required for modern Intel GPUs (Xe iGPU and ARC)
intel-media-driver # VA-API (iHD) userspace
vpl-gpu-rt # oneVPL (QSV) runtime
# Optional (compute / tooling):
intel-compute-runtime # OpenCL (NEO) + Level Zero for Arc/Xe
# NOTE: 'intel-ocl' also exists as a legacy package; not recommended for Arc/Xe.
# libvdpau-va-gl # Only if you must run VDPAU-only apps
];
};
}
+21
View File
@@ -0,0 +1,21 @@
{
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
substituters = [
"https://nix-community.cachix.org"
"https://cache.nixos.org/"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
optimise.automatic = true;
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 2d";
};
};
nixpkgs.config.allowUnfree = true;
}
+8
View File
@@ -0,0 +1,8 @@
{
services.system76-scheduler.enable = true;
#services.thermald.enable = true;
services.power-profiles-daemon.enable = true;
systemd.coredump.enable = false;
zramSwap.enable = true;
zramSwap.memoryPercent = 80;
}
+15
View File
@@ -0,0 +1,15 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
git
neovim
caligula
openssl
topgrade
htop
mosh
btop
wget2
python314
];
}
+6
View File
@@ -0,0 +1,6 @@
{
services.openssh = {
enable = true;
settings.PasswordAuthentication = true;
};
}
+8
View File
@@ -0,0 +1,8 @@
{
services.sunshine = {
enable = true;
autoStart = true;
capSysAdmin = true;
openFirewall = true;
};
}
+13
View File
@@ -0,0 +1,13 @@
{ pkgs, lib, ... }:
{
# OpenRGB
services.hardware.openrgb = {
enable = true;
package = pkgs.openrgb-with-all-plugins;
motherboard = "amd";
server = {
port = 6742;
};
};
}
+10
View File
@@ -0,0 +1,10 @@
{
security.polkit.enable = true;
system.autoUpgrade = {
enable = true;
flake = "git+https://k3t.dev/git/nixconf.git?branch=main";
operation = "boot";
allowReboot = true;
rebootWindow = { lower = "10:00"; upper = "14:00"; };
};
}
+7
View File
@@ -0,0 +1,7 @@
{ pkgs, ... }:
{
programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;
environment.pathsToLink = [ "/share/zsh" ];
}
+3
View File
@@ -0,0 +1,3 @@
{
system.stateVersion = "25.11";
}
+15
View File
@@ -0,0 +1,15 @@
{
time.timeZone = "America/Denver";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
}
+9
View File
@@ -0,0 +1,9 @@
{
users.users.k3t = {
description = "Kai Moore";
isNormalUser = true;
extraGroups = [ "audio" "video" "bluetooth" "wheel" "input" "networkmanager" ];
initialPassword = "password";
linger = true;
};
}
-9
View File
@@ -1,9 +1,5 @@
{ pkgs, ... }: {
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.binfmt.emulatedSystems = ["x86_64-linux" "i386-linux"];
#environment.systemPackages = with pkgs; [
#];
@@ -13,9 +9,4 @@
settings.PasswordAuthentication = true;
};
system.autoUpgrade = {
operation = "boot";
allowReboot = true;
rebootWindow = { lower = "02:00"; upper = "05:00"; };
};
}