mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-18 08:59:39 +00:00
nix: init caddy-custom
This commit is contained in:
parent
181337e20e
commit
e492b2529c
5 changed files with 993 additions and 2 deletions
23
nix/packages/caddy/caddy-src/main.go
Normal file
23
nix/packages/caddy/caddy-src/main.go
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
// This file is copied from:
|
||||
// https://github.com/caddyserver/caddy/blob/82c356f2548ca62b75f76104bef44915482e8fd9/cmd/caddy/main.go#L21-L25
|
||||
|
||||
// 1. Copy this file (main.go) into a new folder
|
||||
// 2. Edit the imports below to include the modules you want plugged in
|
||||
// 3. Run `go mod init caddy`
|
||||
// 4. Run `go install` or `go build` - you now have a custom binary!
|
||||
//
|
||||
// Or you can use xcaddy which does it all for you as a command:
|
||||
// https://github.com/caddyserver/xcaddy
|
||||
package main
|
||||
|
||||
import (
|
||||
caddycmd "github.com/caddyserver/caddy/v2/cmd"
|
||||
|
||||
// plug in Caddy modules here
|
||||
_ "github.com/caddyserver/caddy/v2/modules/standard"
|
||||
_ "github.com/jasonlovesdoggo/caddy-defender"
|
||||
)
|
||||
|
||||
func main() {
|
||||
caddycmd.Main()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue