No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
64 changed files with 1920 additions and 1434 deletions
-
4.github/workflows/merge-staging.yml
-
14nixos/doc/manual/release-notes/rl-2105.xml
-
8nixos/modules/installer/tools/nix-fallback-paths.nix
-
1nixos/modules/services/monitoring/prometheus/exporters.nix
-
38nixos/modules/services/monitoring/prometheus/exporters/kea.nix
-
196nixos/modules/services/networking/radicale.nix
-
1nixos/tests/all-tests.nix
-
99nixos/tests/dendrite.nix
-
51nixos/tests/prometheus-exporters.nix
-
209nixos/tests/radicale.nix
-
14nixos/tests/sway.nix
-
4pkgs/applications/audio/strawberry/default.nix
-
45pkgs/applications/editors/emacs-modes/elpa-generated.nix
-
12pkgs/applications/editors/emacs-modes/org-generated.nix
-
2111pkgs/applications/editors/emacs-modes/recipes-archive-melpa.json
-
2pkgs/applications/editors/emacs-modes/sunrise-commander/default.nix
-
10pkgs/applications/editors/vscode/vscode.nix
-
4pkgs/applications/networking/browsers/brave/default.nix
-
6pkgs/applications/networking/dnscontrol/default.nix
-
4pkgs/data/themes/amber/default.nix
-
30pkgs/development/compilers/zig/default.nix
-
4pkgs/development/interpreters/erlang/R23.nix
-
4pkgs/development/libraries/libxc/default.nix
-
39pkgs/development/libraries/taglib/default.nix
-
4pkgs/development/python-modules/adafruit-platformdetect/default.nix
-
14pkgs/development/python-modules/ansible-lint/default.nix
-
2pkgs/development/python-modules/ansible/collections.nix
-
18pkgs/development/python-modules/gpapi/default.nix
-
4pkgs/development/python-modules/pydicom/default.nix
-
16pkgs/development/python-modules/pyfuse3/default.nix
-
51pkgs/development/python-modules/pytaglib/default.nix
-
13pkgs/development/python-modules/rfc3339-validator/default.nix
-
2pkgs/development/python-modules/telfhash/default.nix
-
30pkgs/development/python-modules/telfhash/telfhash-new-tlsh-hash.patch
-
31pkgs/development/tools/misc/jiq/default.nix
-
2pkgs/development/tools/pypi2nix/default.nix
-
6pkgs/development/tools/rust/cargo-msrv/default.nix
-
8pkgs/development/web/postman/default.nix
-
4pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/default.nix
-
4pkgs/misc/vscode-extensions/python/default.nix
-
4pkgs/os-specific/linux/ell/default.nix
-
6pkgs/os-specific/linux/iwd/default.nix
-
4pkgs/servers/computing/slurm/default.nix
-
6pkgs/servers/dendrite/default.nix
-
33pkgs/servers/monitoring/prometheus/kea-exporter.nix
-
4pkgs/servers/web-apps/wallabag/default.nix
-
8pkgs/servers/xmpp/prosody/default.nix
-
6pkgs/shells/oil/default.nix
-
6pkgs/tools/admin/clair/default.nix
-
4pkgs/tools/audio/volctl/default.nix
-
4pkgs/tools/misc/jdupes/default.nix
-
8pkgs/tools/misc/lorri/default.nix
-
4pkgs/tools/misc/nix-direnv/default.nix
-
34pkgs/tools/networking/calendar-cli/default.nix
-
4pkgs/tools/networking/chrony/default.nix
-
6pkgs/tools/networking/findomain/default.nix
-
4pkgs/tools/networking/ofono/default.nix
-
11pkgs/tools/package-management/nix/default.nix
-
2pkgs/tools/security/metasploit/Gemfile
-
16pkgs/tools/security/metasploit/Gemfile.lock
-
4pkgs/tools/security/metasploit/default.nix
-
32pkgs/tools/security/metasploit/gemset.nix
-
20pkgs/tools/typesetting/tex/auctex/default.nix
-
5pkgs/top-level/all-packages.nix
@ -1,6 +1,6 @@ |
|||
{ |
|||
x86_64-linux = "/nix/store/iwfs2bfcy7lqwhri94p2i6jc87ih55zk-nix-2.3.10"; |
|||
i686-linux = "/nix/store/a3ccfvy9i5n418d5v0bir330kbcz3vj8-nix-2.3.10"; |
|||
aarch64-linux = "/nix/store/bh5g6cv7bv35iz853d3xv2sphn51ybmb-nix-2.3.10"; |
|||
x86_64-darwin = "/nix/store/8c98r6zlwn2d40qm7jnnrr2rdlqviszr-nix-2.3.10"; |
|||
x86_64-linux = "/nix/store/d1ppfhjhdwcsb4npfzyifv5z8i00fzsk-nix-2.3.11"; |
|||
i686-linux = "/nix/store/c6ikndcrzwpfn2sb5b9xb1f17p9b8iga-nix-2.3.11"; |
|||
aarch64-linux = "/nix/store/fb0lfrn0m8s197d264jzd64vhz9c8zbx-nix-2.3.11"; |
|||
x86_64-darwin = "/nix/store/qvb86ffv08q3r66qbd6nqifz425lyyhf-nix-2.3.11"; |
|||
} |
@ -0,0 +1,38 @@ |
|||
{ config |
|||
, lib |
|||
, pkgs |
|||
, options |
|||
}: |
|||
|
|||
with lib; |
|||
|
|||
let |
|||
cfg = config.services.prometheus.exporters.kea; |
|||
in { |
|||
port = 9547; |
|||
extraOpts = { |
|||
controlSocketPaths = mkOption { |
|||
type = types.listOf types.str; |
|||
example = literalExample '' |
|||
[ |
|||
"/run/kea/kea-dhcp4.socket" |
|||
"/run/kea/kea-dhcp6.socket" |
|||
] |
|||
''; |
|||
description = '' |
|||
Paths to kea control sockets |
|||
''; |
|||
}; |
|||
}; |
|||
serviceOpts = { |
|||
serviceConfig = { |
|||
ExecStart = '' |
|||
${pkgs.prometheus-kea-exporter}/bin/kea-exporter \ |
|||
--address ${cfg.listenAddress} \ |
|||
--port ${toString cfg.port} \ |
|||
${concatStringsSep " \\n" cfg.controlSocketPaths} |
|||
''; |
|||
SupplementaryGroups = [ "kea" ]; |
|||
}; |
|||
}; |
|||
} |
@ -0,0 +1,99 @@ |
|||
import ./make-test-python.nix ( |
|||
{ pkgs, ... }: |
|||
let |
|||
homeserverUrl = "http://homeserver:8008"; |
|||
|
|||
private_key = pkgs.runCommand "matrix_key.pem" { |
|||
buildInputs = [ pkgs.dendrite ]; |
|||
} "generate-keys --private-key $out"; |
|||
in |
|||
{ |
|||
name = "dendrite"; |
|||
meta = with pkgs.lib; { |
|||
maintainers = teams.matrix.members; |
|||
}; |
|||
|
|||
nodes = { |
|||
homeserver = { pkgs, ... }: { |
|||
services.dendrite = { |
|||
enable = true; |
|||
settings = { |
|||
global.server_name = "test-dendrite-server.com"; |
|||
global.private_key = private_key; |
|||
client_api.registration_disabled = false; |
|||
}; |
|||
}; |
|||
|
|||
networking.firewall.allowedTCPPorts = [ 8008 ]; |
|||
}; |
|||
|
|||
client = { pkgs, ... }: { |
|||
environment.systemPackages = [ |
|||
( |
|||
pkgs.writers.writePython3Bin "do_test" |
|||
{ libraries = [ pkgs.python3Packages.matrix-nio ]; } '' |
|||
import asyncio |
|||
|
|||
from nio import AsyncClient |
|||
|
|||
|
|||
async def main() -> None: |
|||
# Connect to dendrite |
|||
client = AsyncClient("http://homeserver:8008", "alice") |
|||
|
|||
# Register as user alice |
|||
response = await client.register("alice", "my-secret-password") |
|||
|
|||
# Log in as user alice |
|||
response = await client.login("my-secret-password") |
|||
|
|||
# Create a new room |
|||
response = await client.room_create(federate=False) |
|||
room_id = response.room_id |
|||
|
|||
# Join the room |
|||
response = await client.join(room_id) |
|||
|
|||
# Send a message to the room |
|||
response = await client.room_send( |
|||
room_id=room_id, |
|||
message_type="m.room.message", |
|||
content={ |
|||
"msgtype": "m.text", |
|||
"body": "Hello world!" |
|||
} |
|||
) |
|||
|
|||
# Sync responses |
|||
response = await client.sync(timeout=30000) |
|||
|
|||
# Check the message was received by dendrite |
|||
last_message = response.rooms.join[room_id].timeline.events[-1].body |
|||
assert last_message == "Hello world!" |
|||
|
|||
# Leave the room |
|||
response = await client.room_leave(room_id) |
|||
|
|||
# Close the client |
|||
await client.close() |
|||
|
|||
asyncio.get_event_loop().run_until_complete(main()) |
|||
'' |
|||
) |
|||
]; |
|||
}; |
|||
}; |
|||
|
|||
testScript = '' |
|||
start_all() |
|||
|
|||
with subtest("start the homeserver"): |
|||
homeserver.wait_for_unit("dendrite.service") |
|||
homeserver.wait_for_open_port(8008) |
|||
|
|||
with subtest("ensure messages can be exchanged"): |
|||
client.succeed("do_test") |
|||
''; |
|||
|
|||
} |
|||
) |
@ -1,140 +1,95 @@ |
|||
import ./make-test-python.nix ({ lib, pkgs, ... }: |
|||
|
|||
let |
|||
user = "someuser"; |
|||
password = "some_password"; |
|||
port = builtins.toString 5232; |
|||
port = "5232"; |
|||
filesystem_folder = "/data/radicale"; |
|||
|
|||
cli = "${pkgs.calendar-cli}/bin/calendar-cli --caldav-user ${user} --caldav-pass ${password}"; |
|||
in { |
|||
name = "radicale3"; |
|||
meta.maintainers = with lib.maintainers; [ dotlambda ]; |
|||
|
|||
common = { pkgs, ... }: { |
|||
machine = { pkgs, ... }: { |
|||
services.radicale = { |
|||
enable = true; |
|||
config = '' |
|||
[auth] |
|||
type = htpasswd |
|||
htpasswd_filename = /etc/radicale/htpasswd |
|||
htpasswd_encryption = bcrypt |
|||
|
|||
[storage] |
|||
filesystem_folder = /tmp/collections |
|||
''; |
|||
settings = { |
|||
auth = { |
|||
type = "htpasswd"; |
|||
htpasswd_filename = "/etc/radicale/users"; |
|||
htpasswd_encryption = "bcrypt"; |
|||
}; |
|||
storage = { |
|||
inherit filesystem_folder; |
|||
hook = "git add -A && (git diff --cached --quiet || git commit -m 'Changes by '%(user)s)"; |
|||
}; |
|||
logging.level = "info"; |
|||
}; |
|||
rights = { |
|||
principal = { |
|||
user = ".+"; |
|||
collection = "{user}"; |
|||
permissions = "RW"; |
|||
}; |
|||
calendars = { |
|||
user = ".+"; |
|||
collection = "{user}/[^/]+"; |
|||
permissions = "rw"; |
|||
}; |
|||
}; |
|||
}; |
|||
systemd.services.radicale.path = [ pkgs.git ]; |
|||
environment.systemPackages = [ pkgs.git ]; |
|||
systemd.tmpfiles.rules = [ "d ${filesystem_folder} 0750 radicale radicale -" ]; |
|||
# WARNING: DON'T DO THIS IN PRODUCTION! |
|||
# This puts unhashed secrets directly into the Nix store for ease of testing. |
|||
environment.etc."radicale/htpasswd".source = pkgs.runCommand "htpasswd" {} '' |
|||
environment.etc."radicale/users".source = pkgs.runCommand "htpasswd" {} '' |
|||
${pkgs.apacheHttpd}/bin/htpasswd -bcB "$out" ${user} ${password} |
|||
''; |
|||
}; |
|||
|
|||
in |
|||
|
|||
import ./make-test-python.nix ({ lib, ... }@args: { |
|||
name = "radicale"; |
|||
meta.maintainers = with lib.maintainers; [ aneeshusa infinisil ]; |
|||
|
|||
nodes = rec { |
|||
radicale = radicale1; # Make the test script read more nicely |
|||
radicale1 = lib.recursiveUpdate (common args) { |
|||
nixpkgs.overlays = [ |
|||
(self: super: { |
|||
radicale1 = super.radicale1.overrideAttrs (oldAttrs: { |
|||
propagatedBuildInputs = with self.pythonPackages; |
|||
(oldAttrs.propagatedBuildInputs or []) ++ [ passlib ]; |
|||
}); |
|||
}) |
|||
]; |
|||
system.stateVersion = "17.03"; |
|||
}; |
|||
radicale1_export = lib.recursiveUpdate radicale1 { |
|||
services.radicale.extraArgs = [ |
|||
"--export-storage" "/tmp/collections-new" |
|||
]; |
|||
system.stateVersion = "17.03"; |
|||
}; |
|||
radicale2_verify = lib.recursiveUpdate radicale2 { |
|||
services.radicale.extraArgs = [ "--debug" "--verify-storage" ]; |
|||
system.stateVersion = "17.09"; |
|||
}; |
|||
radicale2 = lib.recursiveUpdate (common args) { |
|||
system.stateVersion = "17.09"; |
|||
}; |
|||
radicale3 = lib.recursiveUpdate (common args) { |
|||
system.stateVersion = "20.09"; |
|||
}; |
|||
}; |
|||
|
|||
# This tests whether the web interface is accessible to an authenticated user |
|||
testScript = { nodes }: let |
|||
switchToConfig = nodeName: let |
|||
newSystem = nodes.${nodeName}.config.system.build.toplevel; |
|||
in "${newSystem}/bin/switch-to-configuration test"; |
|||
in '' |
|||
with subtest("Check Radicale 1 functionality"): |
|||
radicale.succeed( |
|||
"${switchToConfig "radicale1"} >&2" |
|||
) |
|||
radicale.wait_for_unit("radicale.service") |
|||
radicale.wait_for_open_port(${port}) |
|||
radicale.succeed( |
|||
"curl --fail http://${user}:${password}@localhost:${port}/someuser/calendar.ics/" |
|||
) |
|||
|
|||
with subtest("Export data in Radicale 2 format"): |
|||
radicale.succeed("systemctl stop radicale") |
|||
radicale.succeed("ls -al /tmp/collections") |
|||
radicale.fail("ls -al /tmp/collections-new") |
|||
|
|||
with subtest("Radicale exits immediately after exporting storage"): |
|||
radicale.succeed( |
|||
"${switchToConfig "radicale1_export"} >&2" |
|||
) |
|||
radicale.wait_until_fails("systemctl status radicale") |
|||
radicale.succeed("ls -al /tmp/collections") |
|||
radicale.succeed("ls -al /tmp/collections-new") |
|||
|
|||
with subtest("Verify data in Radicale 2 format"): |
|||
radicale.succeed("rm -r /tmp/collections/${user}") |
|||
radicale.succeed("mv /tmp/collections-new/collection-root /tmp/collections") |
|||
radicale.succeed( |
|||
"${switchToConfig "radicale2_verify"} >&2" |
|||
) |
|||
radicale.wait_until_fails("systemctl status radicale") |
|||
|
|||
(retcode, logs) = radicale.execute("journalctl -u radicale -n 10") |
|||
assert ( |
|||
retcode == 0 and "Verifying storage" in logs |
|||
), "Radicale 2 didn't verify storage" |
|||
assert ( |
|||
"failed" not in logs and "exception" not in logs |
|||
), "storage verification failed" |
|||
|
|||
with subtest("Check Radicale 2 functionality"): |
|||
radicale.succeed( |
|||
"${switchToConfig "radicale2"} >&2" |
|||
) |
|||
radicale.wait_for_unit("radicale.service") |
|||
radicale.wait_for_open_port(${port}) |
|||
|
|||
(retcode, output) = radicale.execute( |
|||
"curl --fail http://${user}:${password}@localhost:${port}/someuser/calendar.ics/" |
|||
) |
|||
assert ( |
|||
retcode == 0 and "VCALENDAR" in output |
|||
), "Could not read calendar from Radicale 2" |
|||
|
|||
radicale.succeed("curl --fail http://${user}:${password}@localhost:${port}/.web/") |
|||
|
|||
with subtest("Check Radicale 3 functionality"): |
|||
radicale.succeed( |
|||
"${switchToConfig "radicale3"} >&2" |
|||
) |
|||
radicale.wait_for_unit("radicale.service") |
|||
radicale.wait_for_open_port(${port}) |
|||
|
|||
(retcode, output) = radicale.execute( |
|||
"curl --fail http://${user}:${password}@localhost:${port}/someuser/calendar.ics/" |
|||
) |
|||
assert ( |
|||
retcode == 0 and "VCALENDAR" in output |
|||
), "Could not read calendar from Radicale 3" |
|||
|
|||
radicale.succeed("curl --fail http://${user}:${password}@localhost:${port}/.web/") |
|||
''; |
|||
testScript = '' |
|||
machine.wait_for_unit("radicale.service") |
|||
machine.wait_for_open_port(${port}) |
|||
|
|||
machine.succeed("sudo -u radicale git -C ${filesystem_folder} init") |
|||
machine.succeed( |
|||
"sudo -u radicale git -C ${filesystem_folder} config --local user.email radicale@example.com" |
|||
) |
|||
machine.succeed( |
|||
"sudo -u radicale git -C ${filesystem_folder} config --local user.name radicale" |
|||
) |
|||
|
|||
with subtest("Test calendar and event creation"): |
|||
machine.succeed( |
|||
"${cli} --caldav-url http://localhost:${port}/${user} calendar create cal" |
|||
) |
|||
machine.succeed("test -d ${filesystem_folder}/collection-root/${user}/cal") |
|||
machine.succeed('test -z "$(ls ${filesystem_folder}/collection-root/${user}/cal)"') |
|||
machine.succeed( |
|||
"${cli} --caldav-url http://localhost:${port}/${user}/cal calendar add 2021-04-23 testevent" |
|||
) |
|||
machine.succeed('test -n "$(ls ${filesystem_folder}/collection-root/${user}/cal)"') |
|||
(status, stdout) = machine.execute( |
|||
"sudo -u radicale git -C ${filesystem_folder} log --format=oneline | wc -l" |
|||
) |
|||
assert status == 0, "git log failed" |
|||
assert stdout == "3\n", "there should be exactly 3 commits" |
|||
|
|||
with subtest("Test rights file"): |
|||
machine.fail( |
|||
"${cli} --caldav-url http://localhost:${port}/${user} calendar create sub/cal" |
|||
) |
|||
machine.fail( |
|||
"${cli} --caldav-url http://localhost:${port}/otheruser calendar create cal" |
|||
) |
|||
|
|||
with subtest("Test web interface"): |
|||
machine.succeed("curl --fail http://${user}:${password}@localhost:${port}/.web/") |
|||
|
|||
with subtest("Test security"): |
|||
output = machine.succeed("systemd-analyze security radicale.service") |
|||
machine.log(output) |
|||
assert output[-9:-1] == "SAFE :-}" |
|||
''; |
|||
}) |
2111
pkgs/applications/editors/emacs-modes/recipes-archive-melpa.json
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,39 +1,21 @@ |
|||
{ lib, stdenv, fetchurl, cmake, fetchpatch |
|||
{ lib |
|||
, stdenv |
|||
, fetchFromGitHub |
|||
, cmake |
|||
, zlib |
|||
}: |
|||
|
|||
stdenv.mkDerivation rec { |
|||
pname = "taglib"; |
|||
version = "1.11.1"; |
|||
version = "1.12"; |
|||
|
|||
src = fetchurl { |
|||
url = "http://taglib.org/releases/${pname}-${version}.tar.gz"; |
|||
sha256 = "0ssjcdjv4qf9liph5ry1kngam1y7zp8fzr9xv4wzzrma22kabldn"; |
|||
src = fetchFromGitHub { |
|||
owner = "taglib"; |
|||
repo = "taglib"; |
|||
rev = "v${version}"; |
|||
sha256 = "sha256-omErajnYgxbflsbe6pS2KsexZcXisso0WGYnmIud7WA="; |
|||
}; |
|||
|
|||
patches = [ |
|||
(fetchpatch { |
|||
# https://github.com/taglib/taglib/issues/829 |
|||
name = "CVE-2017-12678.patch"; |
|||
url = "https://github.com/taglib/taglib/commit/eb9ded1206f18.patch"; |
|||
sha256 = "1bvpxsvmlpi3by7myzss9kkpdkv405612n8ff68mw1ambj8h1m90"; |
|||
}) |
|||
|
|||
(fetchpatch { |
|||
# https://github.com/taglib/taglib/pull/869 |
|||
name = "CVE-2018-11439.patch"; |
|||
url = "https://github.com/taglib/taglib/commit/272648ccfcccae30e002ccf34a22e075dd477278.patch"; |
|||
sha256 = "0p397qq4anvcm0p8xs68mxa8hg6dl07chg260lc6k2929m34xv72"; |
|||