mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
fix(access): mistakes
This commit is contained in:
parent
ed3fff4c4f
commit
62a01d2c03
2 changed files with 6 additions and 4 deletions
|
|
@ -4,7 +4,7 @@
|
|||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs.self.lib.lib) mkAlmostOptionDefault;
|
||||
inherit (inputs.self.lib.lib) mkAlmostOptionDefault mkAlmostDefault;
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.modules) mkIf mkMerge mkDefault mkOptionDefault;
|
||||
inherit (lib.attrsets) mapAttrsToList;
|
||||
|
|
@ -131,8 +131,8 @@
|
|||
ssl.cert = let
|
||||
cert = nixosConfig.security.acme.certs.${cfg.cert.name};
|
||||
in {
|
||||
path = mkIf (cfg.cert.name != null) (mkAlmostOptionDefault "${cert.directory}/fullchain.pem");
|
||||
keyPath = mkIf (cfg.cert.name != null) (mkAlmostOptionDefault "${cert.directory}/key.pem");
|
||||
path = mkIf (cfg.cert.name != null) (mkAlmostDefault "${cert.directory}/fullchain.pem");
|
||||
keyPath = mkIf (cfg.cert.name != null) (mkAlmostDefault "${cert.directory}/key.pem");
|
||||
};
|
||||
#listen.ssl = mkIf cfg.enable { ssl = true; };
|
||||
extraConfig = mkMerge [
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
config,
|
||||
meta,
|
||||
lib,
|
||||
gensokyo-zone,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (gensokyo-zone.lib) mkAddress6;
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.modules) mkIf mkMerge mkBefore mkDefault mkOptionDefault;
|
||||
inherit (lib.strings) optionalString concatStringsSep;
|
||||
|
|
@ -99,7 +101,7 @@ in {
|
|||
type = str;
|
||||
default = let
|
||||
scheme = if access.port == 443 then "https" else "http";
|
||||
in "${scheme}://${access.host}:${toString access.port}";
|
||||
in "${scheme}://${mkAddress6 access.host}:${toString access.port}";
|
||||
};
|
||||
port = mkOption {
|
||||
type = port;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue