complete restructure
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# configuration.nix
|
||||
# Main NixOS configuration - imports modular components
|
||||
# Main NixOS configuration entry point
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
@@ -11,266 +11,8 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
# Hardware
|
||||
./hardware-configuration.nix
|
||||
|
||||
# Modular configuration
|
||||
./modules/desktop.nix # Portal, polkit, launcher, lock, wallpaper
|
||||
./modules/boot-plymouth.nix # Plymouth boot splash
|
||||
./modules/gpu-amd.nix # AMD graphics, Vulkan, VA-API
|
||||
./modules/audio.nix # Bluetooth, audio controls
|
||||
./modules/gaming.nix # Steam, Gamemode, Lutris, etc.
|
||||
./modules/apps.nix # User applications
|
||||
./modules/dev.nix # Docker, dev tools
|
||||
./modules/theming.nix # Fonts, themes, cursors
|
||||
./modules/power.nix # Power management, CPU governors
|
||||
./modules/shell.nix # Fish shell configuration
|
||||
./modules/services.nix # System services (fstrim, zram, avahi, psd)
|
||||
./modules/navidrome.nix # Music streaming server
|
||||
./modules/limine-custom-labels.nix # Custom boot entry labels with kernel version
|
||||
./modules
|
||||
./modules/limine-custom-labels.nix
|
||||
];
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
# SECONDARY STORAGE
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
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"
|
||||
];
|
||||
};
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
# BOOT
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
|
||||
# ─── Bootloader: Limine with Secure Boot ───
|
||||
boot.loader.systemd-boot.enable = false; # Disabled - using Limine
|
||||
boot.loader.limine = {
|
||||
enable = true;
|
||||
style.wallpapers = [ ./wallpaper/nix.png ];
|
||||
maxGenerations = 5;
|
||||
};
|
||||
|
||||
boot.loader.limine.secureBoot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# ─── Kernel ───
|
||||
boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-latest-x86_64-v3;
|
||||
|
||||
# Kernel parameters (consolidated from modules)
|
||||
boot.kernelParams = [
|
||||
"amd_pstate=active" # Modern Ryzen power management (from power.nix)
|
||||
"amdgpu.ppfeaturemask=0xffffffff" # Full AMD GPU power features (from gpu-amd.nix)
|
||||
];
|
||||
|
||||
# ─── Scheduler ───
|
||||
# sched-ext scheduler for gaming performance
|
||||
services.scx.enable = true;
|
||||
services.scx.scheduler = "scx_lavd"; # Low-latency scheduler, good for gaming
|
||||
|
||||
# ─── Hibernation ───
|
||||
# Resume from encrypted swap (cryptswap must be unlocked before resume)
|
||||
boot.resumeDevice = "/dev/mapper/cryptswap";
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
# NETWORKING
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
networking.hostName = "nix";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
# LOCALIZATION
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
|
||||
console.keyMap = "de-latin1-nodeadkeys";
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
# DISPLAY & INPUT
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
services.xserver.enable = true;
|
||||
services.displayManager.ly.enable = true;
|
||||
services.displayManager.defaultSession = "niri";
|
||||
|
||||
services.xserver.xkb = {
|
||||
layout = "de";
|
||||
variant = "nodeadkeys";
|
||||
};
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
# AUDIO (PipeWire)
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true; # For pro audio apps
|
||||
};
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
# BLUETOOTH
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
Experimental = false;
|
||||
KernelExperimental = false;
|
||||
};
|
||||
Policy = {
|
||||
AutoEnable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
# PRINTING
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
services.printing.enable = true;
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
# USER
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
description = "Melvin Ragusa";
|
||||
extraGroups = [
|
||||
"wheel" # Sudo access
|
||||
"networkmanager" # Network configuration
|
||||
];
|
||||
shell = pkgs.fish; # Fish shell (migrated from Arch)
|
||||
};
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
# PROGRAMS
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
programs.zsh.enable = true; # Keep zsh available as fallback
|
||||
programs.yazi.enable = true;
|
||||
programs.firefox.enable = true;
|
||||
programs.niri.enable = true;
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
# NIX SETTINGS
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
nix.settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
# Optimize storage
|
||||
auto-optimise-store = true;
|
||||
|
||||
# Trust users for substituters
|
||||
trusted-users = [
|
||||
"root"
|
||||
"@wheel"
|
||||
];
|
||||
};
|
||||
|
||||
# Garbage collection
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 14d";
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
# SYSTEM PACKAGES (Base essentials)
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Core utilities
|
||||
gnupg
|
||||
fastfetch
|
||||
micro
|
||||
wget
|
||||
curl
|
||||
|
||||
# Secure Boot management
|
||||
sbctl
|
||||
|
||||
# Nix tools
|
||||
nil # Nix LSP
|
||||
nixd
|
||||
|
||||
# Wayland
|
||||
xwayland-satellite
|
||||
grim
|
||||
slurp
|
||||
|
||||
# File management
|
||||
nautilus
|
||||
|
||||
# Editors
|
||||
zed-editor
|
||||
|
||||
# Browser
|
||||
inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
|
||||
# Flake inputs (desktop shell)
|
||||
inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
inputs.opencode.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
|
||||
# Terminal
|
||||
ghostty
|
||||
|
||||
# AI coding
|
||||
claude-code
|
||||
];
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
# SERVICES
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
services.openssh.enable = true;
|
||||
services.tailscale.enable = true;
|
||||
services.gnome.gnome-online-accounts.enable = true;
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
# SYSTEM
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
system.stateVersion = "26.05";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user