move adtya.xyz and refactor
This commit is contained in:
parent
69ee079b2e
commit
c37dc0dbf1
7 changed files with 100 additions and 30 deletions
77
flake.lock
77
flake.lock
|
@ -1,5 +1,26 @@
|
|||
{
|
||||
"nodes": {
|
||||
"adtya-xyz": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1698447246,
|
||||
"narHash": "sha256-CfbEtQHk2l+zprXNSpyYu+gNl3cJX9h9qz23SWfxWBM=",
|
||||
"owner": "adtya",
|
||||
"repo": "adtya.xyz",
|
||||
"rev": "db0a9ddacdc10a7441de375f8f11824f38923677",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "adtya",
|
||||
"repo": "adtya.xyz",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"beautysh": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -120,11 +141,11 @@
|
|||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1689068808,
|
||||
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
||||
"lastModified": 1694529238,
|
||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -138,11 +159,11 @@
|
|||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694529238,
|
||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||
"lastModified": 1689068808,
|
||||
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -173,6 +194,24 @@
|
|||
"inputs": {
|
||||
"systems": "systems_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694529238,
|
||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_6": {
|
||||
"inputs": {
|
||||
"systems": "systems_6"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1685518550,
|
||||
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
||||
|
@ -253,7 +292,7 @@
|
|||
},
|
||||
"if3": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
|
@ -292,7 +331,7 @@
|
|||
"crane": "crane",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-parts": "flake-parts",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"flake-utils": "flake-utils_4",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
|
@ -364,7 +403,7 @@
|
|||
"nixvim": {
|
||||
"inputs": {
|
||||
"beautysh": "beautysh",
|
||||
"flake-utils": "flake-utils_4",
|
||||
"flake-utils": "flake-utils_5",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
|
@ -414,7 +453,7 @@
|
|||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-utils": "flake-utils_5",
|
||||
"flake-utils": "flake-utils_6",
|
||||
"gitignore": "gitignore_2",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
|
@ -469,7 +508,8 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"adtya-xyz": "adtya-xyz",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"home-manager": "home-manager",
|
||||
"if3": "if3",
|
||||
"impermanence": "impermanence",
|
||||
|
@ -578,6 +618,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_6": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1678901627,
|
||||
|
|
|
@ -29,6 +29,11 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
adtya-xyz = {
|
||||
url = "github:adtya/adtya.xyz";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
if3 = {
|
||||
url = "github:adtya/if3-docs";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -43,6 +48,7 @@
|
|||
impermanence,
|
||||
lanzaboote,
|
||||
nixvim,
|
||||
adtya-xyz,
|
||||
if3,
|
||||
} @ inputs: let
|
||||
secrets = import ./secrets.nix;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{...}: {
|
||||
imports = [./adtya.xyz.nix];
|
||||
imports = [];
|
||||
|
||||
virtualisation.oci-containers = {
|
||||
backend = "podman";
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
_: {
|
||||
virtualisation.oci-containers.containers."adtya.xyz" = {
|
||||
image = "ghcr.io/adtya/adtya.xyz:latest";
|
||||
ports = ["3000:80"];
|
||||
};
|
||||
|
||||
{
|
||||
config,
|
||||
adtya-xyz,
|
||||
}: {
|
||||
services.caddy.virtualHosts."adtya.xyz" = {
|
||||
serverAliases = ["www.adtya.xyz"];
|
||||
extraConfig = ''
|
||||
reverse_proxy http://127.0.0.1:3000
|
||||
|
||||
handle /.well-known/matrix/server {
|
||||
header Content-Type application/json
|
||||
header Access-Control-Allow-Origin *
|
||||
|
@ -20,6 +16,13 @@ _: {
|
|||
header Access-Control-Allow-Origin *
|
||||
respond `{"m.homeserver": {"base_url": "https://matrix.adtya.xyz:443"}}`
|
||||
}
|
||||
|
||||
handle {
|
||||
root * ${adtya-xyz.packages.${config.nixpkgs.system}.default}/share/web
|
||||
encode gzip
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -14,15 +14,6 @@
|
|||
redir https://keyoxide.org/hkp/${secrets.users.primary.pgpFingerprint}
|
||||
'';
|
||||
};
|
||||
|
||||
"if3.adtya.xyz" = {
|
||||
extraConfig = ''
|
||||
root * ${if3.packages.${config.nixpkgs.system}.default}/share/web
|
||||
encode gzip
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{...}: {
|
||||
imports = [./caddy.nix ./frpc.nix ./ssh.nix];
|
||||
imports = [./adtya.xyz.nix ./caddy.nix ./frpc.nix ./if3.nix ./ssh.nix];
|
||||
}
|
||||
|
|
15
hosts/rico2/services/if3.nix
Normal file
15
hosts/rico2/services/if3.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
config,
|
||||
if3,
|
||||
}: {
|
||||
services.caddy.virtualHosts = {
|
||||
"if3.adtya.xyz" = {
|
||||
extraConfig = ''
|
||||
root * ${if3.packages.${config.nixpkgs.system}.default}/share/web
|
||||
encode gzip
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue