File tree Expand file tree Collapse file tree 4 files changed +39
-3
lines changed
tooling/src/test/kotlin/com/jorisjonkers/personalstack/platform Expand file tree Collapse file tree 4 files changed +39
-3
lines changed Original file line number Diff line number Diff line change 1- { ... } :
1+ { lib , ... } :
22{
33 imports = [
44 ../../profiles/worker.nix
55 ../../modules/k3s/node-labels.nix
66 ./disko.nix
77 ] ;
88
9+ # Raspberry Pi images boot through firmware + U-Boot/extlinux rather than EFI/systemd-boot.
10+ boot . loader = {
11+ grub . enable = lib . mkForce false ;
12+ systemd-boot . enable = lib . mkForce false ;
13+ efi . canTouchEfiVariables = lib . mkForce false ;
14+ generic-extlinux-compatible . enable = true ;
15+ } ;
16+
917 networking . hostName = "enschede-pi-1" ;
1018 personalStack . k3sNodeLabels = {
1119 "personal-stack/site" = "enschede" ;
Original file line number Diff line number Diff line change 1- { ... } :
1+ { lib , ... } :
22{
33 imports = [
44 ../../profiles/worker.nix
55 ../../modules/k3s/node-labels.nix
66 ./disko.nix
77 ] ;
88
9+ # Raspberry Pi images boot through firmware + U-Boot/extlinux rather than EFI/systemd-boot.
10+ boot . loader = {
11+ grub . enable = lib . mkForce false ;
12+ systemd-boot . enable = lib . mkForce false ;
13+ efi . canTouchEfiVariables = lib . mkForce false ;
14+ generic-extlinux-compatible . enable = true ;
15+ } ;
16+
917 networking . hostName = "enschede-pi-2" ;
1018 personalStack . k3sNodeLabels = {
1119 "personal-stack/site" = "enschede" ;
Original file line number Diff line number Diff line change 1- { ... } :
1+ { lib , ... } :
22{
33 imports = [
44 ../../profiles/worker.nix
55 ../../modules/k3s/node-labels.nix
66 ./disko.nix
77 ] ;
88
9+ # Raspberry Pi images boot through firmware + U-Boot/extlinux rather than EFI/systemd-boot.
10+ boot . loader = {
11+ grub . enable = lib . mkForce false ;
12+ systemd-boot . enable = lib . mkForce false ;
13+ efi . canTouchEfiVariables = lib . mkForce false ;
14+ generic-extlinux-compatible . enable = true ;
15+ } ;
16+
917 networking . hostName = "enschede-pi-3" ;
1018 personalStack . k3sNodeLabels = {
1119 "personal-stack/site" = "enschede" ;
Original file line number Diff line number Diff line change @@ -44,6 +44,18 @@ class PlatformHostDefinitionsTest {
4444 }
4545 }
4646
47+ @Test
48+ fun `raspberry pi hosts override efi boot with generic extlinux` () {
49+ listOf (" enschede-pi-1" , " enschede-pi-2" , " enschede-pi-3" ).forEach { nodeName ->
50+ val hostDefinition = repositoryRoot.resolve(" platform/nix/hosts/${nodeName} /default.nix" ).toFile().readText()
51+
52+ assertThat(hostDefinition)
53+ .contains(" systemd-boot.enable = lib.mkForce false" )
54+ .contains(" efi.canTouchEfiVariables = lib.mkForce false" )
55+ .contains(" generic-extlinux-compatible.enable = true" )
56+ }
57+ }
58+
4759 @Test
4860 fun `flake exports every inventory node with the correct architecture` () {
4961 val flake = repositoryRoot.resolve(" platform/flake.nix" ).toFile().readText()
You can’t perform that action at this time.
0 commit comments