mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
pkgs/kat-glauca-dns: What have I done?
This commit is contained in:
parent
b705cf985c
commit
1d4d8eb4d8
4 changed files with 51 additions and 3 deletions
|
|
@ -17,8 +17,6 @@ let
|
|||
clockSupport = true;
|
||||
};
|
||||
|
||||
kat-website = super.callPackage ./kat-website { };
|
||||
|
||||
waybar = super.waybar.override { pulseSupport = true; };
|
||||
|
||||
notmuch = super.callPackage ./notmuch { inherit (super) notmuch; };
|
||||
|
|
@ -35,6 +33,10 @@ let
|
|||
|
||||
screenstub = unstable.callPackage ./screenstub { };
|
||||
|
||||
kat-glauca-dns = unstable.callPackage ./kat-glauca-dns { inherit sources; };
|
||||
|
||||
kat-website = super.callPackage ./kat-website { };
|
||||
|
||||
kat-weather = super.callPackage ./kat-weather { };
|
||||
|
||||
kat-gpg-status = super.callPackage ./kat-gpg-status { };
|
||||
|
|
|
|||
16
pkgs/kat-glauca-dns/default.nix
Normal file
16
pkgs/kat-glauca-dns/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ sources, pkgs, curl, coreutils, writeShellScriptBin }:
|
||||
|
||||
let
|
||||
rbw-bitw = (import sources.arc-nixexprs { inherit pkgs; }).pkgs.rbw-bitw;
|
||||
in writeShellScriptBin "kat-glauca-dns" ''
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
ip4=$(${curl}/bin/curl -s --ipv4 https://dns.glauca.digital/checkip)
|
||||
ip6=$(${curl}/bin/curl -s --ipv6 https://dns.glauca.digital/checkip)
|
||||
source $passFile
|
||||
echo "$ip4, $ip6"
|
||||
${curl}/bin/curl -u ''${user}:''${pass} --data-urlencode "hostname=''${hostname}" --data-urlencode "myip=''${ip4}" "https://dns.glauca.digital/nic/update"
|
||||
echo ""
|
||||
${curl}/bin/curl -u ''${user}:''${pass} --data-urlencode "hostname=''${hostname}" --data-urlencode "myip=''${ip6}" "https://dns.glauca.digital/nic/update"
|
||||
''
|
||||
Loading…
Add table
Add a link
Reference in a new issue