make all age use conditional
This commit is contained in:
parent
b2f0476412
commit
3cb6fba59e
8 changed files with 73 additions and 9 deletions
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
|
@ -7,10 +8,16 @@ let
|
|||
proxyWebsockets = true;
|
||||
proxyPass = "http://localhost:7575";
|
||||
};
|
||||
hasSecret =
|
||||
secret:
|
||||
let
|
||||
secrets = config.age.secrets or { };
|
||||
in
|
||||
secrets ? ${secret} && secrets.${secret} != null;
|
||||
in
|
||||
{
|
||||
# TODO transfer these to o001 to use same certs?
|
||||
security.acme = {
|
||||
security.acme = lib.mkIf (hasSecret "linode_rw_domains") {
|
||||
acceptTerms = true;
|
||||
defaults.email = "admin@joshuabell.xyz";
|
||||
certs."joshuabell.xyz" = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue