# Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. { config, lib, pkgs, modulesPath, ... }: { powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; boot = { loader.systemd-boot.enable = true; loader.efi.canTouchEfiVariables = true; kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./pkgs/kernel/vendor.nix {}); kernel.sysctl = { "kernel.printk" = "1 4 1 7"; }; supportedFilesystems = lib.mkForce [ "vfat" "fat32" "exfat" "ext4" "btrfs" ]; initrd.includeDefaultModules = lib.mkForce false; initrd.availableKernelModules = lib.mkForce [ "nvme" "mmc_block" "hid" "dm_mod" "dm_crypt" "input_leds" ]; # kernelParams copy from Armbian's /boot/armbianEnv.txt & /boot/boot.cmd kernelParams = [ "rootwait" "earlycon" # enable early console, so we can see the boot messages via serial port / HDMI "consoleblank=0" # disable console blanking(screen saver) "console=ttyS2,1500000" # serial port "console=tty1" # HDMI # docker optimizations "cgroup_enable=cpuset" "cgroup_memory=1" "cgroup_enable=memory" "swapaccount=1" ]; }; hardware = { deviceTree = { # https://github.com/armbian/build/blob/f9d7117/config/boards/orangepi5-plus.wip#L10C51-L10C51 name = "rockchip/rk3588-orangepi-5-plus.dtb"; overlays = [ ]; }; enableRedistributableFirmware = lib.mkForce true; firmware = [ (pkgs.callPackage ./pkgs/orangepi-firmware {}) ]; opengl.package = ( (pkgs.mesa.override { galliumDrivers = ["panfrost" "swrast"]; vulkanDrivers = ["swrast"]; }) .overrideAttrs (_: { pname = "mesa-panfork"; version = "23.0.0-panfork"; src = pkgs.fetchFromGitLab { owner = "panfork"; repo = "mesa"; rev = "120202c675749c5ef81ae4c8cdc30019b4de08f4"; # branch: csf hash = "sha256-4eZHMiYS+sRDHNBtLZTA8ELZnLns7yT3USU5YQswxQ0="; }; }) ) .drivers; }; fileSystems."/" = { device = "/dev/disk/by-uuid/c49c99cd-9a91-485d-8572-8f83df262907"; fsType = "ext4"; }; fileSystems."/boot" = { device = "/dev/disk/by-uuid/12CE-A600"; fsType = "vfat"; }; swapDevices = [ { device = "/dev/disk/by-uuid/1f3fe124-c1f6-4e3f-9e89-4aa6d87d9853"; } ]; # 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.enP3p49s0.useDHCP = lib.mkDefault true; # networking.interfaces.enP4p65s0.useDHCP = lib.mkDefault true; # networking.interfaces.enu1u3c2.useDHCP = lib.mkDefault true; # networking.interfaces.wlP2p33s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; }