mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
chore: remove unused overlays
This commit is contained in:
parent
7da0924d91
commit
76893ae125
37 changed files with 47 additions and 1530 deletions
30
packages/snakeoil.nix
Normal file
30
packages/snakeoil.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
runCommand,
|
||||
buildPackages,
|
||||
lib,
|
||||
}: let
|
||||
inherit (lib.strings) concatStringsSep;
|
||||
inherit (lib.lists) toList head;
|
||||
in { domain, name }: runCommand name {
|
||||
domains = concatStringsSep "," (toList domain);
|
||||
domain = head (toList domain);
|
||||
nativeBuildInputs = [ buildPackages.minica ];
|
||||
outputs = [ "out" "key" "cakey" "ca" "cert" "fullchain" ];
|
||||
} ''
|
||||
install -d $out
|
||||
minica \
|
||||
--ca-key ca.key.pem \
|
||||
--ca-cert ca.pem \
|
||||
--domains "$domains"
|
||||
mv ca.pem $ca
|
||||
mv ca.key.pem $cakey
|
||||
mv $domain/cert.pem $cert
|
||||
mv $domain/key.pem $key
|
||||
cat $cert $ca > $fullchain
|
||||
|
||||
ln -s $fullchain $out/fullchain.pem
|
||||
ln -s $key $out/key.pem
|
||||
ln -s $cakey $out/ca.key.pem
|
||||
ln -s $cert $out/cert.pem
|
||||
ln -s $ca $out/ca.pem
|
||||
''
|
||||
Loading…
Add table
Add a link
Reference in a new issue