Release v2.2.0
This commit is contained in:
@@ -1,4 +1,19 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
bitcoin-price = pkgs.writeShellScriptBin "bitcoin-price" ''
|
||||
[ ! -d "/home/hadi/btcprice" ] && ${pkgs.git}/bin/git clone git@github.com:anotherhadi/btcprice /home/hadi/btcprice
|
||||
cd "/home/hadi/btcprice"
|
||||
price=$(${pkgs.curl}/bin/curl eur.rate.sx/1BTC)
|
||||
echo "# Bitcoin Price in EURO" >README.md
|
||||
echo "" >>README.md
|
||||
echo "1 Bitcoin = $price€" >>README.md
|
||||
echo "" >>README.md
|
||||
echo "Date: $(date)" >>README.md
|
||||
${pkgs.git}/bin/git add .
|
||||
${pkgs.git}/bin/git commit -m "Update price (hadi)"
|
||||
${pkgs.git}/bin/git push -u origin main
|
||||
'';
|
||||
in {
|
||||
systemd.timers."bitcoin-git" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
@@ -10,17 +25,7 @@
|
||||
|
||||
systemd.services."bitcoin-git" = {
|
||||
script = ''
|
||||
[ ! -d "/home/hadi/btcprice" ] && ${pkgs.git}/bin/git clone git@github.com:anotherhadi/btcprice /home/hadi/btcprice
|
||||
cd "/home/hadi/btcprice"
|
||||
price=$(${pkgs.curl}/bin/curl eur.rate.sx/1BTC)
|
||||
echo "# Bitcoin Price in EURO" >README.md
|
||||
echo "" >>README.md
|
||||
echo "1 Bitcoin = $price€" >>README.md
|
||||
echo "" >>README.md
|
||||
echo "Date: $(date)" >>README.md
|
||||
${pkgs.git}/bin/git add .
|
||||
${pkgs.git}/bin/git commit -m "Update price (hadi)"
|
||||
${pkgs.git}/bin/git push -u origin main
|
||||
${bitcoin-price}
|
||||
exit 0
|
||||
'';
|
||||
serviceConfig = {
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
# haugene/transmission-openvpn
|
||||
# '';
|
||||
# };
|
||||
# TODO: launch the container at boot
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 9091 ];
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
sops = {
|
||||
age.keyFile = "/home/hadi/.config/sops/age/keys.txt";
|
||||
defaultSopsFile = ./server.yaml;
|
||||
defaultSopsFile = ./secrets.yaml;
|
||||
defaultSopsFormat = "yaml";
|
||||
secrets = {
|
||||
sshconfig = {
|
||||
@@ -14,15 +14,15 @@
|
||||
owner = "hadi";
|
||||
};
|
||||
nextcloud-adminpass = {
|
||||
mode = "0444"; # FIXME
|
||||
mode = "0444";
|
||||
path = "/etc/nextcloud/adminpassFile";
|
||||
};
|
||||
cloudflare-apitoken = {
|
||||
mode = "0444"; # FIXME
|
||||
mode = "0444";
|
||||
path = "/etc/cloudflare/apiToken";
|
||||
};
|
||||
tailscaled-authKey = {
|
||||
mode = "0444"; # FIXME
|
||||
mode = "0444";
|
||||
path = "/etc/tailscale/authKey";
|
||||
};
|
||||
transmission-script = {
|
||||
|
||||
Reference in New Issue
Block a user