diff --git a/nixos/bonfire.nix b/nixos/bonfire.nix new file mode 100644 index 0000000..e3dde69 --- /dev/null +++ b/nixos/bonfire.nix @@ -0,0 +1,19 @@ +{pkgs, ... }: + +{ + services.bonfire = { + # you will need to expose bonfire with a reverse proxy, for example caddy + port = 4000; + package = pkgs.elixirBonfire; + dbName = "bonfire"; + # the environment should contain a minimum of + # SECRET_KEY_BASE + # SIGNING_SALT + # ENCRYPTION_SALT + # RELEASE_COOKIE + # have a look into nix/module.nix for more details + # the way to deploy secrets is beyond this readme, but I would recommend agenix + environmentFile = "/run/secrets/bonfireEnv"; + dbSocketDir = "/var/run/postgresql"; + }; +} diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 81b2552..ab7da74 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -16,6 +16,7 @@ ./hardware-configuration.nix ./vault-warden.nix ./book-stack.nix + # ./bonfire.nix # You can also split up your configuration and import pieces of it here. ];