Personal Nix flake
nixos home-manager nix
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #7 from lpchaim/init-raspberrypi

feat: Init raspberrypi

authored by

Lucas Chaim and committed by
GitHub
e46bf770 1445a23a

+86
+3
homes/aarch64-linux/lpchaim@raspberrypi/default.nix
··· 1 + { 2 + config.home.stateVersion = "24.05"; 3 + }
+22
systems/aarch64-linux/raspberrypi/default.nix
··· 1 + { 2 + lib, 3 + pkgs, 4 + ... 5 + }: let 6 + inherit (lib.lpchaim.nixos) getTraitModules; 7 + in { 8 + imports = 9 + [ 10 + ./hardware-configuration.nix 11 + ] 12 + ++ (getTraitModules [ 13 + "composite/base" 14 + ]); 15 + 16 + config = { 17 + system.stateVersion = "24.05"; 18 + hardware.graphics.enable = false; 19 + boot.kernelPackages = pkgs.linuxPackages_latest; 20 + my.security.u2f.relaxed = true; 21 + }; 22 + }
+61
systems/aarch64-linux/raspberrypi/hardware-configuration.nix
··· 1 + # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 + # and may be overwritten by future invocations. Please make changes 3 + # to /etc/nixos/configuration.nix instead. 4 + { 5 + config, 6 + lib, 7 + pkgs, 8 + modulesPath, 9 + ... 10 + }: { 11 + imports = [ 12 + (modulesPath + "/installer/scan/not-detected.nix") 13 + ]; 14 + 15 + boot.initrd.availableKernelModules = [ 16 + "pcie_brcmstb" # required for the pcie bus to work 17 + "reset-raspberrypi" # required for vl805 firmware to load 18 + "uas" 19 + "usbhid" 20 + "usb_storage" 21 + "vc4" 22 + ]; 23 + boot.initrd.kernelModules = []; 24 + boot.kernelModules = []; 25 + boot.extraModulePackages = []; 26 + 27 + fileSystems."/" = { 28 + device = "/dev/disk/by-uuid/322a6d8e-f946-4d60-98a3-dd1af1373c79"; 29 + fsType = "btrfs"; 30 + options = ["defaults,noatime,compress=zstd,subvol=@"]; 31 + }; 32 + 33 + fileSystems."/home" = { 34 + device = "/dev/disk/by-uuid/322a6d8e-f946-4d60-98a3-dd1af1373c79"; 35 + fsType = "btrfs"; 36 + options = ["defaults,noatime,compress=zstd,subvol=@home"]; 37 + }; 38 + 39 + fileSystems."/nix" = { 40 + device = "/dev/disk/by-uuid/322a6d8e-f946-4d60-98a3-dd1af1373c79"; 41 + fsType = "btrfs"; 42 + options = ["defaults,noatime,compress=zstd,subvol=@nix"]; 43 + }; 44 + 45 + swapDevices = [ 46 + { 47 + device = "/.swapfile"; 48 + size = 2 * 1024; 49 + } 50 + ]; 51 + 52 + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 53 + # (the default) this is the recommended approach. When using systemd-networkd it's 54 + # still possible to use this option, but it's recommended to use it in conjunction 55 + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. 56 + networking.useDHCP = lib.mkDefault true; 57 + # networking.interfaces.enabcm6e4ei0.useDHCP = lib.mkDefault true; 58 + # networking.interfaces.wlan0.useDHCP = lib.mkDefault true; 59 + 60 + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; 61 + }