diff options
| author | Franck Cuny <franck@fcuny.net> | 2022-05-07 16:00:40 -0700 |
|---|---|---|
| committer | Franck Cuny <franck@fcuny.net> | 2022-05-07 16:00:40 -0700 |
| commit | b4fcf4bef44e6f3ccd4fcc5363f61f4f22ae23fe (patch) | |
| tree | ba0959d3bf0e7651c83ea878a0571510c36ed7de /flake.nix | |
| parent | cmd: add a command to update fcuny.xyz (diff) | |
| download | infra-b4fcf4bef44e6f3ccd4fcc5363f61f4f22ae23fe.tar.gz | |
nix: add a command `dnsupdate` to update the DNS
Running `nix run .#dnsupdate` will execute the program to ensure the
configuration is correct.
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -52,7 +52,17 @@ pkgs = import inputs.nixpkgs { inherit system; }; home-manager = inputs.home-manager.defaultPackage."${system}"; in { - packages = pkgs // { inherit home-manager; }; + packages = pkgs // { + inherit home-manager; + + # nix run .#dnsupdate + dnsupdate = pkgs.writers.writeBashBin "dnsupdate" '' + #!/usr/bin/env bash + export TS_API_KEY=$(pass api/api.tailscale.com) + export GOOGLE_APPLICATION_CREDENTIALS=/run/agenix/gcloud/world-nix + go run ./cmd/dnsupdate/ + ''; + }; checks = { pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run { @@ -70,6 +80,8 @@ rnix-lsp home-manager git + go + gopls ]; }; }); |
