diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-01-13 04:52:58 +0100 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-01-13 04:52:58 +0100 |
| commit | 48c689ae9da26ab56bcf229297b216b36c816d53 (patch) | |
| tree | 5d4375db88d54e82b1f0e8cd677ddbcaea504f3c | |
| parent | 5d06ee5a9866400179e756cba6695dea8dd18245 (diff) | |
| download | nixos-48c689ae9da26ab56bcf229297b216b36c816d53.tar nixos-48c689ae9da26ab56bcf229297b216b36c816d53.tar.gz nixos-48c689ae9da26ab56bcf229297b216b36c816d53.tar.bz2 nixos-48c689ae9da26ab56bcf229297b216b36c816d53.tar.xz nixos-48c689ae9da26ab56bcf229297b216b36c816d53.zip | |
first attempt at simp_le
| -rw-r--r-- | custom/simp_le.nix | 9 | ||||
| -rw-r--r-- | ymir.nix | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/custom/simp_le.nix b/custom/simp_le.nix index e03e2b2c..a7196618 100644 --- a/custom/simp_le.nix +++ b/custom/simp_le.nix | |||
| @@ -6,6 +6,13 @@ | |||
| 6 | 6 | ||
| 7 | let | 7 | let |
| 8 | getcert = domain: '' | 8 | getcert = domain: '' |
| 9 | echo ${domain} >> /tmp/domains.test | 9 | date=$(date -u +'%Y-%m-%d') |
| 10 | mkdir -p /etc/ssl/${domain}/$date /srv/www/acme/${domain} || exit 1 | ||
| 11 | cd /etc/ssl/${domain}/$date || exit 1 | ||
| 12 | simp_le \ | ||
| 13 | -f cert.pem -f key.pem -f fullchain.pem -f account_key.json \ | ||
| 14 | --email phikeebaogobaegh@141.li \ | ||
| 15 | -d ${domain}:/srv/www/acme/${domain} \ | ||
| 16 | && ln -fs /etc/ssl/${domain}/$date /etc/ssl/current | ||
| 10 | ''; | 17 | ''; |
| 11 | in writeText "certs.sh" (lib.concatMapStringsSep "\n" getcert domains) | 18 | in writeText "certs.sh" (lib.concatMapStringsSep "\n" getcert domains) |
| @@ -131,7 +131,7 @@ in rec { | |||
| 131 | systab = '' | 131 | systab = '' |
| 132 | %weekly * * nix-collect-garbage --delete-older-than '7d' | 132 | %weekly * * nix-collect-garbage --delete-older-than '7d' |
| 133 | 133 | ||
| 134 | %monthly * * * ${pkgs.bash}/bin/bash ${pkgs.callPackage ./custom/simp_le.nix { domains = ["dirty-haskell.org" "www.dirty-haskell.org" "git.yggdrasil.li" "git.dirty-haskell.org" "git.141.li"]; } } | 134 | %monthly * * * ${pkgs.bash}/bin/bash ${pkgs.callPackage ./custom/simp_le.nix { domains = ["dirty-haskell.org" "www.dirty-haskell.org" "git.yggdrasil.li" "git.dirty-haskell.org" "git.141.li"]; } } 2>&1 | ${pkgs.util-linux}/bin/logger -p auth.info |
| 135 | ''; | 135 | ''; |
| 136 | }; | 136 | }; |
| 137 | 137 | ||
