106 lines
2.9 KiB
Nix
106 lines
2.9 KiB
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
imports = [
|
|
./caesium.hardware.nix # Crucial: Imports your UUIDs
|
|
];
|
|
|
|
time.timeZone = "America/New_York";
|
|
nixpkgs.config.allowUnfree = true;
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
# --- BOOTLOADER ---
|
|
boot.loader.systemd-boot.enable = true;
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
networking.hostName = "caesium";
|
|
networking.networkmanager.enable = true;
|
|
|
|
# --- STORAGE & SSD OPTIMIZATION ---
|
|
# Enable TRIM for SSD longevity
|
|
services.fstrim.enable = true;
|
|
# Hard links duplicate files in the store to save space
|
|
nix.settings.auto-optimise-store = true;
|
|
|
|
# --- SWAP STRATEGY ---
|
|
# Primary Swap: Compressed RAM (Fastest)
|
|
zramSwap.enable = true;
|
|
zramSwap.memoryPercent = 25;
|
|
|
|
# Secondary Swap: 16GB File on Alpha (Safety Net)
|
|
swapDevices = [ {
|
|
device = "/var/lib/swapfile";
|
|
size = 16 * 1024; # 16GB
|
|
} ];
|
|
|
|
# --- USER & GROUPS ---
|
|
users.groups.storage = {};
|
|
users.users.mbessette = {
|
|
isNormalUser = true;
|
|
extraGroups = [ "wheel" "networkmanager" "storage" "docker" ];
|
|
};
|
|
|
|
# --- FILE SYSTEMS (Overrides/Additions) ---
|
|
# Note: The UUIDs stay in hardware-configuration.nix.
|
|
# We only list them here if we want to add specific options like compression.
|
|
|
|
fileSystems."/nix".options = [ "subvol=@nix" "compress=zstd" "noatime" ];
|
|
fileSystems."/usr/local/bottles" = {
|
|
device = "/dev/disk/by-uuid/9523b80b-8a1f-4784-9750-9b8fadf91b92"; # Use the same Alpha UUID
|
|
fsType = "btrfs";
|
|
options = [ "subvol=@bottles" "compress=zstd" "noatime" ];
|
|
};
|
|
|
|
# --- SYSTEM PERMISSIONS ---
|
|
systemd.tmpfiles.rules = [
|
|
"d /usr/local/steam-games 0775 mbessette storage -"
|
|
"d /usr/local/bottles 0775 mbessette storage -"
|
|
"d /usr/local/Projects 0775 mbessette storage -"
|
|
"d /usr/local/docker-data 0770 root root -"
|
|
];
|
|
|
|
# --- VIRTUALIZATION ---
|
|
virtualisation.docker.enable = true;
|
|
virtualisation.docker.daemon.settings = {
|
|
data-root = "/usr/local/docker-data";
|
|
};
|
|
|
|
# --- AUDIO ---
|
|
services.pipewire = {
|
|
enable = true;
|
|
alsa.enable = true;
|
|
alsa.support32Bit = true;
|
|
pulse.enable = true;
|
|
};
|
|
|
|
# --- OS ---
|
|
# This stays 'true' to enable the graphical pipeline
|
|
services.xserver.enable = true;
|
|
|
|
# SDDM is the login manager; Plasma 6 is the desktop
|
|
services.displayManager.sddm.enable = true;
|
|
services.desktopManager.plasma6.enable = true;
|
|
|
|
# Tell SDDM to use Wayland for the login screen itself (Ultra Modern)
|
|
services.displayManager.sddm.wayland.enable = true;
|
|
|
|
# Ensure hardware acceleration is ready for Wayland
|
|
hardware.graphics = {
|
|
enable = true;
|
|
enable32Bit = true; # CRITICAL for Steam/Gaming
|
|
};
|
|
|
|
# --- PROGRAMS ---
|
|
programs.steam.enable = true;
|
|
environment.systemPackages = with pkgs; [
|
|
vim
|
|
git
|
|
wget
|
|
curl
|
|
bottles
|
|
_1password-gui
|
|
];
|
|
|
|
# --- SYSTEM VERSION ---
|
|
system.stateVersion = "24.11"; # Or current stable version
|
|
} |