disko
for rock5b
This commit is contained in:
parent
7cf02684d9
commit
11b7466753
3 changed files with 51 additions and 27 deletions
|
@ -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
35
hosts/rock5b/disko.nix
Normal 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 = "/";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -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;
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue