diff --git a/modules/default.nix b/modules/default.nix index 99a4825..e3b891e 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -4,6 +4,7 @@ in { imports = [ ./apps ./containers + ./fedi ./fonts ./games ./home diff --git a/modules/fedi/default.nix b/modules/fedi/default.nix new file mode 100644 index 0000000..78369be --- /dev/null +++ b/modules/fedi/default.nix @@ -0,0 +1,11 @@ +{ lib, config, ... }: let + inherit (lib) mkIf; + inherit (config) conf; +in mkIf conf.fedi.enable { + services.akkoma = { + enable = true; + nginx = { + onlySSL = true; + }; + }; +} diff --git a/modules/website/default.nix b/modules/website/default.nix index 86c09bd..6e8b212 100644 --- a/modules/website/default.nix +++ b/modules/website/default.nix @@ -8,7 +8,16 @@ in mkIf conf.website.enable { forceSSL = false; locations = { "/" = { - return = "200 \"Faggot\""; + return = "200 \"faggot\""; + }; + }; + }; + "fedi.twoneis.site" = { + serverName = "git.twoneis.site"; + forceSSL = false; + locations = { + "/" = { + return = "200 \"faggot on fedi?\""; }; }; }; diff --git a/options.nix b/options.nix index f5a2fc7..e4d8d8b 100644 --- a/options.nix +++ b/options.nix @@ -19,6 +19,7 @@ in { ssh.enable = mkEnableOption "Install my public key to allow accessing this machine via ssh."; nginx.enable = mkEnableOption "Enable nginx."; website.enable = mkEnableOption "Serve website through nginx. Nginx must be enabled to work correctly."; + fedi.enable = mkEnableOption "Host a fedi server on this machine."; # Mixed and more complex options username = mkOption {