disko for rock5b

This commit is contained in:
Andrea Ciceri 2023-04-12 10:55:15 +02:00
parent 7cf02684d9
commit 11b7466753
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
3 changed files with 51 additions and 27 deletions

View file

@ -6,21 +6,27 @@
config, config,
... ...
}: { }: {
imports = imports = fleetModules [
[ "common"
./hardware-configuration.nix "ssh"
] "ccr"
++ (fleetModules [ ];
"common"
"ssh"
"ccr"
"cgit"
]);
ccr.enable = true; ccr.enable = true;
services.rock5b-fan-control.enable = true; services.rock5b-fan-control.enable = true;
nixpkgs.hostPlatform = "aarch64-linux";
swapDevices = [];
boot.loader = {
grub.enable = false;
generic-extlinux-compatible.enable = true;
};
disko.devices = import ./disko.nix {};
services.nginx.enable = true; services.nginx.enable = true;
services.nginx.virtualHosts."localhost" = { services.nginx.virtualHosts."localhost" = {
cgit = { cgit = {

35
hosts/rock5b/disko.nix Normal file
View file

@ -0,0 +1,35 @@
{emmc ? "/dev/mmcblk0", ...}: {
disko.devices = {
disk = {
emmc = {
type = "disk";
device = emmc;
content = {
type = "table";
format = "gpt";
partitions = [
{
type = "partition";
start = "32.8kB";
end = "12.6MB";
name = "uboot";
bootable = true;
}
{
type = "partition";
name = "NIXOS_ROOTFS";
start = "13.6MB";
end = "100%";
flags = ["legacy_boot"];
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
}
];
};
};
};
};
}

View file

@ -1,17 +0,0 @@
{lib, ...}: {
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXOS_ROOTFS";
fsType = "ext4";
};
};
nixpkgs.hostPlatform = "aarch64-linux";
swapDevices = [];
boot.loader = {
grub.enable = false;
generic-extlinux-compatible.enable = true;
};
}