move authelia into separate file
This commit is contained in:
parent
1720c3c456
commit
90587d63cb
22
hosts/rpi4/authelia.nix
Normal file
22
hosts/rpi4/authelia.nix
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
{
|
||||||
|
# authelia
|
||||||
|
options.services.nginx = let
|
||||||
|
inherit (lib) types;
|
||||||
|
mkAttrsOfSubmoduleOpt = module: lib.mkOption { type = with types; attrsOf (submodule module); };
|
||||||
|
|
||||||
|
# make system config accessible from submodules
|
||||||
|
systemConfig = config;
|
||||||
|
|
||||||
|
# submodule definitions
|
||||||
|
locationModule' = vhostAttrs: { name, config, ... }: {
|
||||||
|
};
|
||||||
|
vhostModule = { name, config, ... }@attrs: {
|
||||||
|
options.locations = mkAttrsOfSubmoduleOpt (locationModule' attrs);
|
||||||
|
};
|
||||||
|
|
||||||
|
in {
|
||||||
|
virtualHosts = mkAttrsOfSubmoduleOpt vhostModule;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -2,27 +2,8 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./gitea.nix
|
./gitea.nix
|
||||||
|
./authelia.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# authelia
|
|
||||||
options.services.nginx = let
|
|
||||||
inherit (lib) types;
|
|
||||||
mkAttrsOfSubmoduleOpt = module: lib.mkOption { type = with types; attrsOf (submodule module); };
|
|
||||||
|
|
||||||
# make system config accessible from submodules
|
|
||||||
systemConfig = config;
|
|
||||||
|
|
||||||
# submodule definitions
|
|
||||||
locationModule' = vhostAttrs: { name, config, ... }: {
|
|
||||||
};
|
|
||||||
vhostModule = { name, config, ... }@attrs: {
|
|
||||||
options.locations = mkAttrsOfSubmoduleOpt (locationModule' attrs);
|
|
||||||
};
|
|
||||||
|
|
||||||
in {
|
|
||||||
virtualHosts = mkAttrsOfSubmoduleOpt vhostModule;
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
age.secrets.cloudflaredns = {
|
age.secrets.cloudflaredns = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user