From 48541f1d8a07d064b591bd2f20adde8525a6b941 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Fri, 2 Jun 2023 23:40:36 +0530 Subject: [PATCH] rico2: setup the proofs subdomain --- home/programs/git.nix | 2 +- hosts/rico2/containers/adtya.xyz.nix | 1 - hosts/rico2/services/caddy.nix | 10 ++++++++-- hosts/rico2/services/frpc.nix | 10 ++++++++++ hosts/rico2/services/ssh.nix | 2 +- secrets.nix | Bin 1421 -> 1425 bytes 6 files changed, 20 insertions(+), 5 deletions(-) diff --git a/home/programs/git.nix b/home/programs/git.nix index d3b8513..ff25c73 100644 --- a/home/programs/git.nix +++ b/home/programs/git.nix @@ -9,7 +9,7 @@ in { userEmail = user.primary.emailAddress; userName = user.primary.realName; signing = { - key = user.primary.signingKey; + key = user.primary.pgpFingerprint; signByDefault = true; }; extraConfig = { diff --git a/hosts/rico2/containers/adtya.xyz.nix b/hosts/rico2/containers/adtya.xyz.nix index d127fc1..b0573b7 100644 --- a/hosts/rico2/containers/adtya.xyz.nix +++ b/hosts/rico2/containers/adtya.xyz.nix @@ -5,7 +5,6 @@ }; services.caddy.virtualHosts."adtya.xyz" = { - hostName = "adtya.xyz"; serverAliases = ["www.adtya.xyz"]; extraConfig = '' reverse_proxy http://127.0.0.1:3000 diff --git a/hosts/rico2/services/caddy.nix b/hosts/rico2/services/caddy.nix index 13c8511..5762372 100644 --- a/hosts/rico2/services/caddy.nix +++ b/hosts/rico2/services/caddy.nix @@ -1,8 +1,14 @@ {...}: let - caddy_config = (import ../../../secrets.nix).caddy_config; + secrets = import ../../../secrets.nix; in { services.caddy = { enable = true; - email = caddy_config.email; + email = secrets.caddy_config.email; + + virtualHosts."proofs.adtya.xyz" = { + extraConfig = '' + redir https://keyoxide.org/hkp/${secrets.users.primary.pgpFingerprint} + ''; + }; }; } diff --git a/hosts/rico2/services/frpc.nix b/hosts/rico2/services/frpc.nix index 00ade7a..7b1b955 100644 --- a/hosts/rico2/services/frpc.nix +++ b/hosts/rico2/services/frpc.nix @@ -45,5 +45,15 @@ in { type = https custom_domains = www.adtya.xyz local_port = 443 + + [http.proofs.adtya.xyz] + type = http + custom_domains = proofs.adtya.xyz + local_port = 80 + + [https.proofs.adtya.xyz] + type = https + custom_domains = proofs.adtya.xyz + local_port = 443 ''; } diff --git a/hosts/rico2/services/ssh.nix b/hosts/rico2/services/ssh.nix index a315eac..0e47ec2 100644 --- a/hosts/rico2/services/ssh.nix +++ b/hosts/rico2/services/ssh.nix @@ -1,4 +1,4 @@ -{ ... }: { +{...}: { services.openssh = { enable = true; settings = { diff --git a/secrets.nix b/secrets.nix index 4ac9c6f6511c9ec4c738b88e5ba8b4774632fe82..422aa588aed6c6818f3886f8b93051c19ec91fab 100644 GIT binary patch literal 1425 zcmV;C1#bEPM@dveQdv+`03T@A|LHAx2K(@@L3SzhdnelKjjjqOSn6qSlA2Lm@xUQEkdIKWg=1|LQpVk>sY{Uu2+DqSIikNnuIV6(o_OLHrTF;fU) z;ccho8D>3QrNA6R#>Y9K8i{f$6mCCqH{SW*JhB5OV%_~nRrMAur&@p`PvVi&r#p#L z#6T=&w1|;~MOz_5j-&o5pBWk{uWVjTCn6R29oG#$ z^9_+gXB;_MFD&bY&qlUReaCJLiETmOjfC&{tgSrR^$wzeiku%Skj#eB zTmeQ@@n>!VVQI?BP3AI7;hR(qqk*LI@PQjWF zU*Z5wRL{4LtZGIhvHP@#(wN=+3)9miiL9hzER>jFQEQ*O2U&GrGP^C$H4Y;xEZ+)o zk-YZVrC)G$=y@e(@87#BndF#=BC5RJ)N;$R`?0l0rxQb_Nk)G*y(f$gExb4(E?fOf%M90nlO)G3uOIH6s3Kw4`g_rO2AGC;Q_ zEzbp{UZKCp!X{H=yS&fcGf~`tv(Y`uuB#1uDkhRSW7nz$_ zPanz2vM6i2pPlZ*?!)O~Let}IC4-80H7UY0)j7-fgb)K;H`D4+a8tj*lcW^7yIyz} zw-lALumf+PZ|)(gMnYn3==+@z$7y}@>qH8El$KPx()k+FU^<88V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