Files
pipa-nixos/hardware-configuration.nix

87 lines
1.7 KiB
Nix

{
config,
lib,
pkgs,
modulesPath,
pkgsCross ? null,
...
}: let
kernelPkgs =
if pkgsCross != null
then pkgsCross
else pkgs;
pipa-kernel = kernelPkgs.callPackage ./pkgs/kernel.nix {};
in {
imports = [
./modules/debug.nix
(modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = false;
};
kernelPackages = kernelPkgs.linuxPackagesFor pipa-kernel;
initrd = {
availableKernelModules = [
"panel_novatek_nt36532"
"msm"
"nanosic_803"
"usbhid"
"pinctrl_sm8250"
];
kernelModules = [];
extraFirmwarePaths = [
"novatek/nt36532_tianma.bin"
"novatek/nt36532_csot.bin"
];
};
kernelParams = [
"console=tty0"
"fbcon=rotate:1"
];
kernelModules = [];
extraModulePackages = [];
growPartition = true;
};
fileSystems = {
"/boot" = {
device = "/dev/disk/by-label/NIX_BOOT";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
};
"/" = {
device = "/dev/disk/by-label/NIX_ROOT";
fsType = "btrfs";
options = ["subvol=root" "compress=zstd" "noatime"];
};
"/nix" = {
device = "/dev/disk/by-label/NIX_ROOT";
fsType = "btrfs";
options = ["subvol=nix" "compress=zstd" "noatime"];
neededForBoot = true;
};
"/home" = {
device = "/dev/disk/by-label/NIX_ROOT";
fsType = "btrfs";
options = ["subvol=home" "compress=zstd" "noatime"];
};
};
powerManagement.cpuFreqGovernor = lib.mkDefault "schedutil";
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}