refactor config with better structure

This commit is contained in:
Prouk committed 2026-10-03 01:01:15 +02:00
1 parent b80d6b9b1f
commit 269c49b2d5
32 files changed
+210 -147

No files matched your search

+2
View File
@@ -27,6 +27,8 @@
...
}:
{
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-tree;
nixosConfigurations.prouk = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
-3
View File
@@ -44,9 +44,6 @@ environment {
// Clutter: Force Wayland backend.
CLUTTER_BACKEND "wayland"
// Firefox: Force native Wayland rendering (massively improves scrolling smoothness).
MOZ_ENABLE_WAYLAND "1"
// Electron/Chromium: Automatically flags apps (VS Code, Discord, Obsidian) to use Wayland.
ELECTRON_OZONE_PLATFORM_HINT "auto"
+6 -8
View File
@@ -2,16 +2,14 @@
{
imports = [
./user.nix
./shell.nix
./dotfiles.nix
./packages
./desktopentries.nix
./config
];
programs.git.enable = true;
programs.bash = {
enable = true;
bashrcExtra = "eval \"$(devenv hook bash)\"\n";
home = {
username = "prouk";
homeDirectory = "/home/prouk";
stateVersion = "26.05";
};
home.stateVersion = "26.05";
}
-14
View File
@@ -1,14 +0,0 @@
{ pkgs, ... }:
{
xdg.desktopEntries."awakened-poe-trade" = {
name = "Awakened PoE Trade";
exec = "${pkgs.awakened-poe-trade}/bin/awakened-poe-trade --no-overlay --listen=0.0.0.0:33333 %U";
terminal = false;
type = "Application";
icon = "awakened-poe-trade";
categories = [
"Game"
"Utility"
];
};
}
+13 -10
View File
@@ -1,28 +1,31 @@
{ ... }:
{
# Desktop
xdg.configFile."niri" = {
force = true;
recursive = true;
source = ./niri;
};
xdg.configFile."alacritty" = {
force = true;
recursive = true;
source = ./alacritty;
source = ./config/niri;
};
xdg.configFile."fuzzel" = {
force = true;
recursive = true;
source = ./fuzzel;
source = ./config/fuzzel;
};
# Shared with SDDM (nixos/dm/sddm.nix); niri loads it from this path.
# Shared with SDDM (nixos/desktop/sddm.nix); niri loads it from this path.
home.file."Pictures/Wallpapers/wallpaper.png" = {
force = true;
source = ../../assets/wallpaper.png;
source = ../assets/wallpaper.png;
};
# Terminal
xdg.configFile."alacritty" = {
force = true;
recursive = true;
source = ./config/alacritty;
};
xdg.configFile."helix" = {
force = true;
recursive = true;
source = ./helix;
source = ./config/helix;
};
}
+7
View File
@@ -0,0 +1,7 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
helvum
pavucontrol
];
}
+5 -3
View File
@@ -1,11 +1,13 @@
{ ... }:
{
imports = [
./development.nix
./desktop.nix
./gaming.nix
./system.nix
./audio.nix
./hardware.nix
./media.nix
./development.nix
./web.nix
./media.nix
./gaming.nix
];
}
+14 -14
View File
@@ -1,9 +1,15 @@
{ pkgs, ... }:
{
gtk = {
enable = true;
};
home.packages = with pkgs; [
alacritty
awww
fuzzel
wev
wl-clip-persist
];
# Theming
gtk.enable = true;
home.pointerCursor = {
enable = true;
gtk.enable = true;
@@ -14,15 +20,9 @@
size = 24;
};
home.packages = with pkgs; [
awww
btop
fuzzel
gparted
pavucontrol
wev
wl-clip-persist
yazi
alacritty
];
# Removable drives
services.udiskie = {
enable = true;
automount = true;
};
}
+8 -8
View File
@@ -1,18 +1,18 @@
{ pkgs, ... }:
{
programs.zed-editor = {
enable = true;
defaultEditor = false;
};
home.packages = with pkgs; [
devenv
github-copilot-app
github-copilot-cli
nil
nixd
helix
jujutsu
just
helix
nil
nixd
];
programs.zed-editor = {
enable = true;
defaultEditor = false;
};
}
+27 -8
View File
@@ -1,14 +1,33 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
awakened-poe-trade
lutris
rusty-path-of-building
protonup-qt
protontricks
winetricks
mangohud
steamtinkerlaunch
# Launchers
gamma-launcher
lutris
# Wine / Proton
protontricks
protonup-qt
steamtinkerlaunch
winetricks
# Overlays
mangohud
# Path of Exile
awakened-poe-trade
rusty-path-of-building
];
xdg.desktopEntries."awakened-poe-trade" = {
name = "Awakened PoE Trade";
exec = "${pkgs.awakened-poe-trade}/bin/awakened-poe-trade --no-overlay --listen=0.0.0.0:33333 %U";
terminal = false;
type = "Application";
icon = "awakened-poe-trade";
categories = [
"Game"
"Utility"
];
};
}
-7
View File
@@ -2,12 +2,5 @@
{
home.packages = with pkgs; [
wootility
wooting-udev-rules
helvum
];
services.udiskie = {
enable = true;
automount = true;
};
}
+8
View File
@@ -0,0 +1,8 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
btop
gparted
yazi
];
}
+9
View File
@@ -0,0 +1,9 @@
{ ... }:
{
programs.bash = {
enable = true;
bashrcExtra = "eval \"$(devenv hook bash)\"\n";
};
programs.git.enable = true;
}
-5
View File
@@ -1,5 +0,0 @@
{ ... }:
{
home.username = "prouk";
home.homeDirectory = "/home/prouk";
}
+3 -3
View File
@@ -32,7 +32,7 @@ clean-system:
sudo nix-env --profile /nix/var/nix/profiles/system --delete-generations +3
sudo nix-collect-garbage
@echo "--- Updating Bootloader Menu ---"
sudo nixos-rebuild boot --flake
sudo nixos-rebuild boot --flake .#prouk
# Clean user generations (no sudo).
clean-user:
@@ -57,9 +57,9 @@ clean-all: clean-system clean-user clean-home-manager
# Build.
build:
@echo "--- Rebuilding System ---"
sudo nixos-rebuild switch --flake
sudo nixos-rebuild switch --flake .#prouk
# Update flake.
update:
@echo "--- Updating Flake ---"
sudo nix flake update
nix flake update
+24 -51
View File
@@ -1,61 +1,34 @@
{ pkgs, ... }:
{ ... }:
{
imports = [
./hardware-configuration.nix
./graphics
./audio.nix
./fonts/fonts.nix
./dm/sddm.nix
./wm/niri.nix
./inputs/wooting.nix
./network/bluetooth.nix
./network/usb.nix
./steam/steam.nix
# System
./system/boot.nix
./system/nix.nix
./system/networking.nix
./system/locale.nix
./system/users.nix
# Hardware
./hardware/graphics.nix
./hardware/nvidia.nix
./hardware/audio.nix
./hardware/bluetooth.nix
./hardware/storage.nix
./hardware/wooting.nix
# Desktop
./desktop/fonts.nix
./desktop/sddm.nix
./desktop/niri.nix
# Programs
./programs/gaming.nix
./programs/obs.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "prouk";
networking.networkmanager.enable = true;
time.timeZone = "Europe/Paris";
users.users.prouk = {
isNormalUser = true;
extraGroups = [ "wheel" ];
};
programs.firefox.enable = true;
programs.nix-ld.enable = true;
nixpkgs.config.allowUnfree = true;
nixpkgs.config.permittedInsecurePackages = [
"electron-40.10.5"
];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# NO TOUCHY
system.stateVersion = "26.05";
boot.kernelPackages = pkgs.linuxPackages_latest;
nix.settings = {
trusted-users = [ "prouk" ];
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
}
File renamed without changes.
+1 -1
View File
@@ -3,6 +3,6 @@
programs.niri.enable = true;
environment.systemPackages = [
inputs.xwayland-satellite.packages.${pkgs.system}.default
inputs.xwayland-satellite.packages.${pkgs.stdenv.hostPlatform.system}.default
];
}
+1 -1
View File
@@ -1,6 +1,6 @@
{ pkgs, lib, config, ... }:
let
# Same wallpaper niri displays (see home/config/default.nix).
# Same wallpaper niri displays (see home/dotfiles.nix).
wallpaper = ../../assets/wallpaper.png;
sddmTheme =
-10
View File
@@ -1,10 +0,0 @@
{ ... }:
{
hardware.graphics = {
enable = true;
};
imports = [
./nvidia.nix
];
}
File renamed without changes.
File renamed without changes.
+4
View File
@@ -0,0 +1,4 @@
{ ... }:
{
hardware.graphics.enable = true;
}
@@ -12,12 +12,13 @@
environment.systemPackages = with pkgs; [
egl-wayland
lact
libva-utils
nvidia-vaapi-driver
nvtopPackages.nvidia
lact
];
# LACT GPU control daemon
systemd.packages = with pkgs; [ lact ];
systemd.services.lactd.wantedBy = [ "multi-user.target" ];
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
+26
View File
@@ -0,0 +1,26 @@
{ pkgs, ... }:
{
boot = {
kernelPackages = pkgs.linuxPackages_latest;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
# Skip the boot menu; hold Space while booting to show it.
timeout = 0;
# Keep /boot from filling up with old generations.
systemd-boot.configurationLimit = 5;
};
# Quiet boot
consoleLogLevel = 3;
initrd.verbose = false;
kernelParams = [
"quiet"
"udev.log_level=3"
"rd.udev.log_level=3"
"systemd.show_status=auto"
"rd.systemd.show_status=auto"
];
};
}
+4
View File
@@ -0,0 +1,4 @@
{ ... }:
{
time.timeZone = "Europe/Paris";
}
+7
View File
@@ -0,0 +1,7 @@
{ ... }:
{
networking = {
hostName = "prouk";
networkmanager.enable = true;
};
}
+32
View File
@@ -0,0 +1,32 @@
{ ... }:
{
nix.settings = {
experimental-features = [
"nix-command"
"flakes"
];
trusted-users = [ "prouk" ];
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
nixpkgs.config.allowUnfree = true;
# Housekeeping
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 14d";
};
nix.optimise.automatic = true;
# Run unpatched dynamic binaries.
programs.nix-ld.enable = true;
}
+7
View File
@@ -0,0 +1,7 @@
{ ... }:
{
users.users.prouk = {
isNormalUser = true;
extraGroups = [ "wheel" ];
};
}