mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
fix up services
This commit is contained in:
parent
6e5b5f3173
commit
4a13abb197
4 changed files with 16 additions and 25 deletions
|
|
@ -17,7 +17,7 @@ _:
|
|||
startAt = "*:0/30";
|
||||
|
||||
serviceConfig = {
|
||||
LoadCredential = "token:${config.sops.secrets.cloudflare.path}";
|
||||
EnvironmentFile = config.sops.secrets.cloudflare.path;
|
||||
DynamicUser = true;
|
||||
};
|
||||
|
||||
|
|
@ -33,8 +33,6 @@ _:
|
|||
exit 0
|
||||
fi
|
||||
|
||||
AUTH="$(cat "$CREDENTIALS_DIRECTORY/token")"
|
||||
|
||||
IP=$(grep -oP '^((?!fe80).).{22}ffee.{5}' /proc/net/if_inet6 | sed -E 's/(.{4})/\1:/g; s/.$//')
|
||||
|
||||
func () {
|
||||
|
|
@ -69,15 +67,15 @@ _:
|
|||
--url "https://api.cloudflare.com/client/v4/zones/$ZONE/dns_records/$ID" \
|
||||
--header "Authorization: Bearer $AUTH" \
|
||||
--header "Content-Type: application/json" \
|
||||
--data "{
|
||||
\"content\": \"$IP\",
|
||||
\"name\": \"$RECORD\",
|
||||
\"proxied\": $PROXY,
|
||||
\"type\": \"AAAA\",
|
||||
\"comment\": \"\",
|
||||
\"tags\": [],
|
||||
\"ttl\": 1
|
||||
}"
|
||||
--data '{
|
||||
"content": "'"$IP"'",
|
||||
"name": "'"$RECORD"'",
|
||||
"proxied": '"$PROXY"',
|
||||
"type": "AAAA",
|
||||
"comment": "",
|
||||
"tags": [],
|
||||
"ttl": 1
|
||||
}'
|
||||
}
|
||||
|
||||
func "*.gerg-l.com" "8f76f071c5edbc0f947a5c5f9c5df9f8"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue