Update
This commit is contained in:
parent
d100690333
commit
154c21859d
@ -2,20 +2,20 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./variables.nix
|
./variables.nix
|
||||||
../modules/server/security.nix
|
./modules/security.nix
|
||||||
../modules/server/openssh.nix
|
./modules/openssh.nix
|
||||||
../modules/server/sops.nix
|
./modules/sops.nix
|
||||||
../modules/server/cloudflare-dyndns.nix
|
./modules/cloudflare-dyndns.nix
|
||||||
../modules/server/nginx.nix
|
./modules/nginx.nix
|
||||||
../modules/server/nextcloud.nix
|
./modules/nextcloud.nix
|
||||||
../modules/server/vaultwarden.nix
|
./modules/vaultwarden.nix
|
||||||
../modules/server/www
|
./modules/www
|
||||||
../modules/server/adguard.nix
|
./modules/adguard.nix
|
||||||
../modules/server/ntfy-sh.nix
|
./modules/ntfy-sh.nix
|
||||||
../modules/server/tailscale.nix
|
./modules/tailscale.nix
|
||||||
../modules/server/kuma.nix
|
./modules/kuma.nix
|
||||||
../modules/server/bitcoin-git.nix
|
./modules/bitcoin-git.nix
|
||||||
# ../modules/server/unifi.nix # FIXME: unifi5 is deprecated
|
# ./modules/unifi.nix # FIXME: unifi5 is deprecated
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{ pkgs, ... }: {
|
||||||
systemd.timers."bitcoin-git" = {
|
systemd.timers."bitcoin-git" = {
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = [ "timers.target" ];
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
@ -10,17 +10,17 @@
|
|||||||
|
|
||||||
systemd.services."bitcoin-git" = {
|
systemd.services."bitcoin-git" = {
|
||||||
script = ''
|
script = ''
|
||||||
[ ! -d "/home/hadi/btcprice" ] && git clone git@github.com:anotherhadi/btcprice /home/hadi/btcprice
|
[ ! -d "/home/hadi/btcprice" ] && ${pkgs.git}/bin/git clone git@github.com:anotherhadi/btcprice /home/hadi/btcprice
|
||||||
cd "/home/hadi/btcprice"
|
cd "/home/hadi/btcprice"
|
||||||
price=$(curl eur.rate.sx/1BTC)
|
price=$(${pkgs.curl}/bin/curl eur.rate.sx/1BTC)
|
||||||
echo "# Bitcoin Price in EURO" >README.md
|
echo "# Bitcoin Price in EURO" >README.md
|
||||||
echo "" >>README.md
|
echo "" >>README.md
|
||||||
echo "1 Bitcoin = $price€" >>README.md
|
echo "1 Bitcoin = $price€" >>README.md
|
||||||
echo "" >>README.md
|
echo "" >>README.md
|
||||||
echo "Date: $(date)" >>README.md
|
echo "Date: $(date)" >>README.md
|
||||||
git add .
|
${pkgs.git}/bin/git add .
|
||||||
git commit -m "Update price (hadi)"
|
${pkgs.git}/bin/git commit -m "Update price (hadi)"
|
||||||
git push -u origin main
|
${pkgs.git}/bin/git push -u origin main
|
||||||
exit 0
|
exit 0
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
Loading…
Reference in New Issue
Block a user