nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

nixos/nitter: rename guestAccounts to sessionsFile

for consistency with upstream, see
https://github.com/zedeus/nitter/commit/6fcd849eff51ad1ee6e6078e3236896ab97803b6

uku b6ba4a49 9b5f2fec

+16 -10
+2
nixos/doc/manual/release-notes/rl-2505.section.md
··· 462 462 463 463 - `nodePackages.ganache` has been removed, as the package has been deprecated by upstream. 464 464 465 + - `services.nitter.guestAccounts` has been renamed to `services.nitter.sessionsFile`, for consistency with upstream. The file format is unchanged. 466 + 465 467 - `virtualisation.azure.agent` option provided by `azure-agent.nix` is replaced by `services.waagent`, and will be removed in a future release. 466 468 467 469 - `matomo` now defaults to version 5 (previously available as `matomo_5`). Version 4 has been removed as it reached EOL on December 19, 2024.
+12 -8
nixos/modules/services/misc/nitter.nix
··· 64 64 "nitter" 65 65 "replaceInstagram" 66 66 ] "Nitter no longer supports this option as Bibliogram has been discontinued.") 67 + (lib.mkRenamedOptionModule 68 + [ "services" "nitter" "guestAccounts" ] 69 + [ "services" "nitter" "sessionsFile" ] 70 + ) 67 71 ]; 68 72 69 73 options = { ··· 326 322 ''; 327 323 }; 328 324 329 - guestAccounts = lib.mkOption { 325 + sessionsFile = lib.mkOption { 330 326 type = lib.types.path; 331 - default = "/var/lib/nitter/guest_accounts.jsonl"; 327 + default = "/var/lib/nitter/sessions.jsonl"; 332 328 description = '' 333 - Path to the guest accounts file. 329 + Path to the session tokens file. 334 330 335 - This file contains a list of guest accounts that can be used to 331 + This file contains a list of session tokens that can be used to 336 332 access the instance without logging in. The file is in JSONL format, 337 333 where each line is a JSON object with the following fields: 338 334 339 335 {"oauth_token":"some_token","oauth_token_secret":"some_secret_key"} 340 336 341 - See <https://github.com/zedeus/nitter/wiki/Guest-Account-Branch-Deployment> 342 - for more information on guest accounts and how to generate them. 337 + See <https://github.com/zedeus/nitter/wiki/Creating-session-tokens> 338 + for more information on session tokens and how to generate them. 343 339 ''; 344 340 }; 345 341 ··· 373 369 after = [ "network-online.target" ]; 374 370 serviceConfig = { 375 371 DynamicUser = true; 376 - LoadCredential = "guestAccountsFile:${cfg.guestAccounts}"; 372 + LoadCredential = "sessionsFile:${cfg.sessionsFile}"; 377 373 StateDirectory = "nitter"; 378 374 Environment = [ 379 375 "NITTER_CONF_FILE=/var/lib/nitter/nitter.conf" 380 - "NITTER_ACCOUNTS_FILE=%d/guestAccountsFile" 376 + "NITTER_SESSIONS_FILE=%d/sessionsFile" 381 377 ]; 382 378 # Some parts of Nitter expect `public` folder in working directory, 383 379 # see https://github.com/zedeus/nitter/issues/414
+2 -2
nixos/tests/nitter.nix
··· 8 8 # These credentials are from the nitter wiki and are expired. We must provide 9 9 # credentials in the correct format, otherwise nitter fails to start. They 10 10 # must not be valid, as unauthorized errors are handled gracefully. 11 - guestAccountFile = pkgs.writeText "guest_accounts.jsonl" '' 11 + sessionsFile = pkgs.writeText "sessions.jsonl" '' 12 12 {"oauth_token":"1719213587296620928-BsXY2RIJEw7fjxoNwbBemgjJhueK0m","oauth_token_secret":"N0WB0xhL4ng6WTN44aZO82SUJjz7ssI3hHez2CUhTiYqy"} 13 13 ''; 14 14 in ··· 22 22 # Test CAP_NET_BIND_SERVICE 23 23 server.port = 80; 24 24 # Provide dummy guest accounts 25 - guestAccounts = guestAccountFile; 25 + inherit sessionsFile; 26 26 }; 27 27 }; 28 28