My personal nix config files. Feel free to import flake.

manually impl nixos-hardware tweaks

+52 -10
+2 -4
flake.nix
··· 86 ]; 87 forAllSystems = nixpkgs.lib.genAttrs systems; # This is a function that generates an attribute by calling a function you pass to it, with each system as an argument 88 inheritSpecialArgs = { 89 - inherit (self) 90 - inputs 91 - outputs 92 - ; 93 inherit 94 self 95 nixos-hardware 96 impermanence 97 nix-flatpak
··· 86 ]; 87 forAllSystems = nixpkgs.lib.genAttrs systems; # This is a function that generates an attribute by calling a function you pass to it, with each system as an argument 88 inheritSpecialArgs = { 89 inherit 90 self 91 + inputs 92 + outputs 93 nixos-hardware 94 impermanence 95 nix-flatpak
+50 -6
hosts/bubblegum.nix
··· 1 { 2 nixos-hardware, 3 pkgs, 4 inputs, 5 ... ··· 10 { 11 imports = [ 12 ./profiles/common.nix 13 - nixos-hardware.nixosModules.common-pc 14 - nixos-hardware.nixosModules.common-pc-ssd 15 - nixos-hardware.nixosModules.common-pc-laptop 16 - nixos-hardware.nixosModules.framework-12-13th-gen-intel 17 ]; 18 networking.hostName = "bubblegum"; 19 - networking.hostId = "489919130"; # head -c 8 /etc/machine-id 20 nixpkgs = { 21 buildPlatform = "x86_64-linux"; 22 }; 23 boot = { 24 loader = { 25 systemd-boot.enable = true; 26 systemd-boot.configurationLimit = 12; 27 efi.canTouchEfiVariables = true; 28 }; 29 - initrd.kernelModules = [ "pinctrl_tigerlake" ]; 30 }; 31 home-manager.users.teq.teq.home-manager.gui = true; 32 teq.nixos = { 33 gui.enable = true; 34 gui.amd = false;
··· 1 { 2 nixos-hardware, 3 + lib, 4 + config, 5 pkgs, 6 inputs, 7 ... ··· 12 { 13 imports = [ 14 ./profiles/common.nix 15 + inputs.nixos-hardware.nixosModules.common-pc-ssd 16 + inputs.nixos-hardware.nixosModules.common-pc-laptop 17 + # inputs.nixos-hardware.nixosModules.framework-12-13th-gen-intel # the kmod module doesn't work right for me so we manually impl below 18 ]; 19 networking.hostName = "bubblegum"; 20 + networking.hostId = "48919130"; # head -c 8 /etc/machine-id 21 nixpkgs = { 22 buildPlatform = "x86_64-linux"; 23 }; 24 + # From https://github.com/NixOS/nixos-hardware/blob/master/framework/12-inch/common/default.nix a9a7323a067284b5546beef7221ce49a1f3b8d24 25 + # Fix TRRS headphones missing a mic 26 + # https://github.com/torvalds/linux/commit/7b509910b3ad6d7aacead24c8744de10daf8715d 27 + boot.extraModprobeConfig = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.13.0") '' 28 + options snd-hda-intel model=dell-headset-multi 29 + ''; 30 + 31 + # Needed for desktop environments to detect display orientation 32 + hardware.sensor.iio.enable = lib.mkDefault true; 33 + 34 + environment.systemPackages = [ pkgs.framework-tool ]; 35 + # / From 36 boot = { 37 loader = { 38 systemd-boot.enable = true; 39 systemd-boot.configurationLimit = 12; 40 efi.canTouchEfiVariables = true; 41 }; 42 + initrd = { 43 + availableKernelModules = [ 44 + "xhci_pci" 45 + "nvme" 46 + "usb_storage" 47 + "sd_mod" 48 + ]; 49 + kernelModules = [ "pinctrl_tigerlake" ]; 50 + luks.devices = { 51 + "luks-3247add6-0d03-4f9e-8258-a3dbbb7780ee".device = 52 + "/dev/disk/by-uuid/3247add6-0d03-4f9e-8258-a3dbbb7780ee"; 53 + "luks-cfc290e0-d912-4c35-979d-8e6a9d6473c7".device = 54 + "/dev/disk/by-uuid/cfc290e0-d912-4c35-979d-8e6a9d6473c7"; 55 + }; 56 + }; 57 + kernelModules = [ "kvm-intel" ]; 58 }; 59 + fileSystems."/" = { 60 + device = "/dev/disk/by-uuid/104f1332-eb7a-4e43-af39-d01cb9329816"; 61 + fsType = "ext4"; 62 + }; 63 + fileSystems."/boot" = { 64 + device = "/dev/disk/by-uuid/D8F1-705F"; 65 + fsType = "vfat"; 66 + options = [ 67 + "fmask=0077" 68 + "dmask=0077" 69 + ]; 70 + }; 71 + swapDevices = [ 72 + { device = "/dev/disk/by-uuid/8fd5400e-0dad-4ebc-ac53-7cc2120fbc6e"; } 73 + ]; 74 home-manager.users.teq.teq.home-manager.gui = true; 75 + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 76 teq.nixos = { 77 gui.enable = true; 78 gui.amd = false;