Files
infra/flake.nix
Hermes Agent bbfcc43534 fix: use nixos-uconsole.kernel module only (uconsole-cm5 has broken deps)
- uconsole-cm5 module requires hardware.raspberry-pi options that don't exist
- Manual hardware config in flake.nix instead
- Still uses uconsole kernel and nixpkgs-uconsole for package compatibility
2026-04-29 19:41:06 +00:00

119 lines
4.3 KiB
Nix

{
description = "Gortium infra flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
agenix = {
url = "github:ryantm/agenix";
inputs.darwin.follows = "";
inputs.nixpkgs.follows = "nixpkgs";
};
lix = {
url = "git+https://git.lix.systems/lix-project/lix?ref=main";
inputs.nixpkgs.follows = "nixpkgs";
};
# uConsole CM5 hardware support (uses nixos-25.05 for hardware.raspberry-pi support)
nixpkgs-uconsole.url = "github:nixos/nixpkgs/nixos-25.05";
nixos-uconsole = {
url = "github:nixos-uconsole/nixos-uconsole";
inputs.nixpkgs.follows = "nixpkgs-uconsole";
};
# Raspberry Pi 5 hardware support
nixos-hardware.url = "github:nixos/nixos-hardware/master";
self.submodules = true;
};
outputs = { self, nixpkgs, nixpkgs-uconsole, agenix, lix, nixos-uconsole, nixos-hardware, ... }@inputs:
let
system = "x86_64-linux";
keys = import ./lib/keys.nix;
paths = {
flake = "/home/gortium/infra";
identities = [
"/home/gortium/.ssh/gortium_ssh_key"
"/etc/ssh/ssh_host_ed25519_key"
"/root/.age/bootstrap.key" ];
};
overlays = [ agenix.overlays.default ];
pkgs = import nixpkgs {
inherit system overlays;
config.allowUnfree = true;
config.permittedInsecurePackages = [
"openclaw-2026.3.12"
];
};
devShell = import ./shells/nix_dev.nix {
inherit pkgs system agenix;
};
in
{
nixosConfigurations = {
lazyworkhorse = nixpkgs.lib.nixosSystem {
specialArgs = { inherit system self keys paths inputs; };
modules = [
{
nixpkgs.overlays = overlays;
nixpkgs.config.allowUnfree = true;
nixpkgs.config.rocmSupport = true;
nixpkgs.config.permittedInsecurePackages = [
"openclaw-2026.3.12"
];
nix.package = lix.packages.${system}.default;
}
agenix.nixosModules.default
./hosts/lazyworkhorse/configuration.nix
./hosts/lazyworkhorse/hardware-configuration.nix
./modules/nixos/filesystem/hoardingcow-mount.nix
./modules/nixos/services/docker_manager.nix
./modules/nixos/services/open_code_server.nix
./modules/nixos/services/ollama_init_custom_models.nix
./modules/nixos/services/openclaw_node.nix
./users/gortium.nix
./users/ai-worker.nix
];
};
cyt-pi = nixpkgs.lib.nixosSystem {
specialArgs = { inherit self keys paths inputs; };
modules = [
{
nixpkgs.overlays = overlays;
nixpkgs.config.allowUnfree = true;
nixpkgs.hostPlatform = "aarch64-linux";
nix.package = lix.packages."aarch64-linux".default;
}
./hosts/cyt-pi/configuration.nix
./hosts/cyt-pi/hardware-configuration.nix
];
};
uConsole = nixpkgs-uconsole.lib.nixosSystem {
system = "aarch64-linux";
specialArgs = { inherit self keys paths inputs; };
modules = [
{
nixpkgs.config.allowUnfree = true;
nixpkgs.hostPlatform = "aarch64-linux";
nix.package = lix.packages."aarch64-linux".default;
# Manual uConsole CM5 hardware setup (nixos-uconsole module has broken hardware.raspberry-pi deps)
# Display: 720x1280 landscape, panel on right side up
boot.kernelParams = [
"video=DSI-1:720x1280M@60D,panel_orientation=right_side_up"
"console=tty1"
];
hardware.enableRedistributableFirmware = true;
hardware.graphics.enable = true;
}
# Use uconsole kernel module only (not the full uconsole-cm5 which has broken deps)
nixos-uconsole.nixosModules.kernel
./hosts/uconsole/configuration.nix
./hosts/uconsole/hardware-configuration.nix
];
};
};
devShells.${system}.default = devShell;
};
}