Merge pull request #2 from ragusa-it/claude/analyze-setup-z9dDE
Configure for atlas/pinj and add Wayland session variables
This commit was merged in pull request #2.
This commit is contained in:
22
flake.nix
22
flake.nix
@@ -22,9 +22,19 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.quickshell.follows = "quickshell";
|
inputs.quickshell.follows = "quickshell";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nix-gaming = {
|
||||||
|
url = "github:fufexan/nix-gaming";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, mango, quickshell, noctalia, ... }@inputs:
|
outputs = { self, nixpkgs, mango, quickshell, noctalia, nix-gaming, home-manager, ... }@inputs:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
@@ -34,11 +44,17 @@
|
|||||||
mangoModule = assert lib.hasAttrByPath [ "nixosModules" "mango" ] mango;
|
mangoModule = assert lib.hasAttrByPath [ "nixosModules" "mango" ] mango;
|
||||||
mango.nixosModules.mango;
|
mango.nixosModules.mango;
|
||||||
|
|
||||||
# IMPORTANT: Replace <hostname> with actual hostname
|
|
||||||
commonModules = [
|
commonModules = [
|
||||||
./hosts/<hostname>/hardware-configuration.nix
|
./hosts/atlas/hardware-configuration.nix
|
||||||
./modules/common.nix
|
./modules/common.nix
|
||||||
mangoModule
|
mangoModule
|
||||||
|
# Home Manager module - Foundation for user-level package management
|
||||||
|
# User-specific configurations can be added via home-manager.users.<username>
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
|
|||||||
@@ -10,13 +10,32 @@
|
|||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# SYSTEM
|
# SYSTEM
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# IMPORTANT: Replace with actual values
|
networking.hostName = "atlas";
|
||||||
networking.hostName = "<hostname>";
|
time.timeZone = "Europe/Berlin";
|
||||||
time.timeZone = "<timezone>";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
i18n.defaultLocale = "<locale>";
|
|
||||||
|
# German keyboard layout (nodeadkeys variant)
|
||||||
|
console.keyMap = "de-latin1-nodeadkeys";
|
||||||
|
services.xserver.xkb = {
|
||||||
|
layout = "de";
|
||||||
|
variant = "nodeadkeys";
|
||||||
|
};
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
# Memory compression (reduces swap usage)
|
||||||
|
zramSwap = {
|
||||||
|
enable = true;
|
||||||
|
algorithm = "zstd";
|
||||||
|
memoryPercent = 50;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Firmware updates
|
||||||
|
services.fwupd.enable = true;
|
||||||
|
|
||||||
|
# Power profiles daemon (for laptop/power management)
|
||||||
|
services.power-profiles-daemon.enable = true;
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# AMD GPU - RDNA 4 (RX 9060 XT) + Zen 3 CPU (5700G)
|
# AMD GPU - RDNA 4 (RX 9060 XT) + Zen 3 CPU (5700G)
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
@@ -42,6 +61,13 @@
|
|||||||
# This variable is optional but makes it explicit
|
# This variable is optional but makes it explicit
|
||||||
environment.variables.AMD_VULKAN_ICD = "RADV";
|
environment.variables.AMD_VULKAN_ICD = "RADV";
|
||||||
|
|
||||||
|
# Wayland session variables for proper app integration
|
||||||
|
environment.sessionVariables = {
|
||||||
|
QT_QPA_PLATFORM = "wayland";
|
||||||
|
MOZ_ENABLE_WAYLAND = "1";
|
||||||
|
NIXOS_OZONE_WL = "1"; # Electron apps (VS Code, Discord, etc.)
|
||||||
|
};
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# CPU - Zen 3 Optimizations (Ryzen 7 5700G)
|
# CPU - Zen 3 Optimizations (Ryzen 7 5700G)
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
@@ -75,16 +101,14 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
settings.default_session = {
|
settings.default_session = {
|
||||||
command = "mango";
|
command = "mango";
|
||||||
# IMPORTANT: Replace <username> with actual username
|
user = "pinj";
|
||||||
user = "<username>";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# USER ACCOUNT
|
# USER ACCOUNT
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# IMPORTANT: Replace <username> with actual username
|
users.users.pinj = {
|
||||||
users.users.<username> = {
|
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" "networkmanager" "video" "seat" ];
|
extraGroups = [ "wheel" "networkmanager" "video" "seat" ];
|
||||||
# IMPORTANT: Generate a password hash with: mkpasswd -m sha-512
|
# IMPORTANT: Generate a password hash with: mkpasswd -m sha-512
|
||||||
@@ -151,6 +175,13 @@
|
|||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
alsa.support32Bit = true;
|
alsa.support32Bit = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
|
|
||||||
|
# Low-latency configuration for gaming
|
||||||
|
lowLatency = {
|
||||||
|
enable = true;
|
||||||
|
quantum = 64; # Buffer size (lower = less latency)
|
||||||
|
rate = 48000; # Sample rate
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Disable PulseAudio (conflicts with PipeWire)
|
# Disable PulseAudio (conflicts with PipeWire)
|
||||||
|
|||||||
@@ -22,10 +22,9 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# IMPORTANT: Replace <username> with actual username
|
|
||||||
# NOTE: After first enabling/applying this dev profile, you must log out and
|
# NOTE: After first enabling/applying this dev profile, you must log out and
|
||||||
# log back in (or reboot) for the docker group membership to take effect.
|
# log back in (or reboot) for the docker group membership to take effect.
|
||||||
users.users.<username>.extraGroups = [ "docker" ];
|
users.users.pinj.extraGroups = [ "docker" ];
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# DEVELOPMENT TOOLS
|
# DEVELOPMENT TOOLS
|
||||||
@@ -35,11 +34,12 @@
|
|||||||
nix-direnv.enable = true; # Caches nix shells
|
nix-direnv.enable = true; # Caches nix shells
|
||||||
};
|
};
|
||||||
|
|
||||||
# IMPORTANT: Replace <username> with actual username
|
users.users.pinj.packages = with pkgs; [
|
||||||
users.users.<username>.packages = with pkgs; [
|
|
||||||
# -- Git --
|
# -- Git --
|
||||||
lazygit
|
lazygit
|
||||||
gh # GitHub CLI
|
gh # GitHub CLI
|
||||||
|
delta # Git diff viewer
|
||||||
|
meld # Visual diff tool
|
||||||
|
|
||||||
# -- Node.js --
|
# -- Node.js --
|
||||||
nodejs_22
|
nodejs_22
|
||||||
@@ -56,10 +56,11 @@
|
|||||||
bat # cat alternative
|
bat # cat alternative
|
||||||
fzf # Fuzzy finder
|
fzf # Fuzzy finder
|
||||||
zoxide # cd alternative
|
zoxide # cd alternative
|
||||||
delta # Git diff viewer
|
|
||||||
|
|
||||||
# -- Database Clients --
|
# -- Database & API Tools --
|
||||||
postgresql # psql client
|
postgresql # psql client
|
||||||
|
dbeaver-bin # Database GUI
|
||||||
|
insomnia # API testing
|
||||||
# redis # Uncomment if needed
|
# redis # Uncomment if needed
|
||||||
|
|
||||||
# -- Misc --
|
# -- Misc --
|
||||||
|
|||||||
@@ -1,9 +1,18 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# Identification tags (shows in boot menu)
|
# Identification tags (shows in boot menu)
|
||||||
system.nixos.tags = [ "gaming" "zen" ];
|
system.nixos.tags = [ "gaming" "zen" ];
|
||||||
|
|
||||||
|
# --------------------------------------------------------------------------
|
||||||
|
# NIX-GAMING PLATFORM OPTIMIZATIONS
|
||||||
|
# --------------------------------------------------------------------------
|
||||||
|
imports = [
|
||||||
|
inputs.nix-gaming.nixosModules.platformOptimisations
|
||||||
|
];
|
||||||
|
|
||||||
|
nix-gaming.platformOptimisations.enable = true;
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# KERNEL - Zen for gaming performance
|
# KERNEL - Zen for gaming performance
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
@@ -53,17 +62,16 @@
|
|||||||
# programs to function correctly. These groups are only added when using
|
# programs to function correctly. These groups are only added when using
|
||||||
# the gaming profile. If you need consistent group membership across
|
# the gaming profile. If you need consistent group membership across
|
||||||
# both profiles, add these groups to common.nix instead.
|
# both profiles, add these groups to common.nix instead.
|
||||||
# IMPORTANT: Replace <username> with actual username
|
users.users.pinj.extraGroups = [ "corectrl" "gamemode" ];
|
||||||
users.users.<username>.extraGroups = [ "corectrl" "gamemode" ];
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# GAMING PACKAGES
|
# GAMING PACKAGES
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# IMPORTANT: Replace <username> with actual username
|
users.users.pinj.packages = with pkgs; [
|
||||||
users.users.<username>.packages = with pkgs; [
|
|
||||||
# -- Performance Overlays --
|
# -- Performance Overlays --
|
||||||
mangohud # FPS counter, GPU stats
|
mangohud # FPS counter, GPU stats
|
||||||
goverlay # MangoHud GUI config
|
goverlay # MangoHud GUI config
|
||||||
|
vkbasalt # Vulkan post-processing (sharpening, CAS)
|
||||||
|
|
||||||
# -- Game Launchers --
|
# -- Game Launchers --
|
||||||
lutris # Multi-platform launcher
|
lutris # Multi-platform launcher
|
||||||
@@ -78,6 +86,10 @@
|
|||||||
# -- Utilities --
|
# -- Utilities --
|
||||||
gamescope # Micro-compositor for gaming
|
gamescope # Micro-compositor for gaming
|
||||||
corectrl # AMD GPU control GUI
|
corectrl # AMD GPU control GUI
|
||||||
|
lact # Linux AMDGPU Control Tool (alternative to CoreCtrl)
|
||||||
|
|
||||||
|
# -- Communication --
|
||||||
|
discord # Voice chat and gaming communities
|
||||||
|
|
||||||
# -- Optional Game Clients --
|
# -- Optional Game Clients --
|
||||||
# prismlauncher # Minecraft
|
# prismlauncher # Minecraft
|
||||||
|
|||||||
Reference in New Issue
Block a user