From 9b06e9856b2452b34d9e6798d7bdd00f759b5494 Mon Sep 17 00:00:00 2001 From: Richard Marko Date: Sat, 26 Sep 2020 14:24:40 +0200 Subject: [PATCH 01/31] raspberrypi-builder: allow passing firmware package as argument --- .../system/boot/loader/raspberrypi/raspberrypi-builder.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi-builder.nix b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi-builder.nix index 7eb52e3d021..64e106036ab 100644 --- a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi-builder.nix +++ b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi-builder.nix @@ -1,10 +1,9 @@ -{ pkgs, configTxt }: +{ pkgs, configTxt, firmware ? pkgs.raspberrypifw }: pkgs.substituteAll { src = ./raspberrypi-builder.sh; isExecutable = true; inherit (pkgs) bash; path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep]; - firmware = pkgs.raspberrypifw; - inherit configTxt; + inherit firmware configTxt; } From d95f020a5316fd1680c641d7f8283bcbc215c0d9 Mon Sep 17 00:00:00 2001 From: Lucas Savva Date: Mon, 12 Oct 2020 19:26:00 +0100 Subject: [PATCH 02/31] nixos/acme: Docs, explain how to set permissions As of 20.09 the /var/lib/acme/.challenges permissions will not automatically be correct. Add instructions on how to set them correctly. --- nixos/modules/security/acme.xml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nixos/modules/security/acme.xml b/nixos/modules/security/acme.xml index 17e94bc12fb..e3ce643e920 100644 --- a/nixos/modules/security/acme.xml +++ b/nixos/modules/security/acme.xml @@ -115,15 +115,18 @@ services.nginx = { = true; = "admin+acme@example.com"; + +# /var/lib/acme/.challenges must be writable by the ACME user +# and readable by the Nginx user. The easiest way to achieve +# this is to add the Nginx user to the ACME group. +users.users.nginx.extraGroups = [ "acme" ]; + services.nginx = { enable = true; virtualHosts = { "acmechallenge.example.com" = { # Catchall vhost, will redirect users to HTTPS for all vhosts serverAliases = [ "*.example.com" ]; - # /var/lib/acme/.challenges must be writable by the ACME user - # and readable by the Nginx user. - # By default, this is the case. locations."/.well-known/acme-challenge" = { root = "/var/lib/acme/.challenges"; }; @@ -134,6 +137,7 @@ services.nginx = { }; } # Alternative config for Apache +users.users.wwwrun.extraGroups = [ "acme" ]; services.httpd = { enable = true; virtualHosts = { From 00d257c7c380c4197801905ab5d4fedacd957a6d Mon Sep 17 00:00:00 2001 From: lf- Date: Sat, 19 Sep 2020 00:07:18 -0700 Subject: [PATCH 03/31] nixos/caddy: fix caddy configs with complicated jq --- nixos/modules/services/web-servers/caddy.nix | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/web-servers/caddy.nix b/nixos/modules/services/web-servers/caddy.nix index 63ba75e660c..8f210dfa0fe 100644 --- a/nixos/modules/services/web-servers/caddy.nix +++ b/nixos/modules/services/web-servers/caddy.nix @@ -20,8 +20,24 @@ let --config ${configFile} --adapter ${cfg.adapter} > $out ''; tlsJSON = pkgs.writeText "tls.json" (builtins.toJSON tlsConfig); - configJSON = pkgs.runCommand "caddy-config.json" { } '' - ${pkgs.jq}/bin/jq -s '.[0] * .[1]' ${adaptedConfig} ${tlsJSON} > $out + + # merge the TLS config options we expose with the ones originating in the Caddyfile + configJSON = + let tlsConfigMerge = '' + {"apps": + {"tls": + {"automation": + {"policies": + (if .[0].apps.tls.automation.policies == .[1]?.apps.tls.automation.policies + then .[0].apps.tls.automation.policies + else (.[0].apps.tls.automation.policies + .[1]?.apps.tls.automation.policies) + end) + } + } + } + }''; + in pkgs.runCommand "caddy-config.json" { } '' + ${pkgs.jq}/bin/jq -s '.[0] * ${tlsConfigMerge}' ${adaptedConfig} ${tlsJSON} > $out ''; in { imports = [ From ef998c2bda6eac0cf3d124407807b197986f9ee7 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 19 Jan 2021 05:17:44 +0000 Subject: [PATCH 04/31] acme-client: 1.0.1 -> 1.1.0 --- pkgs/tools/networking/acme-client/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/acme-client/default.nix b/pkgs/tools/networking/acme-client/default.nix index c669a3a3be2..6de95b34e62 100644 --- a/pkgs/tools/networking/acme-client/default.nix +++ b/pkgs/tools/networking/acme-client/default.nix @@ -10,11 +10,11 @@ with lib; stdenv.mkDerivation rec { pname = "acme-client"; - version = "1.0.1"; + version = "1.1.0"; src = fetchurl { url = "https://data.wolfsden.cz/sources/acme-client-${version}.tar.xz"; - sha256 = "0gmdvmyw8a61w08hrxllypf7rpnqg0fxipbk3zmvsxj7m5i6iysj"; + sha256 = "sha256-AYI7WfRTb5R0/hDX5Iqkq5nrLZ4gQecAGObSajSA+vw="; }; nativeBuildInputs = [ pkg-config ]; From 2887549800e86a9c9b6be7f0281338cb43677378 Mon Sep 17 00:00:00 2001 From: talyz Date: Sat, 23 Jan 2021 21:35:10 +0100 Subject: [PATCH 05/31] updater-emacs: Add missing `pkgs` in path to `withPackages` --- pkgs/applications/editors/emacs-modes/updater-emacs.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/editors/emacs-modes/updater-emacs.nix b/pkgs/applications/editors/emacs-modes/updater-emacs.nix index bd965c8f128..4c321065445 100644 --- a/pkgs/applications/editors/emacs-modes/updater-emacs.nix +++ b/pkgs/applications/editors/emacs-modes/updater-emacs.nix @@ -1,7 +1,7 @@ let pkgs = import ../../../.. {}; - emacsEnv = pkgs.emacs.withPackages (epkgs: let + emacsEnv = pkgs.emacs.pkgs.withPackages (epkgs: let promise = epkgs.trivialBuild { pname = "promise"; From bc1b5fdfe09e89dc253f9df5de15347f80dbd13b Mon Sep 17 00:00:00 2001 From: Gauvain 'GovanifY' Roussel-Tarbouriech Date: Sun, 3 Jan 2021 10:09:30 +0100 Subject: [PATCH 06/31] boot.initrd: add verbose option --- nixos/modules/system/boot/stage-1-init.sh | 24 ++++++++++++++--------- nixos/modules/system/boot/stage-1.nix | 19 +++++++++++++++++- 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh index abc1a0af48a..5b39f34200c 100644 --- a/nixos/modules/system/boot/stage-1-init.sh +++ b/nixos/modules/system/boot/stage-1-init.sh @@ -2,6 +2,13 @@ targetRoot=/mnt-root console=tty1 +verbose="@verbose@" + +info() { + if [[ -n "$verbose" ]]; then + echo "$@" + fi +} extraUtils="@extraUtils@" export LD_LIBRARY_PATH=@extraUtils@/lib @@ -55,7 +62,7 @@ EOF echo "Rebooting..." reboot -f else - echo "Continuing..." + info "Continuing..." fi } @@ -63,9 +70,9 @@ trap 'fail' 0 # Print a greeting. -echo -echo "<<< NixOS Stage 1 >>>" -echo +info +info "<<< NixOS Stage 1 >>>" +info # Make several required directories. mkdir -p /etc/udev @@ -210,14 +217,14 @@ ln -s @modulesClosure@/lib/modules /lib/modules ln -s @modulesClosure@/lib/firmware /lib/firmware echo @extraUtils@/bin/modprobe > /proc/sys/kernel/modprobe for i in @kernelModules@; do - echo "loading module $(basename $i)..." + info "loading module $(basename $i)..." modprobe $i done # Create device nodes in /dev. @preDeviceCommands@ -echo "running udev..." +info "running udev..." ln -sfn /proc/self/fd /dev/fd ln -sfn /proc/self/fd/0 /dev/stdin ln -sfn /proc/self/fd/1 /dev/stdout @@ -235,8 +242,7 @@ udevadm settle # XXX: Use case usb->lvm will still fail, usb->luks->lvm is covered @preLVMCommands@ - -echo "starting device mapper and LVM..." +info "starting device mapper and LVM..." lvm vgchange -ay if test -n "$debug1devices"; then fail; fi @@ -379,7 +385,7 @@ mountFS() { done fi - echo "mounting $device on $mountPoint..." + info "mounting $device on $mountPoint..." mkdir -p "/mnt-root$mountPoint" diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index 86bfde6349c..e223c9940da 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -280,7 +280,7 @@ let inherit (config.system.build) earlyMountScript; - inherit (config.boot.initrd) checkJournalingFS + inherit (config.boot.initrd) checkJournalingFS verbose preLVMCommands preDeviceCommands postDeviceCommands postMountCommands preFailCommands kernelModules; resumeDevices = map (sd: if sd ? device then sd.device else "/dev/disk/by-label/${sd.label}") @@ -560,6 +560,23 @@ in description = "Names of supported filesystem types in the initial ramdisk."; }; + boot.initrd.verbose = mkOption { + default = true; + type = types.bool; + description = + '' + Verbosity of the initrd. Please note that disabling verbosity removes + only the mandatory messages generated by the NixOS scripts. For a + completely silent boot, you might also want to set the two following + configuration options: + + + boot.consoleLogLevel = 0; + boot.kernelParams = [ "quiet" "udev.log_priority=3" ]; + + ''; + }; + boot.loader.supportsInitrdSecrets = mkOption { internal = true; default = false; From b6dea43ad9d4ad2ce0e552b87b146bfe9a8c5e4c Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Thu, 28 Jan 2021 04:20:00 +0000 Subject: [PATCH 07/31] scheme-manpages: 2020-08-14 -> 2021-01-17 --- pkgs/data/documentation/scheme-manpages/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/data/documentation/scheme-manpages/default.nix b/pkgs/data/documentation/scheme-manpages/default.nix index 2915430d9f2..e9fa1b7e4f4 100644 --- a/pkgs/data/documentation/scheme-manpages/default.nix +++ b/pkgs/data/documentation/scheme-manpages/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "scheme-manpages-unstable"; - version = "2020-08-14"; + version = "2021-01-17"; src = fetchFromGitHub { owner = "schemedoc"; repo = "manpages"; - rev = "2e99a0aea9c0327e3c2dcfb9b7a2f8f528b4fe43"; - sha256 = "0ykj4i8mx50mgyz9q63glfnc0mw1lf89hwsflpnbizjda5b4s0fp"; + rev = "817798ccca81424e797fda0e218d53a95f50ded7"; + sha256 = "1amc0dmliz2a37pivlkx88jbc08ypfiwv3z477znx8khhc538glk"; }; dontBuild = true; From 20755fe00f3adacaa2640b714a8b97e616042c40 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Thu, 28 Jan 2021 04:20:00 +0000 Subject: [PATCH 08/31] postgresqlPackages.postgis: 3.1.0 -> 3.1.1 https://postgis.net/2021/01/28/postgis-3.1.1/ --- pkgs/servers/sql/postgresql/ext/postgis.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/postgis.nix b/pkgs/servers/sql/postgresql/ext/postgis.nix index 590aa6f2b6b..f3f7a4a6911 100644 --- a/pkgs/servers/sql/postgresql/ext/postgis.nix +++ b/pkgs/servers/sql/postgresql/ext/postgis.nix @@ -15,13 +15,13 @@ }: stdenv.mkDerivation rec { pname = "postgis"; - version = "3.1.0"; + version = "3.1.1"; outputs = [ "out" "doc" ]; src = fetchurl { url = "https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"; - sha256 = "008280ijd6m9h35y9lcpql0fk0h9f3zkc1pfkdm0rkbnd12y41ns"; + sha256 = "0z9a39243fv37mansbbjq5mmxpnhr7xzn8pv92fr7dkdb3psz5hf"; }; buildInputs = [ libxml2 postgresql geos proj gdal json_c protobufc ] From 683f0b8938fde2da7ad9567d9df622fe5c48491a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20=C5=BDlender?= Date: Thu, 28 Jan 2021 21:27:50 +0100 Subject: [PATCH 09/31] nixos/oci-containers: Use docker.package --- nixos/modules/virtualisation/oci-containers.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/virtualisation/oci-containers.nix b/nixos/modules/virtualisation/oci-containers.nix index ee9fe62187d..52c727f3683 100644 --- a/nixos/modules/virtualisation/oci-containers.nix +++ b/nixos/modules/virtualisation/oci-containers.nix @@ -217,7 +217,7 @@ let environment = proxy_env; path = - if cfg.backend == "docker" then [ pkgs.docker ] + if cfg.backend == "docker" then [ config.virtualisation.docker.package ] else if cfg.backend == "podman" then [ config.virtualisation.podman.package ] else throw "Unhandled backend: ${cfg.backend}"; From ea4de61c49eaf2d41990d5993ca5d5d45b4493d2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 29 Jan 2021 00:58:27 +0100 Subject: [PATCH 10/31] python3Packages.regenmaschine: init at 3.1.1 --- .../python-modules/regenmaschine/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/regenmaschine/default.nix diff --git a/pkgs/development/python-modules/regenmaschine/default.nix b/pkgs/development/python-modules/regenmaschine/default.nix new file mode 100644 index 00000000000..3380ef99f18 --- /dev/null +++ b/pkgs/development/python-modules/regenmaschine/default.nix @@ -0,0 +1,51 @@ +{ lib +, aiohttp +, aresponses +, asynctest +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytest-aiohttp +, pytest-asyncio +, pytest-cov +, pytest-mock +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "regenmaschine"; + version = "3.1.1"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "bachya"; + repo = pname; + rev = version; + sha256 = "0m6i7vspp8ssdk2k32kznql1j8gkp300kzb7pk67hzvpijdy3mca"; + }; + + nativeBuildInputs = [ poetry-core ]; + + propagatedBuildInputs = [ aiohttp ]; + + checkInputs = [ + aresponses + asynctest + pytest-aiohttp + pytest-asyncio + pytest-cov + pytest-mock + pytestCheckHook + ]; + + pythonImportsCheck = [ "regenmaschine" ]; + + __darwinAllowLocalNetworking = true; + + meta = with lib; { + description = "Python library for interacting with RainMachine smart sprinkler controllers"; + homepage = "https://github.com/bachya/regenmaschine"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 754e0d75310..deb9a3ee52a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6565,6 +6565,8 @@ in { reflink = callPackage ../development/python-modules/reflink { }; + regenmaschine = callPackage ../development/python-modules/regenmaschine { }; + regex = callPackage ../development/python-modules/regex { }; regional = callPackage ../development/python-modules/regional { }; From 8b080489d34cad7de38499a248f39dcd10aa9791 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 29 Jan 2021 00:58:57 +0100 Subject: [PATCH 11/31] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 3506998e194..85923799056 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -659,7 +659,7 @@ "rainbird" = ps: with ps; [ ]; # missing inputs: pyrainbird "raincloud" = ps: with ps; [ ]; # missing inputs: raincloudy "rainforest_eagle" = ps: with ps; [ ]; # missing inputs: eagle200_reader uEagle - "rainmachine" = ps: with ps; [ ]; # missing inputs: regenmaschine + "rainmachine" = ps: with ps; [ regenmaschine ]; "random" = ps: with ps; [ ]; "raspihats" = ps: with ps; [ smbus-cffi ]; # missing inputs: raspihats "raspyrfm" = ps: with ps; [ ]; # missing inputs: raspyrfm-client From 5baabf5f3249869e5dbe1a31922c39ac72b8aa43 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 29 Jan 2021 01:10:34 +0100 Subject: [PATCH 12/31] python3Packages.plugwise: init at 0.8.5 --- .../python-modules/plugwise/default.nix | 66 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 68 insertions(+) create mode 100644 pkgs/development/python-modules/plugwise/default.nix diff --git a/pkgs/development/python-modules/plugwise/default.nix b/pkgs/development/python-modules/plugwise/default.nix new file mode 100644 index 00000000000..f4be0e5140b --- /dev/null +++ b/pkgs/development/python-modules/plugwise/default.nix @@ -0,0 +1,66 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, aiohttp +, async-timeout +, crcmod +, defusedxml +, pyserial +, pytz +, python-dateutil +, semver +, jsonpickle +, mypy +, pytest-aiohttp +, pytest-asyncio +, pytest-cov +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "plugwise"; + version = "0.8.5"; + + src = fetchFromGitHub { + owner = pname; + repo = "python-plugwise"; + rev = version; + sha256 = "1gviyy31l1j8z0if2id3m13r43kw4mcgd8921813yfhmf174piq4"; + }; + + propagatedBuildInputs = [ + aiohttp + async-timeout + crcmod + defusedxml + pyserial + pytz + python-dateutil + semver + ]; + + checkInputs = [ + jsonpickle + mypy + pytest-aiohttp + pytest-asyncio + pytest-cov + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ "plugwise" ]; + + __darwinAllowLocalNetworking = true; + + meta = with lib; { + description = "Python module for Plugwise Smiles, Stretch and USB stick"; + longDescription = '' + XKNX is an asynchronous Python library for reading and writing KNX/IP + packets. It provides support for KNX/IP routing and tunneling devices. + ''; + homepage = "https://github.com/plugwise/python-plugwise"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8f2d5c92bf2..d307de3e884 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4876,6 +4876,8 @@ in { pluginbase = callPackage ../development/python-modules/pluginbase { }; + plugwise = callPackage ../development/python-modules/plugwise { }; + plumbum = callPackage ../development/python-modules/plumbum { }; ply = callPackage ../development/python-modules/ply { }; From a9259ed099f954bdad416496c641bc3651a0221d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 29 Jan 2021 01:11:04 +0100 Subject: [PATCH 13/31] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 97cd133ade9..4f1f2adacfd 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -621,7 +621,7 @@ "plaato" = ps: with ps; [ aiohttp-cors ]; "plant" = ps: with ps; [ sqlalchemy ]; "plex" = ps: with ps; [ aiohttp-cors plexapi plexauth plexwebsocket pysonos ]; - "plugwise" = ps: with ps; [ ]; # missing inputs: plugwise + "plugwise" = ps: with ps; [ plugwise ]; "plum_lightpad" = ps: with ps; [ ]; # missing inputs: plumlightpad "pocketcasts" = ps: with ps; [ ]; # missing inputs: pycketcasts "point" = ps: with ps; [ aiohttp-cors ]; # missing inputs: pypoint From cd6aa10b7518901daa9f238cd2e7940ca70d383d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 29 Jan 2021 01:55:14 +0100 Subject: [PATCH 14/31] python3Packages.aiocoap: init at 0.4b3 --- .../python-modules/aiocoap/default.nix | 31 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/python-modules/aiocoap/default.nix diff --git a/pkgs/development/python-modules/aiocoap/default.nix b/pkgs/development/python-modules/aiocoap/default.nix new file mode 100644 index 00000000000..dd74a21bf9b --- /dev/null +++ b/pkgs/development/python-modules/aiocoap/default.nix @@ -0,0 +1,31 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, python +}: + +buildPythonPackage rec { + pname = "aiocoap"; + version = "0.4b3"; + + src = fetchFromGitHub { + owner = "chrysn"; + repo = pname; + rev = version; + sha256 = "1zjg475xgvi19rqg7jmfgy5nfabq50aph0231p9jba211ps7cmxw"; + }; + + checkPhase = '' + ${python.interpreter} -m aiocoap.cli.defaults + ${python.interpreter} -m unittest discover -v + ''; + + pythonImportsCheck = [ "aiocoap" ]; + + meta = with lib; { + description = "Python CoAP library"; + homepage = "https://aiocoap.readthedocs.io/"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f902e97dbc3..11081fe130e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -196,6 +196,8 @@ in { aioamqp = callPackage ../development/python-modules/aioamqp { }; + aiocoap = callPackage ../development/python-modules/aiocoap { }; + aioconsole = callPackage ../development/python-modules/aioconsole { }; aiocontextvars = callPackage ../development/python-modules/aiocontextvars { }; From 866d0ae4e7cf45bfdd074e7759cb6aa99095312e Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 29 Jan 2021 06:23:52 +0000 Subject: [PATCH 15/31] mednaffe: 0.8.8 -> 0.9.0 --- pkgs/misc/emulators/mednaffe/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/emulators/mednaffe/default.nix b/pkgs/misc/emulators/mednaffe/default.nix index dbbbe4da557..7d0d6c6f68e 100644 --- a/pkgs/misc/emulators/mednaffe/default.nix +++ b/pkgs/misc/emulators/mednaffe/default.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation rec { pname = "mednaffe"; - version = "0.8.8"; + version = "0.9.0"; src = fetchFromGitHub { owner = "AmatCoder"; repo = "mednaffe"; rev = version; - sha256 = "15qk3a3l1phr8bap2ayh3c0vyvw2jwhny1iz1ajq2adyjpm9fhr7"; + sha256 = "sha256-BS/GNnRYj9klc4RRj7LwNikgApNttv4IyWPL694j+gM="; }; nativeBuildInputs = [ autoreconfHook pkg-config wrapGAppsHook ]; From 75e2f7ce6385bdb7097db942d1df4f20dfc90463 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Fri, 29 Jan 2021 09:59:40 +0100 Subject: [PATCH 16/31] gcc: fix armhf target Fixes #96921 --- lib/systems/examples.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index e8cf15479c0..be87fb1d069 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -131,6 +131,12 @@ rec { armhf-embedded = { config = "arm-none-eabihf"; libc = "newlib"; + # GCC8+ does not build without this + # (https://www.mail-archive.com/gcc-bugs@gcc.gnu.org/msg552339.html): + gcc = { + arch = "armv5t"; + fpu = "vfp"; + }; }; aarch64-embedded = { From d38b3b2e49debb4f22495f26686b75cdab692f54 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 29 Jan 2021 10:40:16 +0000 Subject: [PATCH 17/31] bpytop: 1.0.59 -> 1.0.61 --- pkgs/tools/system/bpytop/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/system/bpytop/default.nix b/pkgs/tools/system/bpytop/default.nix index b59222200c1..6754d0806b6 100644 --- a/pkgs/tools/system/bpytop/default.nix +++ b/pkgs/tools/system/bpytop/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "bpytop"; - version = "1.0.59"; + version = "1.0.61"; src = fetchFromGitHub { owner = "aristocratos"; repo = pname; rev = "v${version}"; - sha256 = "sha256-RlrUUIbZRNTvxU8LVW0/ZcARlKDVvSMlkN0+6BgAink="; + sha256 = "sha256-E6blMhDkZa3Wbdbsw7f8jdHwHFINOQ48XC5pQdkVPtQ="; }; buildInputs = [ makeWrapper ]; From 3f41fbc8e870a642e2dc5092554fc0421d0f4a8c Mon Sep 17 00:00:00 2001 From: Scriptkiddi Date: Fri, 29 Jan 2021 13:03:37 +0100 Subject: [PATCH 18/31] nixos/hoogle: add type --- nixos/modules/services/development/hoogle.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/development/hoogle.nix b/nixos/modules/services/development/hoogle.nix index 6d6c88b9b2a..bd55483f46d 100644 --- a/nixos/modules/services/development/hoogle.nix +++ b/nixos/modules/services/development/hoogle.nix @@ -41,6 +41,7 @@ in { haskellPackages = mkOption { description = "Which haskell package set to use."; default = pkgs.haskellPackages; + type = types.package; defaultText = "pkgs.haskellPackages"; }; From 679e369ba26ea24659f5594e358688874c4f46da Mon Sep 17 00:00:00 2001 From: Scriptkiddi Date: Fri, 29 Jan 2021 13:04:50 +0100 Subject: [PATCH 19/31] nixos/hostapd: add interface type --- nixos/modules/services/networking/hostapd.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/networking/hostapd.nix b/nixos/modules/services/networking/hostapd.nix index e9569b2ba6b..f719ff59cc7 100644 --- a/nixos/modules/services/networking/hostapd.nix +++ b/nixos/modules/services/networking/hostapd.nix @@ -68,6 +68,7 @@ in interface = mkOption { default = ""; example = "wlp2s0"; + type = types.str; description = '' The interfaces hostapd will use. ''; From 54f8b31971cfa54eb183d3a5794521e6ddc96ccd Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 29 Jan 2021 06:14:08 -0800 Subject: [PATCH 20/31] ayatana-ido: 0.8.1 -> 0.8.2 (#111147) --- pkgs/development/libraries/ayatana-ido/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/ayatana-ido/default.nix b/pkgs/development/libraries/ayatana-ido/default.nix index 60417426f76..03b89411168 100644 --- a/pkgs/development/libraries/ayatana-ido/default.nix +++ b/pkgs/development/libraries/ayatana-ido/default.nix @@ -5,13 +5,13 @@ stdenv.mkDerivation rec { pname = "ayatana-ido"; - version = "0.8.1"; + version = "0.8.2"; src = fetchFromGitHub { owner = "AyatanaIndicators"; repo = pname; rev = version; - sha256 = "1mcw6gmacrzx4cyg4223dpwcmj3qf8l30mxsg43292lajzwsm2hz"; + sha256 = "sha256-nJ4F2faK0XZPj9GzUk3Ueap5h6rALFXISHqFQ30RuoU="; }; nativeBuildInputs = [ pkg-config autoreconfHook gtk-doc vala gobject-introspection ]; From c9e9792dbf274a84a9e42318f30dfbc33f8bb7bc Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 29 Jan 2021 17:13:41 +0100 Subject: [PATCH 21/31] inxi: 3.2.02-2 -> 3.3.00-1 --- pkgs/tools/system/inxi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/system/inxi/default.nix b/pkgs/tools/system/inxi/default.nix index 1ef871c9d30..7f24be893bf 100644 --- a/pkgs/tools/system/inxi/default.nix +++ b/pkgs/tools/system/inxi/default.nix @@ -22,13 +22,13 @@ let ++ recommendedDisplayInformationPrograms; in stdenv.mkDerivation rec { pname = "inxi"; - version = "3.2.02-2"; + version = "3.3.00-1"; src = fetchFromGitHub { owner = "smxi"; repo = "inxi"; rev = version; - sha256 = "sha256-WHfW0empveOxC3jvYq46jlvVZDb8JLne5JHPtFE6nTs="; + sha256 = "sha256-P1AYo4Ao9lDxJXyZd64wBxNgQIvEcT00ThjtcB2v52I="; }; buildInputs = [ perl makeWrapper ]; From b7882e26df4af0dfe7a05e99ef0d4d61d549b354 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Fri, 29 Jan 2021 11:06:04 -0500 Subject: [PATCH 22/31] python3Packages.botocore: 1.19.61 -> 1.19.62 --- pkgs/development/python-modules/botocore/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/botocore/default.nix b/pkgs/development/python-modules/botocore/default.nix index 8727b672a72..1b0f2a347d0 100644 --- a/pkgs/development/python-modules/botocore/default.nix +++ b/pkgs/development/python-modules/botocore/default.nix @@ -12,11 +12,11 @@ buildPythonPackage rec { pname = "botocore"; - version = "1.19.61"; # N.B: if you change this, change boto3 and awscli to a matching version + version = "1.19.62"; # N.B: if you change this, change boto3 and awscli to a matching version src = fetchPypi { inherit pname version; - sha256 = "sha256-MkXJ6ZYUO8/epz0QUUXKcz/NfVr+dEqHYGEvxEnD+BA="; + sha256 = "sha256-KbS5vltA85KgM5JsCMAEwBvWRxOE728S6qSe44cKAQw="; }; propagatedBuildInputs = [ From 999db28127e1b32d196d6a7c97017a4385fad342 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Fri, 29 Jan 2021 11:06:17 -0500 Subject: [PATCH 23/31] python3Packages.boto3: 1.16.61 -> 1.16.62 --- pkgs/development/python-modules/boto3/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/boto3/default.nix b/pkgs/development/python-modules/boto3/default.nix index 81c8e957814..41d0ed5f81d 100644 --- a/pkgs/development/python-modules/boto3/default.nix +++ b/pkgs/development/python-modules/boto3/default.nix @@ -13,11 +13,11 @@ buildPythonPackage rec { pname = "boto3"; - version = "1.16.61"; # N.B: if you change this, change botocore too + version = "1.16.62"; # N.B: if you change this, change botocore too src = fetchPypi { inherit pname version; - sha256 = "sha256-OPUD8FAqukJR3/TRkFfDGnud0PVDM99VIfiTHuTGXiY="; + sha256 = "sha256-u5H+z5guG7+2i7a9LJoMzjyErG+X3TONHvnkd4BnkJE="; }; propagatedBuildInputs = [ botocore jmespath s3transfer ] ++ lib.optionals (!isPy3k) [ futures ]; From c78daf764b7320b39a538b86663184bef2592e25 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Fri, 29 Jan 2021 11:08:39 -0500 Subject: [PATCH 24/31] awscli: 1.18.221 -> 1.18.222 --- pkgs/tools/admin/awscli/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/admin/awscli/default.nix b/pkgs/tools/admin/awscli/default.nix index 5b437e06afc..322830aaa2c 100644 --- a/pkgs/tools/admin/awscli/default.nix +++ b/pkgs/tools/admin/awscli/default.nix @@ -28,11 +28,11 @@ let in with py.pkgs; buildPythonApplication rec { pname = "awscli"; - version = "1.18.221"; # N.B: if you change this, change botocore to a matching version too + version = "1.18.222"; # N.B: if you change this, change botocore to a matching version too src = fetchPypi { inherit pname version; - sha256 = "sha256-G8HonN02eFcfMRhj9+cporugVsF7nDeHEopuHnbS1Is="; + sha256 = "sha256-nVBQ2Lj5+zyvj3g0W3Rxh+CZwG7sbqKehvg6vAhHexs="; }; postPatch = '' From 40463bfd03e14cbe1aaac161e0d6ebe40b241675 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Fri, 29 Jan 2021 16:11:16 +0000 Subject: [PATCH 25/31] =?UTF-8?q?jenkins:=202.263.2=20=E2=86=92=202.263.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/continuous-integration/jenkins/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/continuous-integration/jenkins/default.nix b/pkgs/development/tools/continuous-integration/jenkins/default.nix index adfc6a2580a..d9eef5e3c4e 100644 --- a/pkgs/development/tools/continuous-integration/jenkins/default.nix +++ b/pkgs/development/tools/continuous-integration/jenkins/default.nix @@ -1,13 +1,13 @@ -{ lib, stdenv, fetchurl, common-updater-scripts, coreutils, git, gnused, nix, nixfmt -, writeScript, nixosTests, jq, cacert, curl }: +{ lib, stdenv, fetchurl, common-updater-scripts, coreutils, git, gnused, nix +, nixfmt, writeScript, nixosTests, jq, cacert, curl }: stdenv.mkDerivation rec { pname = "jenkins"; - version = "2.263.2"; + version = "2.263.3"; src = fetchurl { url = "http://mirrors.jenkins.io/war-stable/${version}/jenkins.war"; - sha256 = "13l7y1307iv54z2zsjy0slzv2hpqv9i35qb15xa8s6sl7lcm9l49"; + sha256 = "0lyzmv378yjz4p4dlpm1nwdq4p781nycvspdik82xbxg4s6gamd3"; }; buildCommand = '' From 2c0b72cae5c5c5c9fc218d0e17e767e4bdc1b6c6 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 29 Jan 2021 17:19:33 +0100 Subject: [PATCH 26/31] cargo-c: 0.7.1 -> 0.7.2 --- pkgs/development/tools/rust/cargo-c/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-c/default.nix b/pkgs/development/tools/rust/cargo-c/default.nix index 7b9aa5cf610..c468ad0f4e1 100644 --- a/pkgs/development/tools/rust/cargo-c/default.nix +++ b/pkgs/development/tools/rust/cargo-c/default.nix @@ -5,7 +5,7 @@ rustPlatform.buildRustPackage rec { pname = "cargo-c"; - version = "0.7.1"; + version = "0.7.2"; src = stdenv.mkDerivation rec { name = "${pname}-source-${version}"; @@ -14,11 +14,11 @@ rustPlatform.buildRustPackage rec { owner = "lu-zero"; repo = pname; rev = "v${version}"; - sha256 = "1a348ys4lbgsr23px81kw985i5bp8z75wgzl9l2jv9sdzirpb8k4"; + sha256 = "1rgwj3kf31n4rz0b7jw67wsgyapdycfic7plm5gm4n9rlslp5ax5"; }; cargoLock = fetchurl { url = "https://github.com/lu-zero/${pname}/releases/download/v${version}/Cargo.lock"; - sha256 = "1f78wlid8jx26pqybmafzcl1656nnp87hdiib0v1p5k73mk4ymvy"; + sha256 = "0jnawnkf4m7cqcq9iahnxa53l61a5riax400n96vxrqf3fa752c6"; }; installPhase = '' @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { ''; }; - cargoSha256 = "1nj54igm57h9d8hhqdgkay2nnblcdxhpnha68jqvjazd8a0bq3la"; + cargoSha256 = "0svmhq64aqw1vidq8jmw7w4xhhnyp04vcs9yzhjyz25c4cn9grsf"; nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] From ede24160fc86c4e73b7439db6e539f4a1e5a4890 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20=C5=BDlender?= Date: Thu, 28 Jan 2021 21:28:01 +0100 Subject: [PATCH 27/31] nixos/oci-containers: Remove dep on system.path --- .../modules/virtualisation/oci-containers.nix | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/nixos/modules/virtualisation/oci-containers.nix b/nixos/modules/virtualisation/oci-containers.nix index 52c727f3683..2dd15e3aba4 100644 --- a/nixos/modules/virtualisation/oci-containers.nix +++ b/nixos/modules/virtualisation/oci-containers.nix @@ -227,29 +227,30 @@ let ${cfg.backend} load -i ${container.imageFile} ''} ''; + + script = concatStringsSep " \\\n " ([ + "exec ${cfg.backend} run" + "--rm" + "--name=${escapeShellArg name}" + "--log-driver=${container.log-driver}" + ] ++ optional (container.entrypoint != null) + "--entrypoint=${escapeShellArg container.entrypoint}" + ++ (mapAttrsToList (k: v: "-e ${escapeShellArg k}=${escapeShellArg v}") container.environment) + ++ map (p: "-p ${escapeShellArg p}") container.ports + ++ optional (container.user != null) "-u ${escapeShellArg container.user}" + ++ map (v: "-v ${escapeShellArg v}") container.volumes + ++ optional (container.workdir != null) "-w ${escapeShellArg container.workdir}" + ++ map escapeShellArg container.extraOptions + ++ [container.image] + ++ map escapeShellArg container.cmd + ); + + preStop = "[ $SERVICE_RESULT = success ] || ${cfg.backend} stop ${name}"; postStop = "${cfg.backend} rm -f ${name} || true"; serviceConfig = { StandardOutput = "null"; StandardError = "null"; - ExecStart = concatStringsSep " \\\n " ([ - "${config.system.path}/bin/${cfg.backend} run" - "--rm" - "--name=${name}" - "--log-driver=${container.log-driver}" - ] ++ optional (container.entrypoint != null) - "--entrypoint=${escapeShellArg container.entrypoint}" - ++ (mapAttrsToList (k: v: "-e ${escapeShellArg k}=${escapeShellArg v}") container.environment) - ++ map (p: "-p ${escapeShellArg p}") container.ports - ++ optional (container.user != null) "-u ${escapeShellArg container.user}" - ++ map (v: "-v ${escapeShellArg v}") container.volumes - ++ optional (container.workdir != null) "-w ${escapeShellArg container.workdir}" - ++ map escapeShellArg container.extraOptions - ++ [container.image] - ++ map escapeShellArg container.cmd - ); - - ExecStop = ''${pkgs.bash}/bin/sh -c "[ $SERVICE_RESULT = success ] || ${cfg.backend} stop ${name}"''; ### There is no generalized way of supporting `reload` for docker ### containers. Some containers may respond well to SIGHUP sent to their From 6021ab7820998ada6594ae0ad7808eaf6eeb3e3b Mon Sep 17 00:00:00 2001 From: Svein Ove Aas Date: Wed, 14 Oct 2020 15:24:48 +0100 Subject: [PATCH 28/31] nvidia: Add AMD APU option for Prime --- nixos/modules/hardware/video/nvidia.nix | 39 ++++++++++++++++++++----- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index d1cf7d05c1b..f8efced5364 100644 --- a/nixos/modules/hardware/video/nvidia.nix +++ b/nixos/modules/hardware/video/nvidia.nix @@ -96,6 +96,16 @@ in ''; }; + hardware.nvidia.prime.amdgpuBusId = mkOption { + type = types.str; + default = ""; + example = "PCI:4:0:0"; + description = '' + Bus ID of the AMD APU. You can find it using lspci; for example if lspci + shows the AMD APU at "04:00.0", set this option to "PCI:4:0:0". + ''; + }; + hardware.nvidia.prime.sync.enable = mkOption { type = types.bool; default = false; @@ -153,7 +163,10 @@ in }; }; - config = mkIf enabled { + config = let + igpuDriver = if pCfg.intelBusId != "" then "modesetting" else "amdgpu"; + igpuBusId = if pCfg.intelBusId != "" then pCfg.intelBusId else pCfg.amdgpuBusId; + in mkIf enabled { assertions = [ { assertion = with config.services.xserver.displayManager; gdm.nvidiaWayland -> cfg.modesetting.enable; @@ -161,7 +174,13 @@ in } { - assertion = primeEnabled -> pCfg.nvidiaBusId != "" && pCfg.intelBusId != ""; + assertion = primeEnabled -> pCfg.intelBusId == "" || pCfg.amdgpuBusId == ""; + message = '' + You cannot configure both an Intel iGPU and an AMD APU. Pick the one corresponding to your processor. + ''; + } + { + assertion = primeEnabled -> pCfg.nvidiaBusId != "" && (pCfg.intelBusId != "" || pCfg.amdgpuBusId != ""); message = '' When NVIDIA PRIME is enabled, the GPU bus IDs must configured. ''; @@ -183,18 +202,22 @@ in # "nvidia" driver, in order to allow the X server to start without any outputs. # - Add a separate Device section for the Intel GPU, using the "modesetting" # driver and with the configured BusID. + # - OR add a separate Device section for the AMD APU, using the "amdgpu" + # driver and with the configures BusID. # - Reference that Device section from the ServerLayout section as an inactive # device. # - Configure the display manager to run specific `xrandr` commands which will - # configure/enable displays connected to the Intel GPU. + # configure/enable displays connected to the Intel iGPU / AMD APU. services.xserver.useGlamor = mkDefault offloadCfg.enable; - services.xserver.drivers = optional primeEnabled { - name = "modesetting"; + services.xserver.drivers = let + in optional primeEnabled { + name = igpuDriver; display = offloadCfg.enable; + modules = optional (igpuDriver == "amdgpu") [ pkgs.xorg.xf86videoamdgpu ]; deviceSection = '' - BusID "${pCfg.intelBusId}" + BusID "${igpuBusId}" ${optionalString syncCfg.enable ''Option "AccelMethod" "none"''} ''; } ++ singleton { @@ -214,14 +237,14 @@ in }; services.xserver.serverLayoutSection = optionalString syncCfg.enable '' - Inactive "Device-modesetting[0]" + Inactive "Device-${igpuDriver}[0]" '' + optionalString offloadCfg.enable '' Option "AllowNVIDIAGPUScreens" ''; services.xserver.displayManager.setupCommands = optionalString syncCfg.enable '' # Added by nvidia configuration module for Optimus/PRIME. - ${pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource modesetting NVIDIA-0 + ${pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource ${igpuDriver} NVIDIA-0 ${pkgs.xorg.xrandr}/bin/xrandr --auto ''; From c9f888459267509a57707d15874ceac44533e2cd Mon Sep 17 00:00:00 2001 From: Svein Ove Aas Date: Wed, 14 Oct 2020 16:17:53 +0100 Subject: [PATCH 29/31] nVidia: Support dynamic (fine-grained) power management --- nixos/modules/hardware/video/nvidia.nix | 41 ++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index f8efced5364..72eb9fcfaa6 100644 --- a/nixos/modules/hardware/video/nvidia.nix +++ b/nixos/modules/hardware/video/nvidia.nix @@ -63,6 +63,15 @@ in ''; }; + hardware.nvidia.powerManagement.finegrained = mkOption { + type = types.bool; + default = false; + description = '' + Experimental power management of PRIME offload. For more information, see + the NVIDIA docs, chapter 22. PCI-Express runtime power management. + ''; + }; + hardware.nvidia.modesetting.enable = mkOption { type = types.bool; default = false; @@ -193,6 +202,14 @@ in assertion = !(syncCfg.enable && offloadCfg.enable); message = "Only one NVIDIA PRIME solution may be used at a time."; } + { + assertion = !(syncCfg.enable && cfg.powerManagement.finegrained); + message = "Sync precludes powering down the NVIDIA GPU."; + } + { + assertion = cfg.powerManagement.enable -> offloadCfg.enable; + message = "Fine-grained power management requires offload to be enabled."; + } ]; # If Optimus/PRIME is enabled, we: @@ -228,6 +245,7 @@ in '' BusID "${pCfg.nvidiaBusId}" ${optionalString syncCfg.allowExternalGpu "Option \"AllowExternalGpus\""} + ${optionalString cfg.powerManagement.finegrained "Option \"NVreg_DynamicPowerManagement=0x02\""} ''; screenSection = '' @@ -315,16 +333,37 @@ in boot.kernelParams = optional (offloadCfg.enable || cfg.modesetting.enable) "nvidia-drm.modeset=1" ++ optional cfg.powerManagement.enable "nvidia.NVreg_PreserveVideoMemoryAllocations=1"; - # Create /dev/nvidia-uvm when the nvidia-uvm module is loaded. services.udev.extraRules = '' + # Create /dev/nvidia-uvm when the nvidia-uvm module is loaded. KERNEL=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidiactl c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 255'" KERNEL=="nvidia_modeset", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-modeset c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 254'" KERNEL=="card*", SUBSYSTEM=="drm", DRIVERS=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia%n c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) %n'" KERNEL=="nvidia_uvm", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-uvm c $$(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0'" KERNEL=="nvidia_uvm", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-uvm-tools c $$(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0'" + '' + optionalString cfg.powerManagement.finegrained '' + # Remove NVIDIA USB xHCI Host Controller devices, if present + ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{remove}="1" + + # Remove NVIDIA USB Type-C UCSI devices, if present + ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{remove}="1" + + # Remove NVIDIA Audio devices, if present + ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{remove}="1" + + # Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind + ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto" + ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="auto" + + # Disable runtime PM for NVIDIA VGA/3D controller devices on driver unbind + ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="on" + ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="on" ''; + boot.extraModprobeConfig = mkIf cfg.powerManagement.finegrained '' + options nvidia "NVreg_DynamicPowerManagement=0x02" + ''; + boot.blacklistedKernelModules = [ "nouveau" "nvidiafb" ]; services.acpid.enable = true; From dfb2bc857bb3ab28433eb3c76685481947d49e34 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Fri, 29 Jan 2021 18:56:05 +0100 Subject: [PATCH 30/31] nixos/acme: fix docs --- nixos/modules/security/acme.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/security/acme.xml b/nixos/modules/security/acme.xml index f9b1449e53d..a78ff05f2ea 100644 --- a/nixos/modules/security/acme.xml +++ b/nixos/modules/security/acme.xml @@ -119,7 +119,7 @@ services.nginx = { # /var/lib/acme/.challenges must be writable by the ACME user # and readable by the Nginx user. The easiest way to achieve # this is to add the Nginx user to the ACME group. -users.users.nginx.extraGroups = [ "acme" ]; +users.users.nginx.extraGroups = [ "acme" ]; services.nginx = { enable = true; @@ -137,7 +137,7 @@ services.nginx = { }; } # Alternative config for Apache -users.users.wwwrun.extraGroups = [ "acme" ]; +users.users.wwwrun.extraGroups = [ "acme" ]; services.httpd = { enable = true; virtualHosts = { From 552d7182874ef1b8fcf25c55d3777719a5ec7bfb Mon Sep 17 00:00:00 2001 From: Milan Date: Fri, 29 Jan 2021 19:04:17 +0100 Subject: [PATCH 31/31] qutebrowser: 1.14.1 -> 2.0.1 (#108272) --- .../networking/browsers/qutebrowser/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/networking/browsers/qutebrowser/default.nix b/pkgs/applications/networking/browsers/qutebrowser/default.nix index 35130ab3393..36883faab14 100644 --- a/pkgs/applications/networking/browsers/qutebrowser/default.nix +++ b/pkgs/applications/networking/browsers/qutebrowser/default.nix @@ -31,12 +31,12 @@ let in mkDerivationWith python3Packages.buildPythonApplication rec { pname = "qutebrowser"; - version = "1.14.1"; + version = "2.0.1"; # the release tarballs are different from the git checkout! src = fetchurl { url = "https://github.com/qutebrowser/qutebrowser/releases/download/v${version}/${pname}-${version}.tar.gz"; - sha256 = "15l7jphy1qjsh6y6kd5mgkxsl6ymm9564g1yypa946jbyrgi8k2m"; + sha256 = "0hmj19bp5dihzpphxz77377yfmygj498am0h23kxg5m3y5hqv65a"; }; # Needs tox @@ -55,13 +55,16 @@ in mkDerivationWith python3Packages.buildPythonApplication rec { docbook_xml_dtd_45 docbook_xsl libxml2 libxslt ]; - propagatedBuildInputs = with python3Packages; [ + propagatedBuildInputs = with python3Packages; ([ pyyaml backendPackage jinja2 pygments - pypeg2 cssutils pyopengl attrs setuptools # scripts and userscripts libs tldextract beautifulsoup4 pyreadability pykeepass stem - ]; + # extensive ad blocking + adblock + ] + ++ lib.optional (pythonOlder "3.9") importlib-resources + ); patches = [ ./fix-restart.patch ];