Files
nixos-production/configuration.nix
2025-12-26 17:46:59 +00:00

212 lines
5.1 KiB
Nix

{ config, pkgs, ... }:
{
imports = [
./flatpak-management.nix
./git-auto-update.nix
];
############################################################
# BOOTLOADER - SYSTEMD-BOOT
############################################################
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 3;
boot.loader.efi = {
canTouchEfiVariables = false;
efiSysMountPoint = "/boot";
};
############################################################
# INITRD - HARDWARE-"AGNOSTIC" + FRAMEBUFFER FALLBACK + LUKS
############################################################
boot.initrd.systemd.enable = true;
boot.initrd.availableKernelModules = [
"usb_storage"
"xhci_hcd"
"ehci_pci"
"ahci"
"sd_mod"
"nvme"
"sr_mod"
];
# Explicit graphics fallback for unknown hardware
boot.initrd.kernelModules = [
"i915"
"amdgpu"
"nouveau"
];
boot.initrd.luks.devices.root = {
device = "/dev/disk/by-partlabel/nixos-crypt";
preLVM = true;
allowDiscards = true;
};
boot.plymouth.enable = true;
############################################################
# FIRMWARE - WIDE HARDWARE SUPPORT
############################################################
hardware.enableAllFirmware = true;
hardware.enableRedistributableFirmware = true;
hardware.cpu.intel.updateMicrocode = true;
hardware.cpu.amd.updateMicrocode = true;
############################################################
# FILESYSTEMS
############################################################
services.fstrim.enable = true;
fileSystems."/" = {
device = "/dev/disk/by-label/nixos-root";
fsType = "ext4";
options = [
"noatime"
"nodiratime"
];
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/EFI";
fsType = "vfat";
};
############################################################
# NETWORKING / LOCALE
############################################################
networking.networkmanager.enable = true;
services.xserver.xkb.layout = "de";
console.keyMap = "de";
time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "de_DE.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
############################################################
# BLUETOOTH
############################################################
hardware.bluetooth.enable = true;
############################################################
# DESKTOP - GNOME OR KDE
############################################################
services.displayManager.sddm.enable = true;
services.displayManager.sddm.wayland.enable = true;
services.desktopManager.plasma6.enable = true;
services.xserver.enable = true; # x11 fallback
services.accounts-daemon.enable = true; # online accounts support, but it's broken right now
xdg.portal.enable = true;
services.libinput.enable = true; # touchpad support
############################################################
# AUDIO - PIPEWIRE
############################################################
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
############################################################
# PRINTING
############################################################
services.printing.enable = true;
############################################################
# USERS
############################################################
users.users.user = {
isNormalUser = true;
description = "user";
extraGroups = [ "wheel" "networkmanager" ];
shell = pkgs.bash;
initialPassword = "1312";
};
############################################################
# SOFTWARE
############################################################
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
git
curl
wget
openssh
kdePackages.kaccounts-integration
kdePackages.kaccounts-providers
kdePackages.signond
kdePackages.sddm-kcm
gnome-disk-utility
libreoffice
pdfarranger
ungoogled-chromium
tor-browser
vlc
inkscape
gimp
obsidian
signal-desktop
keepassxc
thunderbird
];
programs.firefox.enable = false;
services.flatpak.enable = true;
############################################################
# USB OPTIMIZATIONS
############################################################
zramSwap.enable = true;
boot.tmp.useTmpfs = true;
services.journald.extraConfig = ''
SystemMaxUse=200M
RuntimeMaxUse=50M
'';
############################################################
# NIXOS VERSION
############################################################
system.stateVersion = "25.11";
}