diff --git a/hosts/defiant/services/nginx.nix b/hosts/defiant/services/nginx.nix index 69c3274..e027fb1 100644 --- a/hosts/defiant/services/nginx.nix +++ b/hosts/defiant/services/nginx.nix @@ -54,6 +54,7 @@ in { ''; } // overrides; in { + "amalie.mansaker.no" = publicProxy "http://leonard.home.feal.no/" { }; "cloud.feal.no" = publicProxy "" { locations."/" = { proxyPass = "http://challenger.home.feal.no"; @@ -62,17 +63,11 @@ in { ''; }; }; - "feal.no" = publicProxy "http://leonard.home.feal.no/" { - serverAliases = [ "www.feal.no" ]; - }; - "git.feal.no" = publicProxy "http://unix:${gitea.server.HTTP_ADDR}" { - default = true; - }; + "feal.no" = publicProxy "http://leonard.home.feal.no/" { serverAliases = [ "www.feal.no" ]; }; + "git.feal.no" = publicProxy "http://unix:${gitea.server.HTTP_ADDR}" { default = true; }; "iam.feal.no" = publicProxy "http://${keycloak.http-host}:${toString keycloak.http-port}" { }; "jf.feal.no" = publicProxy "http://jellyfin.home.feal.no/" { }; - "kinealbrigtsen.no" = publicProxy "http://leonard.home.feal.no/" { - serverAliases = [ "www.kinealbrigtsen.no" ]; - }; + "kinealbrigtsen.no" = publicProxy "http://leonard.home.feal.no/" { serverAliases = [ "www.kinealbrigtsen.no" ]; }; "wiki.wackattack.eu" = publicProxy "http://leonard.home.feal.no/" { }; }; } diff --git a/hosts/leonard/configuration.nix b/hosts/leonard/configuration.nix index afa8fdd..cd098f5 100644 --- a/hosts/leonard/configuration.nix +++ b/hosts/leonard/configuration.nix @@ -15,6 +15,7 @@ ./services/wiki-wackattack-eu.nix ./services/www-feal-no ./services/www-kinealbrigtsen-no.nix + ./services/www-amalie-mansaker-no ]; boot.loader.systemd-boot.enable = lib.mkForce false; diff --git a/hosts/leonard/services/www-amalie-mansaker-no/default.nix b/hosts/leonard/services/www-amalie-mansaker-no/default.nix new file mode 100644 index 0000000..77196df --- /dev/null +++ b/hosts/leonard/services/www-amalie-mansaker-no/default.nix @@ -0,0 +1,11 @@ +{ config, pkgs, lib, ... }: + +{ + services.nginx.virtualHosts."amalie.mansaker.no" = let + siteContent = pkgs.callPackage ./site.nix { }; + in { + locations = { + "/".root = siteContent; + }; + }; +} diff --git a/hosts/leonard/services/www-amalie-mansaker-no/site.nix b/hosts/leonard/services/www-amalie-mansaker-no/site.nix new file mode 100644 index 0000000..3f7bdb5 --- /dev/null +++ b/hosts/leonard/services/www-amalie-mansaker-no/site.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchgit, hugo }: +stdenv.mkDerivation { + name = "www-amalie-mansaker-no"; + + src = fetchgit { + url = "https://git.feal.no/amalieem/amalie.mansaker.no.git"; + fetchSubmodules = true; + + rev = "58265a25b37bf2286e0704e02ab3dde56a348d8b"; + hash = "sha256-dPcv0AGjsWqDCWCjV2PeklBrWsIawLAccRQEYe3teOM="; + }; + + nativeBuildInputs = [ hugo ]; + buildPhase = '' + cp -r $src/* . + ${hugo}/bin/hugo + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out + cp -r public/* $out/ + runHook postInstall + ''; +} +