Initial import
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
# NixOS Gaming Base
|
||||
|
||||
Diese Basis-Config ist fuer ein Desktop-System mit
|
||||
|
||||
- Intel Core i9-13900KF
|
||||
- AMD Radeon RX 9070 XT
|
||||
|
||||
ausgelegt und nutzt jetzt `nixos-unstable`, `Chaotic-Nyx` und COSMIC als Wayland-Desktop. Fokus:
|
||||
|
||||
- aktueller Kernel
|
||||
- AMD-Grafik mit Chaotic `mesa-git` und 32-Bit-Libs fuer Steam/Proton
|
||||
- PipeWire + Gaming-/Desktop-Audio-Tools
|
||||
- Steam, Gamescope, MangoHud, Lutris, Heroic, LACT
|
||||
- RGB- und Peripherie-Basis fuer deine USB-Geraete
|
||||
|
||||
## Struktur
|
||||
|
||||
- `flake.nix`: Einstieg ueber `nixos-unstable` + `chaotic-cx/nyx`
|
||||
- `configuration.nix`: Host-spezifische Einstiegsdatei
|
||||
- `modules/base.nix`: Boot, Kernel, Locale, Nix, Firmware, Governor
|
||||
- `modules/chaotic-nyx.nix`: Chaotic-Nyx Aktivierung, `allowUnfree`, `mesa-git`
|
||||
- `modules/graphics/mesa-amd.nix`: AMDGPU + Mesa/RADV Basis
|
||||
- `modules/audio/pipewire.nix`: PipeWire, JACK, Pulse, Audio-Tools
|
||||
- `modules/gaming.nix`: Steam, Gamescope, Wine/Launcher-Stack
|
||||
- `modules/desktop/cosmic.nix`: COSMIC Desktop + COSMIC Greeter
|
||||
- `modules/peripherals.nix`: OpenRGB, Logitech/Corsair-nahe Tools, USB-Helfer
|
||||
|
||||
## USB-Bezug
|
||||
|
||||
Die Config beruecksichtigt diese aktuell erkannten Geraete:
|
||||
|
||||
- `048d:5702` ITE RGB LED Controller
|
||||
- `1235:8211` Focusrite Scarlett Solo 3rd Gen
|
||||
- `1b1c:1bfd` Corsair K70 CORE RGB
|
||||
- `046d:c539` Logitech Lightspeed Receiver
|
||||
|
||||
Daraus folgen aktuell:
|
||||
|
||||
- `openrgb` + `hardware.i2c.enable` fuer RGB-/Board-Zugriff
|
||||
- `ratbagd` + `piper` fuer Logitech-Gaming-Peripherie
|
||||
- `solaar`, `usbutils`, `pciutils` fuer Device-Handling und Diagnose
|
||||
- PipeWire-Setup fuer das Scarlett Solo
|
||||
- COSMIC als Wayland-Desktop mit `cosmic-greeter`
|
||||
- Chaotic `mesa-git` mit Fallback-Spezialisierung `stable-mesa`
|
||||
|
||||
## Chaotic-Nyx Hinweis
|
||||
|
||||
Die Flake bindet `github:chaotic-cx/nyx/nyxpkgs-unstable` direkt ein und importiert
|
||||
`chaotic.nixosModules.default`.
|
||||
`modules/chaotic-nyx.nix` aktiviert `chaotic.mesa-git.enable = true;`.
|
||||
|
||||
## Nach der Installation
|
||||
|
||||
1. Die vom Installer erzeugte `hardware-configuration.nix` nach `./hardware-configuration.nix` kopieren.
|
||||
2. Falls noetig `users.users.max` und `networking.hostName` in `configuration.nix` anpassen.
|
||||
3. Passwort fuer den Benutzer setzen:
|
||||
|
||||
```bash
|
||||
passwd max
|
||||
```
|
||||
|
||||
4. Flake lock erstellen:
|
||||
|
||||
```bash
|
||||
nix flake lock
|
||||
```
|
||||
|
||||
5. System aktivieren:
|
||||
|
||||
```bash
|
||||
sudo nixos-rebuild switch --flake .#nixos-gaming
|
||||
```
|
||||
|
||||
## Spaeterer Ausbau
|
||||
|
||||
- COSMIC weiter tunen, z. B. Autologin, Keyring-Policy, Flatpak
|
||||
- OBS / Discord / OpenRGB-Profile / Fancontrol
|
||||
- Btrfs-Subvolumes, Snapshots, Impermanence
|
||||
- spezielle Kernel- oder Scheduler-Tweaks, falls du sie wirklich brauchst
|
||||
@@ -0,0 +1,30 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./modules/base.nix
|
||||
./modules/audio/pipewire.nix
|
||||
./modules/chaotic-nyx.nix
|
||||
./modules/graphics/mesa-amd.nix
|
||||
./modules/desktop/cosmic.nix
|
||||
./modules/gaming.nix
|
||||
./modules/peripherals.nix
|
||||
];
|
||||
|
||||
networking.hostName = "nixos-gaming";
|
||||
|
||||
users.users.max = {
|
||||
isNormalUser = true;
|
||||
description = "max";
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
"audio"
|
||||
"video"
|
||||
"input"
|
||||
];
|
||||
};
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
description = "Gaming-focused NixOS config with COSMIC and Chaotic-Nyx";
|
||||
|
||||
nixConfig = {
|
||||
extra-substituters = [
|
||||
"https://nyx-cache.chaotic.cx/"
|
||||
];
|
||||
extra-trusted-public-keys = [
|
||||
"nyx-cache.chaotic.cx:dJxTrgMC3V3cFfyIiBQDQorG6k1LsqurH/srpMSq7qk="
|
||||
];
|
||||
};
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ nixpkgs, chaotic, ... }:
|
||||
{
|
||||
nixosConfigurations.nixos-gaming = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
chaotic.nixosModules.default
|
||||
./configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
# Replace this file with the installer-generated hardware-configuration.nix.
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
easyeffects
|
||||
helvum
|
||||
pavucontrol
|
||||
qpwgraph
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
supportedFilesystems = [ "ntfs" ];
|
||||
|
||||
# Helpful for large games, shader caches and some launchers.
|
||||
kernel.sysctl = {
|
||||
"fs.inotify.max_user_watches" = 1048576;
|
||||
"vm.max_map_count" = 2147483642;
|
||||
};
|
||||
};
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
i18n.defaultLocale = "de_DE.UTF-8";
|
||||
console.keyMap = "de";
|
||||
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
|
||||
security = {
|
||||
rtkit.enable = true;
|
||||
polkit.enable = true;
|
||||
};
|
||||
|
||||
hardware = {
|
||||
enableRedistributableFirmware = true;
|
||||
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
};
|
||||
|
||||
services.fwupd.enable = true;
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
chaotic = {
|
||||
mesa-git = {
|
||||
enable = true;
|
||||
fallbackSpecialisation = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
mesa_git
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services.desktopManager.cosmic = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
services.displayManager.cosmic-greeter.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome-keyring
|
||||
networkmanagerapplet
|
||||
seahorse
|
||||
wayland-utils
|
||||
wl-clipboard
|
||||
xwayland
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs = {
|
||||
appimage = {
|
||||
enable = true;
|
||||
binfmt = true;
|
||||
};
|
||||
gamemode.enable = true;
|
||||
gamescope.enable = true;
|
||||
steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
gamescopeSession.enable = true;
|
||||
protontricks.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
gamemode
|
||||
goverlay
|
||||
heroic
|
||||
lact
|
||||
lutris
|
||||
mangohud
|
||||
protontricks
|
||||
steam-run
|
||||
wineWowPackages.stable
|
||||
winetricks
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
mesa-demos
|
||||
vulkan-tools
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware = {
|
||||
i2c.enable = true;
|
||||
steam-hardware.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
hardware.openrgb.enable = true;
|
||||
ratbagd.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
openrgb
|
||||
pciutils
|
||||
piper
|
||||
solaar
|
||||
usbutils
|
||||
];
|
||||
|
||||
# Observed devices:
|
||||
# - 048d:5702 Integrated Technology Express RGB LED Controller
|
||||
# - 1235:8211 Focusrite Scarlett Solo (3rd Gen.)
|
||||
# - 1b1c:1bfd Corsair K70 CORE RGB
|
||||
# - 046d:c539 Logitech Lightspeed receiver
|
||||
}
|
||||
Reference in New Issue
Block a user