This commit is contained in:
ari committed 2026-09-03 23:18:08 -04:00
1 parent f2f6ce0ec1
commit dca14c1a78
11 files changed
+128 -15

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ bin/
| `skyg remote switch <host>` | Deploy to a remote host |
| `skyg hm switch` | Apply Home Manager config |
| `skyg update [input]` | Update flake inputs |
| `skyg build-iso` | Build bootable ISO |
| `skyg build-image iso|pi1|pi2` | Build bootable image — ISO (`iso`) or Pi SD card image (`pi1`, `pi2`) |
| `skyg openwrt` | Deploy OpenWrt config |
| `skyg rollback` | Roll back to previous generation |
| `skyg profiles` | List valid local/remote profiles |
+12 -11
View File
@@ -308,18 +308,19 @@ export def "skyg openwrt" [
}
}
# Build ISO image
export def "skyg build-iso" [] {
# Build a bootable image: ISO, or Pi SD card image (fully-baked, no on-device rebuild)
export def "skyg build-image" [
target: string@image-targets
] {
cd $REPO_ROOT
nix build .#nixosConfigurations.iso.config.system.build.isoImage
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
let spec = (match $target {
"iso" => { config: "iso", out: "iso", attr: "isoImage" }
"pi1" => { config: "hl-pi1-sd-image", out: "sd-image", attr: "sdImage" }
"pi2" => { config: "hl-pi2-sd-image", out: "sd-image", attr: "sdImage" }
_ => { error make { msg: $"Unknown image target '($target)'. Expected: iso, pi1, pi2" } }
})
nix build $".#nixosConfigurations.($spec.config).config.system.build.($spec.attr)"
ls -l $"result/($spec.out)"
}
# Home Manager operations
+4
View File
@@ -8,6 +8,10 @@ export def remote-cmds [] {
["test", "dry-activate", "run", "switch", "build", "boot"]
}
export def image-targets [] {
["iso", "pi1", "pi2"]
}
export def secret-names [] {
cd $REPO_ROOT
+16
View File
@@ -296,6 +296,22 @@
./hosts/hl-pi1.nix
];
};
hl-pi2 = lib.makeNixOs {
system = "aarch64-linux";
hostName = "hl-pi2";
configuration = [
./hosts/hl-pi2.nix
./hosts/hl-pi2.hardware-configuration.nix
];
};
# Fully-baked bootable SD card image for hl-pi2 — builds the whole
# target system off-Pi so flashing it needs no on-device rebuild.
hl-pi2-sd-image = lib.makeSdImage {
hostName = "hl-pi2";
configuration = [
./hosts/hl-pi2.nix
];
};
hl-terra1 = lib.makeNixOs {
hostName = "hl-terra1";
configuration = [
+1
View File
@@ -29,6 +29,7 @@ hosts/
| `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. Also buildable as a bootable SD image via the `hl-pi1-sd-image` nixosConfiguration (`skyg build-pi-sd-image`) |
| `hl-pi2.nix` | hl-pi2 | Raspberry Pi 4 (aarch64) — headless server, SSH only. Also buildable as a bootable SD image via the `hl-pi2-sd-image` nixosConfiguration |
| `hl-terra1.nix` | hl-terra1 | NFS storage + Jellyfin backup |
| `iso.nix` | iso | Bootable NixOS installer image |
+1
View File
@@ -37,6 +37,7 @@ in
desktop = {
enable = true;
crypto.enable = true;
printers.enable = true;
fixes = {
airpod-bluetooth.enabled = true;
};
+19 -2
View File
@@ -1,7 +1,24 @@
{ lib, pkgs, determinate, ... }:
{
skyg.user.enable = true;
skyg.nixos.common.ssh-server.enable = true;
skyg = {
user.enable = true;
nixos = {
common.ssh-server.enable = true;
common.hardware = {
sound.enable = true;
pipewire.enable = true;
};
desktop = {
enable = true;
tiler = {
enable = true;
hyprland.enable = true;
noctalia.enable = true;
quickshell.enable = true;
};
};
};
};
# Determinate Nix builds its own Nix from source (no aarch64-linux binary
# cache hit for us), and its test suite fails under QEMU emulation because
+25
View File
@@ -0,0 +1,25 @@
{ lib, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "usbhid" "usb_storage" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
};
fileSystems."/boot/firmware" = {
device = "/dev/disk/by-label/FIRMWARE";
fsType = "vfat";
options = [ "nofail" "noauto" ];
};
swapDevices = [ ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}
+43
View File
@@ -0,0 +1,43 @@
{ lib, pkgs, determinate, ... }:
{
skyg = {
user.enable = true;
nixos = {
common.ssh-server.enable = true;
common.hardware = {
sound.enable = true;
pipewire.enable = true;
};
desktop = {
enable = true;
tiler = {
enable = true;
hyprland.enable = true;
noctalia.enable = false;
quickshell.enable = true;
};
};
};
};
# Determinate Nix builds its own Nix from source (no aarch64-linux binary
# cache hit for us), and its test suite fails under QEMU emulation because
# nested seccomp doesn't work through the translation layer. Skip the test
# suite for this build only — Determinate Nix itself stays enabled.
nix.package = lib.mkForce (
determinate.inputs.nix.packages.${pkgs.stdenv.system}.default.overrideAttrs (old: {
doCheck = false;
})
);
# Pi 4 boots via Pi firmware + U-Boot reading extlinux.conf (set up by the
# official NixOS SD image) — not systemd-boot/EFI like the other hosts.
boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true;
# Serial console, useful for headless debugging over UART.
boot.kernelParams = [ "console=ttyS0,115200n8" "console=tty0" ];
# SD image has no swap partition; use compressed RAM swap instead.
zramSwap.enable = true;
}
+6 -1
View File
@@ -1,6 +1,11 @@
{ pkgs, lib, config, ... }:
{
config = lib.mkIf config.skyg.nixos.desktop.enable {
options = {
skyg.nixos.desktop.printers = {
enable = lib.mkEnableOption "Enable Printers";
};
};
config = lib.mkIf config.skyg.nixos.desktop.printers.enable {
services.flatpak.overrides = {
"org.chromium.Chromium" = {
Binary file not shown.