diff options
74 files changed, 2272 insertions, 1445 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 3e46cd3893e7..e54fac92a678 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -582,6 +582,12 @@ githubId = 816777; name = "Ashley Gillman"; }; + ashkitten = { + email = "ashlea@protonmail.com"; + github = "ashkitten"; + githubId = 9281956; + name = "ash lea"; + }; aske = { email = "aske@fmap.me"; github = "aske"; diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 5335ba3abd18..79c72fc14224 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -609,6 +609,7 @@ ./services/networking/iodine.nix ./services/networking/iperf3.nix ./services/networking/ircd-hybrid/default.nix + ./services/networking/jormungandr.nix ./services/networking/iwd.nix ./services/networking/keepalived/default.nix ./services/networking/keybase.nix diff --git a/nixos/modules/services/networking/jormungandr.nix b/nixos/modules/services/networking/jormungandr.nix new file mode 100644 index 000000000000..c1a16a316b7a --- /dev/null +++ b/nixos/modules/services/networking/jormungandr.nix @@ -0,0 +1,97 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.services.jormungandr; + + inherit (lib) mkEnableOption mkIf mkOption; + inherit (lib) optionalString types; + + dataDir = "/var/lib/jormungandr"; + + # Default settings so far, as the service matures we will + # move these out as separate settings + configSettings = { + storage = dataDir; + p2p = { + public_address = "/ip4/127.0.0.1/tcp/8606"; + messages = "high"; + blocks = "high"; + }; + rest = { + listen = "127.0.0.1:8607"; + }; + }; + + configFile = if cfg.configFile == null then + pkgs.writeText "jormungandr.yaml" (builtins.toJSON configSettings) + else cfg.configFile; + +in { + + options = { + + services.jormungandr = { + enable = mkEnableOption "jormungandr service"; + + configFile = mkOption { + type = types.nullOr types.path; + default = null; + example = "/var/lib/jormungandr/node.yaml"; + description = '' + The path of the jormungandr blockchain configuration file in YAML format. + If no file is specified, a file is generated using the other options. + ''; + }; + + secretFile = mkOption { + type = types.nullOr types.path; + default = null; + example = "/etc/secret/jormungandr.yaml"; + description = '' + The path of the jormungandr blockchain secret node configuration file in + YAML format. Do not store this in nix store! + ''; + }; + + genesisBlockHash = mkOption { + type = types.nullOr types.string; + default = null; + example = "d70495af81ae8600aca3e642b2427327cb6001ec4d7a0037e96a00dabed163f9"; + description = '' + Set the genesis block hash (the hash of the block0) so we can retrieve + the genesis block (and the blockchain configuration) from the existing + storage or from the network. + ''; + }; + + genesisBlockFile = mkOption { + type = types.nullOr types.path; + default = null; + example = "/var/lib/jormungandr/block-0.bin"; + description = '' + The path of the genesis block file if we are hosting it locally. + ''; + }; + + }; + }; + + config = mkIf cfg.enable { + + systemd.services.jormungandr = { + description = "jormungandr server"; + wantedBy = [ "multi-user.target" ]; + after = [ "network-online.target" ]; + serviceConfig = { + DynamicUser = true; + StateDirectory = baseNameOf dataDir; + ExecStart = '' + ${pkgs.jormungandr}/bin/jormungandr --config ${configFile} \ + ${optionalString (cfg.secretFile != null) " --secret ${cfg.secretFile}"} \ + ${optionalString (cfg.genesisBlockHash != null) " --genesis-block-hash ${cfg.genesisBlockHash}"} \ + ${optionalString (cfg.genesisBlockFile != null) " --genesis-block ${cfg.genesisBlockFile}"} + ''; + }; + }; + }; +} diff --git a/nixos/modules/services/security/usbguard.nix b/nixos/modules/services/security/usbguard.nix index 88d2f69db572..20d5e3b28eb9 100644 --- a/nixos/modules/services/security/usbguard.nix +++ b/nixos/modules/services/security/usbguard.nix @@ -39,6 +39,16 @@ in { services.usbguard = { enable = mkEnableOption "USBGuard daemon"; + package = mkOption { + type = types.package; + default = pkgs.usbguard; + defaultText = "pkgs.usbguard"; + description = '' + The usbguard package to use. If you do not need the Qt GUI, use + <literal>pkgs.usbguard-nox</literal> to save disk space. + ''; + }; + ruleFile = mkOption { type = types.path; default = "/var/lib/usbguard/rules.conf"; @@ -179,7 +189,7 @@ in { config = mkIf cfg.enable { - environment.systemPackages = [ pkgs.usbguard ]; + environment.systemPackages = [ cfg.package ]; systemd.services.usbguard = { description = "USBGuard daemon"; @@ -195,7 +205,7 @@ in { serviceConfig = { Type = "simple"; - ExecStart = ''${pkgs.usbguard}/bin/usbguard-daemon -P -k -c ${daemonConfFile}''; + ExecStart = ''${cfg.package}/bin/usbguard-daemon -P -k -c ${daemonConfFile}''; Restart = "on-failure"; }; }; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 91c1044b4d8e..7564fc9eafba 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -127,6 +127,7 @@ in jackett = handleTest ./jackett.nix {}; jellyfin = handleTest ./jellyfin.nix {}; jenkins = handleTest ./jenkins.nix {}; + jormungandr = handleTest ./jormungandr.nix {}; kafka = handleTest ./kafka.nix {}; kerberos = handleTest ./kerberos/default.nix {}; kernel-latest = handleTest ./kernel-latest.nix {}; @@ -141,6 +142,7 @@ in latestKernel.login = handleTest ./login.nix { latestKernel = true; }; ldap = handleTest ./ldap.nix {}; leaps = handleTest ./leaps.nix {}; + libxmlb = handleTest ./libxmlb.nix {}; lidarr = handleTest ./lidarr.nix {}; lightdm = handleTest ./lightdm.nix {}; limesurvey = handleTest ./limesurvey.nix {}; diff --git a/nixos/tests/jormungandr.nix b/nixos/tests/jormungandr.nix new file mode 100644 index 000000000000..ab4edf0506aa --- /dev/null +++ b/nixos/tests/jormungandr.nix @@ -0,0 +1,49 @@ +import ./make-test.nix ({ pkgs, ... }: { + name = "jormungandr"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ mmahut ]; + }; + + nodes = { + bft = { ... }: { + environment.systemPackages = [ pkgs.jormungandr ]; + + services.jormungandr.enable = true; + services.jormungandr.genesisBlockFile = "/var/lib/jormungandr/block-0.bin"; + services.jormungandr.secretFile = "/etc/secrets/jormungandr.yaml"; + }; + }; + + testScript = '' + startAll; + + # Let's wait for the StateDirectory + $bft->waitForFile("/var/lib/jormungandr/"); + + # First, we generate the genesis file for our new blockchain + $bft->succeed("jcli genesis init > /root/genesis.yaml"); + + # We need to generate our secret key + $bft->succeed("jcli key generate --type=Ed25519 > /root/key.prv"); + + # We include the secret key into our services.jormungandr.secretFile + $bft->succeed("mkdir -p /etc/secrets"); + $bft->succeed("echo -e \"bft:\\n signing_key:\" \$(cat /root/key.prv) > /etc/secrets/jormungandr.yaml"); + + # After that, we generate our public key from it + $bft->succeed("cat /root/key.prv | jcli key to-public > /root/key.pub"); + + # We add our public key as a consensus leader in the genesis configration file + $bft->succeed("sed -ie \"s/ed25519_pk1vvwp2s0n5jl5f4xcjurp2e92sj2awehkrydrlas4vgqr7xzt33jsadha32/\$(cat /root/key.pub)/\" /root/genesis.yaml"); + + # Now we can generate the genesis block from it + $bft->succeed("jcli genesis encode --input /root/genesis.yaml --output /var/lib/jormungandr/block-0.bin"); + + # We should have everything to start the service now + $bft->succeed("systemctl restart jormungandr"); + $bft->waitForUnit("jormungandr.service"); + + # Now we can test if we are able to reach the REST API + $bft->waitUntilSucceeds("curl -L http://localhost:8607/api/v0/node/stats | grep uptime"); + ''; +}) diff --git a/nixos/tests/libxmlb.nix b/nixos/tests/libxmlb.nix new file mode 100644 index 000000000000..3bee568ac5a2 --- /dev/null +++ b/nixos/tests/libxmlb.nix @@ -0,0 +1,17 @@ +# run installed tests +import ./make-test.nix ({ pkgs, ... }: + +{ + name = "libxmlb"; + meta = { + maintainers = pkgs.libxmlb.meta.maintainers; + }; + + machine = { pkgs, ... }: { + environment.systemPackages = with pkgs; [ gnome-desktop-testing ]; + }; + + testScript = '' + $machine->succeed("gnome-desktop-testing-runner -d '${pkgs.libxmlb.installedTests}/share'"); + ''; +}) diff --git a/nixos/tests/xmpp/ejabberd.nix b/nixos/tests/xmpp/ejabberd.nix index 7eb566b54685..196a04aca300 100644 --- a/nixos/tests/xmpp/ejabberd.nix +++ b/nixos/tests/xmpp/ejabberd.nix @@ -45,8 +45,7 @@ import ../make-test.nix ({ pkgs, ... }: { ip: "127.0.0.1" module: ejabberd_service access: local - shaper_rule: fast - ip: "127.0.0.1" + shaper: fast ## Disabling digest-md5 SASL authentication. digest-md5 requires plain-text ## password storage (see auth_password_format option). @@ -181,7 +180,6 @@ import ../make-test.nix ({ pkgs, ... }: { mod_client_state: {} mod_configure: {} # requires mod_adhoc ## mod_delegation: {} # for xep0356 - mod_echo: {} #mod_irc: # host: "irc.@HOST@" # default_encoding: "utf-8" diff --git a/pkgs/applications/graphics/avocode/default.nix b/pkgs/applications/graphics/avocode/default.nix index 52fd3cebec26..552ca714476f 100644 --- a/pkgs/applications/graphics/avocode/default.nix +++ b/pkgs/applications/graphics/avocode/default.nix @@ -1,19 +1,20 @@ { stdenv, makeDesktopItem, fetchurl, unzip , gdk-pixbuf, glib, gtk3, atk, at-spi2-atk, pango, cairo, freetype, fontconfig, dbus, nss, nspr, alsaLib, cups, expat, udev, gnome3 -, xorg, mozjpeg, makeWrapper, wrapGAppsHook, hicolor-icon-theme, libuuid +, xorg, mozjpeg, makeWrapper, wrapGAppsHook, hicolor-icon-theme, libuuid, at-spi2-core }: stdenv.mkDerivation rec { name = "avocode-${version}"; - version = "3.9.0"; + version = "3.9.2"; src = fetchurl { url = "https://media.avocode.com/download/avocode-app/${version}/avocode-${version}-linux.zip"; - sha256 = "0fk62farnsxz59q82kxagibxmn9p9ckp6ix0wqg297gvasgad31q"; + sha256 = "18yzw7bss1dkmmd8lxr9x8s46qmpnqci202g16zrp6j9jdj094d3"; }; libPath = stdenv.lib.makeLibraryPath (with xorg; [ stdenv.cc.cc.lib + at-spi2-core.out gdk-pixbuf glib gtk3 diff --git a/pkgs/applications/misc/omegat.nix b/pkgs/applications/misc/omegat.nix index 660b5db61058..411b318a3925 100644 --- a/pkgs/applications/misc/omegat.nix +++ b/pkgs/applications/misc/omegat.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, unzip, jdk, makeWrapper}: stdenv.mkDerivation rec { - version = "4.1.5.2"; + version = "4.3.0"; pname = "omegat"; src = fetchurl { # their zip has repeated files or something, so no fetchzip - url = mirror://sourceforge/project/omegat/OmegaT%20-%20Latest/OmegaT%204.1.5%20update%202/OmegaT_4.1.5_02_Beta_Without_JRE.zip; - sha256 = "1mdnsvjgsccpd5xwpqzgva5jjp8yd1akq9aqpild4v6k70lqql2b"; + url = mirror://sourceforge/project/omegat/OmegaT%20-%20Standard/OmegaT%204.3.0/OmegaT_4.3.0_Without_JRE.zip; + sha256 = "0axz7r30p34z5hgvdglznc82g7yvm3g56dv5190jixskx6ba58rs"; }; buildInputs = [ unzip makeWrapper ]; diff --git a/pkgs/applications/networking/nextcloud-client/0001-Explicitly-copy-dbus-files-into-the-store-dir.patch b/pkgs/applications/networking/nextcloud-client/0001-Explicitly-copy-dbus-files-into-the-store-dir.patch new file mode 100644 index 000000000000..67cabc820b7f --- /dev/null +++ b/pkgs/applications/networking/nextcloud-client/0001-Explicitly-copy-dbus-files-into-the-store-dir.patch @@ -0,0 +1,25 @@ +From bbd366348d1f0e334d4604d04e293a046070e666 Mon Sep 17 00:00:00 2001 +From: Maximilian Bosch <maximilian@mbosch.me> +Date: Fri, 23 Aug 2019 00:19:20 +0200 +Subject: [PATCH] Explicitly copy dbus files into the store dir + +--- + shell_integration/libcloudproviders/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/shell_integration/libcloudproviders/CMakeLists.txt b/shell_integration/libcloudproviders/CMakeLists.txt +index 1f35335..7f76951 100644 +--- a/shell_integration/libcloudproviders/CMakeLists.txt ++++ b/shell_integration/libcloudproviders/CMakeLists.txt +@@ -19,7 +19,7 @@ MACRO(PKGCONFIG_GETVAR _package _var _output_variable) + ENDMACRO(PKGCONFIG_GETVAR _package _var _output_variable) + + macro(dbus_add_activation_service _sources) +- PKGCONFIG_GETVAR(dbus-1 session_bus_services_dir _install_dir) ++ set(_install_dir "${CMAKE_INSTALL_PREFIX}/etc/dbus-1/service") + foreach (_i ${_sources}) + get_filename_component(_service_file ${_i} ABSOLUTE) + string(REGEX REPLACE "\\.service.*$" ".service" _output_file ${_i}) +-- +2.19.2 + diff --git a/pkgs/applications/networking/nextcloud-client/default.nix b/pkgs/applications/networking/nextcloud-client/default.nix index b9015e7a9e3a..19db1e140c9f 100644 --- a/pkgs/applications/networking/nextcloud-client/default.nix +++ b/pkgs/applications/networking/nextcloud-client/default.nix @@ -1,20 +1,24 @@ -{ stdenv, fetchgit, cmake, pkgconfig, qtbase, qtwebkit, qtkeychain, qttools, sqlite -, inotify-tools, wrapQtAppsHook, openssl, pcre, qtwebengine, libsecret +{ lib, mkDerivation, fetchgit, cmake, pkgconfig, qtbase, qtwebkit, qtkeychain, qttools, sqlite +, inotify-tools, openssl, pcre, qtwebengine, libsecret , libcloudproviders }: -stdenv.mkDerivation rec { +mkDerivation rec { name = "nextcloud-client-${version}"; - version = "2.5.2"; + version = "2.5.3"; src = fetchgit { url = "git://github.com/nextcloud/desktop.git"; rev = "refs/tags/v${version}"; - sha256 = "1brpxdgyy742dqw6cyyv2257d6ihwiqhbzfk2hb8zjgbi6p9lhsr"; + sha256 = "0fbw56bfbyk3cqv94iqfsxjf01dwy1ysjz89dri7qccs65rnjswj"; fetchSubmodules = true; }; - nativeBuildInputs = [ pkgconfig cmake wrapQtAppsHook ]; + patches = [ + ./0001-Explicitly-copy-dbus-files-into-the-store-dir.patch + ]; + + nativeBuildInputs = [ pkgconfig cmake ]; |