diff --git a/.gitmodules b/.gitmodules index 3570931..eedf244 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "nix-secrets"] path = nix-secrets - url = gitea@git.vatthauer.xyz:leonv/nix-secrets.git + url = forgejo@git.vatthauer.xyz:leonv/nix-secrets.git +[submodule "willem/services/resumee-website"] + path = willem/services/resumee-website + url = forgejo@git.vatthauer.xyz:leonv/resumee-website.git diff --git a/flake.nix b/flake.nix index a576014..2991826 100644 --- a/flake.nix +++ b/flake.nix @@ -54,7 +54,8 @@ }; willem = unstable.lib.nixosSystem { system = "aarch64-linux"; - modules = [ ./willem/configuration.nix ]; + specialArgs = { inherit inputs; }; + modules = [ ./willem/configuration.nix ]; }; }; darwinConfigurations = { diff --git a/willem/configuration.nix b/willem/configuration.nix index c89e381..88bfb81 100644 --- a/willem/configuration.nix +++ b/willem/configuration.nix @@ -2,8 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running 'nixos-help'). -{ config, pkgs, lib, ... }: - +{ config, pkgs, lib, inputs, ... }: { imports = [ @@ -45,6 +44,9 @@ zsh oh-my-zsh restic + # for hugo website + hugo + go ]; environment.variables = { EDITOR = "nvim"; diff --git a/willem/services/acme.nix b/willem/services/acme.nix index 955c5f4..597e1f6 100644 --- a/willem/services/acme.nix +++ b/willem/services/acme.nix @@ -4,5 +4,6 @@ "git.vatthauer.xyz".email = "leonvatthauer@outlook.com"; "bitwarden.vatthauer.xyz".email = "leonvatthauer@outlook.com"; "video.vatthauer.xyz".email = "leonvatthauer@outlook.com"; + "vatthauer.xyz".email = "leonvatthauer@outlook.com"; }; } diff --git a/willem/services/default.nix b/willem/services/default.nix index 0d27feb..d8f83e4 100644 --- a/willem/services/default.nix +++ b/willem/services/default.nix @@ -1,3 +1,4 @@ +{ lib, pkgs, inputs, ... }: { imports = [ ./acme.nix diff --git a/willem/services/nginx.nix b/willem/services/nginx.nix index 96aebac..2329123 100644 --- a/willem/services/nginx.nix +++ b/willem/services/nginx.nix @@ -1,3 +1,4 @@ +{ lib, pkgs, inputs, ... }: { services.nginx = { enable = true; @@ -30,4 +31,9 @@ proxyPass = "http://localhost:8096"; }; }; + services.nginx.virtualHosts."vatthauer.xyz" = { + forceSSL = true; + enableACME = true; + root = pkgs.callPackage ./resumee-website.nix {}; + }; } diff --git a/willem/services/resumee-website.nix b/willem/services/resumee-website.nix new file mode 100644 index 0000000..a71ce55 --- /dev/null +++ b/willem/services/resumee-website.nix @@ -0,0 +1,16 @@ +{ stdenv, git, go, hugo }: +stdenv.mkDerivation { + name = "resumee-website"; + version = "1.0"; + src = builtins.fetchGit { + url = "https://git.vatthauer.xyz/leonv/resumee-website.git"; + rev = "9516643a88018050676dd1f57f5cc7e245e55591"; + }; + nativeBuildInputs = [ git go hugo ]; + buildPhase = "hugo -d $out"; + outputHashAlgo = "sha256"; + outputHashMode = "recursive"; + outputHash = "sha256-icJv4zvaioxj9Ego0rDIFSm1PXRhAMsxmtYJj0H0+8Y="; + +} +