nixos/systems/common.nix
Julian Sutter 82a98a1e6f refactor: Apply syntactic updates for NixOS best practices
This commit applies comprehensive syntactic improvements across the
repository to conform to NixOS formatting and coding standards.

## Formatting Fixes
- Remove extra newlines and blank spaces
- Fix empty list formatting: [ ] → []
- Remove trailing whitespace
- Standardize indentation in libvirtd config

## Best Practices
- Remove deprecated networking.useDHCP setting
- Remove unused extraHosts configuration
- Add lib.mkDefault to videoDrivers for better override support
- Add lib.mkDefault to podman for consistency

## Modern Conventions
- Update nix.settings.download-buffer-size to string format with units ("512M")
- Update system.stateVersion from 25.05 to 25.11 to match channel
- Update home.stateVersion from 25.05 to 25.11 to match channel

## Code Quality
- Remove commented-out code in aurora.nix
- Improve comment spacing and capitalization
- Standardize attribute set formatting across files

## Files Modified
- flake.nix
- desktop/virtualization.nix
- systems/aurora.nix
- systems/common.nix
- systems/labrizor.nix
- systems/skip01.nix
- users/jsutter.nix

Tested: Successfully rebuilt and switched framework system
2026-02-03 22:40:05 -08:00

145 lines
3 KiB
Nix

{ config, pkgs, ... }:
{
# hardware
hardware.enableRedistributableFirmware = true;
services.fwupd.enable = true;
# Network
networking = {
networkmanager = {
enable = true;
plugins = with pkgs; [
networkmanager-openvpn
networkmanager-openconnect
];
};
};
# Bootloader
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Kernel
boot.kernelPackages = pkgs.linuxPackages_latest;
# Nix
nix = {
# Automate garbage collection
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
package = pkgs.nixVersions.stable;
settings = {
auto-optimise-store = true;
trusted-users = [ "root" "jsutter" ];
experimental-features = [ "nix-command" "flakes" ];
keep-outputs = true;
keep-derivations = true;
};
};
system.stateVersion = "25.11";
nixpkgs.config.allowUnfree = true;
nixpkgs.config.nvidia.acceptLicense = true;
nixpkgs.config.nvidia.libsOnly = true;
# Location & internationalisation
time.timeZone = "America/Los_Angeles";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Services
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
services.openssh.enable = true;
security.polkit.enable = true;
programs.zsh.enable = true;
security.sudo.wheelNeedsPassword = false;
# System packages
environment.systemPackages = with pkgs; [
fzf
git
curl
file
gdb
unar
lsof
pciutils
htop
sysstat
nmap
powertop
gnupg
p7zip
rsync
bumblebee
libgdiplus
unzip
clinfo
s-tui
stress
wget
openssl
gnumake
kopia
dig
python3
pv
whois
kdePackages.xdg-desktop-portal-kde
fwupd
usbutils # lsusb
pciutils # lspci
util-linux # lsblk, lscpu
hwinfo # lsdev, lshal, hwinfo
lshw # lshw
nvme-cli
smartmontools
ripgrep
mesa-demos
];
services.flatpak.enable = true;
fonts.packages = with pkgs; [
noto-fonts-color-emoji
noto-fonts-cjk-sans
liberation_ttf
fira-code
fira-code-symbols
mplus-outline-fonts.githubRelease
dina-font
proggyfonts
];
services.xserver.excludePackages = [ pkgs.xterm ];
documentation.nixos.enable = false;
systemd.network.wait-online.enable = false;
boot.initrd.systemd.network.wait-online.enable = false;
services.udev.extraRules = ''
# Allow plugdev group full access to USB devices
SUBSYSTEM=="usb", MODE="0664", GROUP="plugdev"
'';
nix.settings.download-buffer-size = "512M";
}