From 487d81ff86ed60d44e2c3aef2fd3441ec7da9cbc Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Sun, 23 Jun 2024 15:14:29 +0200 Subject: [PATCH] Update --- home/laptop.nix | 2 +- home/programs/qutebrowser/default.nix | 4 +- hosts/server/modules/www/default.nix | 6 +- .../modules/www/home.anotherhadi.com.nix | 4 +- .../modules/www/start.anotherhadi.com.nix | 101 ------------------ 5 files changed, 6 insertions(+), 111 deletions(-) delete mode 100644 hosts/server/modules/www/start.anotherhadi.com.nix diff --git a/home/laptop.nix b/home/laptop.nix index 0baf448..529b423 100644 --- a/home/laptop.nix +++ b/home/laptop.nix @@ -49,8 +49,8 @@ python3 jq git-ignore - node2nix nurl + prefetch-npm-deps # Utils fd diff --git a/home/programs/qutebrowser/default.nix b/home/programs/qutebrowser/default.nix index 065a4cd..2327b54 100644 --- a/home/programs/qutebrowser/default.nix +++ b/home/programs/qutebrowser/default.nix @@ -47,8 +47,8 @@ let src = pkgs.fetchFromGitHub { owner = "anotherhadi"; repo = "homepage"; - rev = "19f56771ae7ac04e2710cbde763f70bb097eb250"; - hash = "sha256-8IzXcQ/hm2ZDzFKUL4B3501PoWoEOiKIN7rP2UrvG84="; + rev = "40286c5e03bcfb9993cce354b4f12c00a1b4966d"; + hash = "sha256-zlJ/bzFWE64HpUCxiRT5E9wrjVVwSTSgIOrifWKxphU="; }; # npmDepsHash = lib.fakeHash; diff --git a/hosts/server/modules/www/default.nix b/hosts/server/modules/www/default.nix index bfba19c..cfb9b1f 100644 --- a/hosts/server/modules/www/default.nix +++ b/hosts/server/modules/www/default.nix @@ -1,9 +1,5 @@ { - imports = [ - ./home.anotherhadi.com.nix - ./start.anotherhadi.com.nix - ./anotherhadi.com.nix - ]; + imports = [ ./home.anotherhadi.com.nix ./anotherhadi.com.nix ]; services.nginx.virtualHosts = { "test.anotherhadi.com" = { root = "/var/www/test"; }; diff --git a/hosts/server/modules/www/home.anotherhadi.com.nix b/hosts/server/modules/www/home.anotherhadi.com.nix index 7b5c4bd..afe81e6 100644 --- a/hosts/server/modules/www/home.anotherhadi.com.nix +++ b/hosts/server/modules/www/home.anotherhadi.com.nix @@ -70,8 +70,8 @@ let src = pkgs.fetchFromGitHub { owner = "anotherhadi"; repo = "homepage"; - rev = "19f56771ae7ac04e2710cbde763f70bb097eb250"; - hash = "sha256-8IzXcQ/hm2ZDzFKUL4B3501PoWoEOiKIN7rP2UrvG84="; + rev = "40286c5e03bcfb9993cce354b4f12c00a1b4966d"; + hash = "sha256-zlJ/bzFWE64HpUCxiRT5E9wrjVVwSTSgIOrifWKxphU="; }; # npmDepsHash = lib.fakeHash; diff --git a/hosts/server/modules/www/start.anotherhadi.com.nix b/hosts/server/modules/www/start.anotherhadi.com.nix deleted file mode 100644 index 571faf8..0000000 --- a/hosts/server/modules/www/start.anotherhadi.com.nix +++ /dev/null @@ -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"; - }; -}