move authelia into separate file
This commit is contained in:
parent
ad2496f4c7
commit
e486b9dfc5
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 = [
|
||||
./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 = {
|
||||
|
||||
age.secrets.cloudflaredns = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user