forked from Fediversity/Fediversity
actually use the typed configuration in deployment
that change somehow slipped through the cracks previously
This commit is contained in:
parent
df9ce821de
commit
5f66a034f3
1 changed files with 18 additions and 14 deletions
|
@ -41,8 +41,11 @@ let
|
||||||
in
|
in
|
||||||
|
|
||||||
## Regular arguments of a NixOps4 deployment module.
|
## Regular arguments of a NixOps4 deployment module.
|
||||||
{ providers, ... }:
|
{ config, providers, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.deployment;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
deployment = lib.mkOption {
|
deployment = lib.mkOption {
|
||||||
|
@ -52,6 +55,7 @@ in
|
||||||
# XXX(@fricklerhandwerk):
|
# XXX(@fricklerhandwerk):
|
||||||
# misusing this will produce obscure errors that will be truncated by NixOps4
|
# misusing this will produce obscure errors that will be truncated by NixOps4
|
||||||
type = lib.types.submodule ./options.nix;
|
type = lib.types.submodule ./options.nix;
|
||||||
|
default = panelConfig;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -116,7 +120,7 @@ in
|
||||||
{
|
{
|
||||||
garage-configuration = makeConfigurationResource garageConfigurationResource (
|
garage-configuration = makeConfigurationResource garageConfigurationResource (
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
mkIf (panelConfig.mastodon.enable || panelConfig.peertube.enable || panelConfig.pixelfed.enable) {
|
mkIf (cfg.mastodon.enable || cfg.peertube.enable || cfg.pixelfed.enable) {
|
||||||
fediversity = {
|
fediversity = {
|
||||||
inherit (panelConfig) domain;
|
inherit (panelConfig) domain;
|
||||||
garage.enable = true;
|
garage.enable = true;
|
||||||
|
@ -129,14 +133,14 @@ in
|
||||||
|
|
||||||
mastodon-configuration = makeConfigurationResource mastodonConfigurationResource (
|
mastodon-configuration = makeConfigurationResource mastodonConfigurationResource (
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
mkIf panelConfig.mastodon.enable {
|
mkIf cfg.mastodon.enable {
|
||||||
fediversity = {
|
fediversity = {
|
||||||
inherit (panelConfig) domain;
|
inherit (cfg) domain;
|
||||||
temp.initialUser = {
|
temp.initialUser = {
|
||||||
inherit (panelConfig.initialUser) username email displayName;
|
inherit (cfg.initialUser) username email displayName;
|
||||||
# FIXME: disgusting, but nvm, this is going to be replaced by
|
# FIXME: disgusting, but nvm, this is going to be replaced by
|
||||||
# proper central authentication at some point
|
# proper central authentication at some point
|
||||||
passwordFile = pkgs.writeText "password" panelConfig.initialUser.password;
|
passwordFile = pkgs.writeText "password" cfg.initialUser.password;
|
||||||
};
|
};
|
||||||
|
|
||||||
mastodon = mastodonS3KeyConfig { inherit pkgs; } // {
|
mastodon = mastodonS3KeyConfig { inherit pkgs; } // {
|
||||||
|
@ -150,14 +154,14 @@ in
|
||||||
|
|
||||||
peertube-configuration = makeConfigurationResource peertubeConfigurationResource (
|
peertube-configuration = makeConfigurationResource peertubeConfigurationResource (
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
mkIf panelConfig.peertube.enable {
|
mkIf cfg.peertube.enable {
|
||||||
fediversity = {
|
fediversity = {
|
||||||
inherit (panelConfig) domain;
|
inherit (cfg) domain;
|
||||||
temp.initialUser = {
|
temp.initialUser = {
|
||||||
inherit (panelConfig.initialUser) username email displayName;
|
inherit (cfg.initialUser) username email displayName;
|
||||||
# FIXME: disgusting, but nvm, this is going to be replaced by
|
# FIXME: disgusting, but nvm, this is going to be replaced by
|
||||||
# proper central authentication at some point
|
# proper central authentication at some point
|
||||||
passwordFile = pkgs.writeText "password" panelConfig.initialUser.password;
|
passwordFile = pkgs.writeText "password" cfg.initialUser.password;
|
||||||
};
|
};
|
||||||
|
|
||||||
peertube = peertubeS3KeyConfig { inherit pkgs; } // {
|
peertube = peertubeS3KeyConfig { inherit pkgs; } // {
|
||||||
|
@ -173,14 +177,14 @@ in
|
||||||
|
|
||||||
pixelfed-configuration = makeConfigurationResource pixelfedConfigurationResource (
|
pixelfed-configuration = makeConfigurationResource pixelfedConfigurationResource (
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
mkIf panelConfig.pixelfed.enable {
|
mkIf cfg.pixelfed.enable {
|
||||||
fediversity = {
|
fediversity = {
|
||||||
inherit (panelConfig) domain;
|
inherit (cfg) domain;
|
||||||
temp.initialUser = {
|
temp.initialUser = {
|
||||||
inherit (panelConfig.initialUser) username email displayName;
|
inherit (cfg.initialUser) username email displayName;
|
||||||
# FIXME: disgusting, but nvm, this is going to be replaced by
|
# FIXME: disgusting, but nvm, this is going to be replaced by
|
||||||
# proper central authentication at some point
|
# proper central authentication at some point
|
||||||
passwordFile = pkgs.writeText "password" panelConfig.initialUser.password;
|
passwordFile = pkgs.writeText "password" cfg.initialUser.password;
|
||||||
};
|
};
|
||||||
|
|
||||||
pixelfed = pixelfedS3KeyConfig { inherit pkgs; } // {
|
pixelfed = pixelfedS3KeyConfig { inherit pkgs; } // {
|
||||||
|
|
Loading…
Add table
Reference in a new issue