hosts/cadey: init

this hasn't been deployed to hardware -- yet
This commit is contained in:
2025-06-22 02:49:41 +00:00
parent 082db767af
commit 8aa2396c36
6 changed files with 60 additions and 17 deletions

View File

@@ -0,0 +1,17 @@
# MAME arcade cabinet
# Raspberry Pi 400:
# - quad-core Cortex-A72 @ 1.8 GHz (ARMv8-A 64)
# - 4GiB RAM
{ ... }:
{
imports = [
./fs.nix
];
sane.hal.aarch64.enable = true;
# sane.roles.client = true;
# sane.roles.handheld = true;
# /boot space is at a premium, especially with uncompressed kernels. default was 20.
boot.loader.generic-extlinux-compatible.configurationLimit = 10;
}

View File

@@ -0,0 +1,17 @@
{ ... }:
{
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/cccccccc-aaaa-dddd-eeee-000020250621";
fsType = "btrfs";
options = [
"compress=zstd"
"defaults"
];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/2025-0621";
fsType = "vfat";
};
}

View File

@@ -2,6 +2,12 @@
{
# TODO: this should be populated per-host
sane.hosts.by-name."cadey" = {
ssh.authorized = lib.mkDefault false;
lan-ip = "10.78.79.70";
};
sane.hosts.by-name."crappy" = {
ssh.user_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMIvSQAGKqmymXIL4La9B00LPxBIqWAr5AsJxk3UQeY5";
ssh.host_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMN0cpRAloCBOE5/2wuzgik35iNDv5KLceWMCVaa7DIQ";

View File

@@ -19,5 +19,24 @@ in
sane.programs.nix-tree.enableFor = { system = false; user.colin = false; }; #< does not cross compile (2025-01-05; blocked by vty)
sane.programs.pyright.enableFor = { system = false; user.colin = false; }; #< python neovim LSP: doesn't cross compile (2025-01-05; unblocked)
sane.programs.vulkan-tools.enableFor = { system = false; user.colin = false; }; #< does not cross compile (2025-02-08)
boot.kernelPatches = [
{
# TODO: upstream into nixpkgs. <repo:nixos/nixpkgs:pkgs/os-specific/linux/kernel/common-config.nix>
name = "fix-module-builtin-mismatch";
patch = null;
extraStructuredConfig = with lib.kernel; {
# nixpkgs specifies `SUN8I_DE2_CCU = yes`, but that in turn requires `SUNXI_CCU = yes` and NOT `= module`
# symptom: config fails to eval
SUNXI_CCU = yes;
# nixpkgs specifies `DRM = yes`, which causes `DRM_PANEL=y`.
# in <repo:kernel.org/linux:include/drm/drm_panel.h> they branch based on if `CONFIG_BACKLIGHT_DEVICE` is a *builtin*,
# hence we need to build it as a builtin to actually have a backlight!
# same logic happens with nixpkgs `DRM_FBDEV_EMULATION = yes` => implies `CONFIG_DRM_KMS_HELPER=y`
# and <repo:kernel.org/linux:include/drm/display/drm_dp_helper.h>
BACKLIGHT_CLASS_DEVICE = yes;
};
}
];
};
}

View File

@@ -67,23 +67,6 @@ in
'';
boot.kernelPatches = [
{
# TODO: upstream into nixpkgs. <repo:nixos/nixpkgs:pkgs/os-specific/linux/kernel/common-config.nix>
name = "fix-module-builtin-mismatch";
patch = null;
extraStructuredConfig = with lib.kernel; {
# nixpkgs specifies `SUN8I_DE2_CCU = yes`, but that in turn requires `SUNXI_CCU = yes` and NOT `= module`
# symptom: config fails to eval
SUNXI_CCU = yes;
# nixpkgs specifies `DRM = yes`, which causes `DRM_PANEL=y`.
# in <repo:kernel.org/linux:include/drm/drm_panel.h> they branch based on if `CONFIG_BACKLIGHT_DEVICE` is a *builtin*,
# hence we need to build it as a builtin to actually have a backlight!
# same logic happens with nixpkgs `DRM_FBDEV_EMULATION = yes` => implies `CONFIG_DRM_KMS_HELPER=y`
# and <repo:kernel.org/linux:include/drm/display/drm_dp_helper.h>
BACKLIGHT_CLASS_DEVICE = yes;
};
}
{
name = "enable-libcamera-requirements";
patch = null;

View File

@@ -91,6 +91,7 @@ let
[
# real hosts:
# { name = "crappy"; system = "armv7l-linux"; }
{ name = "cadey"; system = elaborate "aarch64-linux"; }
{ name = "desko"; system = elaborate "x86_64-linux"; }
{ name = "flowy"; system = elaborate "x86_64-linux"; }
{ name = "lappy"; system = elaborate "x86_64-linux"; }