private certificate fix
This commit is contained in:
@@ -9,31 +9,33 @@ let
|
||||
in
|
||||
{
|
||||
options.my.servers.homepage = setup.mkOptions "homepage" "home" 8082;
|
||||
config = lib.mkIf (cfg.enable && config.my.secureHost) {
|
||||
sops.secrets = {
|
||||
homepage.sopsFile = ../../secrets/homepage.yaml;
|
||||
"private-ca/pem" = {
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf (cfg.enable && config.my.secureHost) {
|
||||
sops.secrets.homepage.sopsFile = ../../secrets/homepage.yaml;
|
||||
services.homepage-dashboard = {
|
||||
inherit (cfg) enable;
|
||||
listenPort = cfg.port;
|
||||
environmentFile = config.sops.secrets.homepage.path;
|
||||
settings = {
|
||||
providers.openweathermap = "{{HOMEPAGE_VAR_OPENWEATHERMAP_API_KEY}}";
|
||||
layout = import ./homepage/layout.nix;
|
||||
};
|
||||
widgets = import ./homepage/widgets.nix;
|
||||
services = import ./homepage/services.nix { inherit lib config; };
|
||||
bookmarks =
|
||||
builtins.readDir ./homepage/bookmarks
|
||||
|> builtins.attrNames
|
||||
|> builtins.filter (file: builtins.match ".*\\.nix" file != null)
|
||||
|> map (file: import ./homepage/bookmarks/${file});
|
||||
};
|
||||
})
|
||||
(lib.mkIf (cfg.enableProxy && config.my.enableProxy && config.my.secureHost) {
|
||||
sops.secrets."private-ca/pem" = {
|
||||
sopsFile = ../../secrets/certs.yaml;
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
};
|
||||
};
|
||||
my.servers.homepage.certPath = config.sops.secrets."private-ca/pem".path;
|
||||
services.homepage-dashboard = {
|
||||
inherit (cfg) enable;
|
||||
listenPort = cfg.port;
|
||||
environmentFile = config.sops.secrets.homepage.path;
|
||||
settings = {
|
||||
providers.openweathermap = "{{HOMEPAGE_VAR_OPENWEATHERMAP_API_KEY}}";
|
||||
layout = import ./homepage/layout.nix;
|
||||
};
|
||||
widgets = import ./homepage/widgets.nix;
|
||||
services = import ./homepage/services.nix { inherit lib config; };
|
||||
bookmarks =
|
||||
builtins.readDir ./homepage/bookmarks
|
||||
|> builtins.attrNames
|
||||
|> builtins.filter (file: builtins.match ".*\\.nix" file != null)
|
||||
|> map (file: import ./homepage/bookmarks/${file});
|
||||
};
|
||||
};
|
||||
my.servers.homepage.certPath = config.sops.secrets."private-ca/pem".path;
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user