{
  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
          '';
        }
      );
    };
}
