This commit is contained in:
Hadi 2024-06-20 12:09:20 +02:00
parent 0cc6e18f3d
commit 5bdbfb3a5f
6 changed files with 29 additions and 24 deletions

View File

@ -27,4 +27,3 @@ feel free to contribute <3 ([CONTRIBUTING.md](CONTRIBUTING.md))
- [ ] server fetch
- [ ] Remote push
- [ ] Ntfy auth file
- [ ] Uptime kuma or alt

View File

@ -50,6 +50,7 @@
jq
git-ignore
node2nix
nurl
# Utils
fd

View File

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

View File

@ -1,16 +1,16 @@
{
imports = [ ./home.anotherhadi.com ];
imports = [ ./home.anotherhadi.com ./homepage.nix ];
services.nginx.virtualHosts = {
"anotherhadi.com" = {
serverAliases = [ "www.anotherhadi.com" ];
root = "/etc/www/anotherhadi.com";
};
"home.anotherhadi.com" = {
serverAliases = [ "jack.anotherhadi.com" ];
root = "/etc/www/home.anotherhadi.com";
};
# "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

@ -4,6 +4,7 @@ let
Home: [
{text: "Nextcloud", url: "https://cloud.anotherhadi.com", icon: "󰅟"},
{text: "Vaultwarden", url: "https://vault.anotherhadi.com", icon: ""},
{text: "Uptime Kuma", url: "https://kuma.anotherhadi.com", icon: "󱎫"},
],
Admin: [
{text: "Adguard Home", url: "http://192.168.2.24:3001", icon: "󰷱"},

View File

@ -1,25 +1,28 @@
{ lib, buildNpmPackage, fetchFromGitHub }:
{ pkgs, ... }: {
nginx.virtualHosts."home.anotherhadi.com" = {
enableACME = true;
root = pkgs.stdenv.mkDerivation {
name = "homepage";
buildNpmPackage rec {
pname = "homepage";
version = "0.0.0";
src = fetchFromGitHub {
src = pkgs.fetchFromGitHub {
owner = "anotherhadi";
repo = pname;
rev = "v${version}";
hash = "sha256-BR+ZGkBBfd0dSQqAvujsbgsEPFYw/ThrylxUbOksYxM=";
repo = "homepage";
rev = "6588787368cbc403cdec08fd25ef27b42077b8d3";
hash = "sha256-Z2TZ56I6lRmYkLRnnMscvmSCzGt5q9yX90lGPebJpe8=";
};
npmDepsHash = "sha256-tuEfyePwlOy2/mOPdXbqJskO6IowvAP4DWg8xSZwbJw=";
buildInputs = with pkgs; [ nodejs ];
# The prepack script runs the build script, which we'd rather do in the build phase.
npmPackFlags = [ "--ignore-scripts" ];
buildPhase = ''
npm install
npm run build
'';
meta = {
description = "A simple homepage for your server.";
homepage = "https://github.com/anotherhadi/homepage";
# license = lib.licenses.gpl3Only;
# maintainers = with lib.maintainers; [ winter ];
installPhase = ''
mkdir -p $out
cp -r build/* $out
'';
};
};
}