nixberry: first viable build

This commit is contained in:
Christoph Hollizeck 2025-11-21 19:24:39 +01:00
parent 0322c74f99
commit d8cf6893e7
Signed by: Daholli
GPG key ID: 249300664F2AF2C7
5 changed files with 48 additions and 45 deletions

View file

@ -13,19 +13,23 @@ in
(lib.mapAttrs' (
name: module:
let
raspberrypis = [ "nixberry" ];
stripped_name = lib.removePrefix prefix name;
specialArgs = {
inherit inputs;
hostConfig = module // {
name = lib.removePrefix prefix name;
name = stripped_name;
};
};
raspberrypis = [ "nixberry" ];
nixos-raspberrypi = lib.mkIf (builtins.elem stripped_name raspberrypis) inputs.nixos-raspberrypi;
};
in
{
name = lib.removePrefix prefix name;
name = stripped_name;
value =
if builtins.elem name raspberrypis then
if builtins.elem stripped_name raspberrypis then
inputs.nixos-raspberrypi.lib.nixosSystem {
inherit specialArgs;
modules = module.imports ++ [