2022-03-07 14:26:15 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
modulesPath,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
2021-10-20 06:22:09 +00:00
|
|
|
sources = import ../../nix/sources.nix;
|
2022-03-07 14:26:15 +00:00
|
|
|
unstable = import sources.nixpkgsUnstable {};
|
2021-11-16 04:57:23 +00:00
|
|
|
in {
|
2021-10-20 06:22:09 +00:00
|
|
|
imports = [
|
|
|
|
"${modulesPath}/profiles/base.nix"
|
|
|
|
./uboot/hardkernel-uboot.nix
|
|
|
|
../../profiles/host_common.nix
|
|
|
|
../../profiles/server_common.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
# The linux kernel used is compiled from the Hardkernel fork of
|
|
|
|
# torvalds/linux
|
|
|
|
boot = {
|
2022-03-07 14:26:15 +00:00
|
|
|
initrd.availableKernelModules = mkForce [];
|
2021-10-20 06:22:09 +00:00
|
|
|
kernelPackages = pkgs.linuxPackagesFor pkgs.linux_hardkernel;
|
|
|
|
# Bootloader (use Hardkernel fork of Das U-Boot)
|
|
|
|
loader = {
|
|
|
|
grub.enable = false;
|
|
|
|
generic-extlinux-compatible.enable = false;
|
|
|
|
hardkernel-uboot.enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# We do know the hardware we are planning to deploy to
|
|
|
|
hardware.enableRedistributableFirmware = mkForce false;
|
|
|
|
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
(import ./overlays/kernel/overlay.nix)
|
|
|
|
(import ./overlays/uboot/overlay.nix)
|
|
|
|
];
|
|
|
|
|
|
|
|
# DNS
|
|
|
|
services.resolved.enable = true;
|
|
|
|
services.resolved.dnssec = "false";
|
|
|
|
|
|
|
|
fileSystems = {
|
|
|
|
"/boot" = {
|
|
|
|
device = "/dev/disk/by-label/FIRMWARE";
|
|
|
|
fsType = "vfat";
|
|
|
|
};
|
|
|
|
"/" = {
|
|
|
|
device = "/dev/disk/by-label/NIXOS_SD";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|