No description
Find a file
Jalil David Salamé Messina 5745e1aaf7
All checks were successful
/ check (push) Successful in 4s
/ build (push) Successful in 2s
feat: refactor and add ip saving
- clean up code to my new (and improved) standards
- print better miette diagnostigs for the error tests
- add an IP saving feature:
    save the last IP that successfully updated the records and usa that
    when restarting the service. This allows seamles upgrades of
    `webnsupdate` without having to manually trigger a DNS update
2024-10-13 00:54:54 +02:00
.cargo feat: refactor and add ip saving 2024-10-13 00:54:54 +02:00
.forgejo/workflows fix(ci): do not use a name when logging in 2024-10-12 22:19:00 +02:00
src feat: refactor and add ip saving 2024-10-13 00:54:54 +02:00
.envrc [feat] flake.nix: add envrc to run nix develop 2024-06-02 15:49:28 +02:00
.gitignore [feat] flake.nix: add envrc to run nix develop 2024-06-02 15:49:28 +02:00
Cargo.lock chore: cargo update 2024-10-12 22:13:18 +02:00
Cargo.toml feat: refactor and add ip saving 2024-10-13 00:54:54 +02:00
default.nix feat: refactor and add ip saving 2024-10-13 00:54:54 +02:00
flake.lock refactor(flake): use flake-parts 2024-10-12 22:34:57 +02:00
flake.nix refactor(flake): use flake-parts 2024-10-12 22:34:57 +02:00
LICENSE webnsupdate: Init at version 0.1.0 2024-05-08 21:37:19 +02:00
module.nix fix(fmt): use nixfmt-rfc-style 2024-09-30 16:14:17 +02:00
README.md webnsupdate: Init at version 0.1.0 2024-05-08 21:37:19 +02:00
run-cmd.nix fix(fmt): use nixfmt-rfc-style 2024-09-30 16:14:17 +02:00

Web NS update

A webserver API for nsupdate. This is only intended for my usecase, so feel free to take inspiration, but don't expect this to be useful to you.

Usage

Note

This was made because I needed it. It probably wont fit your usecase.

Using a flake NixOS configuration add these lines:

{
  inputs.webnsupdate.url = "github:jalil-salame/webnsupdate";
  # inputs.webnsupdate.inputs.nixpkgs.follows = "nixpkgs"; # deduplicate nixpkgs

  # ...
  outputs = {
    nixpkgs,
    webnsupdate,
    ...
  }: {
    # ...
    nixosConfigurations.hostname = let
      system = "...";
      pkgs = import nixpkgs {
        inherit system;
        # IMPORTANT -----------v
        overlays = [webnsupdate.overlays.default];
      };
    in {
      inherit system pkgs;
      modules = [
        webnsupdate.nixosModules.default
        {
          services.webnsupdate = {
            enable = true;
            # ...
          };
        }
      ];
    };
    # ...
  };
}