This commit is contained in:
Hadi 2024-06-23 15:14:29 +02:00
parent 4046038cf2
commit 487d81ff86
5 changed files with 6 additions and 111 deletions

View File

@ -49,8 +49,8 @@
python3 python3
jq jq
git-ignore git-ignore
node2nix
nurl nurl
prefetch-npm-deps
# Utils # Utils
fd fd

View File

@ -47,8 +47,8 @@ let
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "anotherhadi"; owner = "anotherhadi";
repo = "homepage"; repo = "homepage";
rev = "19f56771ae7ac04e2710cbde763f70bb097eb250"; rev = "40286c5e03bcfb9993cce354b4f12c00a1b4966d";
hash = "sha256-8IzXcQ/hm2ZDzFKUL4B3501PoWoEOiKIN7rP2UrvG84="; hash = "sha256-zlJ/bzFWE64HpUCxiRT5E9wrjVVwSTSgIOrifWKxphU=";
}; };
# npmDepsHash = lib.fakeHash; # npmDepsHash = lib.fakeHash;

View File

@ -1,9 +1,5 @@
{ {
imports = [ imports = [ ./home.anotherhadi.com.nix ./anotherhadi.com.nix ];
./home.anotherhadi.com.nix
./start.anotherhadi.com.nix
./anotherhadi.com.nix
];
services.nginx.virtualHosts = { services.nginx.virtualHosts = {
"test.anotherhadi.com" = { root = "/var/www/test"; }; "test.anotherhadi.com" = { root = "/var/www/test"; };

View File

@ -70,8 +70,8 @@ let
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "anotherhadi"; owner = "anotherhadi";
repo = "homepage"; repo = "homepage";
rev = "19f56771ae7ac04e2710cbde763f70bb097eb250"; rev = "40286c5e03bcfb9993cce354b4f12c00a1b4966d";
hash = "sha256-8IzXcQ/hm2ZDzFKUL4B3501PoWoEOiKIN7rP2UrvG84="; hash = "sha256-zlJ/bzFWE64HpUCxiRT5E9wrjVVwSTSgIOrifWKxphU=";
}; };
# npmDepsHash = lib.fakeHash; # npmDepsHash = lib.fakeHash;

View File

@ -1,101 +0,0 @@
{ pkgs, config, ... }:
let
settings = ''
{
"config": {
"title" : "Jack's Home",
"openLinksInNewTab": false,
"locale": "fr-FR",
"colors": {
"primary": "#${config.var.theme.colors.accent}",
"background": "#${config.var.theme.colors.bg}",
"foreground": "#${config.var.theme.colors.fg}",
"muted": "#${config.var.theme.colors.c8}"
},
"folders": [
{
"name": "Home",
"links": [
{
"title": "Nextcloud",
"url": "https://cloud.anotherhadi.com",
"icon": "󰅟"
},
{
"title": "Vaultwarden",
"url": "https://vault.anotherhadi.com",
"icon": ""
},
{
"title": "Uptime Kuma",
"url": "https://kuma.anotherhadi.com",
"icon": "󱎫"
}
]
},
{
"name": "Admin",
"links": [
{
"title": "Adguard Home",
"url": "http://192.168.2.24:3001",
"icon": "󰷱"
},
{
"title": "Proxmox",
"url": "https://192.168.2.17:8006",
"icon": ""
},
{
"title": "Cloudflare",
"url": "https://dash.cloudflare.com/",
"icon": ""
},
{
"title": "Tailscale",
"url": "https://login.tailscale.com/admin/machines",
"icon": "󰖂"
}
]
}
]
}
}
'';
package = pkgs.buildNpmPackage {
pname = "homepage";
version = "0.0.0";
src = pkgs.fetchFromGitHub {
owner = "anotherhadi";
repo = "homepage";
rev = "19f56771ae7ac04e2710cbde763f70bb097eb250";
hash = "sha256-8IzXcQ/hm2ZDzFKUL4B3501PoWoEOiKIN7rP2UrvG84=";
};
# npmDepsHash = lib.fakeHash;
npmDepsHash = "sha256-bG+CHTq2Rst3JMxsjAC81KhK+G7WwsTVD1eyP87g0z4=";
buildPhase = ''
npm install
cp ${
pkgs.writeText "src/routes/config.json" settings
} src/routes/config.json
npm run build
mkdir $out
mv build $out
'';
meta = {
description = "homepage";
homepage = "https://github.com/anotherhadi/homepage";
};
};
in {
services.nginx.virtualHosts."start.anotherhadi.com" = {
enableACME = true;
root = package + "/build";
};
}