Flake for my NixOS devices
at stylus-try 76 lines 2.3 kB view raw
1{ 2 inputs, 3 outputs, 4 ... 5}: { 6 system = "x86_64-linux"; 7 8 modules = [ 9 (outputs.lib.applyRoles ["base" "latest-linux" "dev" "graphics" "games" "fun" "social" "imperm" "secureboot" "wireless" "hypervisor" "podman"]) 10 inputs.nixos-hardware.nixosModules.framework-13th-gen-intel 11 12 ( 13 { 14 config, 15 lib, 16 pkgs, 17 modulesPath, 18 inputs, 19 outputs, 20 ... 21 }: { 22 system.stateVersion = "25.05"; 23 networking.hostName = "aperture"; 24 25 services.fprintd.enable = true; 26 27 boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"]; 28 boot.initrd.kernelModules = []; 29 boot.kernelModules = ["kvm-intel"]; 30 boot.extraModulePackages = []; 31 boot.binfmt.emulatedSystems = ["aarch64-linux"]; 32 33 hardware.framework.enableKmod = false; 34 35 fileSystems."/" = { 36 fsType = "tmpfs"; 37 options = ["size=512M" "mode=755"]; 38 neededForBoot = true; 39 }; 40 41 fileSystems."/home" = { 42 fsType = "tmpfs"; 43 options = ["size=2G"]; 44 neededForBoot = true; 45 }; 46 47 fileSystems."/boot" = { 48 device = "/dev/disk/by-uuid/88E4-A64F"; 49 fsType = "vfat"; 50 options = ["fmask=0022" "dmask=0022" "nosuid" "nodev" "noexec" "noatime"]; 51 }; 52 53 fileSystems."/nix" = { 54 device = "/dev/disk/by-uuid/fd9f484a-a5ef-4378-b054-d292b0204afb"; 55 fsType = "ext4"; 56 options = ["lazytime" "nodev" "nosuid"]; 57 neededForBoot = true; 58 }; 59 60 boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/330c8e83-23cd-46bf-99b3-75a7f5d7c5dc"; 61 boot.initrd.luks.devices."cryptswap".device = "/dev/disk/by-uuid/c599ad48-750b-458d-8361-601bee3eb066"; 62 63 swapDevices = [ 64 {device = "/dev/disk/by-uuid/834d0d23-6a06-416f-853f-36c6ce81f355";} 65 ]; 66 67 networking.useDHCP = lib.mkDefault true; 68 69 powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; 70 hardware.enableRedistributableFirmware = lib.mkDefault true; 71 hardware.cpu.intel.updateMicrocode = 72 lib.mkDefault config.hardware.enableRedistributableFirmware; 73 } 74 ) 75 ]; 76}