diff --git a/configuration.nix b/configuration.nix index 2ddf675..d420b86 100644 --- a/configuration.nix +++ b/configuration.nix @@ -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 = { - canTouchEfiVariables = true; + canTouchEfiVariables = false; efiSysMountPoint = "/boot"; }; ############################################################ - # INITRD – HARDWARE-AGNOSTISCH + # INITRD – HARDWARE‑AGNOSTIC + LUKS ############################################################ boot.initrd.availableKernelModules = [ @@ -27,8 +34,29 @@ 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 – LABEL‑BASED ############################################################ fileSystems."/" = { @@ -42,16 +70,25 @@ }; ############################################################ - # NETZWERK / LOCALE + # NETWORKING / WIFI (DEBIAN NetworkManager EQUIVALENT) ############################################################ networking.networkmanager.enable = true; + # Needed on some laptops for Wi‑Fi kill switches + hardware.rfkill.enable = true; + time.timeZone = "Europe/Berlin"; i18n.defaultLocale = "de_DE.UTF-8"; - console.keyMap = "de"; + ############################################################ + # BLUETOOTH (OPTIONAL BUT COMMON) + ############################################################ + + hardware.bluetooth.enable = true; + services.blueman.enable = true; + ############################################################ # DESKTOP – GNOME ############################################################ @@ -77,7 +114,7 @@ }; ############################################################ - # DRUCKER + # PRINTING ############################################################ services.printing.enable = true; @@ -119,7 +156,7 @@ programs.firefox.enable = true; ############################################################ - # AUTO-UPDATE AUS GIT (OPTIONAL) + # AUTO‑UPDATE FROM GIT ############################################################ environment.etc."update-nixos-config.sh".text = '' @@ -159,7 +196,7 @@ }; ############################################################ - # STABILITÄT + # STABILITY ############################################################ zramSwap.enable = true;