mirror of
https://github.com/Nexoniarz/nexoniarz-config-nixos.git
synced 2026-11-03 04:24:27 +00:00
system.nix had grown to 200 lines covering boot, networking, locale, audio, Bluetooth, fonts, nix settings, hardening, DNS and RGB. Split it by concern into boot.nix, networking.nix, locale.nix, nix-settings.nix, security.nix and audio.nix. Also: - drivers.nix -> hardware.nix, absorbing Bluetooth, the I2C udev rule, OpenRGB and printing - fonts -> desktop.nix - nix-ld and pkgs.file -> apps.nix - the Bottles tmpfiles link -> users.nix, next to services.flatpak The reorganization is behavior-neutral: the dbus-1, system-units, user-units and system-path trees are byte-identical to the previous build once self-referential store paths are normalized, and `nix store diff-closures` against the running system reports exactly one change -- go 1.26.7. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
61 lines
1.5 KiB
Nix
61 lines
1.5 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
hardware.graphics = {
|
|
enable = true;
|
|
enable32Bit = true;
|
|
};
|
|
|
|
services.xserver.videoDrivers = [ "nvidia" ];
|
|
|
|
hardware.nvidia = {
|
|
modesetting.enable = true;
|
|
open = true;
|
|
nvidiaSettings = true;
|
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
};
|
|
|
|
hardware.opentabletdriver.enable = true;
|
|
hardware.uinput.enable = true;
|
|
boot.kernelModules = [ "uinput" ];
|
|
|
|
hardware.bluetooth = {
|
|
enable = true;
|
|
powerOnBoot = true;
|
|
settings = {
|
|
General = {
|
|
Experimental = true; # Battery level of connected devices
|
|
FastConnectable = true; # Faster reconnects, more power draw
|
|
};
|
|
Policy = {
|
|
AutoEnable = true;
|
|
};
|
|
};
|
|
};
|
|
services.blueman.enable = true;
|
|
|
|
boot.extraModprobeConfig = ''
|
|
# DualSense/PS4 pads pair over Bluetooth then drop instantly; broken
|
|
# ERTM in many adapters. Disabling it is the standard fix.
|
|
options bluetooth disable_ertm=1
|
|
'';
|
|
|
|
# Blog V4 needs the rtlsdrblog fork of librtlsdr, which is what
|
|
# pkgs.rtl-sdr already is here. Also blacklists the DVB-T drivers.
|
|
hardware.rtl-sdr.enable = true;
|
|
|
|
# For ddcutil — no laptop backlight here, only external DisplayPort.
|
|
hardware.i2c.enable = true;
|
|
|
|
services.hardware.openrgb = {
|
|
enable = true;
|
|
motherboard = "amd";
|
|
};
|
|
|
|
services.udev.extraRules = ''
|
|
# OpenRGB
|
|
SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660"
|
|
'';
|
|
|
|
services.printing.enable = true;
|
|
}
|