···146146 "/etc/os-release".source = initrdRelease;
147147 "/etc/initrd-release".source = initrdRelease;
148148 };
149149+150150+ # We have to use `warnings` because when warning in the default of the option
151151+ # the warning would also be shown when building the manual since the manual
152152+ # has to evaluate the default.
153153+ #
154154+ # TODO Remove this and drop the default of the option so people are forced to set it.
155155+ # Doing this also means fixing the comment in nixos/modules/testing/test-instrumentation.nix
156156+ warnings = lib.optional (options.system.stateVersion.highestPrio == (lib.mkOptionDefault { }).priority)
157157+ "system.stateVersion is not set, defaulting to ${config.system.stateVersion}. Read why this matters on https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersion.";
149158 };
150159151160 # uses version info nixpkgs, which requires a full nixpkgs path
+1
nixos/modules/services/matrix/matrix-synapse.nix
···296296 default = if lib.versionAtLeast config.system.stateVersion "22.05"
297297 then "${cfg.dataDir}/media_store"
298298 else "${cfg.dataDir}/media";
299299+ defaultText = "${cfg.dataDir}/media_store for when system.stateVersion is at least 22.05, ${cfg.dataDir}/media when lower than 22.05";
299300 description = ''
300301 Directory where uploaded images and attachments are stored.
301302 '';
···129129 # Make sure we use the Guest Agent from the QEMU package for testing
130130 # to reduce the closure size required for the tests.
131131 services.qemuGuest.package = pkgs.qemu_test.ga;
132132+133133+ # Squelch warning about unset system.stateVersion
134134+ system.stateVersion = lib.mkDefault lib.trivial.release;
132135 };
133136134137}
+18-2
nixos/tests/pleroma.nix
···3232 # system one. Overriding this pretty bad default behaviour.
3333 export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
34343535- echo "jamy-password" | toot login_cli -i "pleroma.nixos.test" -e "jamy@nixos.test"
3535+ export TOOT_LOGIN_CLI_PASSWORD="jamy-password"
3636+ toot login_cli -i "pleroma.nixos.test" -e "jamy@nixos.test"
3637 echo "Login OK"
37383839 # Send a toot then verify it's part of the public timeline
···167168 cp key.pem cert.pem $out
168169 '';
169170171171+ /* Toot is preventing users from feeding login_cli a password non
172172+ interactively. While it makes sense most of the times, it's
173173+ preventing us to login in this non-interactive test. This patch
174174+ introduce a TOOT_LOGIN_CLI_PASSWORD env variable allowing us to
175175+ provide a password to toot login_cli
176176+177177+ If https://github.com/ihabunek/toot/pull/180 gets merged at some
178178+ point, feel free to remove this patch. */
179179+ custom-toot = pkgs.toot.overrideAttrs(old:{
180180+ patches = [ (pkgs.fetchpatch {
181181+ url = "https://github.com/NinjaTrappeur/toot/commit/b4a4c30f41c0cb7e336714c2c4af9bc9bfa0c9f2.patch";
182182+ sha256 = "sha256-0xxNwjR/fStLjjUUhwzCCfrghRVts+fc+fvVJqVcaFg=";
183183+ }) ];
184184+ });
185185+170186 hosts = nodes: ''
171187 ${nodes.pleroma.config.networking.primaryIPAddress} pleroma.nixos.test
172188 ${nodes.client.config.networking.primaryIPAddress} client.nixos.test
···178194 security.pki.certificateFiles = [ "${tls-cert}/cert.pem" ];
179195 networking.extraHosts = hosts nodes;
180196 environment.systemPackages = with pkgs; [
181181- toot
197197+ custom-toot
182198 send-toot
183199 ];
184200 };