Add 'old-conf/' from commit '62a64a79a8'
git-subtree-dir: old-conf git-subtree-mainline:4667974392git-subtree-split:62a64a79a8
This commit is contained in:
commit
83de52d5db
195 changed files with 13408 additions and 0 deletions
48
old-conf/nixos-modules/services/caddy/custom-caddy.nix
Normal file
48
old-conf/nixos-modules/services/caddy/custom-caddy.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
with pkgs;
|
||||
|
||||
caddy.override {
|
||||
buildGo125Module = args: buildGo125Module (args // {
|
||||
src = stdenv.mkDerivation rec {
|
||||
pname = "caddy-using-xcaddy-${xcaddy.version}";
|
||||
inherit (caddy) version;
|
||||
|
||||
dontUnpack = true;
|
||||
dontFixup = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
cacert
|
||||
git
|
||||
go
|
||||
];
|
||||
|
||||
plugins = [
|
||||
"github.com/caddy-dns/desec@v1.0.1"
|
||||
];
|
||||
|
||||
configurePhase = ''
|
||||
export GOCACHE=$TMPDIR/go-cache
|
||||
export GOPATH="$TMPDIR/go"
|
||||
export XCADDY_SKIP_BUILD=1
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
${xcaddy}/bin/xcaddy build "${lib.last (lib.splitString "/" caddy.src.rev)}" ${lib.concatMapStringsSep " " (plugin: "--with ${plugin}") plugins}
|
||||
cd buildenv*
|
||||
go mod vendor
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
cp -r --reflink=auto . $out
|
||||
'';
|
||||
|
||||
outputHash = "sha256-a2GeG7TYBnCz30jBKQmmQz8Y3vutRpa+tboaahJ5xeQ=";
|
||||
outputHashMode = "recursive";
|
||||
};
|
||||
|
||||
subPackages = [ "." ];
|
||||
ldflags = [ "-s" "-w" ]; ## don't include version info twice
|
||||
vendorHash = null;
|
||||
});
|
||||
}
|
||||
14
old-conf/nixos-modules/services/caddy/default.nix
Normal file
14
old-conf/nixos-modules/services/caddy/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.ragon.services.caddy;
|
||||
in
|
||||
{
|
||||
options.ragon.services.caddy.enable = lib.mkEnableOption "enables the caddy webserver";
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
package = import ./custom-caddy.nix { inherit lib; pkgs = pkgs.unstable; };
|
||||
};
|
||||
ragon.persist.extraDirectories = [ config.services.caddy.dataDir ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue