This commit is contained in:
Lucy 2025-09-25 13:51:04 +02:00
commit df1ea7ce32
5 changed files with 406 additions and 0 deletions

67
flake.nix Normal file
View file

@ -0,0 +1,67 @@
{
description = "c-base WiFi + Dev Tools flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
treefmt-nix.url = "github:numtide/treefmt-nix";
};
outputs =
{
self,
nixpkgs,
treefmt-nix,
}:
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 { });
in
{
# Packages per system
packages = eachSystem (
pkgs: system: {
isrg-root-x1 = isrgRootX1.${system};
}
);
# NixOS Modules per system
nixosModules = eachSystem (
pkgs: system:
import ./nixos-modules/wifi.nix {
inherit pkgs;
isrgRootX1Cert = isrgRootX1.${system};
}
);
# Dev Shells per system
devShells = eachSystem (
pkgs: system: {
default = pkgs.mkShell {
buildInputs = with pkgs; [
nixos-rebuild
git
nixpkgs-fmt
statix
deadnix
];
};
}
);
};
}