mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-02 11:01:41 +02:00
feat: install nixos on orange pi 5 plus with edk2-rk3588(uefi)
This commit is contained in:
+22
-7
@@ -27,14 +27,22 @@ with allSystemAttrs; let
|
||||
};
|
||||
|
||||
# aarch64 related
|
||||
# using the same nixpkgs as nixos-rk3588 to utilize the cross-compilation cache.
|
||||
rk3588_pkgs = import nixos-rk3588.inputs.nixpkgs {system = x64_system;};
|
||||
rk3588_specialArgs = {
|
||||
inherit username userfullname useremail;
|
||||
rk3588_pkgs = import nixos-rk3588.inputs.nixpkgs {system = aarch64_system;};
|
||||
# aarch64 related
|
||||
rk3588_specialArgs = let
|
||||
# using the same nixpkgs as nixos-rk3588
|
||||
inherit (nixos-rk3588.inputs) nixpkgs;
|
||||
# Provide rk3588 inputs as special argument
|
||||
rk3588 = nixos-rk3588.inputs;
|
||||
};
|
||||
# use aarch64-linux's native toolchain
|
||||
pkgsKernel = import nixpkgs {
|
||||
system = aarch64_system;
|
||||
};
|
||||
in
|
||||
allSystemSpecialArgs.aarch64_system
|
||||
// {
|
||||
inherit nixpkgs;
|
||||
# Provide rk3588 inputs as special argument
|
||||
rk3588 = {inherit nixpkgs pkgsKernel;};
|
||||
};
|
||||
rk3588_base_args = {
|
||||
inherit home-manager;
|
||||
inherit (nixos-rk3588.inputs) nixpkgs; # or nixpkgs-unstable
|
||||
@@ -55,6 +63,7 @@ in {
|
||||
|
||||
# aarch64 SBCs
|
||||
suzu = rk3588_specialArgs;
|
||||
rakushun = rk3588_specialArgs;
|
||||
};
|
||||
nodeNixpkgs = {
|
||||
nozomi = lpi4a_pkgs;
|
||||
@@ -62,6 +71,7 @@ in {
|
||||
|
||||
# aarch64 SBCs
|
||||
suzu = rk3588_pkgs;
|
||||
rakushun = rk3588_pkgs;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -137,5 +147,10 @@ in {
|
||||
_12kingdoms_suzu_modules
|
||||
{host_tags = _12kingdoms_suzu_tags;}
|
||||
]);
|
||||
rakushun = colmenaSystem (attrs.mergeAttrsList [
|
||||
rk3588_base_args
|
||||
_12kingdoms_rakushun_modules
|
||||
{host_tags = _12kingdoms_rakushun_tags;}
|
||||
]);
|
||||
};
|
||||
}
|
||||
|
||||
+26
-1
@@ -8,6 +8,28 @@ with allSystemAttrs; let
|
||||
system = x64_system;
|
||||
specialArgs = allSystemSpecialArgs.x64_system;
|
||||
};
|
||||
|
||||
# aarch64 related
|
||||
rk3588_specialArgs = let
|
||||
# using the same nixpkgs as nixos-rk3588
|
||||
inherit (nixos-rk3588.inputs) nixpkgs;
|
||||
# use aarch64-linux's native toolchain
|
||||
pkgsKernel = import nixpkgs {
|
||||
system = aarch64_system;
|
||||
};
|
||||
in
|
||||
allSystemSpecialArgs.aarch64_system
|
||||
// {
|
||||
inherit nixpkgs;
|
||||
# Provide rk3588 inputs as special argument
|
||||
rk3588 = {inherit nixpkgs pkgsKernel;};
|
||||
};
|
||||
rk3588_base_args = {
|
||||
inherit home-manager nixos-generators;
|
||||
inherit (nixos-rk3588.inputs) nixpkgs; # or nixpkgs-unstable
|
||||
system = aarch64_system;
|
||||
specialArgs = rk3588_specialArgs;
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
# ai with i3 window manager
|
||||
@@ -32,9 +54,12 @@ in {
|
||||
k3s_prod_1_worker_3 = nixosSystem (k3s_prod_1_worker_3_modules // base_args);
|
||||
|
||||
tailscale_gw = nixosSystem (homelab_tailscale_gw_modules // base_args);
|
||||
|
||||
# aarch64 hosts
|
||||
suzu = nixosSystem (_12kingdoms_suzu_modules // rk3588_base_args);
|
||||
rakushun = nixosSystem (_12kingdoms_rakushun_modules // rk3588_base_args);
|
||||
};
|
||||
|
||||
# take system images for idols
|
||||
# https://github.com/nix-community/nixos-generators
|
||||
packages."${x64_system}" = attrs.mergeAttrsList [
|
||||
(
|
||||
|
||||
+10
-3
@@ -246,14 +246,21 @@ in {
|
||||
nixos-modules = [
|
||||
../hosts/12kingdoms_suzu
|
||||
../modules/nixos/server/server-aarch64.nix
|
||||
|
||||
# cross-compilation this flake.
|
||||
{nixpkgs.crossSystem.config = "aarch64-unknown-linux-gnu";}
|
||||
];
|
||||
# home-module.imports = [];
|
||||
};
|
||||
_12kingdoms_suzu_tags = ["aarch" "suzu"];
|
||||
|
||||
# 楽俊, Rakushun
|
||||
_12kingdoms_rakushun_modules = {
|
||||
nixos-modules = [
|
||||
../hosts/12kingdoms_rakushun
|
||||
../modules/nixos/server/server-aarch64.nix
|
||||
];
|
||||
# home-module.imports = [];
|
||||
};
|
||||
_12kingdoms_rakushun_tags = ["aarch" "rakushun"];
|
||||
|
||||
# Shoukei (祥瓊, Shōkei)
|
||||
_12kingdoms_shoukei_modules_i3 = {
|
||||
nixos-modules =
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
"kubevirt-shoryu" = "192.168.5.176";
|
||||
"kubevirt-shushou" = "192.168.5.177";
|
||||
"kubevirt-youko" = "192.168.5.178";
|
||||
"rakushun" = "192.168.5.179";
|
||||
"tailscale-gw" = "192.168.5.192";
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user