os/modules/concourse-server/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.3 KiB
Nix
Raw Normal View History

2023-11-11 00:12:57 +00:00
{
lib,
config,
pkgs,
...
}:
with lib; let
psCfg = config.pub-solar;
cfg = config.pub-solar.concourse-server;
in {
options.pub-solar.concourse-server = {
enable = mkOption {
description = "Concourse server";
default = false;
};
hostStateDir = mkOption {
description = "sets the state directory on host side";
default = "/srv/concourse-server/data";
};
};
config = mkIf cfg.enable {
containers."concourse-server" = {
autoStart = true;
ephemeral = true;
bindMounts."/data" = {
hostPath = cfg.hostStateDir;
isReadOnly = false;
};
config = {
config,
pkgs,
...
}: {
nixpkgs.overlays = [ (self: super: {
concourse = self.pkgs.concourse;
}) ];
system.stateVersion = "23.05";
networking.firewall.enable = false;
services.postgresql = {
enable = true;
};
systemd.services.concourse-web = {
enable = true;
description = "concourse web";
unitConfig = {
Type = "simple";
};
serviceConfig = {
ExecStart = "${pkgs.concourse}/bin/concourse";
};
wantedBy = [ "multi-user.target" ];
};
};
};
};
}