Files
infrastructure/machines/discourse/configuration.nix
2025-01-19 14:22:08 +01:00

48 lines
1.0 KiB
Nix

{ config, lib, pkgs, ... }:
with lib;
{
sops.defaultSopsFile = ./secrets.yaml;
sops.secrets = {
discourseAdminPasswordFile = {};
discourseSecretKeyBaseFile = {};
};
networking = {
hostName = mkDefault "discourse";
useDHCP = false;
nameservers = [ "1.1.1.1" ];
};
imports = [
../modules/malobeo_user.nix
../modules/sshd.nix
../modules/minimal_tools.nix
../modules/autoupdate.nix
];
services.discourse = {
enable = true;
hostname = "forum.malobeol.org";
admin = {
email = "admin@example.org";
username = "admin";
fullName = "Admin";
passwordFile = config.sops.secrets.discourseAdminPasswordFile.path;
};
secretKeyBaseFile = config.sops.secrets.discourseSecretKeyBaseFile.path;
database.createLocally = true;
enableACME = false;
};
services.postgresql = {
enable = true;
package = pkgs.postgresql_13;
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
system.stateVersion = "22.11"; # Did you read the comment?
}