add cloudflared
This commit is contained in:
parent
9b30ae2216
commit
1de45dbbd9
3 changed files with 33 additions and 1 deletions
30
modules/services/cloudflared.nix
Normal file
30
modules/services/cloudflared.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
myModules.enableCloudflared = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Cloudflare tunnels";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.myModules.enableCloudflared {
|
||||
services.cloudflared = {
|
||||
enable = true;
|
||||
credentialsFile = "/home/osbm/.cloudflared/cert.pem";
|
||||
tunnels."ffe51e83-5516-44e5-9c8b-2b140cdfece9" = {
|
||||
default = "http_status:404";
|
||||
ingress = {
|
||||
"git.osbm.dev" = {
|
||||
service = "http://localhost:3000";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue