baseos/flake.nix

69 lines
1.5 KiB
Nix
Raw Normal View History

2025-09-25 13:51:04 +02:00
{
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
2025-09-25 13:57:05 +02:00
isrgRootX1 = eachSystem (
pkgs: _system: pkgs.callPackage ./pkgs/by-name/is/isrg-root-x1/package.nix { }
);
2025-09-25 13:51:04 +02:00
in
{
2025-09-25 13:57:05 +02:00
formatter = eachSystem (pkgs: _system: pkgs.nixfmt-rfc-style);
2025-09-25 13:51:04 +02:00
# Packages per system
packages = eachSystem (
2025-09-25 13:57:05 +02:00
_pkgs: system: {
2025-09-25 13:51:04 +02:00
isrg-root-x1 = isrgRootX1.${system};
}
);
# NixOS Modules per system
nixosModules = eachSystem (
2025-09-25 13:57:05 +02:00
lib: pkgs: system:
2025-09-25 13:51:04 +02:00
import ./nixos-modules/wifi.nix {
2025-09-25 13:57:05 +02:00
inherit pkgs lib;
2025-09-25 13:51:04 +02:00
isrgRootX1Cert = isrgRootX1.${system};
}
);
# Dev Shells per system
devShells = eachSystem (
2025-09-25 13:57:05 +02:00
pkgs: _system: {
2025-09-25 13:51:04 +02:00
default = pkgs.mkShell {
buildInputs = with pkgs; [
nixos-rebuild
git
nixpkgs-fmt
statix
deadnix
];
};
}
);
};
}