···329329330330- The behavior of the `networking.nat.externalIP` and `networking.nat.externalIPv6` options has been changed. `networking.nat.forwardPorts` now only forwards packets destined for the specified IP addresses.
331331332332+- `services.gitlab` now requires the setting of `activeRecordPrimaryKeyFile`, `activeRecordDeterministicKeyFile`, `activeRecordSaltFile` as GitLab introduced Rails ActiveRecord encryption.
333333+332334- `python3Packages.bpycv` has been removed due to being incompatible with Blender 4 and unmaintained.
333335334336- `python3Packages.jaeger-client` was removed because it was deprecated upstream. [OpenTelemetry](https://opentelemetry.io) is the recommended replacement.
+64-2
nixos/modules/services/misc/gitlab.nix
···907907 '';
908908 };
909909910910+ secrets.activeRecordPrimaryKeyFile = mkOption {
911911+ type = with types; nullOr path;
912912+ default = null;
913913+ description = ''
914914+ A file containing the secret used to encrypt some rails data
915915+ in the DB. This should not be the same as `services.gitlab.secrets.activeRecordDeterministicKeyFile`!
916916+917917+ Make sure the secret is at ideally 32 characters and all random,
918918+ no regular words or you'll be exposed to dictionary attacks.
919919+920920+ This should be a string, not a nix path, since nix paths are
921921+ copied into the world-readable nix store.
922922+ '';
923923+ };
924924+925925+ secrets.activeRecordDeterministicKeyFile = mkOption {
926926+ type = with types; nullOr path;
927927+ default = null;
928928+ description = ''
929929+ A file containing the secret used to encrypt some rails data in a deterministic way
930930+ in the DB. This should not be the same as `services.gitlab.secrets.activeRecordPrimaryKeyFile`!
931931+932932+ Make sure the secret is at ideally 32 characters and all random,
933933+ no regular words or you'll be exposed to dictionary attacks.
934934+935935+ This should be a string, not a nix path, since nix paths are
936936+ copied into the world-readable nix store.
937937+ '';
938938+ };
939939+940940+ secrets.activeRecordSaltFile = mkOption {
941941+ type = with types; nullOr path;
942942+ default = null;
943943+ description = ''
944944+ A file containing the salt for active record encryption in the DB.
945945+946946+ Make sure the secret is at ideally 32 characters and all random,
947947+ no regular words or you'll be exposed to dictionary attacks.
948948+949949+ This should be a string, not a nix path, since nix paths are
950950+ copied into the world-readable nix store.
951951+ '';
952952+ };
953953+910954 extraShellConfig = mkOption {
911955 type = types.attrs;
912956 default = { };
···11811225 message = "services.gitlab.secrets.jwsFile must be set!";
11821226 }
11831227 {
12281228+ assertion = cfg.secrets.activeRecordPrimaryKeyFile != null;
12291229+ message = "services.gitlab.secrets.activeRecordPrimaryKeyFile must be set!";
12301230+ }
12311231+ {
12321232+ assertion = cfg.secrets.activeRecordDeterministicKeyFile != null;
12331233+ message = "services.gitlab.secrets.activeRecordDeterministicKeyFile must be set!";
12341234+ }
12351235+ {
12361236+ assertion = cfg.secrets.activeRecordSaltFile != null;
12371237+ message = "services.gitlab.secrets.activeRecordSaltFile must be set!";
12381238+ }
12391239+ {
11841240 assertion = versionAtLeast postgresqlPackage.version "14.9";
11851241 message = "PostgreSQL >= 14.9 is required to run GitLab 17. Follow the instructions in the manual section for upgrading PostgreSQL here: https://nixos.org/manual/nixos/stable/index.html#module-services-postgres-upgrading";
11861242 }
···14801536 db="$(<'${cfg.secrets.dbFile}')"
14811537 otp="$(<'${cfg.secrets.otpFile}')"
14821538 jws="$(<'${cfg.secrets.jwsFile}')"
14831483- export secret db otp jws
15391539+ arprimary="$(<'${cfg.secrets.activeRecordPrimaryKeyFile}')"
15401540+ ardeterministic="$(<'${cfg.secrets.activeRecordDeterministicKeyFile}')"
15411541+ arsalt="$(<'${cfg.secrets.activeRecordSaltFile}')"
15421542+ export secret db otp jws arprimary ardeterministic arsalt
14841543 jq -n '{production: {secret_key_base: $ENV.secret,
14851544 otp_key_base: $ENV.otp,
14861545 db_key_base: $ENV.db,
14871487- openid_connect_signing_key: $ENV.jws}}' \
15461546+ openid_connect_signing_key: $ENV.jws,
15471547+ active_record_encryption_primary_key: $ENV.arprimary,
15481548+ active_record_encryption_deterministic_key: $ENV.ardeterministic,
15491549+ active_record_encryption_key_derivation_salt: $ENV.arsalt}}' \
14881550 > '${cfg.statePath}/config/secrets.yml'
14891551 )
14901552