feat: add NixOS module for nixos-options-mcp service

Module provides:
- services.nixos-options-mcp.enable - Enable the service
- services.nixos-options-mcp.package - Package to use
- services.nixos-options-mcp.database.type - sqlite or postgres
- services.nixos-options-mcp.database.name - SQLite filename
- services.nixos-options-mcp.database.connectionString - PostgreSQL URL
- services.nixos-options-mcp.indexOnStart - Revisions to index on start
- services.nixos-options-mcp.user/group - Service user/group
- services.nixos-options-mcp.dataDir - Data directory

Includes systemd hardening options.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-03 18:26:29 +01:00
parent 88e8a55347
commit 43ffc234ac
2 changed files with 155 additions and 1 deletions

View File

@@ -7,8 +7,9 @@
outputs = { self, nixpkgs }:
let
lib = nixpkgs.lib;
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
forAllSystems = lib.genAttrs supportedSystems;
pkgsFor = system: nixpkgs.legacyPackages.${system};
in
{
@@ -67,5 +68,13 @@
'';
};
});
nixosModules = {
nixos-options-mcp = { pkgs, ... }: {
imports = [ ./nix/module.nix ];
services.nixos-options-mcp.package = lib.mkDefault self.packages.${pkgs.system}.nixos-options;
};
default = self.nixosModules.nixos-options-mcp;
};
};
}