add pleroma

This commit is contained in:
James Walker 2022-04-13 22:55:35 -04:00
parent a23213a141
commit ed1681b62a
Signed by: walkah
GPG Key ID: 3C127179D6086E93
4 changed files with 39 additions and 1 deletions

View File

@ -15,11 +15,13 @@ in
../../modules/gitea
../../modules/home-assistant
../../modules/matrix
../../modules/pleroma
../../modules/sops
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 3;
boot.loader.efi.canTouchEfiVariables = true;
boot.cleanTmpDir = true;
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];

View File

@ -3,7 +3,8 @@
let
dotfiles = builtins.fetchTarball
"https://github.com/walkah/dotfiles/archive/main.tar.gz";
in {
in
{
imports = [
./hardware-configuration.nix
./networking.nix # generated at runtime by nixos-infect
@ -15,6 +16,7 @@ in {
../../modules/home-assistant/nginx.nix
../../modules/ipfs/gateway.nix
../../modules/matrix/nginx.nix
../../modules/pleroma/nginx.nix
];
nixpkgs.overlays = [ (import ../../overlays) ];

View File

@ -0,0 +1,17 @@
{ config, lib, pkgs, ... }:
{
services = {
pleroma = {
enable = true;
configs = [ "import Config" ];
};
postgresql = {
ensureDatabases = [ "pleroma" ];
ensureUsers = [{
name = "pleroma";
ensurePermissions = { "DATABASE pleroma" = "ALL PRIVILEGES"; };
}];
};
};
}

17
modules/pleroma/nginx.nix Normal file
View File

@ -0,0 +1,17 @@
{ config, lib, pkgs, ... }:
{
services.nginx = {
enable = true;
virtualHosts = {
"walkah.social" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://plato:4000";
proxyWebsockets = true;
};
};
};
};
}