sdcard image for pi
This commit is contained in:
1 parent
be306f2e30
commit
f2f6ce0ec1
4 files changed
+42
-1
No files matched your search
@@ -315,6 +315,13 @@ export def "skyg build-iso" [] {
|
||||
ls -l result/iso
|
||||
}
|
||||
|
||||
# Build hl-pi1 SD card image (fully-baked, no on-device rebuild needed)
|
||||
export def "skyg build-pi-sd-image" [] {
|
||||
cd $REPO_ROOT
|
||||
nix build .#nixosConfigurations.hl-pi1-sd-image.config.system.build.sdImage
|
||||
ls -l result/sd-image
|
||||
}
|
||||
|
||||
# Home Manager operations
|
||||
export def "skyg hm" [action: string@hm-actions, profile: string = "ari"] {
|
||||
cd $REPO_ROOT
|
||||
|
||||
@@ -287,6 +287,15 @@
|
||||
./hosts/hl-pi1.hardware-configuration.nix
|
||||
];
|
||||
};
|
||||
# Fully-baked bootable SD card image for hl-pi1 — builds the whole
|
||||
# target system off-Pi (see nix.buildMachines/binfmt on fwdesk /
|
||||
# hl-bigbox1) so flashing it needs no on-device rebuild.
|
||||
hl-pi1-sd-image = lib.makeSdImage {
|
||||
hostName = "hl-pi1";
|
||||
configuration = [
|
||||
./hosts/hl-pi1.nix
|
||||
];
|
||||
};
|
||||
hl-terra1 = lib.makeNixOs {
|
||||
hostName = "hl-terra1";
|
||||
configuration = [
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ hosts/
|
||||
| `hl-minipc1.nix` | hl-minipc1 | Core infra: Gitea, nix-serve, Docker registry |
|
||||
| `hl-minipc2.nix` | hl-minipc2 | Container/media server |
|
||||
| `hl-minipc3.nix` | hl-minipc3 | K3s worker node |
|
||||
| `hl-pi1.nix` | hl-pi1 | Raspberry Pi CM4 (aarch64) — headless server, SSH only |
|
||||
| `hl-pi1.nix` | hl-pi1 | Raspberry Pi CM4 (aarch64) — headless server, SSH only. Also buildable as a bootable SD image via the `hl-pi1-sd-image` nixosConfiguration (`skyg build-pi-sd-image`) |
|
||||
| `hl-terra1.nix` | hl-terra1 | NFS storage + Jellyfin backup |
|
||||
| `iso.nix` | iso | Bootable NixOS installer image |
|
||||
|
||||
|
||||
@@ -131,6 +131,31 @@ in
|
||||
] ++ configuration;
|
||||
};
|
||||
|
||||
makeSdImage =
|
||||
{ system ? "aarch64-linux"
|
||||
, hostName
|
||||
, systemStateVersion ? "26.05"
|
||||
, homeManagerVersion ? "26.05"
|
||||
, configuration ? [ ]
|
||||
}: nixpkgs.lib.nixosSystem {
|
||||
specialArgs = specialArgs // {
|
||||
inherit system skygUtils user;
|
||||
unstablePkgs = nixpkgs-unstable.legacyPackages.${system};
|
||||
};
|
||||
inherit system;
|
||||
modules = osModules ++ [
|
||||
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
|
||||
(import ./main.nix {
|
||||
inherit
|
||||
user
|
||||
hostName
|
||||
systemStateVersion
|
||||
homeManagerVersion
|
||||
;
|
||||
})
|
||||
] ++ configuration;
|
||||
};
|
||||
|
||||
makeDarwinModule =
|
||||
{ system ? "x86_64-darwin"
|
||||
, user
|
||||
|
||||
Reference in new issue
Block a user