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
+211 -148

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 { nixosConfigurations.prouk = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
-3
View File
@@ -44,9 +44,6 @@ environment {
// Clutter: Force Wayland backend. // Clutter: Force Wayland backend.
CLUTTER_BACKEND "wayland" 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/Chromium: Automatically flags apps (VS Code, Discord, Obsidian) to use Wayland.
ELECTRON_OZONE_PLATFORM_HINT "auto" ELECTRON_OZONE_PLATFORM_HINT "auto"
+6 -8
View File
@@ -2,16 +2,14 @@
{ {
imports = [ imports = [
./user.nix ./shell.nix
./dotfiles.nix
./packages ./packages
./desktopentries.nix
./config
]; ];
programs.git.enable = true; home = {
programs.bash = { username = "prouk";
enable = true; homeDirectory = "/home/prouk";
bashrcExtra = "eval \"$(devenv hook bash)\"\n"; 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" = { xdg.configFile."niri" = {
force = true; force = true;
recursive = true; recursive = true;
source = ./niri; source = ./config/niri;
};
xdg.configFile."alacritty" = {
force = true;
recursive = true;
source = ./alacritty;
}; };
xdg.configFile."fuzzel" = { xdg.configFile."fuzzel" = {
force = true; force = true;
recursive = 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" = { home.file."Pictures/Wallpapers/wallpaper.png" = {
force = true; force = true;
source = ../../assets/wallpaper.png; source = ../assets/wallpaper.png;
};
# Terminal
xdg.configFile."alacritty" = {
force = true;
recursive = true;
source = ./config/alacritty;
}; };
xdg.configFile."helix" = { xdg.configFile."helix" = {
force = true; force = true;
recursive = 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 = [ imports = [
./development.nix
./desktop.nix ./desktop.nix
./gaming.nix ./system.nix
./audio.nix
./hardware.nix ./hardware.nix
./media.nix ./development.nix
./web.nix ./web.nix
./media.nix
./gaming.nix
]; ];
} }
+14 -14
View File
@@ -1,9 +1,15 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
gtk = { home.packages = with pkgs; [
enable = true; alacritty
}; awww
fuzzel
wev
wl-clip-persist
];
# Theming
gtk.enable = true;
home.pointerCursor = { home.pointerCursor = {
enable = true; enable = true;
gtk.enable = true; gtk.enable = true;
@@ -14,15 +20,9 @@
size = 24; size = 24;
}; };
home.packages = with pkgs; [ # Removable drives
awww services.udiskie = {
btop enable = true;
fuzzel automount = true;
gparted };
pavucontrol
wev
wl-clip-persist
yazi
alacritty
];
} }
+8 -8
View File
@@ -1,18 +1,18 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
programs.zed-editor = {
enable = true;
defaultEditor = false;
};
home.packages = with pkgs; [ home.packages = with pkgs; [
devenv devenv
github-copilot-app github-copilot-app
github-copilot-cli github-copilot-cli
nil helix
nixd
jujutsu jujutsu
just just
helix nil
nixd
]; ];
programs.zed-editor = {
enable = true;
defaultEditor = false;
};
} }
+27 -8
View File
@@ -1,14 +1,33 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
awakened-poe-trade # Launchers
lutris
rusty-path-of-building
protonup-qt
protontricks
winetricks
mangohud
steamtinkerlaunch
gamma-launcher 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; [ home.packages = with pkgs; [
wootility 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-env --profile /nix/var/nix/profiles/system --delete-generations +3
sudo nix-collect-garbage sudo nix-collect-garbage
@echo "--- Updating Bootloader Menu ---" @echo "--- Updating Bootloader Menu ---"
sudo nixos-rebuild boot --flake sudo nixos-rebuild boot --flake .#prouk
# Clean user generations (no sudo). # Clean user generations (no sudo).
clean-user: clean-user:
@@ -57,9 +57,9 @@ clean-all: clean-system clean-user clean-home-manager
# Build. # Build.
build: build:
@echo "--- Rebuilding System ---" @echo "--- Rebuilding System ---"
sudo nixos-rebuild switch --flake sudo nixos-rebuild switch --flake .#prouk
# Update flake. # Update flake.
update: update:
@echo "--- Updating Flake ---" @echo "--- Updating Flake ---"
sudo nix flake update nix flake update
+24 -51
View File
@@ -1,61 +1,34 @@
{ pkgs, ... }: { ... }:
{ {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./graphics
./audio.nix # System
./fonts/fonts.nix ./system/boot.nix
./dm/sddm.nix ./system/nix.nix
./wm/niri.nix ./system/networking.nix
./inputs/wooting.nix ./system/locale.nix
./network/bluetooth.nix ./system/users.nix
./network/usb.nix
./steam/steam.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 ./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 # NO TOUCHY
system.stateVersion = "26.05"; 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; programs.niri.enable = true;
environment.systemPackages = [ 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, ... }: { pkgs, lib, config, ... }:
let let
# Same wallpaper niri displays (see home/config/default.nix). # Same wallpaper niri displays (see home/dotfiles.nix).
wallpaper = ../../assets/wallpaper.png; wallpaper = ../../assets/wallpaper.png;
sddmTheme = 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; [ environment.systemPackages = with pkgs; [
egl-wayland egl-wayland
lact
libva-utils libva-utils
nvidia-vaapi-driver nvidia-vaapi-driver
nvtopPackages.nvidia nvtopPackages.nvidia
lact
]; ];
# LACT GPU control daemon
systemd.packages = with pkgs; [ lact ]; systemd.packages = with pkgs; [ lact ];
systemd.services.lactd.wantedBy = ["multi-user.target"]; 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" ];
};
}