Update configuration.nix

This commit is contained in:
ska
2025-12-22 09:34:27 +00:00
parent 4e75a0cef4
commit a0e7a02440

View File

@@ -2,17 +2,24 @@
{ {
############################################################ ############################################################
# BOOTLOADER SYSTEMD-BOOT (STATT GRUB) # BOOTLOADER GRUB (HYBRID BIOS + UEFI, REMOVABLE)
############################################################ ############################################################
boot.loader.systemd-boot.enable = true; boot.loader.grub = {
enable = true;
device = "nodev";
efiSupport = true;
efiInstallAsRemovable = true;
useOSProber = false;
};
boot.loader.efi = { boot.loader.efi = {
canTouchEfiVariables = true; canTouchEfiVariables = false;
efiSysMountPoint = "/boot"; efiSysMountPoint = "/boot";
}; };
############################################################ ############################################################
# INITRD HARDWARE-AGNOSTISCH # INITRD HARDWAREAGNOSTIC + LUKS
############################################################ ############################################################
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [
@@ -27,8 +34,29 @@
boot.kernelModules = []; boot.kernelModules = [];
boot.initrd.luks.devices.root = {
device = "/dev/disk/by-partlabel/nixos-crypt";
preLVM = true;
allowDiscards = true;
};
############################################################ ############################################################
# DATEISYSTEME LABEL-BASIERT # FIRMWARE EQUIVALENT TO DEBIAN firmware-*
############################################################
# This replaces ALL of:
# firmware-linux, firmware-iwlwifi, firmware-realtek,
# firmware-amd-graphics, firmware-intel-sound, etc.
hardware.enableAllFirmware = true;
hardware.enableRedistributableFirmware = true;
# CPU microcode (safe for USB systems)
hardware.cpu.intel.updateMicrocode = true;
hardware.cpu.amd.updateMicrocode = true;
############################################################
# FILESYSTEMS LABELBASED
############################################################ ############################################################
fileSystems."/" = { fileSystems."/" = {
@@ -42,16 +70,25 @@
}; };
############################################################ ############################################################
# NETZWERK / LOCALE # NETWORKING / WIFI (DEBIAN NetworkManager EQUIVALENT)
############################################################ ############################################################
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
# Needed on some laptops for WiFi kill switches
hardware.rfkill.enable = true;
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "de_DE.UTF-8"; i18n.defaultLocale = "de_DE.UTF-8";
console.keyMap = "de"; console.keyMap = "de";
############################################################
# BLUETOOTH (OPTIONAL BUT COMMON)
############################################################
hardware.bluetooth.enable = true;
services.blueman.enable = true;
############################################################ ############################################################
# DESKTOP GNOME # DESKTOP GNOME
############################################################ ############################################################
@@ -77,7 +114,7 @@
}; };
############################################################ ############################################################
# DRUCKER # PRINTING
############################################################ ############################################################
services.printing.enable = true; services.printing.enable = true;
@@ -119,7 +156,7 @@
programs.firefox.enable = true; programs.firefox.enable = true;
############################################################ ############################################################
# AUTO-UPDATE AUS GIT (OPTIONAL) # AUTOUPDATE FROM GIT
############################################################ ############################################################
environment.etc."update-nixos-config.sh".text = '' environment.etc."update-nixos-config.sh".text = ''
@@ -159,7 +196,7 @@
}; };
############################################################ ############################################################
# STABILITÄT # STABILITY
############################################################ ############################################################
zramSwap.enable = true; zramSwap.enable = true;