web01: deploy homepage from clan-homepage

This commit is contained in:
lassulus 2023-07-05 14:39:05 +02:00
parent 70bafcb31f
commit 1bae0c1b62
4 changed files with 36 additions and 17 deletions

View File

@ -40,6 +40,29 @@
"type": "github"
}
},
"homepage": {
"inputs": {
"flake-parts": [
"flake-parts"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1688556282,
"narHash": "sha256-U0IJtBCwcFsGIXWkxM22igPsjsutmJncgVX6gcQCEuY=",
"ref": "refs/heads/main",
"rev": "444f075e1d1c5cf9f8433434e9df44aaed1c3f46",
"revCount": 9,
"type": "git",
"url": "https://git.clan.lol/clan/clan-homepage"
},
"original": {
"type": "git",
"url": "https://git.clan.lol/clan/clan-homepage"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1688491638,
@ -60,6 +83,7 @@
"inputs": {
"disko": "disko",
"flake-parts": "flake-parts",
"homepage": "homepage",
"nixpkgs": "nixpkgs",
"srvos": "srvos",
"treefmt-nix": "treefmt-nix"

View File

@ -12,6 +12,11 @@
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
homepage.url = "git+https://git.clan.lol/clan/clan-homepage";
homepage.inputs.nixpkgs.follows = "nixpkgs";
homepage.inputs.flake-parts.follows = "flake-parts";
srvos.url = "github:numtide/srvos";
# Use the version of nixpkgs that has been tested to work with SrvOS
srvos.inputs.nixpkgs.follows = "nixpkgs";

View File

@ -1,4 +1,4 @@
{ pkgs, ... }: {
{ pkgs, self, ... }: {
security.acme.defaults.email = "admins@clan.lol";
security.acme.acceptTerms = true;
@ -6,17 +6,7 @@
virtualHosts."clan.lol" = {
forceSSL = true;
enableACME = true;
root = pkgs.runCommand "clan.lol" { } ''
mkdir -p $out;
cat > $out/index.html <<EOF
<html>
<head>
<title>Clan</title>
</head>
<body><h1>Clan</h1></body>
</html>
EOF
'';
root = self.inputs.homepage.packages.${pkgs.system}.default;
extraConfig = ''
charset utf-8;
source_charset utf-8;

File diff suppressed because one or more lines are too long