diff --git a/machines/amaterasu/main/default.nix b/machines/amaterasu/main/default.nix index cb5dc76..0b128af 100644 --- a/machines/amaterasu/main/default.nix +++ b/machines/amaterasu/main/default.nix @@ -126,6 +126,7 @@ in { ### dov = { gitlab.enable = true; + jenkins.enable = true; }; # DO NOT CHANGE AT ANY POINT! diff --git a/modules/default.nix b/modules/default.nix index fad0b34..fe78ccd 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -13,5 +13,6 @@ ./window-manager ./display-manager ./gitlab + ./jenkins ]; } diff --git a/modules/gitlab/default.nix b/modules/gitlab/default.nix index 60fc709..03108d5 100644 --- a/modules/gitlab/default.nix +++ b/modules/gitlab/default.nix @@ -45,7 +45,7 @@ in { }; services.gitlab = { - enable = true; + enable = cfg.enable; databasePasswordFile = config.sops.secrets."gitlab/databasePassword".path; initialRootPasswordFile = config.sops.secrets."gitlab/initialRootPassword".path; secrets = { @@ -105,7 +105,7 @@ in { }; services.nginx = { - enable = true; + enable = cfg.enable; recommendedProxySettings = true; virtualHosts = { @@ -119,11 +119,11 @@ in { }; networking.firewall = { - enable = true; + enable = cfg.enable; allowedTCPPorts = [ 80 443 ]; # HTTP and HTTPS }; - services.openssh.enable = true; + services.openssh.enable = cfg.enable; systemd.services.gitlab-backup.environment.BACKUP = "dump"; }; diff --git a/modules/jenkins/default.nix b/modules/jenkins/default.nix new file mode 100644 index 0000000..0d273ec --- /dev/null +++ b/modules/jenkins/default.nix @@ -0,0 +1,21 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.dov.jenkins; +in { + options.dov.jenkins.enable = mkEnableOption "jenkins config"; + + config = mkIf cfg.enable { + services.jenkins = { + enable = cfg.enable; + port = 8081; + }; + + networking.firewall = { + enable = cfg.enable; + allowedTCPPorts = [ 8081 ]; # HTTP and HTTPS + }; + }; +}