Add host drain
This commit is contained in:
parent
0f40720ce7
commit
389b2a2e07
3
hosts/drain/build-sd-image.sh
Executable file
3
hosts/drain/build-sd-image.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
nix build -f "<nixpkgs/nixos>" config.system.build.sdImage -I nixos-config=configuration.nix -I nixpkgs=channel:nixos-unstable --system aarch64-linux
|
34
hosts/drain/configuration.nix
Normal file
34
hosts/drain/configuration.nix
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{ lib, pkgs, config, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../../configuration/common
|
||||||
|
(modulesPath + "/installer/cd-dvd/sd-image.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.loader.grub.enable = false;
|
||||||
|
boot.loader.raspberryPi.enable = true;
|
||||||
|
boot.loader.raspberryPi.version = 4;
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_rpi4;
|
||||||
|
|
||||||
|
sdImage = {
|
||||||
|
firmwareSize = 1024;
|
||||||
|
firmwarePartitionName = "NIXOS_BOOT";
|
||||||
|
populateFirmwareCommands =
|
||||||
|
"${config.system.build.installBootLoader} ${config.system.build.toplevel} -d ./firmware";
|
||||||
|
populateRootCommands = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot/firmware" = {
|
||||||
|
mountPoint = "/boot";
|
||||||
|
neededForBoot = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
documentation.enable = false;
|
||||||
|
|
||||||
|
networking.hostName = "drain";
|
||||||
|
|
||||||
|
networking.interfaces.eth0.useDHCP = true;
|
||||||
|
|
||||||
|
system.stateVersion = "21.03";
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user