Allow disabled registrations
This commit is contained in:
parent
dae40cc82d
commit
339f51a5a0
|
@ -2,7 +2,7 @@
|
||||||
description = "Mastodon running in a container";
|
description = "Mastodon running in a container";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-23.05";
|
nixpkgs.url = "nixpkgs/nixos-23.11";
|
||||||
arion.url = "github:hercules-ci/arion";
|
arion.url = "github:hercules-ci/arion";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,9 @@ in {
|
||||||
default = 4;
|
default = 4;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
close-registrations =
|
||||||
|
mkEnableOption "Disable the creation of new accounts.";
|
||||||
|
|
||||||
smtp = {
|
smtp = {
|
||||||
host = mkOption {
|
host = mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
|
@ -105,7 +108,6 @@ in {
|
||||||
configuration = {
|
configuration = {
|
||||||
boot.tmp.useTmpfs = true;
|
boot.tmp.useTmpfs = true;
|
||||||
system.nssModules = mkForce [ ];
|
system.nssModules = mkForce [ ];
|
||||||
environment.systemPackages = with pkgs; [ dig inetutils ];
|
|
||||||
services = {
|
services = {
|
||||||
nscd.enable = false;
|
nscd.enable = false;
|
||||||
postgresql.enable = true;
|
postgresql.enable = true;
|
||||||
|
@ -126,6 +128,7 @@ in {
|
||||||
configureNginx = true;
|
configureNginx = true;
|
||||||
automaticMigrations = true;
|
automaticMigrations = true;
|
||||||
streamingProcesses = cfg.streaming-processes;
|
streamingProcesses = cfg.streaming-processes;
|
||||||
|
extraConfig.registrations_open = !cfg.closed-registrations;
|
||||||
};
|
};
|
||||||
nginx = {
|
nginx = {
|
||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = true;
|
||||||
|
|
Loading…
Reference in New Issue