module(wp): pass through wp config secrets
This commit is contained in:
parent
86b6f7eb31
commit
98d9e0c140
1 changed files with 8 additions and 1 deletions
|
@ -3,7 +3,11 @@ with lib;
|
|||
let
|
||||
cfg = config.services.wordpress;
|
||||
callPackage = pkgs.callPackage;
|
||||
appConfig = (import ./default-app-config.nix).extend (self: super: { });
|
||||
appConfig = (import ./default-app-config.nix).extend (self: super: {
|
||||
wpConfig = super.wpConfig.extend (self: super: {
|
||||
secrets = cfg.wpConfigSecrets;
|
||||
});
|
||||
});
|
||||
writeableDataPath = "/var/lib/phpfpm/${appConfig.name}";
|
||||
phpFpmListen = "/run/phpfpm/wordpress-pool.sock";
|
||||
phpIni = import ./php-config.nix { inherit pkgs config appConfig;
|
||||
|
@ -22,6 +26,9 @@ in {
|
|||
disabledModules = [ "services/web-apps/wordpress.nix" ];
|
||||
options.services.wordpress = {
|
||||
enable = mkEnableOption "Enable the WordPress module";
|
||||
wpConfigSecrets = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.wp-cli ];
|
||||
|
|
Loading…
Add table
Reference in a new issue