add oci target

This commit is contained in:
alisceon 2026-05-27 16:39:26 +02:00
parent 9cb871275a
commit 87cc464d1b
5 changed files with 131 additions and 14 deletions

View file

@ -31,7 +31,6 @@
...
}:
let
system = "x86_64-linux";
repoLocalPath =
let
fromEnv = builtins.getEnv "NIXOS_CONFIG_ROOT";
@ -42,26 +41,21 @@
inputs.nur.overlays.default
];
pkgs = import nixpkgs {
mkPkgs = system: import nixpkgs {
inherit system;
config.allowUnfree = true;
flake.setFlakeRegistry = true;
inherit overlays;
};
pkgs-unstable = import nixpkgs-unstable {
mkPkgsUnstable = system: import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
flake.setFlakeRegistry = true;
inherit overlays;
};
sharedSpecialArgs = {
inherit repoLocalPath pkgs-unstable;
repoRoot = self;
};
sharedModules = [
mkSharedModules = pkgs: pkgs-unstable: [
./nixos/modules/base.nix
inputs.home-manager.nixosModules.home-manager
({ ... }: {
@ -77,24 +71,32 @@
mkHost = {
hostName,
system,
nixosModules ? [ ],
hmModules ? [ ],
extraModules ? [ ],
}:
let
pkgs = mkPkgs system;
pkgs-unstable = mkPkgsUnstable system;
in
nixpkgs.lib.nixosSystem {
inherit system pkgs;
specialArgs = sharedSpecialArgs;
specialArgs = {
inherit repoLocalPath pkgs-unstable;
repoRoot = self;
};
modules =
sharedModules
(mkSharedModules pkgs pkgs-unstable)
++ [ (./nixos/hosts + "/${hostName}/configuration.nix") ]
++ nixosModules
++ extraModules
++ [
{
home-manager.users.alisceon.imports =
[
[
inputs.noctalia.homeModules.default
./home/profiles/base.nix
./home/profiles/base.nix
]
++ hmModules;
home-manager.users.root.imports = [
@ -125,6 +127,7 @@
nixosConfigurations = {
electra = mkHost {
hostName = "electra";
system = "x86_64-linux";
nixosModules = workstationModules;
hmModules = workstationHomeModules ++ [
./home/hosts/alisceon/electra.nix
@ -133,6 +136,7 @@
tower = mkHost {
hostName = "tower";
system = "x86_64-linux";
nixosModules = workstationModules;
hmModules = workstationHomeModules ++ [
./home/hosts/alisceon/tower.nix
@ -141,6 +145,7 @@
tesla-nixos = mkHost {
hostName = "tesla-nixos";
system = "x86_64-linux";
nixosModules = serverModules;
hmModules = serverHomeModules;
extraModules = [
@ -151,6 +156,14 @@
nuc = mkHost {
hostName = "nuc";
system = "x86_64-linux";
nixosModules = serverModules;
hmModules = serverHomeModules;
};
oci-a1 = mkHost {
hostName = "oci-a1";
system = "aarch64-linux";
nixosModules = serverModules;
hmModules = serverHomeModules;
};