62 lines
1.1 KiB
Nix
62 lines
1.1 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
let
|
|
enabled = config.mod.whib-backend.enable;
|
|
in
|
|
{
|
|
options = {
|
|
mod.whib-backend = {
|
|
enable = lib.mkEnableOption "enable WHIB backend";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf enabled {
|
|
environment.systemPackages = [ pkgs.gnupg ];
|
|
|
|
services.whib-backend = {
|
|
enable = true;
|
|
domain = "whib-backend.local";
|
|
|
|
backend = {
|
|
signingKey = "super-secret-key";
|
|
};
|
|
|
|
postgres = {
|
|
password = "postgrespassword";
|
|
|
|
backup = {
|
|
gpgPassphraseFile = ./whib-gpgPassfile;
|
|
};
|
|
};
|
|
};
|
|
|
|
virtualisation.vmVariant = {
|
|
virtualisation = {
|
|
sharedDirectories = {
|
|
my-shared = {
|
|
source = "/home/alex/whib-backup";
|
|
target = "/mnt/shared";
|
|
};
|
|
};
|
|
|
|
forwardPorts = [
|
|
{
|
|
from = "host";
|
|
host.port = 8080;
|
|
guest.port = 8080;
|
|
}
|
|
{
|
|
from = "host";
|
|
host.port = 5432;
|
|
guest.port = 5432;
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|