photoncloud-monorepo/nix-nos/flake.nix
centra 3eeb303dcb feat: Batch commit for T039.S3 deployment
Includes all pending changes needed for nixos-anywhere:
- fiberlb: L7 policy, rule, certificate types
- deployer: New service for cluster management
- nix-nos: Generic network modules
- Various service updates and fixes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 04:34:51 +09:00

62 lines
1.6 KiB
Nix

{
description = "Nix-NOS: Generic network operating system modules for NixOS";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
lib = nixpkgs.lib;
in
{
# Export NixOS modules
nixosModules.default = import ./modules;
# Development shell
devShells = lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.mkShell {
buildInputs = with pkgs; [
nixpkgs-fmt
nil
];
shellHook = ''
echo "Nix-NOS development shell"
echo "Run: nix flake check"
'';
};
}
);
# Package checks
checks = lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system:
let
pkgs = nixpkgs.legacyPackages.${system};
# Basic module evaluation test
testEval = import "${nixpkgs}/nixos/lib/eval-config.nix" {
inherit system;
modules = [
self.nixosModules.default
{ nix-nos.enable = true; }
];
};
in
{
# Verify module loads without errors
module-eval = pkgs.runCommand "module-eval-test" {
inherit (testEval.config.nix-nos) enable version;
} ''
echo "Nix-NOS module loaded successfully"
echo "Version: $version"
touch $out
'';
}
);
};
}