add landing page

This commit is contained in:
Grisha Shipunov 2025-02-02 20:50:39 +01:00
parent e9ea354f51
commit 8086efe6ec
3 changed files with 47 additions and 4 deletions

27
flake.lock generated
View file

@ -528,7 +528,8 @@
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix",
"tmux-yank": "tmux-yank"
"tmux-yank": "tmux-yank",
"website": "website"
}
},
"rust-overlay": {
@ -689,6 +690,30 @@
"repo": "treefmt-nix",
"type": "github"
}
},
"website": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1738525735,
"narHash": "sha256-aeNSiEkIE0n95q5V8HkxeNL4pZ7NojnH/eIoaP5h74Y=",
"ref": "main",
"rev": "25e2c1c97065ed33df66873e0899d110f3ead9e7",
"revCount": 3,
"type": "git",
"url": "https://codeberg.org/0xa/website.git"
},
"original": {
"ref": "main",
"type": "git",
"url": "https://codeberg.org/0xa/website.git"
}
}
},
"root": "root",

View file

@ -35,6 +35,12 @@
inputs.nixpkgs.follows = "nixpkgs";
};
website = {
url = "git+https://codeberg.org/0xa/website.git?ref=main";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
tmux-yank = {
url = "github:tmux-plugins/tmux-yank";
flake = false;

View file

@ -1,4 +1,7 @@
{ ... }:
{ inputs, ... }:
let
website = inputs.website.packages."x86_64-linux".default;
in
{
imports = [
./auth.nix
@ -49,12 +52,21 @@
add_header X-Content-Type-Options nosniff;
'';
# default vhost
virtualHosts."oxapentane.com" = {
forceSSL = true;
enableACME = true;
# default = true;
default = true;
locations."/" = {
return = "503";
root = "${website}";
index = "index.html";
};
};
virtualHosts."www.oxapentane.com" = {
forceSSL = true;
enableACME = true;
locations."/" = {
return = "302 https://oxapentane.com";
};
};
};