{ config, lib, pkgs, modulesPath, ... }: let user = config.user; decrypt = import ../lib/decrypt.nix; in { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "sdhci_pci"]; boot.initrd.kernelModules = ["uas" "usbcore" "usb_storage" "vfat" "nls_cp437" "nls_iso8859_1"]; boot.kernelModules = ["kvm-intel"]; boot.extraModulePackages = []; fileSystems."/" = { device = "/dev/disk/by-uuid/48a07e82-1090-448c-a751-3a410afba0f7"; fsType = "btrfs"; options = ["subvol=@" "compress=zstd" "autodefrag"]; }; boot.initrd.postDeviceCommands = pkgs.lib.mkBefore (decrypt { keydevice = "/dev/disk/by-id/usb-Generic_Flash_Disk_BCC97785-0:0"; keypartname = "usbkey"; }); boot.initrd.luks.devices."cryptroot" = { device = "/dev/disk/by-uuid/570cc51f-bd5c-4bee-a18f-f6aabaf60881"; keyFileSize = 4096; keyFile = "/key/keyfile"; preLVM = false; }; fileSystems."/home" = { device = "/dev/disk/by-uuid/48a07e82-1090-448c-a751-3a410afba0f7"; fsType = "btrfs"; options = ["subvol=@home" "compress=zstd" "autodefrag"]; }; fileSystems."/swap" = { device = "/dev/disk/by-uuid/48a07e82-1090-448c-a751-3a410afba0f7"; fsType = "btrfs"; options = ["subvol=@swap"]; }; fileSystems."/boot" = { device = "/dev/disk/by-uuid/EED9-A165"; fsType = "vfat"; }; swapDevices = [{device = "/swap/swapfile";}]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; # networking.interfaces.enp53s0.useDHCP = lib.mkDefault true; # networking.interfaces.wlp54s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.opengl = { enable = true; extraPackages = with pkgs; [ intel-media-driver # LIBVA_DRIVER_NAME=iHD vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) vaapiVdpau libvdpau-va-gl ]; }; hardware.keyboard.zsa.enable = true; networking.hostName = "FCS-Tristan-Nixbook"; system.stateVersion = "22.11"; # do not change home-manager.users.${user}.imports = [ { home.stateVersion = "22.05"; wayland.windowManager.hyprland.settings = { bind = [ "SUPER_SHIFT, Q, killactive," ]; "device:at-translated-set-2-keyboard" = { kb_variant = "dvorak,"; kb_layout = "gb,gb"; kb_options = "grp:alt_shift_toggle,caps:escape"; }; }; } ]; services.tlp.enable = true; }