feat: add NixOS deployment infrastructure #8
27
flake.nix
27
flake.nix
@@ -12,18 +12,15 @@
|
|||||||
url = "git+https://git.lix.systems/lix-project/lix?ref=main";
|
url = "git+https://git.lix.systems/lix-project/lix?ref=main";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
# uConsole CM5 hardware support (uses compatible nixpkgs for module)
|
# uConsole CM5 hardware support
|
||||||
nixpkgs-uconsole.url = "github:nixos/nixpkgs/89dbf01"; # 2025-12-29, matches nixos-uconsole
|
nixos-uconsole.url = "github:nixos-uconsole/nixos-uconsole";
|
||||||
nixos-uconsole = {
|
# Note: nixos-uconsole manages its own nixpkgs input internally
|
||||||
url = "github:nixos-uconsole/nixos-uconsole";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs-uconsole";
|
|
||||||
};
|
|
||||||
# Raspberry Pi 5 hardware support
|
# Raspberry Pi 5 hardware support
|
||||||
nixos-hardware.url = "github:nixos/nixos-hardware/master";
|
nixos-hardware.url = "github:nixos/nixos-hardware/master";
|
||||||
self.submodules = true;
|
self.submodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixpkgs-uconsole, agenix, lix, nixos-uconsole, nixos-hardware, ... }@inputs:
|
outputs = { self, nixpkgs, agenix, lix, nixos-uconsole, nixos-hardware, ... }@inputs:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
keys = import ./lib/keys.nix;
|
keys = import ./lib/keys.nix;
|
||||||
@@ -88,24 +85,16 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
uConsole = nixpkgs-uconsole.lib.nixosSystem {
|
uConsole = nixos-uconsole.lib.nixosSystem {
|
||||||
|
system = "aarch64-linux";
|
||||||
specialArgs = { inherit self keys paths inputs; };
|
specialArgs = { inherit self keys paths inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = overlays;
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
nixpkgs.hostPlatform = "aarch64-linux";
|
|
||||||
nix.package = lix.packages."aarch64-linux".default;
|
nix.package = lix.packages."aarch64-linux".default;
|
||||||
|
|
||||||
# Manual uConsole CM5 hardware setup (module has compatibility issues)
|
|
||||||
# Display: 720x1280 landscape, panel on right
|
|
||||||
boot.kernelParams = [
|
|
||||||
"video=DSI-1:720x1280M@60D,panel_orientation=right_side_up"
|
|
||||||
"console=tty1"
|
|
||||||
];
|
|
||||||
hardware.enableRedistributableFirmware = true;
|
|
||||||
hardware.graphics.enable = true;
|
|
||||||
}
|
}
|
||||||
|
nixos-uconsole.nixosModules.uconsole-cm5
|
||||||
|
nixos-hardware.nixosModules.raspberry-pi-5
|
||||||
./hosts/uconsole/configuration.nix
|
./hosts/uconsole/configuration.nix
|
||||||
./hosts/uconsole/hardware-configuration.nix
|
./hosts/uconsole/hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -2,8 +2,20 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
# --- CORE HARDWARE (CM5 / RPi5) ---
|
# --- CORE HARDWARE (CM5 / RPi5) ---
|
||||||
# Manual hardware config in flake.nix (nixos-uconsole module has compatibility issues)
|
# nixos-uconsole.nixosModules.uconsole-cm5 imported in flake.nix
|
||||||
# Display and firmware configured in flake.nix modules array
|
|
||||||
|
uconsole = {
|
||||||
|
enable = true;
|
||||||
|
variant = "cm5"; # Hardware target: CM5/RPi5
|
||||||
|
# Fixes the landscape orientation at boot
|
||||||
|
videoMode = "720x1280M@60D,panel_orientation=right_side_up";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Firmware for Wi-Fi and Bluetooth
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
|
# Enable GPU acceleration (VideoCore VII)
|
||||||
|
hardware.graphics.enable = true;
|
||||||
|
|
||||||
# --- BASIC HOST INFO ---
|
# --- BASIC HOST INFO ---
|
||||||
networking.hostName = "uConsole";
|
networking.hostName = "uConsole";
|
||||||
|
|||||||
Reference in New Issue
Block a user