This commit is contained in:
Hadi
2024-06-20 02:45:24 +02:00
parent b796117725
commit a0c5bd962b
10 changed files with 97 additions and 12 deletions

View File

@@ -27,6 +27,6 @@
# change the nvim's obsidian configuration if you want to enable that:
obsidian = true;
theme = import ../themes/catppuccin.nix; # select your theme here
theme = import ../themes/nixy.nix; # select your theme here
};
}

View File

@@ -0,0 +1,31 @@
{
systemd.timers."bitcoin-git" = {
wantedBy = [ "timers.target" ];
timerConfig = {
Unit = "bitcoin-git.service";
OnCalendar = "daily";
Persistent = true;
};
};
systemd.services."bitcoin-git" = {
script = ''
[ ! -d "/home/heaven/btcprice" ] && git clone git@github.com:anotherhadi/btcprice /home/heaven/btcprice
cd "/home/heaven/btcprice"
price=$(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
git add .
git commit -m "Update price (heaven)"
git push -u origin main
exit 0
'';
serviceConfig = {
Type = "oneshot";
User = "heaven";
};
};
}

View File

@@ -8,6 +8,8 @@
"vault.anotherhadi.com"
"anotherhadi.com"
"www.anotherhadi.com"
"test.anotherhadi.com"
"jack.anotherhadi.com"
"ntfy.anotherhadi.com"
"home.anotherhadi.com"
];

View File

@@ -4,11 +4,14 @@
services.nginx.virtualHosts = {
"anotherhadi.com" = {
# serverAliases = [ "www.anotherhadi.com" ];
serverAliases = [ "www.anotherhadi.com" ];
root = "/etc/www/anotherhadi.com";
};
"home.anotherhadi.com" = { root = "/etc/www/home.anotherhadi.com"; };
"www.anotherhadi.com" = { root = "/var/www/test"; };
"home.anotherhadi.com" = {
serverAliases = [ "jack.anotherhadi.com" ];
root = "/etc/www/home.anotherhadi.com";
};
"test.anotherhadi.com" = { root = "/var/www/test"; };
};
environment.etc."www/anotherhadi.com" = { source = ./anotherhadi.com; };
}

View File

@@ -2,14 +2,14 @@
let
bookmarks = ''
Home: [
{text: "Nextcloud", url: "https://cloud.anotherhadi.com", icon: ""},
{text: "Vaultwarden", url: "https://vault.anotherhadi.com", icon: ""},
{text: "Nextcloud", url: "https://cloud.anotherhadi.com", icon: "󰅟"},
{text: "Vaultwarden", url: "https://vault.anotherhadi.com", icon: ""},
],
Admin: [
{text: "Adguard Home", url: "http://192.168.2.24:3001", icon: ""},
{text: "Proxmox", url: "https://192.168.2.17:8006", icon: ""},
{text: "Cloudflare", url: "https://dash.cloudflare.com/", icon: ""},
{text: "Tailscale", url: "https://login.tailscale.com/admin/machines", icon: ""},
{text: "Adguard Home", url: "http://192.168.2.24:3001", icon: "󰷱"},
{text: "Proxmox", url: "https://192.168.2.17:8006", icon: ""},
{text: "Cloudflare", url: "https://dash.cloudflare.com/", icon: ""},
{text: "Tailscale", url: "https://login.tailscale.com/admin/machines", icon: "󰖂"},
],
'';
in {

View File

@@ -0,0 +1,25 @@
{ lib, buildNpmPackage, fetchFromGitHub }:
buildNpmPackage rec {
pname = "homepage";
version = "0.0.0";
src = fetchFromGitHub {
owner = "anotherhadi";
repo = pname;
rev = "v${version}";
hash = "sha256-BR+ZGkBBfd0dSQqAvujsbgsEPFYw/ThrylxUbOksYxM=";
};
npmDepsHash = "sha256-tuEfyePwlOy2/mOPdXbqJskO6IowvAP4DWg8xSZwbJw=";
# The prepack script runs the build script, which we'd rather do in the build phase.
npmPackFlags = [ "--ignore-scripts" ];
meta = {
description = "A simple homepage for your server.";
homepage = "https://github.com/anotherhadi/homepage";
# license = lib.licenses.gpl3Only;
# maintainers = with lib.maintainers; [ winter ];
};
}