Configure for atlas/pinj and add Wayland session variables #2
Reference in New Issue
Block a user
Delete Branch "claude/analyze-setup-z9dDE"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
NIXOS_OZONE_WL) for proper app integration
https://claude.ai/code/session_01UAdmEkSeh9NGPfjRfViLWY
Pull request overview
Configures the NixOS flake for the
atlashost andpinjuser, and adds Wayland-related session environment variables to improve app integration.Changes:
<hostname>/<username>placeholders withatlas/pinjacross modules and flake wiring.modules/common.nix.hosts/atlas/hardware-configuration.nixfile and points the flake at it.Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
extraGroupsandpackagestopinj.extraGroupsandpackagestopinj.atlas, timezone, locale), definespinjuser, and adds Wayland session variables.atlashost (currently a placeholder).commonModulesto importhosts/atlas/hardware-configuration.nix.💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
@@ -17,0 +17,4 @@# German keyboard layout (nodeadkeys variant)console.keyMap = "de-latin1-nodeadkeys";services.xserver.xkb = {layout = "de";PR description says the system timezone should be set to Europe/Rome (with a TODO note), but the config hard-codes Europe/Berlin and there’s no TODO. Please align the value (and TODO/comment) with the intended target, or update the PR description if Berlin is correct.
@copilot open a new pull request to apply changes based on the comments in this thread
Also implement these
Comparison with Popular NixOS Gaming Setups
Feature Comparison
Feature
Your Setup
nix-gaming
SteamNix
lawrab/nixos-config
Kernel
Zen (gaming) / Latest (dev)
Recommends Xanmod
CachyOS + BORE scheduler
Standard
GPU Driver
RADV (Mesa stable)
—
Mesa stable
Mesa stable
PipeWire
✅ Basic
✅ Low-latency module
✅
✅
Home Manager
❌
✅ Module
❌
✅ Full integration
Gamemode
✅
✅ Recommended
✅
❌
Steam
✅
Wine/Proton packages
✅ + Decky Loader
❌
Theming
❌
—
❌
✅ Catppuccin
Notifications
❌
—
—
✅ Mako
Screen Lock
Via Noctalia
—
—
✅ Hyprlock
Dev Environments
direnv
—
Docker, VS Code Server
✅ Flake templates
Recommended Integrations
Provides battle-tested gaming optimizations:
In flake.nix inputs
nix-gaming = {
url = "github:fufexan/nix-gaming";
inputs.nixpkgs.follows = "nixpkgs";
};
Modules available:
pipewire-low-latency - Configurable audio latency (quantum/rate)
platformOptimisations - SteamOS-inspired sysctl tweaks
Wine packages with Discord RPC bridge
2. Home Manager Integration (Medium-High Value)
Better separation of user vs system config, portable dotfiles:
In flake.nix inputs
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
Benefits:
User packages managed declaratively
Portable between NixOS and other systems
Better dotfile management
3. Additional System Improvements
Addition
Purpose
Module/Package
zram
Better memory under pressure
zramSwap.enable = true;
fwupd
Firmware updates
services.fwupd.enable = true;
LACT
AMD GPU control (CoreCtrl alternative)
environment.systemPackages = [ pkgs.lact ];
Mako
Wayland notifications
User package
Cachix
Faster builds (pre-built binaries)
Binary cache setup
4. PipeWire Low-Latency (From nix-gaming)
Your current PipeWire is basic. nix-gaming provides:
With nix-gaming module
services.pipewire.lowLatency = {
enable = true;
quantum = 64; # Buffer size (lower = less latency)
rate = 48000; # Sample rate
};
5. Platform Optimizations (From nix-gaming)
SteamOS-inspired sysctl tweaks beyond your current vm.max_map_count:
With nix-gaming module
nix-gaming.platformOptimisations.enable = true;
Potential Additions to Your Config
Quick Wins (No new flake dependencies)
In common.nix or gaming.nix
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;
For Gaming Profile
In gaming.nix - add to user packages
pkgs.lact # LACT - AMD GPU control (alternative to CoreCtrl)
pkgs.vkbasalt # Vulkan post-processing (sharpening, CAS)
pkgs.discord # If needed
For Dev Profile
In dev.nix - add to user packages
pkgs.meld # Visual diff tool
pkgs.dbeaver-bin # Database GUI
pkgs.insomnia # API testing (alternative to httpie for GUI)
Architecture Improvements
Consider: Modular User Packages
Instead of defining packages in each profile, extract to separate files:
modules/
├── common.nix
├── dev.nix
├── gaming.nix
├── packages/
│ ├── dev-tools.nix # lazygit, gh, nodejs, etc.
│ ├── gaming-tools.nix # mangohud, lutris, etc.
│ └── wayland-tools.nix # foot, grim, slurp, etc.
Consider: Secrets Management
For the password hash, consider agenix or sops-nix instead of storing in git.
Summary: Priority Integrations
Priority
Integration
Effort
Impact
🔴 High
nix-gaming (PipeWire low-latency + platform opts)
Low
High
🟡 Medium
zramSwap + fwupd
Very Low
Medium
🟡 Medium
Home Manager
Medium
High (long-term)
🟢 Low
Theming (Catppuccin)
Low
Aesthetic
🟢 Low
Secrets management
Medium
Security
Would you like me to implement any of these integrations?
@ragusa-it I've opened a new pull request, #3, to work on those changes. Once the pull request is ready, I'll request review from you.