mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
nixos/nitter: rename guestAccounts to sessionsFile
for consistency with upstream, see
6fcd849eff
This commit is contained in:
parent
9b5f2fec89
commit
b6ba4a499c
3 changed files with 16 additions and 10 deletions
|
@ -462,6 +462,8 @@
|
||||||
|
|
||||||
- `nodePackages.ganache` has been removed, as the package has been deprecated by upstream.
|
- `nodePackages.ganache` has been removed, as the package has been deprecated by upstream.
|
||||||
|
|
||||||
|
- `services.nitter.guestAccounts` has been renamed to `services.nitter.sessionsFile`, for consistency with upstream. The file format is unchanged.
|
||||||
|
|
||||||
- `virtualisation.azure.agent` option provided by `azure-agent.nix` is replaced by `services.waagent`, and will be removed in a future release.
|
- `virtualisation.azure.agent` option provided by `azure-agent.nix` is replaced by `services.waagent`, and will be removed in a future release.
|
||||||
|
|
||||||
- `matomo` now defaults to version 5 (previously available as `matomo_5`). Version 4 has been removed as it reached EOL on December 19, 2024.
|
- `matomo` now defaults to version 5 (previously available as `matomo_5`). Version 4 has been removed as it reached EOL on December 19, 2024.
|
||||||
|
|
|
@ -64,6 +64,10 @@ in
|
||||||
"nitter"
|
"nitter"
|
||||||
"replaceInstagram"
|
"replaceInstagram"
|
||||||
] "Nitter no longer supports this option as Bibliogram has been discontinued.")
|
] "Nitter no longer supports this option as Bibliogram has been discontinued.")
|
||||||
|
(lib.mkRenamedOptionModule
|
||||||
|
[ "services" "nitter" "guestAccounts" ]
|
||||||
|
[ "services" "nitter" "sessionsFile" ]
|
||||||
|
)
|
||||||
];
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
@ -322,20 +326,20 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
guestAccounts = lib.mkOption {
|
sessionsFile = lib.mkOption {
|
||||||
type = lib.types.path;
|
type = lib.types.path;
|
||||||
default = "/var/lib/nitter/guest_accounts.jsonl";
|
default = "/var/lib/nitter/sessions.jsonl";
|
||||||
description = ''
|
description = ''
|
||||||
Path to the guest accounts file.
|
Path to the session tokens file.
|
||||||
|
|
||||||
This file contains a list of guest accounts that can be used to
|
This file contains a list of session tokens that can be used to
|
||||||
access the instance without logging in. The file is in JSONL format,
|
access the instance without logging in. The file is in JSONL format,
|
||||||
where each line is a JSON object with the following fields:
|
where each line is a JSON object with the following fields:
|
||||||
|
|
||||||
{"oauth_token":"some_token","oauth_token_secret":"some_secret_key"}
|
{"oauth_token":"some_token","oauth_token_secret":"some_secret_key"}
|
||||||
|
|
||||||
See <https://github.com/zedeus/nitter/wiki/Guest-Account-Branch-Deployment>
|
See <https://github.com/zedeus/nitter/wiki/Creating-session-tokens>
|
||||||
for more information on guest accounts and how to generate them.
|
for more information on session tokens and how to generate them.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -369,11 +373,11 @@ in
|
||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
LoadCredential = "guestAccountsFile:${cfg.guestAccounts}";
|
LoadCredential = "sessionsFile:${cfg.sessionsFile}";
|
||||||
StateDirectory = "nitter";
|
StateDirectory = "nitter";
|
||||||
Environment = [
|
Environment = [
|
||||||
"NITTER_CONF_FILE=/var/lib/nitter/nitter.conf"
|
"NITTER_CONF_FILE=/var/lib/nitter/nitter.conf"
|
||||||
"NITTER_ACCOUNTS_FILE=%d/guestAccountsFile"
|
"NITTER_SESSIONS_FILE=%d/sessionsFile"
|
||||||
];
|
];
|
||||||
# Some parts of Nitter expect `public` folder in working directory,
|
# Some parts of Nitter expect `public` folder in working directory,
|
||||||
# see https://github.com/zedeus/nitter/issues/414
|
# see https://github.com/zedeus/nitter/issues/414
|
||||||
|
|
|
@ -8,7 +8,7 @@ import ./make-test-python.nix (
|
||||||
# These credentials are from the nitter wiki and are expired. We must provide
|
# These credentials are from the nitter wiki and are expired. We must provide
|
||||||
# credentials in the correct format, otherwise nitter fails to start. They
|
# credentials in the correct format, otherwise nitter fails to start. They
|
||||||
# must not be valid, as unauthorized errors are handled gracefully.
|
# must not be valid, as unauthorized errors are handled gracefully.
|
||||||
guestAccountFile = pkgs.writeText "guest_accounts.jsonl" ''
|
sessionsFile = pkgs.writeText "sessions.jsonl" ''
|
||||||
{"oauth_token":"1719213587296620928-BsXY2RIJEw7fjxoNwbBemgjJhueK0m","oauth_token_secret":"N0WB0xhL4ng6WTN44aZO82SUJjz7ssI3hHez2CUhTiYqy"}
|
{"oauth_token":"1719213587296620928-BsXY2RIJEw7fjxoNwbBemgjJhueK0m","oauth_token_secret":"N0WB0xhL4ng6WTN44aZO82SUJjz7ssI3hHez2CUhTiYqy"}
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
|
@ -22,7 +22,7 @@ import ./make-test-python.nix (
|
||||||
# Test CAP_NET_BIND_SERVICE
|
# Test CAP_NET_BIND_SERVICE
|
||||||
server.port = 80;
|
server.port = 80;
|
||||||
# Provide dummy guest accounts
|
# Provide dummy guest accounts
|
||||||
guestAccounts = guestAccountFile;
|
inherit sessionsFile;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue