Initial commit

This commit is contained in:
Prouk committed 2026-07-23 18:45:14 +02:00
commit adefce92cf
33 files changed
+782

No files matched your search

+1
View File
@@ -0,0 +1 @@
eval "$(devenv direnvrc)"
+10
View File
@@ -0,0 +1,10 @@
# Devenv
.devenv*
devenv.local.nix
devenv.local.yaml
# direnv
.direnv
# pre-commit
.pre-commit-config.yaml
+67
View File
@@ -0,0 +1,67 @@
# Makefile to safely clean up NixOS profiles, keeping only the last 3 generations.
.PHONY: help dry-run clean-system clean-user clean-home-manager clean-all
# Default target displays the help menu
help:
@echo "NixOS Profile Cleanup Utility"
@echo "============================="
@echo "Available targets:"
@echo " make dry-run - Safe preview of what will be deleted"
@echo " make clean-system - Clean system generations and update bootloader (requires sudo)"
@echo " make clean-user - Clean current user's profile generations"
@echo " make clean-home-manager - Clean Home Manager generations (if applicable)"
@echo " make clean-all - Clean everything (System, User, and Home Manager)"
# Dry run to preview changes without deleting anything
dry-run:
@echo "=== [DRY RUN] System Profile ==="
sudo nix-env --profile /nix/var/nix/profiles/system --delete-generations +3 --dry-run
@echo "\n=== [DRY RUN] User Profile ==="
nix-env --delete-generations +3 --dry-run
@echo "\n=== [DRY RUN] Home Manager Profile ==="
@if [ -d "$$HOME/.local/state/nix/profiles/home-manager" ]; then \
nix-env --profile "$$HOME/.local/state/nix/profiles/home-manager" --delete-generations +3 --dry-run; \
elif [ -d "$$HOME/.nix-profile" ]; then \
echo "No Home Manager directory found, but user profile exists."; \
else \
echo "No Home Manager profile detected."; \
fi
# Clean system generations (requires sudo)
clean-system:
@echo "--- Cleaning System Profile (SUDO) ---"
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
# Clean user generations (no sudo)
clean-user:
@echo "--- Cleaning User Profile ---"
nix-env --delete-generations +3
nix-collect-garbage
# Clean Home Manager generations (no sudo)
clean-home-manager:
@echo "--- Cleaning Home Manager Profile ---"
@if [ -d "$$HOME/.local/state/nix/profiles/home-manager" ]; then \
nix-env --profile "$$HOME/.local/state/nix/profiles/home-manager" --delete-generations +3; \
nix-collect-garbage; \
else \
echo "No Home Manager profile found. Skipping."; \
fi
# Clean everything in one go
clean-all: clean-system clean-user clean-home-manager
@echo "All cleanups successfully completed!"
# Rebuild
rebuild:
@echo "--- Rebuilding System ---"
sudo nixos-rebuild switch --flake
# Update flake
update:
@echo "--- Updating Flake ---"
sudo nix flake update
+46
View File
@@ -0,0 +1,46 @@
{ pkgs, lib, config, inputs, ... }:
{
# https://devenv.sh/basics/
env.GREET = "devenv";
# https://devenv.sh/packages/
packages = [ pkgs.git ];
# https://devenv.sh/languages/
# languages.rust.enable = true;
# https://devenv.sh/processes/
# processes.dev.exec = "${lib.getExe pkgs.watchexec} -n -- ls -la";
# https://devenv.sh/services/
# services.postgres.enable = true;
# https://devenv.sh/scripts/
scripts.hello.exec = ''
echo hello from $GREET
'';
# https://devenv.sh/basics/
enterShell = ''
hello # Run scripts directly
git --version # Use packages
'';
# https://devenv.sh/tasks/
# tasks = {
# "myproj:setup".exec = "mytool build";
# "devenv:enterShell".after = [ "myproj:setup" ];
# };
# https://devenv.sh/tests/
enterTest = ''
echo "Running tests"
git --version | grep --color=auto "${pkgs.git.version}"
'';
# https://devenv.sh/git-hooks/
# git-hooks.hooks.shellcheck.enable = true;
# See full reference at https://devenv.sh/reference/options/
}
+18
View File
@@ -0,0 +1,18 @@
# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
inputs:
nixpkgs:
url: github:cachix/devenv-nixpkgs/rolling
# If you're using non-OSS software, you can set allow_unfree to true.
# allow_unfree: true
# If you're not willing to allow unsupported packages:
# allow_unsupported_system: false
# If you're willing to use a package that's vulnerable
# permitted_insecure_packages:
# - "openssl-1.1.1w"
# If you have more than one devenv you can merge them
#imports:
# - ./backend
Generated
+70
View File
@@ -0,0 +1,70 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1784789275,
"narHash": "sha256-cgRTWuG+u1tBPhm01JrId2k0Bni09phVJ1Q0BZlRd7M=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3b0e6bbd65869af1beadf5963a99befc179d209f",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1784497964,
"narHash": "sha256-WhdsTtaih3DgTPP/PX023b36UNQyMzEoi6GkPyGx0y4=",
"rev": "241313f4e8e508cb9b13278c2b0fa25b9ca27163",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1037713.241313f4e8e5/nixexprs.tar.xz"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"zen-browser": "zen-browser"
}
},
"zen-browser": {
"inputs": {
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1784822396,
"narHash": "sha256-gW59E7cwPetoOAcygLtHQX7a3C8VdWz6T0GazldcxU0=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "a68b1580a237cae4c9f86e04ac972726e3f87fdb",
"type": "github"
},
"original": {
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
+42
View File
@@ -0,0 +1,42 @@
{
description = "Prouk's magnificent flake";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
zen-browser = {
url = "github:0xc000022070/zen-browser-flake";
inputs = {
nixpkgs.follows = "nixpkgs";
home-manager.follows = "home-manager";
};
};
};
outputs =
inputs@{
nixpkgs,
home-manager,
...
}:
{
nixosConfigurations.prouk = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./nixos
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
users.prouk = import ./home;
};
}
];
};
};
}
+12
View File
@@ -0,0 +1,12 @@
{ pkgs, ... }:
{
programs.zed-editor = {
enable = true;
defaultEditor = true;
};
home.packages = with pkgs; [
devenv
nil
nixd
];
}
+8
View File
@@ -0,0 +1,8 @@
{ ... }:
{
xdg.configFile."niri" = {
force = true;
recursive = true;
source = ./niri;
};
}
+2
View File
@@ -0,0 +1,2 @@
animations {
}
+21
View File
@@ -0,0 +1,21 @@
include "startup.kdl"
include "env.kdl"
include "animations.kdl"
include "inputs.kdl"
include "keybinds.kdl"
include "layout.kdl"
include "outputs.kdl"
include "wrules.kdl"
hotkey-overlay {
skip-at-startup
}
cursor {
xcursor-theme "Colloid-dark-cursors"
xcursor-size 24
}
prefer-no-csd
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
+60
View File
@@ -0,0 +1,60 @@
environment {
// =========================================================================
// 1. NVIDIA & GBM BACKEND
// =========================================================================
// Forces the Generic Buffer Manager (GBM) to use the NVIDIA DRM driver.
GBM_BACKEND "nvidia-drm"
// Forces OpenGL/GLX applications to use the NVIDIA proprietary driver.
__GLX_VENDOR_LIBRARY_NAME "nvidia"
// =========================================================================
// 2. HARDWARE VIDEO ACCELERATION
// =========================================================================
// Tells VA-API to use the NVIDIA driver for hardware-accelerated video.
LIBVA_DRIVER_NAME "nvidia"
// REQUIRED if you use 'nvidia-vaapi-driver' for Firefox/Chromium video decoding.
NVD_BACKEND "direct"
// =========================================================================
// 3. VARIABLE REFRESH RATE (G-SYNC / VRR)
// =========================================================================
// Enables G-Sync / Adaptive Sync for capable monitors.
__GL_GSYNC_ALLOWED "1"
// Controls VRR. Note: If you experience desktop flickering, change this to "0".
__GL_VRR_ALLOWED "1"
// =========================================================================
// 4. TOOLKIT BACKENDS (Forces apps to run natively on Wayland)
// =========================================================================
// GTK: Try Wayland first, fallback to X11 if necessary.
GDK_BACKEND "wayland,x11,*"
// Qt: Use Wayland, fallback to X11.
QT_QPA_PLATFORM "wayland;xcb"
// Prevents Qt from drawing its own window borders/decorations.
QT_WAYLAND_DISABLE_WINDOWDECORATION "1"
// SDL: Forces games using modern SDL2/SDL3 to run natively on Wayland.
SDL_VIDEODRIVER "wayland"
// 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"
// =========================================================================
// 5. DESKTOP SESSION IDENTIFICATION
// =========================================================================
// Helps xdg-desktop-portal and styling tools recognize your environment.
XDG_SESSION_TYPE "wayland"
XDG_CURRENT_DESKTOP "niri"
XDG_SESSION_DESKTOP "niri"
}
+24
View File
@@ -0,0 +1,24 @@
input {
keyboard {
xkb {
layout "us"
}
}
touchpad {
off
}
mouse {
accel-speed 1
accel-profile "flat"
}
trackpoint {
off
}
warp-mouse-to-focus
focus-follows-mouse max-scroll-amount="0%"
}
+37
View File
@@ -0,0 +1,37 @@
binds {
Mod+Shift+Slash { show-hotkey-overlay; }
Mod+Tab repeat=false { toggle-overview; }
Mod+Escape repeat=false { close-window; }
Mod+Left { focus-column-or-monitor-left; }
Mod+Right { focus-column-or-monitor-right; }
Mod+Alt+Left { move-column-left-or-to-monitor-left; }
Mod+Alt+Right { move-column-right-or-to-monitor-right; }
Mod+Alt+Up { move-window-up-or-to-workspace-up; }
Mod+Alt+Down { move-window-down-or-to-workspace-down; }
Mod+Up { focus-workspace-up; }
Mod+Down { focus-workspace-down; }
Mod+R { switch-preset-column-width; }
Mod+Ctrl+R { reset-window-height; }
Mod+Minus { set-column-width "-10%"; }
Mod+Equal { set-column-width "+10%"; }
F11 { toggle-windowed-fullscreen; }
Mod+F11 { fullscreen-window; }
Mod+F { toggle-window-floating; }
Mod+Shift+F { switch-focus-between-floating-and-tiling; }
Print { screenshot; }
Ctrl+Print { screenshot-screen; }
Alt+Print { screenshot-window; }
Mod+Q { spawn "alacritty"; }
Mod+Grave { spawn "fuzzel"; }
}
+35
View File
@@ -0,0 +1,35 @@
layout {
background-color "transparent"
gaps 16
center-focused-column "never"
preset-column-widths {
proportion 0.33333
proportion 0.5
proportion 0.66667
}
default-column-width { proportion 0.5; }
focus-ring {
off
}
border {
off
}
shadow {
}
struts {
}
empty-workspace-above-first
}
layer-rule {
match namespace="^awww-daemon$"
place-within-backdrop true
}
+11
View File
@@ -0,0 +1,11 @@
output "DP-2" {
mode "2560x1440@239.970"
variable-refresh-rate
focus-at-startup
}
output "DP-3" {
mode "1920x1080@143.981"
transform "90"
position x=-1080 y=-440
}
+2
View File
@@ -0,0 +1,2 @@
spawn-at-startup "awww-daemon"
spawn-at-startup "awww img ~/Pictures/Wallpapers/Wallpaper.png --resize crop --crop-gravity center"
+9
View File
@@ -0,0 +1,9 @@
window-rule {
match title="^Picture-in-Picture$"
open-floating true
}
window-rule {
geometry-corner-radius 12
clip-to-geometry true
}
+37
View File
@@ -0,0 +1,37 @@
{
pkgs,
...
}:
{
imports = [
./user.nix
./programs.nix
./code.nix
./config
./look.nix
];
programs.git.enable = true;
programs.bash.enable = true;
programs.direnv = {
enable = true;
enableBashIntegration = true;
};
home.packages = with pkgs; [
xwayland-satellite
github-copilot-cli
vesktop
pavucontrol
wev
lutris
fuzzel
gparted
yazi
btop
awww
wootility
wooting-udev-rules
];
home.stateVersion = "26.05";
}
+16
View File
@@ -0,0 +1,16 @@
{ pkgs, ... }:
{
gtk = {
enable = true;
};
home.pointerCursor = {
enable = true;
gtk.enable = true;
x11.enable = true;
package = pkgs.colloid-cursors;
name = "Colloid-dark-cursors";
size = 24;
};
}
+11
View File
@@ -0,0 +1,11 @@
{ inputs, ... }:
{
imports = [
inputs.zen-browser.homeModules.twilight
];
programs.zen-browser = {
enable = true;
setAsDefaultBrowser = true;
};
}
+5
View File
@@ -0,0 +1,5 @@
{ ... }:
{
home.username = "prouk";
home.homeDirectory = "/home/prouk";
}
+17
View File
@@ -0,0 +1,17 @@
{ pkgs, ... }:
{
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
environment.systemPackages = with pkgs; [
alsa-scarlett-gui
];
}
+64
View File
@@ -0,0 +1,64 @@
{ pkgs, ... }:
{
imports = [
./hardware-configuration.nix
./graphics
./audio.nix
./fonts/fonts.nix
./dm/sddm.nix
./wm/niri.nix
./inputs/wooting.nix
./inputs/wooting.nix
./network/bluetooth.nix
./steam/steam.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;
environment.systemPackages = with pkgs; [
gnumake
];
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="
];
};
}
+7
View File
@@ -0,0 +1,7 @@
{ ... }:
{
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
};
}
+17
View File
@@ -0,0 +1,17 @@
{ pkgs, ... }:
{
fonts = {
packages = with pkgs; [
nerd-fonts.iosevka
nerd-fonts.symbols-only
];
fontconfig = {
enable = true;
defaultFonts = {
emoji = [
];
};
};
};
}
+10
View File
@@ -0,0 +1,10 @@
{ ... }:
{
hardware.graphics = {
enable = true;
};
imports = [
./nvidia.nix
];
}
+20
View File
@@ -0,0 +1,20 @@
{ pkgs, ... }:
{
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
branch = "bleeding_edge";
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = true;
nvidiaSettings = true;
};
environment.systemPackages = with pkgs; [
libva-utils
nvidia-vaapi-driver
nvtopPackages.nvidia
];
}
+58
View File
@@ -0,0 +1,58 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [
"nvidia"
"nvidia-modeset"
"nvidia-uvm"
"nvidia-drm"
];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/fffa5d3f-1684-4434-bbdd-a8792659355f";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/AA82-FC59";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
fileSystems."/BIGNVME" = {
device = "/dev/disk/by-uuid/866d8acc-fd1b-4c03-aad2-91e4d099d4e4";
fsType = "ext4";
};
swapDevices = [
{ device = "/dev/disk/by-uuid/95a4ca9d-b04f-4f5a-b1be-b1b17cba9a7b"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
+4
View File
@@ -0,0 +1,4 @@
{ ... }:
{
hardware.wooting.enable = true;
}
+12
View File
@@ -0,0 +1,12 @@
{ ... }:
{
hardware.bluetooth = {
enable = true;
settings = {
General = {
Experimental = true;
};
};
};
services.blueman.enable = true;
}
+16
View File
@@ -0,0 +1,16 @@
{ pkgs, ... }:
{
programs = {
steam.enable = true;
gamescope = {
enable = true;
capSysNice = false;
};
};
environment.systemPackages = with pkgs; [
SDL2
protonup-rs
protontricks
winetricks
];
}
+13
View File
@@ -0,0 +1,13 @@
{ pkgs, ... }:
{
programs.niri.enable = true;
programs.xwayland.enable = true;
environment.variables = {
NIXOS_OZONE_WLEGL = "1";
};
environment.systemPackages = with pkgs; [
alacritty
];
}