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 - [ ] server fetch
- [ ] Remote push - [ ] Remote push
- [ ] Ntfy auth file - [ ] Ntfy auth file
- [ ] Uptime kuma or alt

View File

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

View File

@ -26,6 +26,7 @@
sops = true; sops = true;
# change the nvim's obsidian configuration if you want to enable that: # change the nvim's obsidian configuration if you want to enable that:
obsidian = true; obsidian = true;
tailscale = true;
theme = import ../themes/nixy.nix; # select your theme here 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 = { services.nginx.virtualHosts = {
"anotherhadi.com" = { "anotherhadi.com" = {
serverAliases = [ "www.anotherhadi.com" ]; serverAliases = [ "www.anotherhadi.com" ];
root = "/etc/www/anotherhadi.com"; root = "/etc/www/anotherhadi.com";
}; };
"home.anotherhadi.com" = { # "home.anotherhadi.com" = {
serverAliases = [ "jack.anotherhadi.com" ]; # serverAliases = [ "jack.anotherhadi.com" ];
root = "/etc/www/home.anotherhadi.com"; # root = "/etc/www/home.anotherhadi.com";
}; # };
"test.anotherhadi.com" = { root = "/var/www/test"; }; "test.anotherhadi.com" = { root = "/var/www/test"; };
}; };
environment.etc."www/anotherhadi.com" = { source = ./anotherhadi.com; }; environment.etc."www/anotherhadi.com" = { source = ./anotherhadi.com; };

View File

@ -4,6 +4,7 @@ let
Home: [ Home: [
{text: "Nextcloud", url: "https://cloud.anotherhadi.com", icon: "󰅟"}, {text: "Nextcloud", url: "https://cloud.anotherhadi.com", icon: "󰅟"},
{text: "Vaultwarden", url: "https://vault.anotherhadi.com", icon: ""}, {text: "Vaultwarden", url: "https://vault.anotherhadi.com", icon: ""},
{text: "Uptime Kuma", url: "https://kuma.anotherhadi.com", icon: "󱎫"},
], ],
Admin: [ Admin: [
{text: "Adguard Home", url: "http://192.168.2.24:3001", icon: "󰷱"}, {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 { src = pkgs.fetchFromGitHub {
pname = "homepage";
version = "0.0.0";
src = fetchFromGitHub {
owner = "anotherhadi"; owner = "anotherhadi";
repo = pname; repo = "homepage";
rev = "v${version}"; rev = "6588787368cbc403cdec08fd25ef27b42077b8d3";
hash = "sha256-BR+ZGkBBfd0dSQqAvujsbgsEPFYw/ThrylxUbOksYxM="; 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. buildPhase = ''
npmPackFlags = [ "--ignore-scripts" ]; npm install
npm run build
'';
meta = { installPhase = ''
description = "A simple homepage for your server."; mkdir -p $out
homepage = "https://github.com/anotherhadi/homepage"; cp -r build/* $out
# license = lib.licenses.gpl3Only; '';
# maintainers = with lib.maintainers; [ winter ];
};
}; };
} }