···11+these are set of nixos modules for more convenient deployment of cloud resources for various providers. only implemented module is for firewalls right now, supporting hetzner.
22+33+## usage
44+55+if using flakes, put `nixosModules.<resource>` and `nixosModules.<resource>-<provider>`
66+in your NixOS configuration. for example, `nixosModules.firewall` and
77+`nixosModules.firewall-hetzner`. see `nix flake show` for all available modules.
88+99+if not using flakes, you can import `<resource>/` and `<resource>/provider/<provider>`.
1010+1111+then, you can either use each module's individual `mkApp` config option to
1212+generate an app and run it, or you can call `makeApps`:
1313+- for flakes use the flake output `makeApps` and `makeApps {inherit pkgs self;}`. you can assign the output of this to your `outputs.apps` as it generates flake apps.
1414+- for non-flake use `import ./makeApps.nix {inherit pkgs nixosSystem;}`, this will return an attribute set with a `run` key which is the generated app.
+2-1
firewall/provider/hetzner/default.nix
···66in {
77 options = {
88 providers.hetzner.firewall = {
99+ enable = l.mkEnableOption "hetzner firewall";
910 id = l.mkOption {
1011 type = t.ints.unsigned;
1112 description = "The ID of the firewall to update.";
···2223 };
2324 };
24252525- config = {
2626+ config = l.mkIf cfg.enable {
2627 providers.hetzner.firewall.mkApp = pkgs: import ./app.nix {
2728 inherit pkgs lib taggedPorts;
2829 inherit (cfg) id;