summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrisha Shipunov2025-02-02 20:50:39 +0100
committerGrisha Shipunov2025-02-02 20:50:39 +0100
commit8086efe6ec04e5e1e5909501001db8defff746f3 (patch)
tree3d7a518cb524c3243e1db97bd50d2a685dee7d67
parente9ea354f513eeac76dbcc30ea2688fadef0b5013 (diff)
add landing page
-rw-r--r--flake.lock27
-rw-r--r--flake.nix6
-rw-r--r--hosts/cloud/proxy/default.nix18
3 files changed, 47 insertions, 4 deletions
diff --git a/flake.lock b/flake.lock
index 6093dcd..e85d055 100644
--- a/flake.lock
+++ b/flake.lock
@@ -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",
diff --git a/flake.nix b/flake.nix
index 8c112fa..1070488 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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;
diff --git a/hosts/cloud/proxy/default.nix b/hosts/cloud/proxy/default.nix
index c225ce3..42430b1 100644
--- a/hosts/cloud/proxy/default.nix
+++ b/hosts/cloud/proxy/default.nix
@@ -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";
};
};
};