67 lines
1.4 KiB
Nix
67 lines
1.4 KiB
Nix
{
|
|
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
|
|
];
|
|
};
|
|
}
|
|
);
|
|
};
|
|
}
|