baseos/flake.nix
2025-09-25 13:57:05 +02:00

68 lines
1.5 KiB
Nix

{
description = "c-base WiFi + Dev Tools flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs =
{
nixpkgs,
}:
let
systemList = [
"x86_64-linux"
"aarch64-linux"
];
# Helper: map a function over all systems
eachSystem =
f:
nixpkgs.lib.genAttrs systemList (
system:
let
pkgs = import nixpkgs { inherit system; };
in
f pkgs system
);
# ISRG Root X1 Certificate package per system
isrgRootX1 = eachSystem (
pkgs: _system: pkgs.callPackage ./pkgs/by-name/is/isrg-root-x1/package.nix { }
);
in
{
formatter = eachSystem (pkgs: _system: pkgs.nixfmt-rfc-style);
# Packages per system
packages = eachSystem (
_pkgs: system: {
isrg-root-x1 = isrgRootX1.${system};
}
);
# NixOS Modules per system
nixosModules = eachSystem (
lib: pkgs: system:
import ./nixos-modules/wifi.nix {
inherit pkgs lib;
isrgRootX1Cert = isrgRootX1.${system};
}
);
# Dev Shells per system
devShells = eachSystem (
pkgs: _system: {
default = pkgs.mkShell {
buildInputs = with pkgs; [
nixos-rebuild
git
nixpkgs-fmt
statix
deadnix
];
};
}
);
};
}