clean up pi setup

This commit is contained in:
ari committed 2026-09-04 02:23:34 -04:00
1 parent dca14c1a78
commit 3c828efadd
6 files changed
+36 -27

No files matched your search

+2 -2
View File
@@ -315,8 +315,8 @@ export def "skyg build-image" [
cd $REPO_ROOT cd $REPO_ROOT
let spec = (match $target { let spec = (match $target {
"iso" => { config: "iso", out: "iso", attr: "isoImage" } "iso" => { config: "iso", out: "iso", attr: "isoImage" }
"pi1" => { config: "hl-pi1-sd-image", out: "sd-image", attr: "sdImage" } "pi1" => { config: "hl-pi1", out: "sd-image", attr: "sdImage" }
"pi2" => { config: "hl-pi2-sd-image", out: "sd-image", attr: "sdImage" } "pi2" => { config: "hl-pi2", out: "sd-image", attr: "sdImage" }
_ => { error make { msg: $"Unknown image target '($target)'. Expected: iso, pi1, pi2" } } _ => { error make { msg: $"Unknown image target '($target)'. Expected: iso, pi1, pi2" } }
}) })
nix build $".#nixosConfigurations.($spec.config).config.system.build.($spec.attr)" nix build $".#nixosConfigurations.($spec.config).config.system.build.($spec.attr)"
+2 -19
View File
@@ -279,7 +279,7 @@
./hosts/hl-minipc3.hardware-configuration.nix ./hosts/hl-minipc3.hardware-configuration.nix
]; ];
}; };
hl-pi1 = lib.makeNixOs { hl-pi1 = lib.makeSdImage {
system = "aarch64-linux"; system = "aarch64-linux";
hostName = "hl-pi1"; hostName = "hl-pi1";
configuration = [ configuration = [
@@ -287,16 +287,7 @@
./hosts/hl-pi1.hardware-configuration.nix ./hosts/hl-pi1.hardware-configuration.nix
]; ];
}; };
# Fully-baked bootable SD card image for hl-pi1 — builds the whole hl-pi2 = lib.makeSdImage {
# 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-pi2 = lib.makeNixOs {
system = "aarch64-linux"; system = "aarch64-linux";
hostName = "hl-pi2"; hostName = "hl-pi2";
configuration = [ configuration = [
@@ -304,14 +295,6 @@
./hosts/hl-pi2.hardware-configuration.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 { hl-terra1 = lib.makeNixOs {
hostName = "hl-terra1"; hostName = "hl-terra1";
configuration = [ configuration = [
+1
View File
@@ -6,6 +6,7 @@
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ]; boot.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.zfs.forceImportRoot = false;
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-label/NIXOS_SD"; device = "/dev/disk/by-label/NIXOS_SD";
+15 -2
View File
@@ -1,4 +1,4 @@
{ lib, pkgs, determinate, ... }: { lib, pkgs, config, determinate, ... }:
{ {
skyg = { skyg = {
user.enable = true; user.enable = true;
@@ -13,6 +13,7 @@
tiler = { tiler = {
enable = true; enable = true;
hyprland.enable = true; hyprland.enable = true;
hyprland.configLink.enable = false;
noctalia.enable = false; noctalia.enable = false;
quickshell.enable = true; quickshell.enable = true;
}; };
@@ -38,6 +39,18 @@
# Serial console, useful for headless debugging over UART. # Serial console, useful for headless debugging over UART.
boot.kernelParams = [ "console=ttyS0,115200n8" "console=tty0" ]; boot.kernelParams = [ "console=ttyS0,115200n8" "console=tty0" ];
# SD image has no swap partition; use compressed RAM swap instead.
zramSwap.enable = true; zramSwap.enable = true;
programs.dank-material-shell.greeter = {
enable = true;
compositor.name = "hyprland";
configHome = "/home/${config.skyg.user.name}";
};
services.displayManager.autoLogin = {
enable = true;
user = config.skyg.user.name;
};
services.displayManager.defaultSession = "hyprland";
environment.systemPackages = with pkgs; [
foot
];
} }
+16 -4
View File
@@ -26,6 +26,16 @@ in
Defaults to the machine's hostName (e.g. `fwbook` -> `configs/fwbook/hypr`). Defaults to the machine's hostName (e.g. `fwbook` -> `configs/fwbook/hypr`).
''; '';
}; };
configLink = {
enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Whether to symlink `~/.config/hypr` -> `configs/<configName>/hypr`.
Disable on hosts that manage their own Hyprland config elsewhere.
'';
};
};
}; };
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
@@ -58,10 +68,12 @@ in
]; ];
# Symlink ~/.config/hypr -> configs/<configName>/hypr (host-specific). # Symlink ~/.config/hypr -> configs/<configName>/hypr (host-specific).
system.userActivationScripts.hyprlandConfig.text = skygUtils.makeHyperlinkScriptToConfigs { system.userActivationScripts.hyprlandConfig = lib.mkIf cfg.configLink.enable {
filePath = "${cfg.configName}/hypr"; text = skygUtils.makeHyperlinkScriptToConfigs {
targetPath = "hypr"; filePath = "${cfg.configName}/hypr";
configSource = "/home/${config.skyg.user.name}/nixos-setup/configs"; targetPath = "hypr";
configSource = "/home/${config.skyg.user.name}/nixos-setup/configs";
};
}; };
}; };
} }
Binary file not shown.