Add proper youtee service

This commit is contained in:
batteredbunny 2024-12-29 18:50:45 +01:00
parent 90c32609d7
commit f59230fc64
5 changed files with 98 additions and 9 deletions

View file

@ -55,14 +55,6 @@ in
'';
virtualHosts = {
"youtu.ee".extraConfig = ''
tls {
dns cloudflare {env.CLOUDFLARE_API_TOKEN}
resolvers 1.1.1.1
}
redir https://youtu.be{uri} temporary
'';
"xn--tdaa.ee" = {
extraConfig = ''
tls {

View file

@ -29,6 +29,7 @@
./services/grafana.nix
./services/pds
./services/gonic.nix
./services/youtuee.nix
inputs.lastfm-status.nixosModules.default
inputs.confess.nixosModules.default
inputs.common-modules.nixosModules.nixos-upgrade

71
flake.lock generated
View file

@ -200,6 +200,24 @@
"type": "github"
}
},
"flake-utils_5": {
"inputs": {
"systems": "systems_5"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"lastfm-status": {
"inputs": {
"flake-utils": "flake-utils_2",
@ -370,6 +388,22 @@
"type": "github"
}
},
"nixpkgs_8": {
"locked": {
"lastModified": 1735291276,
"narHash": "sha256-NYVcA06+blsLG6wpAbSPTCyLvxD/92Hy4vlY9WxFI1M=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "634fd46801442d760e09493a794c4f15db2d0cbb",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"bsky-website": "bsky-website",
@ -381,7 +415,8 @@
"nix-minecraft": "nix-minecraft",
"nix-minecraft-plugin-upgrade": "nix-minecraft-plugin-upgrade",
"nixpkgs": "nixpkgs_7",
"xn--tdaa-website": "xn--tdaa-website"
"xn--tdaa-website": "xn--tdaa-website",
"youtuee": "youtuee"
}
},
"rust-overlay": {
@ -462,6 +497,21 @@
"type": "github"
}
},
"systems_5": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"xn--tdaa-website": {
"flake": false,
"locked": {
@ -477,6 +527,25 @@
"type": "git",
"url": "ssh://forgejo@forge.catnip.ee:2222/batteredbunny/xn--tdaa.ee"
}
},
"youtuee": {
"inputs": {
"flake-utils": "flake-utils_5",
"nixpkgs": "nixpkgs_8"
},
"locked": {
"lastModified": 1735495331,
"narHash": "sha256-B+ka6tzXuehRPWCYbqFu/oHbZuSqqaBRa5lMa2RW0yg=",
"ref": "refs/heads/main",
"rev": "87f69daa88ea359f4607207c0c79423ff5541da7",
"revCount": 1,
"type": "git",
"url": "ssh://forgejo@forge.catnip.ee:2222/batteredbunny/youtuee"
},
"original": {
"type": "git",
"url": "ssh://forgejo@forge.catnip.ee:2222/batteredbunny/youtuee"
}
}
},
"root": "root",

View file

@ -26,6 +26,8 @@
};
confess.url = "git+ssh://forgejo@forge.catnip.ee:2222/batteredbunny/confess";
drasl.url = "github:unmojang/drasl";
youtuee.url = "git+ssh://forgejo@forge.catnip.ee:2222/batteredbunny/youtuee";
};
outputs =

25
services/youtuee.nix Normal file
View file

@ -0,0 +1,25 @@
{ config, inputs, ... }: {
imports = [
inputs.youtuee.nixosModules.default
];
services = {
youtuee = {
enable = true;
settings = {
behindReverseProxy = true;
port = 8181;
};
};
caddy.virtualHosts."youtu.ee".extraConfig = ''
tls {
dns cloudflare {env.CLOUDFLARE_API_TOKEN}
resolvers 1.1.1.1
}
reverse_proxy :${toString config.services.youtuee.settings.port}
'';
};
}