From 781987f98387b741ca27ee7d8aa67555d6128c0a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 25 Dec 2023 06:23:22 +0000 Subject: [PATCH 001/236] yo: 4.3.1 -> 5.0.0 --- pkgs/development/tools/yo/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/yo/default.nix b/pkgs/development/tools/yo/default.nix index 325939a7609b..64d08cf7472c 100644 --- a/pkgs/development/tools/yo/default.nix +++ b/pkgs/development/tools/yo/default.nix @@ -5,16 +5,16 @@ buildNpmPackage rec { pname = "yo"; - version = "4.3.1"; + version = "5.0.0"; src = fetchFromGitHub { owner = "yeoman"; repo = "yo"; rev = "v${version}"; - hash = "sha256-vnvcg3hvAYcqS11enBEHtpTwTOy4puY5i/6zPOHCywo="; + hash = "sha256-0UkDANW58OZcEXGAgZ0Omob2AWyO6WszbN1nHLavdsM="; }; - npmDepsHash = "sha256-QkEPaepvI6NfEEmqnVA4Xx/tByn6goyGWVpoJNMigd8="; + npmDepsHash = "sha256-z0ZYrIk7FJXBsZJ72LiBWXJMI7FrCP/EjSTgqis+zIs="; dontNpmBuild = true; From 1568b766c49ed1c1edca86561fc145580008d96b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 8 Aug 2024 00:20:15 +0000 Subject: [PATCH 002/236] oneDNN: 3.5 -> 3.5.3 --- pkgs/development/libraries/oneDNN/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/oneDNN/default.nix b/pkgs/development/libraries/oneDNN/default.nix index a5eeb4a19308..b8081353ed1c 100644 --- a/pkgs/development/libraries/oneDNN/default.nix +++ b/pkgs/development/libraries/oneDNN/default.nix @@ -9,13 +9,13 @@ # https://github.com/oneapi-src/oneDNN#oneapi-deep-neural-network-library-onednn stdenv.mkDerivation (finalAttrs: { pname = "oneDNN"; - version = "3.5"; + version = "3.5.3"; src = fetchFromGitHub { owner = "oneapi-src"; repo = "oneDNN"; rev = "v${finalAttrs.version}"; - hash = "sha256-IOS5w84/Dnwjqgk5Lf6o6P1l9q5KBUUll250B1mh/Gc="; + hash = "sha256-/ERkk6bgGEKoJEVdnBxMFEzB8pii71t3zQZNtyg+TdQ="; }; outputs = [ "out" "dev" "doc" ]; From 3b3cb4c2d18cc0683009e3e44ca5a6cec745c7af Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Aug 2024 23:47:31 +0000 Subject: [PATCH 003/236] python312Packages.glyphslib: 6.7.2 -> 6.8.2 --- pkgs/development/python-modules/glyphslib/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/glyphslib/default.nix b/pkgs/development/python-modules/glyphslib/default.nix index 043fce83f167..f490c9328fb1 100644 --- a/pkgs/development/python-modules/glyphslib/default.nix +++ b/pkgs/development/python-modules/glyphslib/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "glyphslib"; - version = "6.7.2"; + version = "6.8.2"; format = "pyproject"; @@ -25,7 +25,7 @@ buildPythonPackage rec { owner = "googlefonts"; repo = "glyphsLib"; rev = "refs/tags/v${version}"; - hash = "sha256-wiDLFRoP7MBzZuDA5drdXPS58Mhrw83xUKES3b1tBow="; + hash = "sha256-AcAk9lFueIWYsDK1ESSK6D0/i1qW7udDfUa1pFRqGQs="; }; nativeBuildInputs = [ setuptools-scm ]; From e3b0aa3cf132d4f078a94ccd7d7d16a31bf57803 Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Thu, 29 Aug 2024 19:17:22 +0200 Subject: [PATCH 004/236] matterbridge: 1.26.0 -> 1.26.0-unstable-2024-08-27 Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> --- pkgs/servers/matterbridge/default.nix | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/pkgs/servers/matterbridge/default.nix b/pkgs/servers/matterbridge/default.nix index 023bbe9ddc1e..d847c02f3aa2 100644 --- a/pkgs/servers/matterbridge/default.nix +++ b/pkgs/servers/matterbridge/default.nix @@ -1,25 +1,29 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ + lib, + buildGoModule, + fetchFromGitHub, +}: -buildGoModule rec { +buildGoModule { pname = "matterbridge"; - version = "1.26.0"; + version = "1.26.0-unstable-2024-08-27"; src = fetchFromGitHub { owner = "42wim"; - repo = pname; - rev = "v${version}"; - sha256 = "sha256-APlnJUu/ttK/S2AxO+SadU2ttmEnU+js/3GUf3x0aSQ="; + repo = "matterbridge"; + rev = "c4157a4d5b49fce79c80a30730dc7c404bacd663"; + hash = "sha256-ZnNVDlrkZd/I0NWmQMZzJ3RIruH0ARoVKJ4EyYVdMiw="; }; subPackages = [ "." ]; vendorHash = null; - meta = with lib; { + meta = { description = "Simple bridge between Mattermost, IRC, XMPP, Gitter, Slack, Discord, Telegram, Rocket.Chat, Hipchat(via xmpp), Matrix and Steam"; homepage = "https://github.com/42wim/matterbridge"; - license = with licenses; [ asl20 ]; - maintainers = with maintainers; [ ryantm ]; + license = with lib.licenses; [ asl20 ]; + maintainers = with lib.maintainers; [ ryantm ]; mainProgram = "matterbridge"; }; } From 6b82acb5777839889fa63adcd23c788e14aa996b Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Thu, 29 Aug 2024 19:18:30 +0200 Subject: [PATCH 005/236] matterbridge: move to by-name Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> --- .../default.nix => by-name/ma/matterbridge/package.nix} | 0 pkgs/top-level/all-packages.nix | 1 - 2 files changed, 1 deletion(-) rename pkgs/{servers/matterbridge/default.nix => by-name/ma/matterbridge/package.nix} (100%) diff --git a/pkgs/servers/matterbridge/default.nix b/pkgs/by-name/ma/matterbridge/package.nix similarity index 100% rename from pkgs/servers/matterbridge/default.nix rename to pkgs/by-name/ma/matterbridge/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4be7ec3ca2cd..a9d2c5cd6d5c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25137,7 +25137,6 @@ with pkgs; mattermost = callPackage ../servers/mattermost { }; matterircd = callPackage ../servers/mattermost/matterircd.nix { }; - matterbridge = callPackage ../servers/matterbridge { }; mattermost-desktop = callPackage ../applications/networking/instant-messengers/mattermost-desktop { }; From 1a4a2e7757c663c3cd10a31c6dde4d53e4f92144 Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Mon, 2 Sep 2024 17:50:09 +0200 Subject: [PATCH 006/236] json2ts: init at v15.0.2 --- pkgs/by-name/js/json2ts/package.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 pkgs/by-name/js/json2ts/package.nix diff --git a/pkgs/by-name/js/json2ts/package.nix b/pkgs/by-name/js/json2ts/package.nix new file mode 100644 index 000000000000..38243c4d4a2f --- /dev/null +++ b/pkgs/by-name/js/json2ts/package.nix @@ -0,0 +1,25 @@ +{ + buildNpmPackage, + fetchFromGitHub, + lib, +}: +buildNpmPackage { + name = "json2ts"; + version = "15.0.2"; + src = fetchFromGitHub { + owner = "bcherny"; + repo = "json-schema-to-typescript"; + rev = "118d6a8e7a5a9397d1d390ce297f127ae674a623"; + hash = "sha256-ldAFfw3E0A0lIJyDSsshgPRPR7OmV/FncPsDhC3waT8="; + }; + npmDepsHash = "sha256-kLKau4SBxI9bMAd7X8/FQfCza2sYl/+0bg2LQcOQIJo="; + + meta = with lib; { + mainProgram = "json2ts"; + description = "Compile JSON Schema to TypeScript type declarations"; + homepage = "https://github.com/bcherny/json-schema-to-typescript"; + license = licenses.mit; + maintainers = with maintainers; [ hsjobeki ]; + platforms = platforms.all; + }; +} From 05e1a4189f3c14c8f6a2e69eebe2f6694151b00a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 5 Sep 2024 02:00:11 +0000 Subject: [PATCH 007/236] onlyoffice-documentserver: 8.1.1 -> 8.1.3 --- pkgs/servers/onlyoffice-documentserver/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/onlyoffice-documentserver/default.nix b/pkgs/servers/onlyoffice-documentserver/default.nix index 278259459a54..8cc68f6e502d 100644 --- a/pkgs/servers/onlyoffice-documentserver/default.nix +++ b/pkgs/servers/onlyoffice-documentserver/default.nix @@ -15,11 +15,11 @@ let # var/www/onlyoffice/documentserver/server/DocService/docservice onlyoffice-documentserver = stdenv.mkDerivation rec { pname = "onlyoffice-documentserver"; - version = "8.1.1"; + version = "8.1.3"; src = fetchurl { url = "https://github.com/ONLYOFFICE/DocumentServer/releases/download/v${lib.concatStringsSep "." (lib.take 3 (lib.splitVersion version))}/onlyoffice-documentserver_amd64.deb"; - sha256 = "sha256-YzGImBG/CkJqKrZwQQ/mgptasxqYgmmE2ivzbYzbz9M="; + sha256 = "sha256-jCwcXb97Z9/ZofKLYneJxKAnaZE/Hwvm34GLQu/BoUM="; }; preferLocalBuild = true; From 38de19423f182ef9a0a1ad61d1643e5ce5ef6482 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 5 Sep 2024 04:52:27 +0000 Subject: [PATCH 008/236] coder: 2.13.5 -> 2.14.2 --- pkgs/development/tools/coder/default.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgs/development/tools/coder/default.nix b/pkgs/development/tools/coder/default.nix index 74044655dc2b..47d35842ac95 100644 --- a/pkgs/development/tools/coder/default.nix +++ b/pkgs/development/tools/coder/default.nix @@ -14,15 +14,6 @@ let channels = { stable = { - version = "2.13.5"; - hash = { - x86_64-linux = "sha256-drg19B1YTjpLvKDGE8B38T08KyMvuoAse5hQzDaJn5k="; - x86_64-darwin = "sha256-wj1zW6pJBx7eTFxdjBNiS6g+uixCUd1+O969K4JDj1k="; - aarch64-linux = "sha256-z2iiz5RWoVsDkwKCvDYbFRsLyiIBhJKrCo6p8d4ImMg="; - aarch64-darwin = "sha256-akuXh/izu9S9UQfIWhfdfcuez4FhZBz5PE5g9WmtpoQ="; - }; - }; - mainline = { version = "2.14.2"; hash = { x86_64-linux = "sha256-Qglz8F80QICwWOVwDELegewYHkPhhrTEuGKJgiw2mYg="; @@ -31,6 +22,15 @@ let aarch64-darwin = "sha256-+lFWz6qDuhtDNn7DID/lmpqltpEwftVP3U+2CseVMnY="; }; }; + mainline = { + version = "2.15.0"; + hash = { + x86_64-linux = "sha256-zM5l3vkLKuDdZHTgVTYfvfYTGLCpDnA2GZDh5PLQ9rs="; + x86_64-darwin = "sha256-AbW92RMaPfusve5DxRaT3npeN2zVzrBOBL3XGN8235I="; + aarch64-linux = "sha256-13FZc1zMmaxfDp0bXBFzf2gcO6wkiA932C5m9oon2GQ="; + aarch64-darwin = "sha256-UP08DncRvM1NjtMOfanDnXGySK1RrCUta5lbIvJ7vto="; + }; + }; }; in stdenvNoCC.mkDerivation (finalAttrs: { From 9eb4a94051305b2cfb24d715ee51392bee118643 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 5 Sep 2024 21:54:24 +0000 Subject: [PATCH 009/236] luigi: 3.5.1 -> 3.5.2 --- pkgs/applications/networking/cluster/luigi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/luigi/default.nix b/pkgs/applications/networking/cluster/luigi/default.nix index 6a01cb5134cd..60373a8f85fc 100644 --- a/pkgs/applications/networking/cluster/luigi/default.nix +++ b/pkgs/applications/networking/cluster/luigi/default.nix @@ -2,11 +2,11 @@ python3.pkgs.buildPythonApplication rec { pname = "luigi"; - version = "3.5.1"; + version = "3.5.2"; src = fetchPypi { inherit pname version; - hash = "sha256-/HkLJ0dRXdGcZz77uOTJrOX0xc3DH45/k9xmfesuxsg="; + hash = "sha256-0AD+am6nfJN2Z0/oegRawAw/z36+hBRlWgZjCqnbURE="; }; propagatedBuildInputs = with python3.pkgs; [ python-dateutil tornado python-daemon boto3 tenacity ]; From 61530c4b3e07c6f595da6999112b7a33b70341b3 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 6 Sep 2024 00:35:57 +0000 Subject: [PATCH 010/236] csound-qt: 1.1.1 -> 1.1.2 --- pkgs/applications/audio/csound/csound-qt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/csound/csound-qt/default.nix b/pkgs/applications/audio/csound/csound-qt/default.nix index c2c9432eaeb0..a747cb2e14d7 100644 --- a/pkgs/applications/audio/csound/csound-qt/default.nix +++ b/pkgs/applications/audio/csound/csound-qt/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { pname = "csound-qt"; - version = "1.1.1"; + version = "1.1.2"; src = fetchFromGitHub { owner = "CsoundQt"; repo = "CsoundQt"; rev = "v${version}"; - hash = "sha256-PdylVOnunbB36dbZX/wzd9A8CJPDv/xH5HPLAUkRu28="; + hash = "sha256-ufjZQnO3H5pwdeEwGqunbXCfx7nvWTzak4cwVYWqvz4="; }; patches = [ From ecf38c959bfdd53ec4bfd8ab5e0280bb55cda0e7 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 7 Sep 2024 03:45:28 +0000 Subject: [PATCH 011/236] bazelisk: 1.20.0 -> 1.21.0 --- pkgs/development/tools/bazelisk/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/bazelisk/default.nix b/pkgs/development/tools/bazelisk/default.nix index 41bc278d805c..e0faacc5e5d5 100644 --- a/pkgs/development/tools/bazelisk/default.nix +++ b/pkgs/development/tools/bazelisk/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "bazelisk"; - version = "1.20.0"; + version = "1.21.0"; src = fetchFromGitHub { owner = "bazelbuild"; repo = pname; rev = "v${version}"; - sha256 = "sha256-UNrfLuSadkP3GBlFMg2V3mK/GSNlyvIxeHnkTuPjfy4="; + sha256 = "sha256-p5K0VYPAjorlwJx7GB2r7M/KGUzD3jyOp4dLkw11/tc="; }; - vendorHash = "sha256-hjV7Pc3DFExSCsA0jKVxb1GxoXQ7LRFGuot3V0IHG58="; + vendorHash = "sha256-wMCJnbu9pKBujTvZ4rvxgJdB7l7Z6vB6eyem35Ghz0Q="; doCheck = false; From 98bfb095e1f1e036f76d1aab4429bd289ba161e1 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 7 Sep 2024 07:04:01 +0000 Subject: [PATCH 012/236] rocksdb: 9.5.2 -> 9.6.1 --- pkgs/development/libraries/rocksdb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/rocksdb/default.nix b/pkgs/development/libraries/rocksdb/default.nix index fddb72fa7be8..b81061639d79 100644 --- a/pkgs/development/libraries/rocksdb/default.nix +++ b/pkgs/development/libraries/rocksdb/default.nix @@ -19,13 +19,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocksdb"; - version = "9.5.2"; + version = "9.6.1"; src = fetchFromGitHub { owner = "facebook"; repo = "rocksdb"; rev = "v${finalAttrs.version}"; - hash = "sha256-+0gUtWhvCBISm0/67ylynNfihxbIg5wFh1gOOQp4sCI="; + hash = "sha256-Df5X3sL4dRP9TwwfoB3645nlru6eQhFD1LKPCXHrofU="; }; patches = lib.optional (lib.versionAtLeast finalAttrs.version "6.29.3" && enableLiburing) ./fix-findliburing.patch; From 721675b804c7cceda84a80d1238892d6be8811a5 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 7 Sep 2024 08:41:28 +0000 Subject: [PATCH 013/236] waypaper: 2.1.2 -> 2.3 --- pkgs/applications/misc/waypaper/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/waypaper/default.nix b/pkgs/applications/misc/waypaper/default.nix index a8dae9664264..29b8072318f3 100644 --- a/pkgs/applications/misc/waypaper/default.nix +++ b/pkgs/applications/misc/waypaper/default.nix @@ -8,13 +8,13 @@ python3.pkgs.buildPythonApplication rec { pname = "waypaper"; - version = "2.1.2"; + version = "2.3"; src = fetchFromGitHub { owner = "anufrievroman"; repo = "waypaper"; rev = "refs/tags/${version}"; - hash = "sha256-GB+H2kZr1+UhhGFpfXc3V4DPXjvHBdg6EKNEFhjKEHk="; + hash = "sha256-ty3KiKkIyv6aqTua3YUB2smYJv7dXGPP5k3lXoxDzI0="; }; nativeBuildInputs = [ From b50abbbe4e0a90b52f0b4f9cb244b5a56d91478b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 8 Sep 2024 02:32:13 +0000 Subject: [PATCH 014/236] slumber: 1.8.1 -> 2.0.0 --- pkgs/by-name/sl/slumber/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/sl/slumber/package.nix b/pkgs/by-name/sl/slumber/package.nix index 5c52ad9ad484..b65e041cdc24 100644 --- a/pkgs/by-name/sl/slumber/package.nix +++ b/pkgs/by-name/sl/slumber/package.nix @@ -8,16 +8,16 @@ rustPlatform.buildRustPackage rec { pname = "slumber"; - version = "1.8.1"; + version = "2.0.0"; src = fetchFromGitHub { owner = "LucasPickering"; repo = "slumber"; rev = "refs/tags/v${version}"; - hash = "sha256-u+IONDK3X+4kPmW9YXa0qQbAezBD+UADnlNEH1coKNE="; + hash = "sha256-TfJAVXJssnKj/RREetFBWgJcGNdpCTF7KUu3CrigF08="; }; - cargoHash = "sha256-V/wPzEoUppLu8E5/SbBT4sPftz/SIg4s00/AHQL9R+o="; + cargoHash = "sha256-jLBid9MDQ2eMhG0knxU1gxbi+eRFlCPYRkzWnjCnyG0="; buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]; From e497edbfa007ec476c46f805840dfb22617faeb3 Mon Sep 17 00:00:00 2001 From: Louis Thevenet Date: Mon, 9 Sep 2024 08:12:37 +0200 Subject: [PATCH 015/236] maintainers: add louis-thevenet --- maintainers/maintainer-list.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 405c23369992..09c7d0186bd1 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -12073,6 +12073,11 @@ githubId = 4969294; name = "Louis Tim Larsen"; }; + louis-thevenet = { + name = "Louis Thevenet"; + github = "louis-thevenet"; + githubId = 55986107; + }; lovek323 = { email = "jason@oconal.id.au"; github = "lovek323"; From 63425fe1b0852bbea26144f68bb01edbc14960a6 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 9 Sep 2024 15:58:18 +0000 Subject: [PATCH 016/236] transcrypt: 2.2.3 -> 2.3.0 --- pkgs/applications/version-management/transcrypt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/transcrypt/default.nix b/pkgs/applications/version-management/transcrypt/default.nix index 5000037b0c8a..26e88f624299 100644 --- a/pkgs/applications/version-management/transcrypt/default.nix +++ b/pkgs/applications/version-management/transcrypt/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "transcrypt"; - version = "2.2.3"; + version = "2.3.0"; src = fetchFromGitHub { owner = "elasticdog"; repo = "transcrypt"; rev = "v${version}"; - sha256 = "+B8CYHDneDd0GwiTwQK6YVScDMKao2JXFpGk9PY6/EE="; + sha256 = "sha256-hevKqs0JKsRI2qTRzWAAuMotiBX6dGF0ZmypBco2l6g="; }; nativeBuildInputs = [ makeWrapper ]; From 45299badd82ba998663db64c31db907d79008fcc Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Tue, 10 Sep 2024 21:23:51 +0800 Subject: [PATCH 017/236] kwok: init at 0.6.0 --- pkgs/by-name/kw/kwok/package.nix | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 pkgs/by-name/kw/kwok/package.nix diff --git a/pkgs/by-name/kw/kwok/package.nix b/pkgs/by-name/kw/kwok/package.nix new file mode 100644 index 000000000000..cf11b9dadb0e --- /dev/null +++ b/pkgs/by-name/kw/kwok/package.nix @@ -0,0 +1,29 @@ +{ + buildGoModule, + lib, + fetchFromGitHub, +}: + +buildGoModule rec { + pname = "kwok"; + version = "0.6.0"; + + src = fetchFromGitHub { + owner = "kubernetes-sigs"; + repo = "kwok"; + rev = "refs/tags/v${version}"; + hash = "sha256-3g8enPxxh2SaxiDgDwJpAfSjv/iRoBRmTnXwDtuMdFA="; + }; + + vendorHash = "sha256-YVGXYN7PgGgBzxhx6piP3NHRAsR1/pCj97UWB21WNMg="; + + doCheck = false; # docker is need for test + + meta = { + description = "Simulate massive Kubernetes clusters with low resource usage locally without kubelet"; + homepage = "https://kwok.sigs.k8s.io"; + changelog = "https://github.com/kubernetes-sigs/kwok/releases/tag/v${version}"; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ bot-wxt1221 ]; + }; +} From 4b4ecf24925b240f75bce21c48cc3fde847df9b6 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Wed, 11 Sep 2024 14:58:16 -0400 Subject: [PATCH 018/236] vault-bin: 1.16.2 -> 1.17.5 --- pkgs/tools/security/vault/update-bin.sh | 25 +++++++++++-------------- pkgs/tools/security/vault/vault-bin.nix | 17 +++++++++-------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/pkgs/tools/security/vault/update-bin.sh b/pkgs/tools/security/vault/update-bin.sh index 25f41e2aad12..cd91fe4b608d 100755 --- a/pkgs/tools/security/vault/update-bin.sh +++ b/pkgs/tools/security/vault/update-bin.sh @@ -10,15 +10,12 @@ if [ ! -f "$NIX_DRV" ]; then exit 1 fi -fetch_arch() { - VER="$1"; ARCH="$2" - URL="https://releases.hashicorp.com/vault/${VER}/vault_${VER}_${ARCH}.zip" - nix-prefetch "{ stdenv, fetchzip }: -stdenv.mkDerivation rec { - pname = \"vault-bin\"; version = \"${VER}\"; - src = fetchzip { url = \"$URL\"; }; -} -" +function calc_hash () { + local version=$1 + local arch=$2 + url="https://releases.hashicorp.com/vault/${version}/vault_${version}_${arch}.zip" + zip_hash=$(nix-prefetch-url --unpack $url) + nix hash to-sri --type sha256 "$zip_hash" } replace_sha() { @@ -28,11 +25,11 @@ replace_sha() { # https://releases.hashicorp.com/vault/1.9.4/vault_1.9.4_linux_arm64.zip VAULT_VER=$(curl -Ls -w "%{url_effective}" -o /dev/null https://github.com/hashicorp/vault/releases/latest | awk -F'/' '{print $NF}' | sed 's/v//') -VAULT_LINUX_X86_SHA256=$(fetch_arch "$VAULT_VER" "linux_386") -VAULT_LINUX_X64_SHA256=$(fetch_arch "$VAULT_VER" "linux_amd64") -VAULT_DARWIN_X64_SHA256=$(fetch_arch "$VAULT_VER" "darwin_amd64") -VAULT_LINUX_AARCH64_SHA256=$(fetch_arch "$VAULT_VER" "linux_arm64") -VAULT_DARWIN_AARCH64_SHA256=$(fetch_arch "$VAULT_VER" "darwin_arm64") +VAULT_LINUX_X86_SHA256=$(calc_hash "$VAULT_VER" "linux_386") +VAULT_LINUX_X64_SHA256=$(calc_hash "$VAULT_VER" "linux_amd64") +VAULT_DARWIN_X64_SHA256=$(calc_hash "$VAULT_VER" "darwin_amd64") +VAULT_LINUX_AARCH64_SHA256=$(calc_hash "$VAULT_VER" "linux_arm64") +VAULT_DARWIN_AARCH64_SHA256=$(calc_hash "$VAULT_VER" "darwin_arm64") sed -i "s/version = \".*\"/version = \"$VAULT_VER\"/" "$NIX_DRV" diff --git a/pkgs/tools/security/vault/vault-bin.nix b/pkgs/tools/security/vault/vault-bin.nix index dbdd8d49f76b..7a829e1ad271 100644 --- a/pkgs/tools/security/vault/vault-bin.nix +++ b/pkgs/tools/security/vault/vault-bin.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { pname = "vault-bin"; - version = "1.16.2"; + version = "1.17.5"; src = let @@ -15,17 +15,18 @@ stdenv.mkDerivation rec { x86_64-darwin = "darwin_amd64"; aarch64-darwin = "darwin_arm64"; }; - sha256 = selectSystem { - x86_64-linux = "sha256-fVDHXVI4f/1d6NTgHcURDXAjCkSEwKD3+bhRyvIgfjw="; - aarch64-linux = "sha256-tfRqnroz9W7V3gCataJbm2t97OJUkVe2VyWXPqbeJaw="; - i686-linux = "sha256-l2aYuyxYAOnAOBwtkEkrpqRNWYL7qsaYJ3vMiknhFow="; - x86_64-darwin = "sha256-xX/syRtkJJjmSO36Apq+i/s4kOMMop3De276358hb0c="; - aarch64-darwin = "sha256-I1FpMRsssil0LQe5LBjpX5b7uTATRJOBzbJeLnKCd74="; + hash = selectSystem { + x86_64-linux = "sha256-rh0ZVmAbiOmZFCpiiX9ClAYmQKx084VKCjxvD9bbYAk="; + aarch64-linux = "sha256-DtriOEQCuSMMjzfJJpJAf7z+wGJSbzU3V/X+glTLkv8="; + i686-linux = "sha256-EPS3Sx2l0Gv4PWeqrnIEoNYUF4Or075vdhn71vKXQEw="; + x86_64-darwin = "sha256-pi/sD88haBxUx6dSUEUv6ugQO2K/lhg4ne7xbcVzg3M="; + aarch64-darwin = "sha256-6ZESO3m5FCRwTNh3xlWjWw6c9sjiAwV09YA/hQ5Py/o="; }; in fetchzip { url = "https://releases.hashicorp.com/vault/${version}/vault_${version}_${suffix}.zip"; - inherit sha256; + stripRoot=false; + inherit hash; }; dontConfigure = true; From 9a09ad4ceb4a8b09ccdc1b2374b954510748d8fd Mon Sep 17 00:00:00 2001 From: AveryanAlex Date: Wed, 21 Aug 2024 20:05:10 +0300 Subject: [PATCH 019/236] byedpi: init at 0.13.1 --- pkgs/by-name/by/byedpi/package.nix | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pkgs/by-name/by/byedpi/package.nix diff --git a/pkgs/by-name/by/byedpi/package.nix b/pkgs/by-name/by/byedpi/package.nix new file mode 100644 index 000000000000..d081c059dcc7 --- /dev/null +++ b/pkgs/by-name/by/byedpi/package.nix @@ -0,0 +1,37 @@ +{ + lib, + stdenv, + fetchFromGitHub, + nix-update-script, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "byedpi"; + version = "0.13.1"; + + src = fetchFromGitHub { + owner = "hufrea"; + repo = "byedpi"; + rev = "refs/tags/v${finalAttrs.version}"; + hash = "sha256-Sf5Ik8+9nKhum4/faGf44Y/gQggldyRsFUVmd9XPKOA="; + }; + + installPhase = '' + runHook preInstall + install -Dm755 ciadpi $out/bin/ciadpi + runHook postInstall + ''; + + strictDeps = true; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "SOCKS proxy server implementing some DPI bypass methods"; + homepage = "https://github.com/hufrea/byedpi"; + changelog = "https://github.com/hufrea/byedpi/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ averyanalex ]; + platforms = with lib.platforms; linux ++ windows; + mainProgram = "ciadpi"; + }; +}) From c3cc52fe6bd57b56ee5a871b8f2ecf7f5fc859c6 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Wed, 4 Sep 2024 14:24:05 +0200 Subject: [PATCH 020/236] eigenrand: init at 0.5.1 Co-authored-by: Aleksana --- pkgs/by-name/ei/eigenrand/package.nix | 48 +++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 pkgs/by-name/ei/eigenrand/package.nix diff --git a/pkgs/by-name/ei/eigenrand/package.nix b/pkgs/by-name/ei/eigenrand/package.nix new file mode 100644 index 000000000000..d3014ff9d75f --- /dev/null +++ b/pkgs/by-name/ei/eigenrand/package.nix @@ -0,0 +1,48 @@ +{ + cmake, + eigen, + fetchFromGitHub, + gtest, + lib, + stdenv, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "eigenrand"; + version = "0.5.1"; + + src = fetchFromGitHub { + owner = "bab2min"; + repo = "EigenRand"; + rev = "v${finalAttrs.version}"; + hash = "sha256-mrpkWIb6kfLvppmIfzhjF1/3m1zSd8XG1D07V6Zjlu0="; + }; + + # Avoid downloading googletest: we already have it. + postPatch = '' + substituteInPlace CMakeLists.txt --replace-fail \ + "FetchContent_MakeAvailable(googletest)" \ + "add_subdirectory(${gtest.src} googletest SYSTEM)" + ''; + + postInstall = '' + # Remove installed tests and googletest stuff + rm -rf $out/bin $out/include/gmock $out/include/gtest $out/lib + ''; + + nativeBuildInputs = [ cmake ]; + propagatedBuildInputs = [ eigen ]; + checkInputs = [ gtest ]; + + doCheck = true; + + cmakeFlags = [ "-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;EigenRand-test" ]; + + meta = { + description = "Fastest Random Distribution Generator for Eigen"; + homepage = "https://github.com/bab2min/EigenRand"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ nim65s ]; + platforms = lib.platforms.unix; + }; +}) From 9b16fe5f70ba1cbc3e3e66db5522b99d86d358e1 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Wed, 4 Sep 2024 13:59:26 +0200 Subject: [PATCH 021/236] proxsuite-nlp: init at 0.7.1 Co-authored-by: Aleksana --- pkgs/by-name/pr/proxsuite-nlp/package.nix | 95 +++++++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 97 insertions(+) create mode 100644 pkgs/by-name/pr/proxsuite-nlp/package.nix diff --git a/pkgs/by-name/pr/proxsuite-nlp/package.nix b/pkgs/by-name/pr/proxsuite-nlp/package.nix new file mode 100644 index 000000000000..234cc93febc7 --- /dev/null +++ b/pkgs/by-name/pr/proxsuite-nlp/package.nix @@ -0,0 +1,95 @@ +{ + cmake, + doxygen, + eigenrand, + example-robot-data, + fetchFromGitHub, + fetchpatch, + fmt, + fontconfig, + graphviz, + lib, + stdenv, + pinocchio, + pkg-config, + proxsuite, + python3Packages, + pythonSupport ? false, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "proxsuite-nlp"; + version = "0.7.1"; + + src = fetchFromGitHub { + owner = "Simple-Robotics"; + repo = "proxsuite-nlp"; + rev = "v${finalAttrs.version}"; + hash = "sha256-aMTEjAu1ltjorx5vhz7klB0cGgdm+7STAPhi+NA6mnI="; + }; + + outputs = [ + "doc" + "out" + ]; + + patches = [ + # Fix use of system jrl-cmakemodules + # This patch was merged upstream and can be removed on next release + (fetchpatch { + url = "https://github.com/Simple-Robotics/proxsuite-nlp/pull/106/commits/c653ab67860fdf7b53b1a919f0b8a7746eba016b.patch"; + hash = "sha256-Kw2obJGOWms/Lr4cVkLFpaLTickCq5WQyDVbwi8Bd58="; + }) + # Fix use of system EigenRand + # This patch was merged upstream and can be removed on next release + (fetchpatch { + url = "https://github.com/Simple-Robotics/proxsuite-nlp/pull/106/commits/25370417755f003708b5b2b81e253797e8d96928.patch"; + hash = "sha256-PKijVmttt5JakF3X/GiVWptncxHJUbs/aikgwgB5NME="; + }) + ]; + + nativeBuildInputs = [ + cmake + doxygen + graphviz + pkg-config + ] ++ lib.optional pythonSupport python3Packages.pythonImportsCheckHook; + checkInputs = [ eigenrand ] ++ lib.optional pythonSupport python3Packages.pytest; + propagatedBuildInputs = + [ + example-robot-data + fmt + ] + ++ lib.optionals pythonSupport [ + python3Packages.pinocchio + python3Packages.proxsuite + ] + ++ lib.optionals (!pythonSupport) [ + pinocchio + proxsuite + ]; + + cmakeFlags = [ + (lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport) + (lib.cmakeBool "BUILD_WITH_PINOCCHIO_SUPPORT" true) + (lib.cmakeBool "BUILD_WITH_PROXSUITE_SUPPORT" true) + ]; + + # Fontconfig error: Cannot load default config file: No such file: (null) + env.FONTCONFIG_FILE = "${fontconfig.out}/etc/fonts/fonts.conf"; + + # Fontconfig error: No writable cache directories + preBuild = "export XDG_CACHE_HOME=$(mktemp -d)"; + + doCheck = true; + pythonImportsCheck = [ "proxsuite_nlp" ]; + + meta = { + description = "Primal-dual augmented Lagrangian solver for nonlinear programming on manifolds"; + homepage = "https://github.com/Simple-Robotics/proxsuite-nlp"; + changelog = "https://github.com/Simple-Robotics/proxsuite-nlp/blob/v${finalAttrs.version}/CHANGELOG.md"; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ nim65s ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1390548108c6..d77636d23440 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10017,6 +10017,8 @@ self: super: with self; { proxsuite = toPythonModule (pkgs.proxsuite.override { pythonSupport = true; python3Packages = self; }); + proxsuite-nlp = toPythonModule (pkgs.proxsuite-nlp.override { pythonSupport = true; python3Packages = self; }); + proxy-tools = callPackage ../development/python-modules/proxy-tools { }; proxy-db = callPackage ../development/python-modules/proxy-db { }; From ffa38763a06d1582bab22404b9f76616552ccac6 Mon Sep 17 00:00:00 2001 From: aviac Date: Thu, 15 Aug 2024 14:46:27 +0200 Subject: [PATCH 022/236] rerun: 0.13.0 -> 0.18.2 --- ...me_series-utils-patch-out-doctests-w.patch | 31 -- pkgs/by-name/re/rerun/package.nix | 40 +- pkgs/by-name/re/rerun/rust-version.patch | 436 ++++++++++++++++++ pkgs/by-name/re/rerun/tests.patch | 16 + .../python-modules/rerun-sdk/default.nix | 15 +- 5 files changed, 481 insertions(+), 57 deletions(-) delete mode 100644 pkgs/by-name/re/rerun/0001-re_space_view_time_series-utils-patch-out-doctests-w.patch create mode 100644 pkgs/by-name/re/rerun/rust-version.patch create mode 100644 pkgs/by-name/re/rerun/tests.patch diff --git a/pkgs/by-name/re/rerun/0001-re_space_view_time_series-utils-patch-out-doctests-w.patch b/pkgs/by-name/re/rerun/0001-re_space_view_time_series-utils-patch-out-doctests-w.patch deleted file mode 100644 index d43ae339641e..000000000000 --- a/pkgs/by-name/re/rerun/0001-re_space_view_time_series-utils-patch-out-doctests-w.patch +++ /dev/null @@ -1,31 +0,0 @@ -From f6c5dde13a39bd149d892162e2ef72267f4c4a57 Mon Sep 17 00:00:00 2001 -From: Someone Serge -Date: Thu, 15 Feb 2024 18:05:16 +0000 -Subject: [PATCH] re_space_view_time_series: utils: patch out doctests w - unstable features - ---- - crates/re_space_view_time_series/src/util.rs | 7 +------ - 1 file changed, 1 insertion(+), 6 deletions(-) - -diff --git a/crates/re_space_view_time_series/src/util.rs b/crates/re_space_view_time_series/src/util.rs -index 83ce5362f..59d3b9734 100644 ---- a/crates/re_space_view_time_series/src/util.rs -+++ b/crates/re_space_view_time_series/src/util.rs -@@ -288,12 +288,7 @@ fn add_series_runs( - /// is finite `x == x.next_up().next_down()` also holds. - /// - /// ```rust --/// #![feature(float_next_up_down)] --/// // f64::EPSILON is the difference between 1.0 and the next number up. --/// assert_eq!(1.0f64.next_up(), 1.0 + f64::EPSILON); --/// // But not for most numbers. --/// assert!(0.1f64.next_up() < 0.1 + f64::EPSILON); --/// assert_eq!(9007199254740992f64.next_up(), 9007199254740994.0); -+/// // PATCHED OUT THE UNSTABLE float_next_up_down - /// ``` - /// - /// [`NEG_INFINITY`]: f64::NEG_INFINITY --- -2.43.0 - diff --git a/pkgs/by-name/re/rerun/package.nix b/pkgs/by-name/re/rerun/package.nix index 4d9c8da8041c..84324b4bb084 100644 --- a/pkgs/by-name/re/rerun/package.nix +++ b/pkgs/by-name/re/rerun/package.nix @@ -22,28 +22,24 @@ rustPlatform.buildRustPackage rec { pname = "rerun"; - version = "0.13.0"; - + version = "0.18.2"; src = fetchFromGitHub { owner = "rerun-io"; repo = "rerun"; rev = version; - hash = "sha256-HgzzuvCpzKgWC8it0PSq62hBjjqpdgYtQQ50SNbr3do="; + sha256 = "sha256-mQjjgRKNFSts34Lphfje9H1BLY9nybCrJ2V09nMzVDM="; }; - patches = [ - # Disables a doctest that depends on a nightly feature - ./0001-re_space_view_time_series-utils-patch-out-doctests-w.patch + cargoHash = "sha256-ZyjRe4M6RabSKhKCLa1ed1fsF6dkUt2a1c8C/1E48+M="; + # the crate uses an old rust version (currently 1.76) + # nixpkgs only works with the latest rust (currently 1.80) + # so we patch this + cargoPatches = [ ./rust-version.patch ]; - # "Fix cell size test now that the overhead has shrunk" - # https://github.com/rerun-io/rerun/pull/5917 - (fetchpatch { - url = "https://github.com/rerun-io/rerun/commit/933fc5cc1f3ee262a78bd4647257295747671152.patch"; - hash = "sha256-jCeGfzKt0oYqIea+7bA2V/U9VIjhVvfQzLRrYG4jaHY="; - }) - ]; - - cargoHash = "sha256-qvnkOlcjADV4b+JfFAy9yNaZGaf0ZO7hh9HBg5XmPi0="; + cargoBuildFlags = [ "--package rerun-cli" ]; + cargoTestFlags = [ "--package rerun-cli" ]; + buildNoDefaultFeatures = true; + buildFeatures = [ "native_viewer" ]; nativeBuildInputs = [ (lib.getBin binaryen) # wasm-opt @@ -105,13 +101,8 @@ rustPlatform.buildRustPackage rec { postPhases = lib.optionals stdenv.hostPlatform.isLinux [ "addDlopenRunpathsPhase" ]; - cargoTestFlags = [ - "-p" - "rerun" - "--workspace" - "--exclude=crates/rerun/src/lib.rs" - ]; - + # The path in `build.rs` is wrong for some reason, so we patch it to make the passthru tests work + patches = [ ./tests.patch ]; passthru.tests = { inherit (python3Packages) rerun-sdk; }; @@ -124,7 +115,10 @@ rustPlatform.buildRustPackage rec { asl20 mit ]; - maintainers = with maintainers; [ SomeoneSerge ]; + maintainers = with maintainers; [ + SomeoneSerge + robwalt + ]; mainProgram = "rerun"; }; } diff --git a/pkgs/by-name/re/rerun/rust-version.patch b/pkgs/by-name/re/rerun/rust-version.patch new file mode 100644 index 000000000000..c7147c0081fa --- /dev/null +++ b/pkgs/by-name/re/rerun/rust-version.patch @@ -0,0 +1,436 @@ + BUILD.md | 4 ++-- + CHANGELOG.md | 4 ++-- + Cargo.toml | 2 +- + clippy.toml | 2 +- + crates/build/re_build_info/src/build_info.rs | 2 +- + crates/viewer/re_viewer/data/quick_start_guides/rust_connect.md | 2 +- + crates/viewer/re_viewer/data/quick_start_guides/rust_spawn.md | 2 +- + docs/content/getting-started/installing-viewer.md | 2 +- + docs/content/getting-started/quick-start/rust.md | 2 +- + examples/rust/clock/Cargo.toml | 2 +- + examples/rust/custom_data_loader/Cargo.toml | 2 +- + examples/rust/custom_space_view/Cargo.toml | 2 +- + examples/rust/custom_store_subscriber/Cargo.toml | 2 +- + examples/rust/dna/Cargo.toml | 2 +- + examples/rust/extend_viewer_ui/Cargo.toml | 2 +- + examples/rust/external_data_loader/Cargo.toml | 2 +- + examples/rust/incremental_logging/Cargo.toml | 2 +- + examples/rust/log_file/Cargo.toml | 2 +- + examples/rust/minimal/Cargo.toml | 2 +- + examples/rust/minimal_options/Cargo.toml | 2 +- + examples/rust/minimal_serve/Cargo.toml | 2 +- + examples/rust/objectron/Cargo.toml | 2 +- + examples/rust/raw_mesh/Cargo.toml | 2 +- + examples/rust/shared_recording/Cargo.toml | 2 +- + examples/rust/spawn_viewer/Cargo.toml | 2 +- + examples/rust/stdio/Cargo.toml | 2 +- + examples/rust/template/Cargo.toml | 2 +- + rust-toolchain | 2 +- + scripts/clippy_wasm/clippy.toml | 2 +- + scripts/lint.py | 2 +- + 30 files changed, 32 insertions(+), 32 deletions(-) + +diff --git a/BUILD.md b/BUILD.md +index c0bc6e074..a74f86967 100644 +--- a/BUILD.md ++++ b/BUILD.md +@@ -23,12 +23,12 @@ cd rerun + + Now install the `pixi` package manager: + +-Make sure `cargo --version` prints `1.76.0` once you are done. ++Make sure `cargo --version` prints `1.80.0` once you are done. + + If you are using an Apple-silicon Mac (M1, M2), make sure `rustc -vV` outputs `host: aarch64-apple-darwin`. If not, this should fix it: + + ```sh +-rustup set default-host aarch64-apple-darwin && rustup install 1.76.0 ++rustup set default-host aarch64-apple-darwin && rustup install 1.80.0 + ``` + + ## Building and running the Viewer +diff --git a/CHANGELOG.md b/CHANGELOG.md +index 7efd062ea..82da0d411 100644 +--- a/CHANGELOG.md ++++ b/CHANGELOG.md +@@ -672,7 +672,7 @@ As always there's a lot going on under the hood: + - New data APIs 6: cached archetype queries [#5673](https://github.com/rerun-io/rerun/pull/5673) + - Remove justfile & fully replace remaining commands with Pixi [#5892](https://github.com/rerun-io/rerun/pull/5892) + - Replace requirements-docs.txt with a Python doc Pixi environment [#5909](https://github.com/rerun-io/rerun/pull/5909) +-- Update to Rust 1.76 [#5908](https://github.com/rerun-io/rerun/pull/5908) ++- Update to Rust 1.80 [#5908](https://github.com/rerun-io/rerun/pull/5908) + - Remove all dev/ci requirements.txt and fully replace with Pixi [#5939](https://github.com/rerun-io/rerun/pull/5939) + - Markdown linter [#6181](https://github.com/rerun-io/rerun/pull/6181) + +@@ -1337,7 +1337,7 @@ Check out our [migration guide](https://www.rerun.io/docs/reference/migration/mi + + #### 📦 Dependencies + - Update egui and wgpu [#4111](https://github.com/rerun-io/rerun/pull/4111) +-- Update Rust to 1.76.0 [#4390](https://github.com/rerun-io/rerun/pull/4390) ++- Update Rust to 1.80.0 [#4390](https://github.com/rerun-io/rerun/pull/4390) + + #### 🤷 Other + #### 🤷 Other +diff --git a/Cargo.toml b/Cargo.toml +index 48ab565a3..a479a5394 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -24,7 +24,7 @@ homepage = "https://rerun.io" + include = ["../../LICENSE-APACHE", "../../LICENSE-MIT", "**/*.rs", "Cargo.toml"] + license = "MIT OR Apache-2.0" + repository = "https://github.com/rerun-io/rerun" +-rust-version = "1.76" ++rust-version = "1.80" + version = "0.18.2" + + [workspace.dependencies] +diff --git a/clippy.toml b/clippy.toml +index 70ff980b8..f3d9d04b4 100644 +--- a/clippy.toml ++++ b/clippy.toml +@@ -3,7 +3,7 @@ + # ----------------------------------------------------------------------------- + # Section identical to the main scripts/clippy_wasm/clippy.toml: + +-msrv = "1.76" ++msrv = "1.80" + + allow-unwrap-in-tests = true + +diff --git a/crates/build/re_build_info/src/build_info.rs b/crates/build/re_build_info/src/build_info.rs +index 55abb7290..6efb10e3b 100644 +--- a/crates/build/re_build_info/src/build_info.rs ++++ b/crates/build/re_build_info/src/build_info.rs +@@ -153,7 +153,7 @@ fn crate_version_from_build_info_string() { + patch: 0, + meta: Some(crate::crate_version::Meta::DevAlpha(7)), + }, +- rustc_version: "1.76.0 (d5c2e9c34 2023-09-13)", ++ rustc_version: "1.80.0 (d5c2e9c34 2023-09-13)", + llvm_version: "16.0.5", + git_hash: "", + git_branch: "", +diff --git a/crates/viewer/re_viewer/data/quick_start_guides/rust_connect.md b/crates/viewer/re_viewer/data/quick_start_guides/rust_connect.md +index 1130ccd7e..c5b748b77 100644 +--- a/crates/viewer/re_viewer/data/quick_start_guides/rust_connect.md ++++ b/crates/viewer/re_viewer/data/quick_start_guides/rust_connect.md +@@ -10,7 +10,7 @@ Let's try it out in a brand-new Rust project: + cargo init cube && cd cube && cargo add rerun --features native_viewer + ``` + +-Note that the Rerun SDK requires a working installation of Rust 1.76+. ++Note that the Rerun SDK requires a working installation of Rust 1.80+. + + ## Logging your own data + +diff --git a/crates/viewer/re_viewer/data/quick_start_guides/rust_spawn.md b/crates/viewer/re_viewer/data/quick_start_guides/rust_spawn.md +index fc9cfc1c6..cde772f1a 100644 +--- a/crates/viewer/re_viewer/data/quick_start_guides/rust_spawn.md ++++ b/crates/viewer/re_viewer/data/quick_start_guides/rust_spawn.md +@@ -10,7 +10,7 @@ Let's try it out in a brand-new Rust project: + cargo init cube && cd cube && cargo add rerun + ``` + +-Note that the Rerun SDK requires a working installation of Rust 1.76+. ++Note that the Rerun SDK requires a working installation of Rust 1.80+. + + ## Logging your own data + +diff --git a/docs/content/getting-started/installing-viewer.md b/docs/content/getting-started/installing-viewer.md +index 8327753b2..55ebc55e8 100644 +--- a/docs/content/getting-started/installing-viewer.md ++++ b/docs/content/getting-started/installing-viewer.md +@@ -40,7 +40,7 @@ There are many ways to install the viewer. Please pick whatever works best for y + - Download `rerun-cli` for your platform from the [GitHub Release artifacts](https://github.com/rerun-io/rerun/releases/latest/). + - Via Cargo + - `cargo binstall rerun-cli` - download binaries via [`cargo binstall`](https://github.com/cargo-bins/cargo-binstall) +- - `cargo install rerun-cli --locked` - build it from source (this requires Rust 1.76+) ++ - `cargo install rerun-cli --locked` - build it from source (this requires Rust 1.80+) + - Together with the Rerun [Python SDK](./quick-start/python.md): + - `pip3 install rerun-sdk` - download it via pip + - `conda install -c conda-forge rerun-sdk` - download via Conda +diff --git a/docs/content/getting-started/quick-start/rust.md b/docs/content/getting-started/quick-start/rust.md +index 45d1beb1a..c79bc34db 100644 +--- a/docs/content/getting-started/quick-start/rust.md ++++ b/docs/content/getting-started/quick-start/rust.md +@@ -5,7 +5,7 @@ order: 3 + + ## Setup + +-The Rerun SDK for Rust requires a working installation of Rust 1.76+. ++The Rerun SDK for Rust requires a working installation of Rust 1.80+. + + After you have [installed the viewer](../installing-viewer.md#installing-the-viewer) you can simply add [the Rerun crate](https://crates.io/crates/rerun) to your project with `cargo add rerun`. + +diff --git a/examples/rust/clock/Cargo.toml b/examples/rust/clock/Cargo.toml +index ba2999675..7c038ebc4 100644 +--- a/examples/rust/clock/Cargo.toml ++++ b/examples/rust/clock/Cargo.toml +@@ -2,7 +2,7 @@ + name = "clock" + version = "0.18.2" + edition = "2021" +-rust-version = "1.76" ++rust-version = "1.80" + license = "MIT OR Apache-2.0" + publish = false + +diff --git a/examples/rust/custom_data_loader/Cargo.toml b/examples/rust/custom_data_loader/Cargo.toml +index e5df4cf66..37cbe80cb 100644 +--- a/examples/rust/custom_data_loader/Cargo.toml ++++ b/examples/rust/custom_data_loader/Cargo.toml +@@ -2,7 +2,7 @@ + name = "custom_data_loader" + version = "0.18.2" + edition = "2021" +-rust-version = "1.76" ++rust-version = "1.80" + license = "MIT OR Apache-2.0" + publish = false + +diff --git a/examples/rust/custom_space_view/Cargo.toml b/examples/rust/custom_space_view/Cargo.toml +index ae1babd40..5c012cf7c 100644 +--- a/examples/rust/custom_space_view/Cargo.toml ++++ b/examples/rust/custom_space_view/Cargo.toml +@@ -2,7 +2,7 @@ + name = "custom_space_view" + version = "0.18.2" + edition = "2021" +-rust-version = "1.76" ++rust-version = "1.80" + license = "MIT OR Apache-2.0" + publish = false + +diff --git a/examples/rust/custom_store_subscriber/Cargo.toml b/examples/rust/custom_store_subscriber/Cargo.toml +index 627f21d7b..52d8d923e 100644 +--- a/examples/rust/custom_store_subscriber/Cargo.toml ++++ b/examples/rust/custom_store_subscriber/Cargo.toml +@@ -2,7 +2,7 @@ + name = "custom_store_subscriber" + version = "0.18.2" + edition = "2021" +-rust-version = "1.76" ++rust-version = "1.80" + license = "MIT OR Apache-2.0" + publish = false + +diff --git a/examples/rust/dna/Cargo.toml b/examples/rust/dna/Cargo.toml +index 57909e2fe..f5332a40c 100644 +--- a/examples/rust/dna/Cargo.toml ++++ b/examples/rust/dna/Cargo.toml +@@ -2,7 +2,7 @@ + name = "dna" + version = "0.18.2" + edition = "2021" +-rust-version = "1.76" ++rust-version = "1.80" + license = "MIT OR Apache-2.0" + publish = false + +diff --git a/examples/rust/extend_viewer_ui/Cargo.toml b/examples/rust/extend_viewer_ui/Cargo.toml +index 0a753fe36..e2442a638 100644 +--- a/examples/rust/extend_viewer_ui/Cargo.toml ++++ b/examples/rust/extend_viewer_ui/Cargo.toml +@@ -2,7 +2,7 @@ + name = "extend_viewer_ui" + version = "0.18.2" + edition = "2021" +-rust-version = "1.76" ++rust-version = "1.80" + license = "MIT OR Apache-2.0" + publish = false + +diff --git a/examples/rust/external_data_loader/Cargo.toml b/examples/rust/external_data_loader/Cargo.toml +index a57a27743..7ee67583d 100644 +--- a/examples/rust/external_data_loader/Cargo.toml ++++ b/examples/rust/external_data_loader/Cargo.toml +@@ -2,7 +2,7 @@ + name = "rerun-loader-rust-file" + version = "0.18.2" + edition = "2021" +-rust-version = "1.76" ++rust-version = "1.80" + license = "MIT OR Apache-2.0" + publish = false + +diff --git a/examples/rust/incremental_logging/Cargo.toml b/examples/rust/incremental_logging/Cargo.toml +index c7cfe3965..2bc68c06c 100644 +--- a/examples/rust/incremental_logging/Cargo.toml ++++ b/examples/rust/incremental_logging/Cargo.toml +@@ -2,7 +2,7 @@ + name = "incremental_logging" + version = "0.18.2" + edition = "2021" +-rust-version = "1.76" ++rust-version = "1.80" + license = "MIT OR Apache-2.0" + publish = false + +diff --git a/examples/rust/log_file/Cargo.toml b/examples/rust/log_file/Cargo.toml +index 4f3b5a220..b78f3a49b 100644 +--- a/examples/rust/log_file/Cargo.toml ++++ b/examples/rust/log_file/Cargo.toml +@@ -2,7 +2,7 @@ + name = "log_file" + version = "0.18.2" + edition = "2021" +-rust-version = "1.76" ++rust-version = "1.80" + license = "MIT OR Apache-2.0" + publish = false + +diff --git a/examples/rust/minimal/Cargo.toml b/examples/rust/minimal/Cargo.toml +index 77588cfb0..f5bc05637 100644 +--- a/examples/rust/minimal/Cargo.toml ++++ b/examples/rust/minimal/Cargo.toml +@@ -2,7 +2,7 @@ + name = "minimal" + version = "0.18.2" + edition = "2021" +-rust-version = "1.76" ++rust-version = "1.80" + license = "MIT OR Apache-2.0" + publish = false + +diff --git a/examples/rust/minimal_options/Cargo.toml b/examples/rust/minimal_options/Cargo.toml +index 2f34f4890..6c9afe8c8 100644 +--- a/examples/rust/minimal_options/Cargo.toml ++++ b/examples/rust/minimal_options/Cargo.toml +@@ -2,7 +2,7 @@ + name = "minimal_options" + version = "0.18.2" + edition = "2021" +-rust-version = "1.76" ++rust-version = "1.80" + license = "MIT OR Apache-2.0" + publish = false + +diff --git a/examples/rust/minimal_serve/Cargo.toml b/examples/rust/minimal_serve/Cargo.toml +index d2efcb718..7ca9ca96a 100644 +--- a/examples/rust/minimal_serve/Cargo.toml ++++ b/examples/rust/minimal_serve/Cargo.toml +@@ -2,7 +2,7 @@ + name = "minimal_serve" + version = "0.18.2" + edition = "2021" +-rust-version = "1.76" ++rust-version = "1.80" + license = "MIT OR Apache-2.0" + publish = false + +diff --git a/examples/rust/objectron/Cargo.toml b/examples/rust/objectron/Cargo.toml +index 25d732cde..bf1029d56 100644 +--- a/examples/rust/objectron/Cargo.toml ++++ b/examples/rust/objectron/Cargo.toml +@@ -2,7 +2,7 @@ + name = "objectron" + version = "0.18.2" + edition = "2021" +-rust-version = "1.76" ++rust-version = "1.80" + license = "MIT OR Apache-2.0" + publish = false + +diff --git a/examples/rust/raw_mesh/Cargo.toml b/examples/rust/raw_mesh/Cargo.toml +index a41df4804..a3d3b7081 100644 +--- a/examples/rust/raw_mesh/Cargo.toml ++++ b/examples/rust/raw_mesh/Cargo.toml +@@ -2,7 +2,7 @@ + name = "raw_mesh" + version = "0.18.2" + edition = "2021" +-rust-version = "1.76" ++rust-version = "1.80" + license = "MIT OR Apache-2.0" + publish = false + +diff --git a/examples/rust/shared_recording/Cargo.toml b/examples/rust/shared_recording/Cargo.toml +index ded88fbfb..a238033d3 100644 +--- a/examples/rust/shared_recording/Cargo.toml ++++ b/examples/rust/shared_recording/Cargo.toml +@@ -2,7 +2,7 @@ + name = "shared_recording" + version = "0.18.2" + edition = "2021" +-rust-version = "1.76" ++rust-version = "1.80" + license = "MIT OR Apache-2.0" + publish = false + +diff --git a/examples/rust/spawn_viewer/Cargo.toml b/examples/rust/spawn_viewer/Cargo.toml +index 8a73efc91..7495735d8 100644 +--- a/examples/rust/spawn_viewer/Cargo.toml ++++ b/examples/rust/spawn_viewer/Cargo.toml +@@ -2,7 +2,7 @@ + name = "spawn_viewer" + version = "0.18.2" + edition = "2021" +-rust-version = "1.76" ++rust-version = "1.80" + license = "MIT OR Apache-2.0" + publish = false + +diff --git a/examples/rust/stdio/Cargo.toml b/examples/rust/stdio/Cargo.toml +index f55cea217..78493677e 100644 +--- a/examples/rust/stdio/Cargo.toml ++++ b/examples/rust/stdio/Cargo.toml +@@ -2,7 +2,7 @@ + name = "stdio" + version = "0.18.2" + edition = "2021" +-rust-version = "1.76" ++rust-version = "1.80" + license = "MIT OR Apache-2.0" + publish = false + +diff --git a/examples/rust/template/Cargo.toml b/examples/rust/template/Cargo.toml +index 6e1ebafe4..eda133daa 100644 +--- a/examples/rust/template/Cargo.toml ++++ b/examples/rust/template/Cargo.toml +@@ -2,7 +2,7 @@ + name = "template" + version = "0.18.2" + edition = "2021" +-rust-version = "1.76" ++rust-version = "1.80" + license = "MIT OR Apache-2.0" + publish = false + +diff --git a/rust-toolchain b/rust-toolchain +index 871f56248..38e5e90f3 100644 +--- a/rust-toolchain ++++ b/rust-toolchain +@@ -5,6 +5,6 @@ + # to the user in the error, instead of "error: invalid channel name '[toolchain]'". + + [toolchain] +-channel = "1.76.0" ++channel = "1.80.0" + components = ["rustfmt", "clippy"] + targets = ["wasm32-unknown-unknown"] +diff --git a/scripts/clippy_wasm/clippy.toml b/scripts/clippy_wasm/clippy.toml +index 75729af1e..627a3650e 100644 +--- a/scripts/clippy_wasm/clippy.toml ++++ b/scripts/clippy_wasm/clippy.toml +@@ -6,7 +6,7 @@ + # ----------------------------------------------------------------------------- + # Section identical to the main clippy.toml: + +-msrv = "1.76" ++msrv = "1.80" + + allow-unwrap-in-tests = true + +diff --git a/scripts/lint.py b/scripts/lint.py +index 695d12b6b..32a2c41e1 100755 +--- a/scripts/lint.py ++++ b/scripts/lint.py +@@ -599,7 +599,7 @@ def test_lint_workspace_deps() -> None: + name = "clock" + version = "0.6.0-alpha.0" + edition = "2021" +- rust-version = "1.76" ++ rust-version = "1.80" + license = "MIT OR Apache-2.0" + publish = false + diff --git a/pkgs/by-name/re/rerun/tests.patch b/pkgs/by-name/re/rerun/tests.patch new file mode 100644 index 000000000000..69a5ad5399b7 --- /dev/null +++ b/pkgs/by-name/re/rerun/tests.patch @@ -0,0 +1,16 @@ + rerun_py/build.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rerun_py/build.rs b/rerun_py/build.rs +index 3d292c55b..28e54f06b 100644 +--- a/rerun_py/build.rs ++++ b/rerun_py/build.rs +@@ -17,7 +17,7 @@ fn main() { + #[cfg(not(target_os = "windows"))] + let rerun_bin = std::env::current_dir() + .expect("std::env::current_dir() failed") +- .join("rerun_sdk/rerun_cli/rerun"); ++ .join("rerun_sdk/rerun"); + + if !rerun_bin.exists() { + eprintln!("ERROR: Expected to find `rerun` at `{rerun_bin:?}`."); diff --git a/pkgs/development/python-modules/rerun-sdk/default.nix b/pkgs/development/python-modules/rerun-sdk/default.nix index 4c8ac5c3933f..add95c23c9a1 100644 --- a/pkgs/development/python-modules/rerun-sdk/default.nix +++ b/pkgs/development/python-modules/rerun-sdk/default.nix @@ -14,19 +14,26 @@ pytestCheckHook, python, libiconv, + semver, + opencv4, }: buildPythonPackage { pname = "rerun-sdk"; - inherit (rerun) version; pyproject = true; - inherit (rerun) src; - inherit (rerun) cargoDeps; + inherit (rerun) + src + version + cargoDeps + cargoPatches + patches + ; nativeBuildInputs = [ rustPlatform.cargoSetupHook rustPlatform.maturinBuildHook + rerun ]; buildInputs = @@ -44,6 +51,8 @@ buildPythonPackage { pillow pyarrow typing-extensions + semver + opencv4 ]; buildAndTestSubdir = "rerun_py"; From 96509bec476233de378fae3e724d0f945e5a263e Mon Sep 17 00:00:00 2001 From: Moritz Sanft <58110325+msanft@users.noreply.github.com> Date: Wed, 11 Sep 2024 13:09:51 +0200 Subject: [PATCH 023/236] gossip: add missing dependencies --- pkgs/by-name/go/gossip/package.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/go/gossip/package.nix b/pkgs/by-name/go/gossip/package.nix index e5588618369e..9144634d6358 100644 --- a/pkgs/by-name/go/gossip/package.nix +++ b/pkgs/by-name/go/gossip/package.nix @@ -13,6 +13,7 @@ , rustPlatform , stdenv , wayland +, wayland-scanner , xorg }: @@ -54,6 +55,8 @@ rustPlatform.buildRustPackage rec { git pkg-config rustPlatform.bindgenHook + ] ++ lib.optionals stdenv.isLinux [ + wayland-scanner ]; buildInputs = [ @@ -64,8 +67,11 @@ rustPlatform.buildRustPackage rec { openssl ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.AppKit + darwin.apple_sdk.frameworks.Cocoa darwin.apple_sdk.frameworks.CoreGraphics darwin.apple_sdk.frameworks.Foundation + darwin.apple_sdk.frameworks.ForceFeedback + darwin.apple_sdk.frameworks.AVFoundation ] ++ lib.optionals stdenv.isLinux [ wayland xorg.libX11 @@ -84,7 +90,7 @@ rustPlatform.buildRustPackage rec { ln -s $out/logo/gossip.png $out/share/icons/hicolor/128x128/apps/gossip.png ''; - postFixup = '' + postFixup = lib.optionalString (!stdenv.isDarwin) '' patchelf $out/bin/gossip \ --add-rpath ${lib.makeLibraryPath [ libGL libxkbcommon wayland ]} ''; From fa7001de6db29f6bf60094db30cb2dde47bf1745 Mon Sep 17 00:00:00 2001 From: Moritz Sanft <58110325+msanft@users.noreply.github.com> Date: Wed, 11 Sep 2024 13:52:32 +0200 Subject: [PATCH 024/236] gossip: format --- pkgs/by-name/go/gossip/package.nix | 115 +++++++++++++++++------------ 1 file changed, 67 insertions(+), 48 deletions(-) diff --git a/pkgs/by-name/go/gossip/package.nix b/pkgs/by-name/go/gossip/package.nix index 9144634d6358..f6c4927316d9 100644 --- a/pkgs/by-name/go/gossip/package.nix +++ b/pkgs/by-name/go/gossip/package.nix @@ -1,20 +1,21 @@ -{ cmake -, darwin -, fetchFromGitHub -, ffmpeg -, fontconfig -, git -, lib -, libGL -, libxkbcommon -, makeDesktopItem -, openssl -, pkg-config -, rustPlatform -, stdenv -, wayland -, wayland-scanner -, xorg +{ + cmake, + darwin, + fetchFromGitHub, + ffmpeg, + fontconfig, + git, + lib, + libGL, + libxkbcommon, + makeDesktopItem, + openssl, + pkg-config, + rustPlatform, + stdenv, + wayland, + wayland-scanner, + xorg, }: rustPlatform.buildRustPackage rec { @@ -48,37 +49,45 @@ rustPlatform.buildRustPackage rec { RUSTFLAGS = "--cfg tokio_unstable"; # Some users might want to add "rustls-tls(-native)" for Rust TLS instead of OpenSSL. - buildFeatures = [ "video-ffmpeg" "lang-cjk" ]; - - nativeBuildInputs = [ - cmake - git - pkg-config - rustPlatform.bindgenHook - ] ++ lib.optionals stdenv.isLinux [ - wayland-scanner + buildFeatures = [ + "video-ffmpeg" + "lang-cjk" ]; - buildInputs = [ - ffmpeg - fontconfig - libGL - libxkbcommon - openssl - ] ++ lib.optionals stdenv.isDarwin [ - darwin.apple_sdk.frameworks.AppKit - darwin.apple_sdk.frameworks.Cocoa - darwin.apple_sdk.frameworks.CoreGraphics - darwin.apple_sdk.frameworks.Foundation - darwin.apple_sdk.frameworks.ForceFeedback - darwin.apple_sdk.frameworks.AVFoundation - ] ++ lib.optionals stdenv.isLinux [ - wayland - xorg.libX11 - xorg.libXcursor - xorg.libXi - xorg.libXrandr - ]; + nativeBuildInputs = + [ + cmake + git + pkg-config + rustPlatform.bindgenHook + ] + ++ lib.optionals stdenv.isLinux [ + wayland-scanner + ]; + + buildInputs = + [ + ffmpeg + fontconfig + libGL + libxkbcommon + openssl + ] + ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.AppKit + darwin.apple_sdk.frameworks.Cocoa + darwin.apple_sdk.frameworks.CoreGraphics + darwin.apple_sdk.frameworks.Foundation + darwin.apple_sdk.frameworks.ForceFeedback + darwin.apple_sdk.frameworks.AVFoundation + ] + ++ lib.optionals stdenv.isLinux [ + wayland + xorg.libX11 + xorg.libXcursor + xorg.libXi + xorg.libXrandr + ]; # Tests rely on local files, so disable them. (I'm too lazy to patch it.) doCheck = false; @@ -92,7 +101,13 @@ rustPlatform.buildRustPackage rec { postFixup = lib.optionalString (!stdenv.isDarwin) '' patchelf $out/bin/gossip \ - --add-rpath ${lib.makeLibraryPath [ libGL libxkbcommon wayland ]} + --add-rpath ${ + lib.makeLibraryPath [ + libGL + libxkbcommon + wayland + ] + } ''; desktopItems = [ @@ -102,7 +117,11 @@ rustPlatform.buildRustPackage rec { icon = "gossip"; comment = meta.description; desktopName = "Gossip"; - categories = [ "Chat" "Network" "InstantMessaging" ]; + categories = [ + "Chat" + "Network" + "InstantMessaging" + ]; startupWMClass = "gossip"; }) ]; From ba8a16ff20613ed024b46a5c79cc339bcb1ee6f2 Mon Sep 17 00:00:00 2001 From: natsukium Date: Thu, 12 Sep 2024 22:56:14 +0900 Subject: [PATCH 025/236] python312Packages.linien-common: fix build --- .../python-modules/linien-common/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/linien-common/default.nix b/pkgs/development/python-modules/linien-common/default.nix index 6904fccd83bf..f95b9af606cf 100644 --- a/pkgs/development/python-modules/linien-common/default.nix +++ b/pkgs/development/python-modules/linien-common/default.nix @@ -5,7 +5,7 @@ setuptools, importlib-metadata, numpy, - rpyc4, + rpyc, scipy, appdirs, callPackage, @@ -29,12 +29,14 @@ buildPythonPackage rec { export HOME=$(mktemp -d) ''; - nativeBuildInputs = [ setuptools ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ + pythonRelaxDeps = [ "importlib-metadata" ]; + + dependencies = [ importlib-metadata numpy - rpyc4 + rpyc scipy appdirs ]; From 6618ec06ccffb5750019735b5a81a6d277b007c5 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Thu, 12 Sep 2024 20:25:49 +0200 Subject: [PATCH 026/236] nixosTests.bittorrent: Fix pkgs scope --- nixos/tests/bittorrent.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/tests/bittorrent.nix b/nixos/tests/bittorrent.nix index 565e37cf0e56..72e7e5152c06 100644 --- a/nixos/tests/bittorrent.nix +++ b/nixos/tests/bittorrent.nix @@ -20,7 +20,7 @@ let externalTrackerAddress = "80.100.100.3"; download-dir = "/var/lib/transmission/Downloads"; - transmissionConfig = { ... }: { + transmissionConfig = { pkgs, ... }: { environment.systemPackages = [ pkgs.transmission_3 ]; services.transmission = { enable = true; From 60ed2a00ed8b5fbe0ba8c5bde3189bee1fb8315a Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Thu, 12 Sep 2024 16:27:26 +0200 Subject: [PATCH 027/236] nixosTests.bittorrent: Format --- nixos/tests/bittorrent.nix | 320 +++++++++++++++++++++---------------- 1 file changed, 178 insertions(+), 142 deletions(-) diff --git a/nixos/tests/bittorrent.nix b/nixos/tests/bittorrent.nix index 72e7e5152c06..83d9168a6fa5 100644 --- a/nixos/tests/bittorrent.nix +++ b/nixos/tests/bittorrent.nix @@ -6,163 +6,199 @@ # which only works if the first client successfully uses the UPnP-IGD # protocol to poke a hole in the NAT. -import ./make-test-python.nix ({ pkgs, ... }: +import ./make-test-python.nix ( + { pkgs, ... }: -let + let - # Some random file to serve. - file = pkgs.hello.src; + # Some random file to serve. + file = pkgs.hello.src; - internalRouterAddress = "192.168.3.1"; - internalClient1Address = "192.168.3.2"; - externalRouterAddress = "80.100.100.1"; - externalClient2Address = "80.100.100.2"; - externalTrackerAddress = "80.100.100.3"; + internalRouterAddress = "192.168.3.1"; + internalClient1Address = "192.168.3.2"; + externalRouterAddress = "80.100.100.1"; + externalClient2Address = "80.100.100.2"; + externalTrackerAddress = "80.100.100.3"; - download-dir = "/var/lib/transmission/Downloads"; - transmissionConfig = { pkgs, ... }: { - environment.systemPackages = [ pkgs.transmission_3 ]; - services.transmission = { - enable = true; - settings = { - dht-enabled = false; - message-level = 2; - inherit download-dir; - }; - }; - }; -in - -{ - name = "bittorrent"; - meta = with pkgs.lib.maintainers; { - maintainers = [ domenkozar rob bobvanderlinden ]; - }; - - nodes = { - tracker = { pkgs, ... }: { - imports = [ transmissionConfig ]; - - virtualisation.vlans = [ 1 ]; - networking.firewall.enable = false; - networking.interfaces.eth1.ipv4.addresses = [ - { address = externalTrackerAddress; prefixLength = 24; } - ]; - - # We need Apache on the tracker to serve the torrents. - services.httpd = { - enable = true; - virtualHosts = { - "torrentserver.org" = { - adminAddr = "foo@example.org"; - documentRoot = "/tmp"; + download-dir = "/var/lib/transmission/Downloads"; + transmissionConfig = + { pkgs, ... }: + { + environment.systemPackages = [ pkgs.transmission_3 ]; + services.transmission = { + enable = true; + settings = { + dht-enabled = false; + message-level = 2; + inherit download-dir; }; }; }; - services.opentracker.enable = true; + in + + { + name = "bittorrent"; + meta = with pkgs.lib.maintainers; { + maintainers = [ + domenkozar + rob + bobvanderlinden + ]; }; - router = { pkgs, nodes, ... }: { - virtualisation.vlans = [ 1 2 ]; - networking.nat.enable = true; - networking.nat.internalInterfaces = [ "eth2" ]; - networking.nat.externalInterface = "eth1"; - networking.firewall.enable = true; - networking.firewall.trustedInterfaces = [ "eth2" ]; - networking.interfaces.eth0.ipv4.addresses = []; - networking.interfaces.eth1.ipv4.addresses = [ - { address = externalRouterAddress; prefixLength = 24; } - ]; - networking.interfaces.eth2.ipv4.addresses = [ - { address = internalRouterAddress; prefixLength = 24; } - ]; - services.miniupnpd = { - enable = true; - externalInterface = "eth1"; - internalIPs = [ "eth2" ]; - appendConfig = '' - ext_ip=${externalRouterAddress} - ''; - }; + nodes = { + tracker = + { pkgs, ... }: + { + imports = [ transmissionConfig ]; + + virtualisation.vlans = [ 1 ]; + networking.firewall.enable = false; + networking.interfaces.eth1.ipv4.addresses = [ + { + address = externalTrackerAddress; + prefixLength = 24; + } + ]; + + # We need Apache on the tracker to serve the torrents. + services.httpd = { + enable = true; + virtualHosts = { + "torrentserver.org" = { + adminAddr = "foo@example.org"; + documentRoot = "/tmp"; + }; + }; + }; + services.opentracker.enable = true; + }; + + router = + { pkgs, nodes, ... }: + { + virtualisation.vlans = [ + 1 + 2 + ]; + networking.nat.enable = true; + networking.nat.internalInterfaces = [ "eth2" ]; + networking.nat.externalInterface = "eth1"; + networking.firewall.enable = true; + networking.firewall.trustedInterfaces = [ "eth2" ]; + networking.interfaces.eth0.ipv4.addresses = [ ]; + networking.interfaces.eth1.ipv4.addresses = [ + { + address = externalRouterAddress; + prefixLength = 24; + } + ]; + networking.interfaces.eth2.ipv4.addresses = [ + { + address = internalRouterAddress; + prefixLength = 24; + } + ]; + services.miniupnpd = { + enable = true; + externalInterface = "eth1"; + internalIPs = [ "eth2" ]; + appendConfig = '' + ext_ip=${externalRouterAddress} + ''; + }; + }; + + client1 = + { pkgs, nodes, ... }: + { + imports = [ transmissionConfig ]; + environment.systemPackages = [ pkgs.miniupnpc ]; + + virtualisation.vlans = [ 2 ]; + networking.interfaces.eth0.ipv4.addresses = [ ]; + networking.interfaces.eth1.ipv4.addresses = [ + { + address = internalClient1Address; + prefixLength = 24; + } + ]; + networking.defaultGateway = internalRouterAddress; + networking.firewall.enable = false; + }; + + client2 = + { pkgs, ... }: + { + imports = [ transmissionConfig ]; + + virtualisation.vlans = [ 1 ]; + networking.interfaces.eth0.ipv4.addresses = [ ]; + networking.interfaces.eth1.ipv4.addresses = [ + { + address = externalClient2Address; + prefixLength = 24; + } + ]; + networking.firewall.enable = false; + }; }; - client1 = { pkgs, nodes, ... }: { - imports = [ transmissionConfig ]; - environment.systemPackages = [ pkgs.miniupnpc ]; + testScript = + { nodes, ... }: + '' + start_all() - virtualisation.vlans = [ 2 ]; - networking.interfaces.eth0.ipv4.addresses = []; - networking.interfaces.eth1.ipv4.addresses = [ - { address = internalClient1Address; prefixLength = 24; } - ]; - networking.defaultGateway = internalRouterAddress; - networking.firewall.enable = false; - }; + # Wait for network and miniupnpd. + router.systemctl("start network-online.target") + router.wait_for_unit("network-online.target") + router.wait_for_unit("miniupnpd") - client2 = { pkgs, ... }: { - imports = [ transmissionConfig ]; + # Create the torrent. + tracker.succeed("mkdir ${download-dir}/data") + tracker.succeed( + "cp ${file} ${download-dir}/data/test.tar.bz2" + ) + tracker.succeed( + "transmission-create ${download-dir}/data/test.tar.bz2 --private --tracker http://${externalTrackerAddress}:6969/announce --outfile /tmp/test.torrent" + ) + tracker.succeed("chmod 644 /tmp/test.torrent") - virtualisation.vlans = [ 1 ]; - networking.interfaces.eth0.ipv4.addresses = []; - networking.interfaces.eth1.ipv4.addresses = [ - { address = externalClient2Address; prefixLength = 24; } - ]; - networking.firewall.enable = false; - }; - }; + # Start the tracker. !!! use a less crappy tracker + tracker.systemctl("start network-online.target") + tracker.wait_for_unit("network-online.target") + tracker.wait_for_unit("opentracker.service") + tracker.wait_for_open_port(6969) - testScript = { nodes, ... }: '' - start_all() + # Start the initial seeder. + tracker.succeed( + "transmission-remote --add /tmp/test.torrent --no-portmap --no-dht --download-dir ${download-dir}/data" + ) - # Wait for network and miniupnpd. - router.systemctl("start network-online.target") - router.wait_for_unit("network-online.target") - router.wait_for_unit("miniupnpd") + # Now we should be able to download from the client behind the NAT. + tracker.wait_for_unit("httpd") + client1.systemctl("start network-online.target") + client1.wait_for_unit("network-online.target") + client1.succeed("transmission-remote --add http://${externalTrackerAddress}/test.torrent >&2 &") + client1.wait_for_file("${download-dir}/test.tar.bz2") + client1.succeed( + "cmp ${download-dir}/test.tar.bz2 ${file}" + ) - # Create the torrent. - tracker.succeed("mkdir ${download-dir}/data") - tracker.succeed( - "cp ${file} ${download-dir}/data/test.tar.bz2" - ) - tracker.succeed( - "transmission-create ${download-dir}/data/test.tar.bz2 --private --tracker http://${externalTrackerAddress}:6969/announce --outfile /tmp/test.torrent" - ) - tracker.succeed("chmod 644 /tmp/test.torrent") + # Bring down the initial seeder. + tracker.stop_job("transmission") - # Start the tracker. !!! use a less crappy tracker - tracker.systemctl("start network-online.target") - tracker.wait_for_unit("network-online.target") - tracker.wait_for_unit("opentracker.service") - tracker.wait_for_open_port(6969) - - # Start the initial seeder. - tracker.succeed( - "transmission-remote --add /tmp/test.torrent --no-portmap --no-dht --download-dir ${download-dir}/data" - ) - - # Now we should be able to download from the client behind the NAT. - tracker.wait_for_unit("httpd") - client1.systemctl("start network-online.target") - client1.wait_for_unit("network-online.target") - client1.succeed("transmission-remote --add http://${externalTrackerAddress}/test.torrent >&2 &") - client1.wait_for_file("${download-dir}/test.tar.bz2") - client1.succeed( - "cmp ${download-dir}/test.tar.bz2 ${file}" - ) - - # Bring down the initial seeder. - tracker.stop_job("transmission") - - # Now download from the second client. This can only succeed if - # the first client created a NAT hole in the router. - client2.systemctl("start network-online.target") - client2.wait_for_unit("network-online.target") - client2.succeed( - "transmission-remote --add http://${externalTrackerAddress}/test.torrent --no-portmap --no-dht >&2 &" - ) - client2.wait_for_file("${download-dir}/test.tar.bz2") - client2.succeed( - "cmp ${download-dir}/test.tar.bz2 ${file}" - ) - ''; -}) + # Now download from the second client. This can only succeed if + # the first client created a NAT hole in the router. + client2.systemctl("start network-online.target") + client2.wait_for_unit("network-online.target") + client2.succeed( + "transmission-remote --add http://${externalTrackerAddress}/test.torrent --no-portmap --no-dht >&2 &" + ) + client2.wait_for_file("${download-dir}/test.tar.bz2") + client2.succeed( + "cmp ${download-dir}/test.tar.bz2 ${file}" + ) + ''; + } +) From ec32dd4de6e3929815d16aa64f0c3f2022c7b101 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 13 Sep 2024 04:57:53 +0000 Subject: [PATCH 028/236] ghidra-extensions.lightkeeper: 1.1.0 -> 1.1.1 --- pkgs/tools/security/ghidra/extensions/lightkeeper/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/ghidra/extensions/lightkeeper/default.nix b/pkgs/tools/security/ghidra/extensions/lightkeeper/default.nix index 74aa7ca90b11..f31e89c9f4ef 100644 --- a/pkgs/tools/security/ghidra/extensions/lightkeeper/default.nix +++ b/pkgs/tools/security/ghidra/extensions/lightkeeper/default.nix @@ -5,13 +5,13 @@ }: buildGhidraExtension rec { pname = "lightkeeper"; - version = "1.1.0"; + version = "1.1.1"; src = fetchFromGitHub { owner = "WorksButNotTested"; repo = "lightkeeper"; rev = version; - hash = "sha256-S8yNn56A2CvrIBsq0RoBx0qOjrYDZSv1IVTxGmlL4Js="; + hash = "sha256-Emyo4GBrR725jDxRsStC6/4F9mYnRo3S3QY0GeB/BvI="; }; preConfigure = '' cd lightkeeper From 82e844c5d2e3e125c4bc496b1f8206c2dcab04ce Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 16 Jul 2024 11:51:30 +0000 Subject: [PATCH 029/236] python312Packages.inquirer: 3.2.5 -> 3.3.0 --- pkgs/development/python-modules/inquirer/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/inquirer/default.nix b/pkgs/development/python-modules/inquirer/default.nix index 8b65de7cfe35..ff3d58cfe255 100644 --- a/pkgs/development/python-modules/inquirer/default.nix +++ b/pkgs/development/python-modules/inquirer/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { pname = "inquirer"; - version = "3.2.5"; + version = "3.3.0"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -29,7 +29,7 @@ buildPythonPackage rec { owner = "magmax"; repo = "python-inquirer"; rev = "refs/tags/v${version}"; - hash = "sha256-7No4Yw0zBGflvglx7G1/yjrsU/DkTrSz93DfIzokBYM="; + hash = "sha256-M4EgQ/DX00CtAXRNvXoVKVWxj1jRpnNdG4qxOv20/MI="; }; nativeBuildInputs = [ poetry-core ]; From 5dc649b2e7d762c9dc212138b5ae33ee8cbfb915 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 13 Sep 2024 12:10:20 +0200 Subject: [PATCH 030/236] python312Packages.inquirer: refactor --- pkgs/development/python-modules/inquirer/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/inquirer/default.nix b/pkgs/development/python-modules/inquirer/default.nix index ff3d58cfe255..63db32d65b53 100644 --- a/pkgs/development/python-modules/inquirer/default.nix +++ b/pkgs/development/python-modules/inquirer/default.nix @@ -21,20 +21,20 @@ buildPythonPackage rec { pname = "inquirer"; version = "3.3.0"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.8"; - src = fetchFromGitHub rec { + src = fetchFromGitHub { owner = "magmax"; repo = "python-inquirer"; rev = "refs/tags/v${version}"; hash = "sha256-M4EgQ/DX00CtAXRNvXoVKVWxj1jRpnNdG4qxOv20/MI="; }; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ blessed editor readchar From 7c545e26a31fc86421923c2c65faad309cf7923a Mon Sep 17 00:00:00 2001 From: eyjhb Date: Fri, 13 Sep 2024 15:22:34 +0200 Subject: [PATCH 031/236] nixos/neo4j: always set http values, even when disabled --- nixos/modules/services/databases/neo4j.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/databases/neo4j.nix b/nixos/modules/services/databases/neo4j.nix index ff4d47c3cf7f..c4e19a47ac7f 100644 --- a/nixos/modules/services/databases/neo4j.nix +++ b/nixos/modules/services/databases/neo4j.nix @@ -52,11 +52,9 @@ let server.directories.run=${cfg.directories.home}/run # HTTP Connector - ${lib.optionalString (cfg.http.enable) '' - server.http.enabled=${lib.boolToString cfg.http.enable} - server.http.listen_address=${cfg.http.listenAddress} - server.http.advertised_address=${cfg.http.listenAddress} - ''} + server.http.enabled=${lib.boolToString cfg.http.enable} + server.http.listen_address=${cfg.http.listenAddress} + server.http.advertised_address=${cfg.http.listenAddress} # HTTPS Connector server.https.enabled=${lib.boolToString cfg.https.enable} From d961443de7de23d1535c42b7b3514d1849fa03b1 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Wed, 11 Sep 2024 16:52:21 +0200 Subject: [PATCH 032/236] musescore: Add wrapGAppsHook3 --- pkgs/applications/audio/musescore/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/applications/audio/musescore/default.nix b/pkgs/applications/audio/musescore/default.nix index fbfc50a1a684..cfb50546b705 100644 --- a/pkgs/applications/audio/musescore/default.nix +++ b/pkgs/applications/audio/musescore/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , fetchpatch , cmake +, wrapGAppsHook3 , wrapQtAppsHook , pkg-config , ninja @@ -95,7 +96,14 @@ in stdenv'.mkDerivation (finalAttrs: { "--set-default QT_QPA_PLATFORM xcb" ]; + preFixup = '' + qtWrapperArgs+=("''${gappsWrapperArgs[@]}") + ''; + + dontWrapGApps = true; + nativeBuildInputs = [ + wrapGAppsHook3 wrapQtAppsHook cmake qttools From df275267440bd5b7bdb7c835417eb038eee9d3e9 Mon Sep 17 00:00:00 2001 From: Gavin John Date: Thu, 5 Sep 2024 11:13:33 -0700 Subject: [PATCH 033/236] qgroundcontrol: move to by-name --- .../default.nix => by-name/qg/qgroundcontrol/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename pkgs/{applications/science/robotics/qgroundcontrol/default.nix => by-name/qg/qgroundcontrol/package.nix} (100%) diff --git a/pkgs/applications/science/robotics/qgroundcontrol/default.nix b/pkgs/by-name/qg/qgroundcontrol/package.nix similarity index 100% rename from pkgs/applications/science/robotics/qgroundcontrol/default.nix rename to pkgs/by-name/qg/qgroundcontrol/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a4ca15f6c5db..00b0bd079710 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -32787,7 +32787,7 @@ with pkgs; wrapQemuBinfmtP = callPackage ../applications/virtualization/qemu/binfmt-p-wrapper.nix { }; - qgroundcontrol = libsForQt5.callPackage ../applications/science/robotics/qgroundcontrol { }; + qgroundcontrol = libsForQt5.callPackage ../by-name/qg/qgroundcontrol/package.nix { }; qjackctl = libsForQt5.callPackage ../applications/audio/qjackctl { }; From 16cba249af34bf0046006bff2ef8920aa1977e14 Mon Sep 17 00:00:00 2001 From: Gavin John Date: Thu, 5 Sep 2024 11:14:35 -0700 Subject: [PATCH 034/236] qgroundcontrol: nixfmt --- pkgs/by-name/qg/qgroundcontrol/package.nix | 47 ++++++++++++++++++---- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/qg/qgroundcontrol/package.nix b/pkgs/by-name/qg/qgroundcontrol/package.nix index 8caddf7dfcef..7cb29b68a09e 100644 --- a/pkgs/by-name/qg/qgroundcontrol/package.nix +++ b/pkgs/by-name/qg/qgroundcontrol/package.nix @@ -1,14 +1,39 @@ -{ lib, stdenv, fetchFromGitHub, SDL2, qtbase, qtcharts, qtlocation, qtserialport -, qtsvg, qtquickcontrols2, qtgraphicaleffects, qtspeech, qtx11extras, qmake -, qttools, gst_all_1, wayland, pkg-config, wrapQtAppsHook }: +{ + lib, + stdenv, + fetchFromGitHub, + SDL2, + qtbase, + qtcharts, + qtlocation, + qtserialport, + qtsvg, + qtquickcontrols2, + qtgraphicaleffects, + qtspeech, + qtx11extras, + qmake, + qttools, + gst_all_1, + wayland, + pkg-config, + wrapQtAppsHook, +}: stdenv.mkDerivation rec { pname = "qgroundcontrol"; version = "4.4.2"; propagatedBuildInputs = [ - qtbase qtcharts qtlocation qtserialport qtsvg qtquickcontrols2 - qtgraphicaleffects qtspeech qtx11extras + qtbase + qtcharts + qtlocation + qtserialport + qtsvg + qtquickcontrols2 + qtgraphicaleffects + qtspeech + qtx11extras ]; gstInputs = with gst_all_1; [ @@ -21,7 +46,12 @@ stdenv.mkDerivation rec { ]; buildInputs = [ SDL2 ] ++ gstInputs ++ propagatedBuildInputs; - nativeBuildInputs = [ pkg-config qmake qttools wrapQtAppsHook ]; + nativeBuildInputs = [ + pkg-config + qmake + qttools + wrapQtAppsHook + ]; preConfigure = '' mkdir build @@ -76,7 +106,10 @@ stdenv.mkDerivation rec { homepage = "http://qgroundcontrol.com/"; license = licenses.gpl3Plus; platforms = platforms.linux; - maintainers = with maintainers; [ lopsided98 pandapip1 ]; + maintainers = with maintainers; [ + lopsided98 + pandapip1 + ]; mainProgram = "QGroundControl"; }; } From 4f688aecec5c30480ea501188b3912b10dfe2442 Mon Sep 17 00:00:00 2001 From: Gavin John Date: Thu, 5 Sep 2024 11:14:58 -0700 Subject: [PATCH 035/236] qgroundcontrol: Replace homepage with https link --- pkgs/by-name/qg/qgroundcontrol/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/qg/qgroundcontrol/package.nix b/pkgs/by-name/qg/qgroundcontrol/package.nix index 7cb29b68a09e..3d12c817ab59 100644 --- a/pkgs/by-name/qg/qgroundcontrol/package.nix +++ b/pkgs/by-name/qg/qgroundcontrol/package.nix @@ -103,7 +103,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Provides full ground station support and configuration for the PX4 and APM Flight Stacks"; - homepage = "http://qgroundcontrol.com/"; + homepage = "https://qgroundcontrol.com/"; license = licenses.gpl3Plus; platforms = platforms.linux; maintainers = with maintainers; [ From e78df2f24e493c1daf1f263512f8586b347bb0ef Mon Sep 17 00:00:00 2001 From: Gavin John Date: Thu, 5 Sep 2024 11:15:37 -0700 Subject: [PATCH 036/236] qgroundcontrol: remove a `with lib;` --- pkgs/by-name/qg/qgroundcontrol/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/qg/qgroundcontrol/package.nix b/pkgs/by-name/qg/qgroundcontrol/package.nix index 3d12c817ab59..b48cd62aadbb 100644 --- a/pkgs/by-name/qg/qgroundcontrol/package.nix +++ b/pkgs/by-name/qg/qgroundcontrol/package.nix @@ -101,12 +101,12 @@ stdenv.mkDerivation rec { fetchSubmodules = true; }; - meta = with lib; { + meta = { description = "Provides full ground station support and configuration for the PX4 and APM Flight Stacks"; homepage = "https://qgroundcontrol.com/"; - license = licenses.gpl3Plus; - platforms = platforms.linux; - maintainers = with maintainers; [ + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ lopsided98 pandapip1 ]; From 54bda8090bf8495ee8905c653b8d57a9a8898e51 Mon Sep 17 00:00:00 2001 From: Gavin John Date: Thu, 5 Sep 2024 11:22:08 -0700 Subject: [PATCH 037/236] qgroundcontrol: add changelog --- pkgs/by-name/qg/qgroundcontrol/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/qg/qgroundcontrol/package.nix b/pkgs/by-name/qg/qgroundcontrol/package.nix index b48cd62aadbb..72f8a972f9ac 100644 --- a/pkgs/by-name/qg/qgroundcontrol/package.nix +++ b/pkgs/by-name/qg/qgroundcontrol/package.nix @@ -104,6 +104,7 @@ stdenv.mkDerivation rec { meta = { description = "Provides full ground station support and configuration for the PX4 and APM Flight Stacks"; homepage = "https://qgroundcontrol.com/"; + changelog = "https://github.com/mavlink/qgroundcontrol/blob/master/ChangeLog.md"; license = lib.licenses.gpl3Plus; platforms = lib.platforms.linux; maintainers = with lib.maintainers; [ From 4c6a603295b7b74b7cbf19c3558f17358b6b5bdb Mon Sep 17 00:00:00 2001 From: Gavin John Date: Thu, 5 Sep 2024 11:22:48 -0700 Subject: [PATCH 038/236] qgroundcontrol: Remove pname misuse --- pkgs/by-name/qg/qgroundcontrol/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/qg/qgroundcontrol/package.nix b/pkgs/by-name/qg/qgroundcontrol/package.nix index 72f8a972f9ac..abaf015764aa 100644 --- a/pkgs/by-name/qg/qgroundcontrol/package.nix +++ b/pkgs/by-name/qg/qgroundcontrol/package.nix @@ -95,7 +95,7 @@ stdenv.mkDerivation rec { # TODO: package mavlink so we can build from a normal source tarball src = fetchFromGitHub { owner = "mavlink"; - repo = pname; + repo = "qgroundcontrol"; rev = "v${version}"; hash = "sha256-2Bc4uC/2e+PTsvFZ4RjnTzkOiBO9vsYHeLPkcwpDRrg="; fetchSubmodules = true; From 5bffe8d9b592aa371880714f746a0de5c0d924cc Mon Sep 17 00:00:00 2001 From: Gavin John Date: Thu, 5 Sep 2024 12:01:16 -0700 Subject: [PATCH 039/236] qgroundcontrol: switch to using libsForQt5 --- pkgs/by-name/qg/qgroundcontrol/package.nix | 28 +++++++--------------- pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/pkgs/by-name/qg/qgroundcontrol/package.nix b/pkgs/by-name/qg/qgroundcontrol/package.nix index abaf015764aa..b27e6bb51b4a 100644 --- a/pkgs/by-name/qg/qgroundcontrol/package.nix +++ b/pkgs/by-name/qg/qgroundcontrol/package.nix @@ -3,28 +3,17 @@ stdenv, fetchFromGitHub, SDL2, - qtbase, - qtcharts, - qtlocation, - qtserialport, - qtsvg, - qtquickcontrols2, - qtgraphicaleffects, - qtspeech, - qtx11extras, - qmake, - qttools, + libsForQt5, gst_all_1, wayland, pkg-config, - wrapQtAppsHook, }: stdenv.mkDerivation rec { pname = "qgroundcontrol"; version = "4.4.2"; - propagatedBuildInputs = [ + propagatedBuildInputs = with libsForQt5; [ qtbase qtcharts qtlocation @@ -46,12 +35,13 @@ stdenv.mkDerivation rec { ]; buildInputs = [ SDL2 ] ++ gstInputs ++ propagatedBuildInputs; - nativeBuildInputs = [ - pkg-config - qmake - qttools - wrapQtAppsHook - ]; + nativeBuildInputs = + [ pkg-config ] + ++ (with libsForQt5; [ + qmake + qttools + wrapQtAppsHook + ]); preConfigure = '' mkdir build diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 00b0bd079710..facc5b1fb2ce 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -32787,8 +32787,6 @@ with pkgs; wrapQemuBinfmtP = callPackage ../applications/virtualization/qemu/binfmt-p-wrapper.nix { }; - qgroundcontrol = libsForQt5.callPackage ../by-name/qg/qgroundcontrol/package.nix { }; - qjackctl = libsForQt5.callPackage ../applications/audio/qjackctl { }; qimgv = libsForQt5.callPackage ../applications/graphics/qimgv { }; From ef5cdd9fc6a2e0832ef5826de89d963cdad797e4 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sat, 14 Sep 2024 10:22:11 +0900 Subject: [PATCH 040/236] luigi: build with pypaBuildHook --- pkgs/applications/networking/cluster/luigi/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/cluster/luigi/default.nix b/pkgs/applications/networking/cluster/luigi/default.nix index 60373a8f85fc..8c145ef6393f 100644 --- a/pkgs/applications/networking/cluster/luigi/default.nix +++ b/pkgs/applications/networking/cluster/luigi/default.nix @@ -3,13 +3,18 @@ python3.pkgs.buildPythonApplication rec { pname = "luigi"; version = "3.5.2"; + pyproject = true; src = fetchPypi { inherit pname version; hash = "sha256-0AD+am6nfJN2Z0/oegRawAw/z36+hBRlWgZjCqnbURE="; }; - propagatedBuildInputs = with python3.pkgs; [ python-dateutil tornado python-daemon boto3 tenacity ]; + build-system = [ python3.pkgs.setuptools ]; + + dependencies = with python3.pkgs; [ python-dateutil tornado python-daemon tenacity ]; + + pythonImportsCheck = [ "luigi" ]; # Requires tox, hadoop, and google cloud doCheck = false; From 00130888b32eeca1ad8da7010900861930f29c40 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 14 Sep 2024 12:36:04 +0200 Subject: [PATCH 041/236] python312Packages.weheat: init at 2024.09.10 Library to interact with the weheat API https://github.com/wefabricate/wh-python --- .../python-modules/weheat/default.nix | 52 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 54 insertions(+) create mode 100644 pkgs/development/python-modules/weheat/default.nix diff --git a/pkgs/development/python-modules/weheat/default.nix b/pkgs/development/python-modules/weheat/default.nix new file mode 100644 index 000000000000..00bdac870ffa --- /dev/null +++ b/pkgs/development/python-modules/weheat/default.nix @@ -0,0 +1,52 @@ +{ + lib, + aenum, + buildPythonPackage, + fetchFromGitHub, + pydantic, + python-dateutil, + pythonOlder, + setuptools, + urllib3, +}: + +buildPythonPackage rec { + pname = "weheat"; + version = "2024.09.10"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "wefabricate"; + repo = "wh-python"; + rev = "refs/tags/${version}"; + hash = "sha256-D9m9IR5RTRphIgDX25izkbAHeLml9AYL6xdH46ryqaI="; + }; + + pythonRelaxDeps = [ + "urllib3" + "pydantic" + ]; + + build-system = [ setuptools ]; + + dependencies = [ + aenum + pydantic + python-dateutil + urllib3 + ]; + + # Module has no tests + doCheck = false; + + pythonImportsCheck = [ "weheat" ]; + + meta = { + description = "Library to interact with the weheat API"; + homepage = "https://github.com/wefabricate/wh-python"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fb1c6cdddf59..5678810ef781 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17285,6 +17285,8 @@ self: super: with self; { weconnect-mqtt = callPackage ../development/python-modules/weconnect-mqtt { }; + weheat = callPackage ../development/python-modules/weheat { }; + werkzeug = callPackage ../development/python-modules/werkzeug { }; west = callPackage ../development/python-modules/west { }; From 3362c8c585216b28a60864915b7362bf80f923c8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 14 Sep 2024 12:39:31 +0200 Subject: [PATCH 042/236] python312Packages.aiohasupervisor: init at 0.1.0b0 Client for Home Assistant Supervisor https://pypi.org/project/aiohasupervisor/ --- .../aiohasupervisor/default.nix | 64 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 66 insertions(+) create mode 100644 pkgs/development/python-modules/aiohasupervisor/default.nix diff --git a/pkgs/development/python-modules/aiohasupervisor/default.nix b/pkgs/development/python-modules/aiohasupervisor/default.nix new file mode 100644 index 000000000000..89c706c578cf --- /dev/null +++ b/pkgs/development/python-modules/aiohasupervisor/default.nix @@ -0,0 +1,64 @@ +{ + lib, + aiohttp, + aioresponses, + buildPythonPackage, + fetchPypi, + mashumaro, + orjson, + pytest-aiohttp, + pytest-cov-stub, + pytest-timeout, + pytestCheckHook, + pythonOlder, + setuptools, + yarl, +}: + +buildPythonPackage rec { + pname = "aiohasupervisor"; + version = "0.1.0b0"; + pyproject = true; + + disabled = pythonOlder "3.12"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-ocvNDLZ6h4PincCHhZfKEsIvQH0LScAsY3zrfDsXWHI="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "setuptools~=68.0.0" "setuptools>=68.0.0" \ + --replace-fail "wheel~=0.40.0" "wheel>=0.40.0" + ''; + + build-system = [ setuptools ]; + + dependencies = [ + aiohttp + mashumaro + orjson + yarl + ]; + + nativeCheckInputs = [ + aioresponses + pytest-aiohttp + pytest-cov-stub + pytest-timeout + pytestCheckHook + ]; + + # Import issue, check with next release + doCheck = false; + + pythonImportsCheck = [ "aiohasupervisor" ]; + + meta = { + description = "Client for Home Assistant Supervisor"; + homepage = "https://pypi.org/project/aiohasupervisor/"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fb1c6cdddf59..cf4361bb8be6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -239,6 +239,8 @@ self: super: with self; { aioharmony = callPackage ../development/python-modules/aioharmony { }; + aiohasupervisor = callPackage ../development/python-modules/aiohasupervisor { }; + aiohomekit = callPackage ../development/python-modules/aiohomekit { }; aiohttp = callPackage ../development/python-modules/aiohttp { }; From 311dbf93c8fda2a0f2e5c4a6a4a4077a6626139f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 14 Sep 2024 16:01:38 +0200 Subject: [PATCH 043/236] octoscan: init at 0-unstable-2024-08-25 Static vulnerability scanner for GitHub action workflows https://github.com/synacktiv/octoscan --- pkgs/by-name/oc/octoscan/package.nix | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pkgs/by-name/oc/octoscan/package.nix diff --git a/pkgs/by-name/oc/octoscan/package.nix b/pkgs/by-name/oc/octoscan/package.nix new file mode 100644 index 000000000000..c3a6e4d50b96 --- /dev/null +++ b/pkgs/by-name/oc/octoscan/package.nix @@ -0,0 +1,33 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, +}: + +buildGoModule rec { + pname = "octoscan"; + version = "0-unstable-2024-08-25"; + + src = fetchFromGitHub { + owner = "synacktiv"; + repo = "octoscan"; + # https://github.com/synacktiv/octoscan/issues/7 + rev = "69f0761fe4d31f7fe4050fde5fd807364155fde4"; + hash = "sha256-2aCjqjBDXqGbu94o22JRpJ5nUv8U46JGRcrBJCINflQ="; + }; + + vendorHash = "sha256-9IT8qTFzn8otWGTBP7ODcT8iBckIJ/3+jkbF1dq6aDw="; + + ldflags = [ + "-s" + "-w" + ]; + + meta = { + description = "Static vulnerability scanner for GitHub action workflows"; + homepage = "https://github.com/synacktiv/octoscan"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ fab ]; + mainProgram = "octoscan"; + }; +} From 29608c50efa1df53b4d64c990922204946197c2a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 14 Sep 2024 16:05:32 +0200 Subject: [PATCH 044/236] python312Packages.pysigma: 0.11.13 -> 0.11.14 Diff: https://github.com/SigmaHQ/pySigma/compare/refs/tags/v0.11.13...v0.11.14 Changelog: https://github.com/SigmaHQ/pySigma/releases/tag/v0.11.14 --- pkgs/development/python-modules/pysigma/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pysigma/default.nix b/pkgs/development/python-modules/pysigma/default.nix index b6786ea77ff4..8987f9820e84 100644 --- a/pkgs/development/python-modules/pysigma/default.nix +++ b/pkgs/development/python-modules/pysigma/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "pysigma"; - version = "0.11.13"; + version = "0.11.14"; pyproject = true; disabled = pythonOlder "3.8"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "SigmaHQ"; repo = "pySigma"; rev = "refs/tags/v${version}"; - hash = "sha256-YgEgPvBvVzk0Q2mBXyjBozGnjcs4H/+/5ghMU7/CMDw="; + hash = "sha256-jxVTXw3WZcOL5IDUHs+DRGoXDRFn99UWOz5j5mCEf8A="; }; pythonRelaxDeps = [ From 6847ffb2ab5286e0208d64eb6d39c3b5ed0e91a5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 14 Sep 2024 16:33:33 +0200 Subject: [PATCH 045/236] python312Packages.taxii2-client: init at 2.3.0 TAXII 2 client library https://github.com/oasis-open/cti-taxii-client/ --- .../python-modules/taxii2-client/default.nix | 43 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/python-modules/taxii2-client/default.nix diff --git a/pkgs/development/python-modules/taxii2-client/default.nix b/pkgs/development/python-modules/taxii2-client/default.nix new file mode 100644 index 000000000000..49ad9b891630 --- /dev/null +++ b/pkgs/development/python-modules/taxii2-client/default.nix @@ -0,0 +1,43 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pythonOlder, + pytz, + requests, + setuptools, + six, +}: + +buildPythonPackage rec { + pname = "taxii2-client"; + version = "2.3.0"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "oasis-open"; + repo = "cti-taxii-client"; + rev = "refs/tags/v${version}"; + hash = "sha256-e22bJdLAlm30vv/xIgLSjcwmzfN0Pwt2JydLgEbA+Is="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + pytz + requests + six + ]; + + pythonImportsCheck = [ "taxii2client" ]; + + meta = { + description = "TAXII 2 client library"; + homepage = "https://github.com/oasis-open/cti-taxii-client/"; + changelog = "https://github.com/oasis-open/cti-taxii-client/blob/${src.rev}/CHANGES.txt"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fb1c6cdddf59..e7804f8a525b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15146,6 +15146,8 @@ self: super: with self; { taxi = callPackage ../development/python-modules/taxi { }; + taxii2-client = callPackage ../development/python-modules/taxii2-client { }; + tbats = callPackage ../development/python-modules/tbats { }; tblib = callPackage ../development/python-modules/tblib { }; From eb2bb25eba2b443a8f99a8bcf32df4763416fc68 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 14 Sep 2024 17:03:46 +0200 Subject: [PATCH 046/236] python312Packages.stix2-validator: init at 3.2.0 Validator for STIX 2.0 JSON normative requirements and best practices https://github.com/oasis-open/cti-stix-validator/ --- .../stix2-validator/default.nix | 55 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/stix2-validator/default.nix diff --git a/pkgs/development/python-modules/stix2-validator/default.nix b/pkgs/development/python-modules/stix2-validator/default.nix new file mode 100644 index 000000000000..105e11713d0e --- /dev/null +++ b/pkgs/development/python-modules/stix2-validator/default.nix @@ -0,0 +1,55 @@ +{ + lib, + buildPythonPackage, + colorama, + cpe, + fetchFromGitHub, + jsonschema, + python-dateutil, + pythonOlder, + requests, + setuptools, + simplejson, + stix2-patterns, +}: + +buildPythonPackage rec { + pname = "stix2-validator"; + version = "3.2.0"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "oasis-open"; + repo = "cti-stix-validator"; + rev = "refs/tags/v${version}"; + hash = "sha256-OI1SXILyCRGl1ZsoyYDl+/RsBhTP24eqECtW3uazS2k="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + colorama + cpe + jsonschema + python-dateutil + requests + simplejson + stix2-patterns + ]; + + # Tests need more work + # Exception: Could not deserialize ATN with version (expected 4). + doCheck = false; + + # nativeCheckInputs = [ pytestCheckHook ]; + + meta = { + description = "Validator for STIX 2.0 JSON normative requirements and best practices"; + homepage = "https://github.com/oasis-open/cti-stix-validator/"; + changelog = "https://github.com/oasis-open/cti-stix-validator/blob/${src.rev}/CHANGELOG"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e7804f8a525b..51186052915d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14894,6 +14894,8 @@ self: super: with self; { stix2-patterns = callPackage ../development/python-modules/stix2-patterns { }; + stix2-validator = callPackage ../development/python-modules/stix2-validator { }; + stm32loader = callPackage ../development/python-modules/stm32loader { }; stone = callPackage ../development/python-modules/stone { }; From 0b4ee8409ac6ab74e1dd1c5407896826f6dffce9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 14 Sep 2024 17:21:54 +0200 Subject: [PATCH 047/236] python312Packages.mixbox: init at 1.0.5 Library of common code leveraged by cybox, maec and stix https://github.com/CybOXProject/mixbox --- .../python-modules/mixbox/default.nix | 54 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 56 insertions(+) create mode 100644 pkgs/development/python-modules/mixbox/default.nix diff --git a/pkgs/development/python-modules/mixbox/default.nix b/pkgs/development/python-modules/mixbox/default.nix new file mode 100644 index 000000000000..7e348f8bc676 --- /dev/null +++ b/pkgs/development/python-modules/mixbox/default.nix @@ -0,0 +1,54 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + lxml, + ordered-set, + pytestCheckHook, + python-dateutil, + pythonOlder, + setuptools, +}: + +buildPythonPackage rec { + pname = "mixbox"; + version = "1.0.5"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "CybOXProject"; + repo = "mixbox"; + rev = "refs/tags/v${version}"; + hash = "sha256-qK3cKOf0s345M1pVFro5NFhDj4lch12UegOY1ZUEOBQ="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + lxml + ordered-set + python-dateutil + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "mixbox" ]; + + pytestFlagsArray = [ "test/*.py" ]; + + disabledTests = [ + # Tests are out-dated + "test_serialize_datetime_as_date" + "test_preferred_prefixes" + ]; + + meta = { + description = "Library of common code leveraged by cybox, maec and stix"; + homepage = "https://github.com/CybOXProject/mixbox"; + changelog = "https://github.com/CybOXProject/mixbox/releases/tag/v${version}"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 51186052915d..369756f6c9a0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7900,6 +7900,8 @@ self: super: with self; { mitogen = callPackage ../development/python-modules/mitogen { }; + mixbox = callPackage ../development/python-modules/mixbox { }; + mixins = callPackage ../development/python-modules/mixins { }; mixpanel = callPackage ../development/python-modules/mixpanel { }; From fe89dcbcef00e634c1a017f8ce6d58f451d37c92 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Sat, 14 Sep 2024 10:34:35 -0500 Subject: [PATCH 048/236] vimPlugins.git-worktree-nvim: add plenary dependency --- pkgs/applications/editors/vim/plugins/overrides.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index ecca61f46151..ef0a0ac1cdb6 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -876,6 +876,10 @@ dependencies = with self; [ plenary-nvim ]; }; + git-worktree-nvim = super.git-worktree-nvim.overrideAttrs { + dependencies = with super; [ plenary-nvim ]; + }; + guard-nvim = super.guard-nvim.overrideAttrs { dependencies = with self; [ guard-collection ]; }; From e97fef1229c581727a1bee2e97eae133e2049b38 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 14 Sep 2024 18:15:34 +0200 Subject: [PATCH 049/236] python312Packages.cybox: init at 2.1.0.21 Library for parsing, manipulating, and generating CybOX content https://github.com/CybOXProject/python-cybox/ --- .../python-modules/cybox/default.nix | 56 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 58 insertions(+) create mode 100644 pkgs/development/python-modules/cybox/default.nix diff --git a/pkgs/development/python-modules/cybox/default.nix b/pkgs/development/python-modules/cybox/default.nix new file mode 100644 index 000000000000..24c991a05862 --- /dev/null +++ b/pkgs/development/python-modules/cybox/default.nix @@ -0,0 +1,56 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + fetchpatch, + lxml, + mixbox, + pytestCheckHook, + python-dateutil, + pythonOlder, + setuptools, +}: + +buildPythonPackage rec { + pname = "cybox"; + version = "2.1.0.21"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "CybOXProject"; + repo = "python-cybox"; + rev = "refs/tags/v${version}"; + hash = "sha256-Gn/gH7pvvOqLIGExgCNa5KswPazIZUZXdQe3LRAUVjw="; + }; + + patches = [ + # Import ABC from collections.abc for Python 3 compatibility, https://github.com/CybOXProject/python-cybox/pull/332 + (fetchpatch { + name = "collections-abc.patch"; + url = "https://github.com/CybOXProject/python-cybox/commit/fd4631dac12943d89e9ea2e94105cbc3b81d52f9.patch"; + hash = "sha256-dXEsJujtbU/SuUBge8abWgMPeYO1ZR3c5758Bd0dnwE="; + }) + ]; + + build-system = [ setuptools ]; + + dependencies = [ + lxml + mixbox + python-dateutil + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "cybox" ]; + + meta = { + description = "Library for parsing, manipulating, and generating CybOX content"; + homepage = "https://github.com/CybOXProject/python-cybox/"; + changelog = "https://github.com/CybOXProject/python-cybox/blob/${src.rev}/CHANGES.txt"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 369756f6c9a0..af64eeecc385 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2767,6 +2767,8 @@ self: super: with self; { cxxheaderparser = callPackage ../development/python-modules/cxxheaderparser { }; + cybox = callPackage ../development/python-modules/cybox { }; + cycler = callPackage ../development/python-modules/cycler { }; cyclonedx-python-lib = callPackage ../development/python-modules/cyclonedx-python-lib { }; From 2031cc55b1cb9760e043c0ace8ac5257d39922e8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 14 Sep 2024 18:18:46 +0200 Subject: [PATCH 050/236] python312Packages.maec: init at 4.1.0.17 Library for parsing, manipulating, and generating MAEC content https://github.com/MAECProject/python-maec/ --- .../python-modules/maec/default.nix | 50 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 52 insertions(+) create mode 100644 pkgs/development/python-modules/maec/default.nix diff --git a/pkgs/development/python-modules/maec/default.nix b/pkgs/development/python-modules/maec/default.nix new file mode 100644 index 000000000000..2c29be54289f --- /dev/null +++ b/pkgs/development/python-modules/maec/default.nix @@ -0,0 +1,50 @@ +{ + lib, + buildPythonPackage, + cybox, + distutils, + fetchFromGitHub, + lxml, + mixbox, + pytestCheckHook, + pythonOlder, + setuptools, +}: + +buildPythonPackage rec { + pname = "maec"; + version = "4.1.0.17"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "MAECProject"; + repo = "python-maec"; + rev = "refs/tags/v${version}"; + hash = "sha256-I2Ov2AQiC9D8ivHqn7owcTsNS7Kw+CWVyijK3VO52Og="; + }; + + build-system = [ + distutils + setuptools + ]; + + dependencies = [ + cybox + lxml + mixbox + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "maec" ]; + + meta = { + description = "Library for parsing, manipulating, and generating MAEC content"; + homepage = "https://github.com/MAECProject/python-maec/"; + changelog = "https://github.com/MAECProject/python-maec/blob/${src.rev}/CHANGES.txt"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index af64eeecc385..379a899c7fac 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7474,6 +7474,8 @@ self: super: with self; { macropy = callPackage ../development/python-modules/macropy { }; + maec = callPackage ../development/python-modules/maec { }; + maestral = callPackage ../development/python-modules/maestral { }; magic = callPackage ../development/python-modules/magic { }; From 09b0477d42234a18b92cc7a8e4ca640c6f8401b2 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 14 Sep 2024 16:38:51 +0000 Subject: [PATCH 051/236] python312Packages.motionblinds: 0.6.24 -> 0.6.25 --- pkgs/development/python-modules/motionblinds/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/motionblinds/default.nix b/pkgs/development/python-modules/motionblinds/default.nix index 451d4e0edfa2..b791f9483ead 100644 --- a/pkgs/development/python-modules/motionblinds/default.nix +++ b/pkgs/development/python-modules/motionblinds/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "motionblinds"; - version = "0.6.24"; + version = "0.6.25"; pyproject = true; disabled = pythonOlder "3.7"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "starkillerOG"; repo = "motion-blinds"; rev = "refs/tags/${version}"; - hash = "sha256-4ao0FalOFrr4or7iUqx5aAw93yqI2i3/uF4rdHOsa7M="; + hash = "sha256-MU+zMka8d8wocc90vdS56BMHg6Z/LAAdRetiysh9Ssc="; }; build-system = [ setuptools ]; From e96b361f1b126660ee2d724ec6cda48b4f49b33f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 14 Sep 2024 19:42:23 +0000 Subject: [PATCH 052/236] yandex-cloud: 0.132.1 -> 0.133.0 --- pkgs/by-name/ya/yandex-cloud/sources.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/ya/yandex-cloud/sources.json b/pkgs/by-name/ya/yandex-cloud/sources.json index 8cc8c92fb364..2f9bfea320d9 100644 --- a/pkgs/by-name/ya/yandex-cloud/sources.json +++ b/pkgs/by-name/ya/yandex-cloud/sources.json @@ -1,25 +1,25 @@ { - "version": "0.132.1", + "version": "0.133.0", "binaries": { "aarch64-darwin": { - "url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.132.1/darwin/arm64/yc", - "hash": "sha256-d8Fw17Ld4/ifJ6hHTX2kcc8ju/5eXcUcRjyey16lEoo=" + "url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.133.0/darwin/arm64/yc", + "hash": "sha256-qdpiMIQygggXRysEClQPCSTHyG4Iz3qsqcpkGUmPylQ=" }, "aarch64-linux": { - "url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.132.1/linux/arm64/yc", - "hash": "sha256-VvfJGsNKd5uBDDZ8bWab7ZLaIKj7lG/5Kwvc/60MTuA=" + "url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.133.0/linux/arm64/yc", + "hash": "sha256-GyAeEIF07DmNFLYsmhmc76pEK7uao5v3XswG/mY0HNA=" }, "i686-linux": { - "url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.132.1/linux/386/yc", - "hash": "sha256-99rqys2wqY4B3S5XT2r75WyiffO09QoFBaKbbvNRSr8=" + "url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.133.0/linux/386/yc", + "hash": "sha256-j3Ieq2C+/LHHX7W5xhi77xKLqlMWV6MeCEVmR46ZLDk=" }, "x86_64-darwin": { - "url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.132.1/darwin/amd64/yc", - "hash": "sha256-ATMGC4RAHXJV13u4xNZWJboplrec6SSvbQwjTz1cBgI=" + "url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.133.0/darwin/amd64/yc", + "hash": "sha256-0HnSg1cwLDwv8RuGPZ0wJcCD1vCYOCjJJfLxu5b7hag=" }, "x86_64-linux": { - "url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.132.1/linux/amd64/yc", - "hash": "sha256-gI4ACuKEH7n3BP+v8I/8B7nyYFZch6LGuywr0qIxlE8=" + "url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.133.0/linux/amd64/yc", + "hash": "sha256-kP0BJUTVtRcyE/S24hBQrKxu/A4Zxo+PzlhdVZbcNc8=" } } } From f493e3f06186c2f001880fb778c27dcaa3fa4aa6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 14 Sep 2024 21:57:29 +0200 Subject: [PATCH 053/236] python312Packages.bc-detect-secrets: 1.5.15 -> 1.5.16 Diff: https://github.com/bridgecrewio/detect-secrets/compare/refs/tags/1.5.15...1.5.16 --- pkgs/development/python-modules/bc-detect-secrets/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/bc-detect-secrets/default.nix b/pkgs/development/python-modules/bc-detect-secrets/default.nix index 526562f1286a..f392cdfbbc7a 100644 --- a/pkgs/development/python-modules/bc-detect-secrets/default.nix +++ b/pkgs/development/python-modules/bc-detect-secrets/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "bc-detect-secrets"; - version = "1.5.15"; + version = "1.5.16"; pyproject = true; disabled = pythonOlder "3.8"; @@ -26,7 +26,7 @@ buildPythonPackage rec { owner = "bridgecrewio"; repo = "detect-secrets"; rev = "refs/tags/${version}"; - hash = "sha256-D4TJnaxaCCJWgDPbGvbxkW6yg/Ph1jaIT9QBjxFcxAw="; + hash = "sha256-SXwaZv7aki+lQvRe6S5SLF7UFvf3n9MaUFqw2Um8ENg="; }; build-system = [ setuptools ]; From 59226f616c8876fc4c3ac12b3945a899af63e4e1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 14 Sep 2024 22:04:35 +0200 Subject: [PATCH 054/236] python312Packages.channels: 4.0.0 -> 4.1.0 Diff: https://github.com/django/channels/compare/refs/tags/4.0.0...4.1.0 Changelog: https://github.com/django/channels/blob/4.1.0/CHANGELOG.txt --- .../python-modules/channels/default.nix | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/channels/default.nix b/pkgs/development/python-modules/channels/default.nix index f7a204f1f3e2..df15fbdf4c75 100644 --- a/pkgs/development/python-modules/channels/default.nix +++ b/pkgs/development/python-modules/channels/default.nix @@ -10,28 +10,31 @@ pytest-django, pytestCheckHook, pythonOlder, + setuptools, }: buildPythonPackage rec { pname = "channels"; - version = "4.0.0"; - format = "setuptools"; + version = "4.1.0"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "django"; - repo = pname; - rev = version; - hash = "sha256-n88MxwYQ4O2kBy/W0Zvi3FtIlhZQQRCssB/lYrFNvps="; + repo = "channels"; + rev = "refs/tags/${version}"; + hash = "sha256-JUU1N+Sc7t//0vEdkgQy20iVKgHr4Ys+XnLgqPMcKM8="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ asgiref django ]; - passthru.optional-dependencies = { + optional-dependencies = { daphne = [ daphne ]; }; @@ -40,13 +43,14 @@ buildPythonPackage rec { pytest-asyncio pytest-django pytestCheckHook - ] ++ passthru.optional-dependencies.daphne; + ] ++ lib.flatten (builtins.attrValues optional-dependencies); pythonImportsCheck = [ "channels" ]; meta = with lib; { description = "Brings event-driven capabilities to Django with a channel system"; homepage = "https://github.com/django/channels"; + changelog = "https://github.com/django/channels/blob/${version}/CHANGELOG.txt"; license = licenses.bsd3; maintainers = with maintainers; [ fab ]; }; From 2d176f8e6047e20bf859feb1ae027d619fec81fa Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 14 Sep 2024 22:10:27 +0200 Subject: [PATCH 055/236] python312Packages.aiohttp-client-cache: 0.11.0 -> 0.11.1 --- .../python-modules/aiohttp-client-cache/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aiohttp-client-cache/default.nix b/pkgs/development/python-modules/aiohttp-client-cache/default.nix index 72ae35816ecb..1bfd4b79953b 100644 --- a/pkgs/development/python-modules/aiohttp-client-cache/default.nix +++ b/pkgs/development/python-modules/aiohttp-client-cache/default.nix @@ -11,11 +11,11 @@ buildPythonPackage rec { pname = "aiohttp_client_cache"; - version = "0.11.0"; + version = "0.11.1"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-B2b/9O2gVJjHUlN0pYeBDcwsy3slaAnd5SroeQqEU+s="; + hash = "sha256-MuY60hAkD4Ik8+Encv5TrBAs8kx88Y3bhqy7n9+eS28="; }; nativeBuildInputs = [ poetry-core ]; propagatedBuildInputs = [ From 56cc7996d7b88ed4f97e3779aa006036595080d6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 14 Sep 2024 22:26:49 +0200 Subject: [PATCH 056/236] python312Packages.aiohttp-client-cache: refactor - enable tests - add pythonImportsCheck --- .../aiohttp-client-cache/default.nix | 71 ++++++++++++++++--- 1 file changed, 63 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/aiohttp-client-cache/default.nix b/pkgs/development/python-modules/aiohttp-client-cache/default.nix index 1bfd4b79953b..6f3116938465 100644 --- a/pkgs/development/python-modules/aiohttp-client-cache/default.nix +++ b/pkgs/development/python-modules/aiohttp-client-cache/default.nix @@ -1,32 +1,87 @@ { lib, - fetchPypi, - buildPythonPackage, - poetry-core, + aioboto3, + aiobotocore, + aiofiles, aiohttp, + aiosqlite, attrs, + buildPythonPackage, + faker, + fetchPypi, itsdangerous, + motor, + poetry-core, + pytest-aiohttp, + pytestCheckHook, + pythonOlder, + redis, url-normalize, }: buildPythonPackage rec { - pname = "aiohttp_client_cache"; + pname = "aiohttp-client-cache"; version = "0.11.1"; pyproject = true; + + disabled = pythonOlder "3.8"; + src = fetchPypi { - inherit pname version; + pname = "aiohttp_client_cache"; + inherit version; hash = "sha256-MuY60hAkD4Ik8+Encv5TrBAs8kx88Y3bhqy7n9+eS28="; }; - nativeBuildInputs = [ poetry-core ]; - propagatedBuildInputs = [ + + build-system = [ poetry-core ]; + + dependencies = [ aiohttp attrs itsdangerous url-normalize ]; + + optional-dependencies = { + all = [ + aioboto3 + aiobotocore + aiofiles + aiosqlite + motor + redis + ]; + dynamodb = [ + aioboto3 + aiobotocore + ]; + filesystem = [ + aiofiles + aiosqlite + ]; + mongodb = [ motor ]; + redis = [ redis ]; + sqlite = [ aiosqlite ]; + }; + + nativeCheckInputs = [ + faker + pytest-aiohttp + pytestCheckHook + ] ++ lib.flatten (builtins.attrValues optional-dependencies); + + pythonImportsCheck = [ "aiohttp_client_cache" ]; + + disabledTestPaths = [ + # Tests require running instances of the services + "test/integration/test_dynamodb.py" + "test/integration/test_redis.py" + "test/integration/test_sqlite.py" + ]; + meta = with lib; { description = "Async persistent cache for aiohttp requests"; - homepage = "https://pypi.org/project/aiohttp-client-cache/"; + homepage = "https://github.com/requests-cache/aiohttp-client-cache"; + changelog = "https://github.com/requests-cache/aiohttp-client-cache/blob/v${version}/HISTORY.md"; license = licenses.mit; maintainers = with maintainers; [ seirl ]; }; From a1ba031cd54bca31de3448742e7bca042889c019 Mon Sep 17 00:00:00 2001 From: Louis Thevenet Date: Sat, 14 Sep 2024 23:08:41 +0200 Subject: [PATCH 057/236] see-cat: init at 0.8.1 --- pkgs/by-name/se/see-cat/package.nix | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 pkgs/by-name/se/see-cat/package.nix diff --git a/pkgs/by-name/se/see-cat/package.nix b/pkgs/by-name/se/see-cat/package.nix new file mode 100644 index 000000000000..c8c213272a52 --- /dev/null +++ b/pkgs/by-name/se/see-cat/package.nix @@ -0,0 +1,38 @@ +{ + lib, + fetchFromGitHub, + rustPlatform, + pkg-config, +}: +rustPlatform.buildRustPackage rec { + pname = "see-cat"; + version = "0.8.1"; + + src = fetchFromGitHub { + owner = "guilhermeprokisch"; + repo = "see"; + rev = "v${version}"; + hash = "sha256-VCUrPCaG2fKp9vpFLzNLcfCBu2NiwdY2+bo1pd7anZY="; + }; + + cargoHash = "sha256-lfpJ40QpZ9eQhDFJjLwiDU5DmaYAqCh5iJSjZ+jj+kk="; + + nativeBuildInputs = [ + pkg-config + ]; + + meta = { + description = "Cute cat(1) for the terminal"; + longDescription = '' + see is a powerful file visualization tool for the terminal, offering + advanced code viewing capabilities, Markdown rendering, and + more. It provides syntax highlighting, emoji support, and image + rendering capabilities, offering a visually appealing way to view + various file types directly in your console. + ''; + homepage = "https://github.com/guilhermeprokisch/see"; + license = lib.licenses.mit; + mainProgram = "see"; + maintainers = with lib.maintainers; [ louis-thevenet ]; + }; +} From 684fc6e79b8365e9e99890e1150f81954459a3ab Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 14 Sep 2024 23:41:26 +0200 Subject: [PATCH 058/236] python312Packages.dbt-common: 1.3.0 -> 1.8.0 Changelog: https://github.com/dbt-labs/dbt-common/blob/1.8.0/CHANGELOG.md --- .../python-modules/dbt-common/default.nix | 35 +++++++++++-------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/dbt-common/default.nix b/pkgs/development/python-modules/dbt-common/default.nix index bf9a93abafab..0bb43248db08 100644 --- a/pkgs/development/python-modules/dbt-common/default.nix +++ b/pkgs/development/python-modules/dbt-common/default.nix @@ -1,34 +1,37 @@ { lib, - buildPythonPackage, - fetchFromGitHub, - hatchling, agate, + buildPythonPackage, colorama, + deepdiff, + fetchPypi, + hatchling, isodate, jinja2, jsonschema, mashumaro, pathspec, protobuf, - python-dateutil, - requests, - typing-extensions, pytest-mock, pytest-xdist, pytestCheckHook, + python-dateutil, + pythonOlder, + requests, + typing-extensions, }: buildPythonPackage rec { pname = "dbt-common"; - version = "1.3.0"; + version = "1.8.0"; pyproject = true; - src = fetchFromGitHub { - owner = "dbt-labs"; - repo = "dbt-common"; - rev = "refs/tags/v${version}"; - hash = "sha256-3UjwQy257ks21fQV0uZNKu5EsuzjlIAEcVtRWkR9x/4="; + disabled = pythonOlder "3.8"; + + src = fetchPypi { + pname = "dbt_common"; + inherit version; + hash = "sha256-ehZ+a3zznnWMY9NJx9LfRtkV1vHiIH0HEhsYWfMbmb4="; }; build-system = [ hatchling ]; @@ -38,6 +41,7 @@ buildPythonPackage rec { dependencies = [ agate colorama + deepdiff isodate jinja2 jsonschema @@ -49,7 +53,8 @@ buildPythonPackage rec { typing-extensions ] ++ mashumaro.optional-dependencies.msgpack; - pythonImportsCheck = [ "dbt_common" ]; + # Upstream stopped to tag the source fo rnow + doCheck = false; nativeCheckInputs = [ pytest-mock @@ -57,10 +62,12 @@ buildPythonPackage rec { pytestCheckHook ]; + pythonImportsCheck = [ "dbt_common" ]; + meta = { description = "Shared common utilities for dbt-core and adapter implementations use"; homepage = "https://github.com/dbt-labs/dbt-common"; - changelog = "https://github.com/dbt-labs/dbt-common/blob/${src.rev}/CHANGELOG.md"; + changelog = "https://github.com/dbt-labs/dbt-common/blob/${version}/CHANGELOG.md"; license = lib.licenses.asl20; maintainers = [ ]; }; From 0df2244e6e7056bd34a461f5862a71369b43b23c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 14 Sep 2024 23:42:19 +0200 Subject: [PATCH 059/236] python312Packages.dbt-adapters: 1.3.3 -> 1.6.0 Diff: https://github.com/dbt-labs/dbt-adapters/compare/refs/tags/v1.3.3...v1.6.0 Changelog: https://github.com/dbt-labs/dbt-adapters/blob/refs/tags/v1.6.0/CHANGELOG.md --- pkgs/development/python-modules/dbt-adapters/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/dbt-adapters/default.nix b/pkgs/development/python-modules/dbt-adapters/default.nix index 776725659d69..38cae3b9080b 100644 --- a/pkgs/development/python-modules/dbt-adapters/default.nix +++ b/pkgs/development/python-modules/dbt-adapters/default.nix @@ -14,14 +14,14 @@ buildPythonPackage rec { pname = "dbt-adapters"; - version = "1.3.3"; + version = "1.6.0"; pyproject = true; src = fetchFromGitHub { owner = "dbt-labs"; repo = "dbt-adapters"; rev = "refs/tags/v${version}"; - hash = "sha256-M7n+WcHGBMNZ5k9GZRR05g8KzPDWjmB83iZSD16G774="; + hash = "sha256-P8AWh11nrP6EtBZrvxu9BoCpP+a8oljzRxbJXkVB2B4="; }; build-system = [ hatchling ]; From ba0125efd1781db9f228248e181e9bc6043918a1 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 15 Sep 2024 00:43:13 +0000 Subject: [PATCH 060/236] babashka-unwrapped: 1.3.191 -> 1.4.192 --- pkgs/development/interpreters/babashka/clojure-tools.nix | 4 ++-- pkgs/development/interpreters/babashka/default.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/interpreters/babashka/clojure-tools.nix b/pkgs/development/interpreters/babashka/clojure-tools.nix index fec8a7fd5a5a..858c3eb11c21 100644 --- a/pkgs/development/interpreters/babashka/clojure-tools.nix +++ b/pkgs/development/interpreters/babashka/clojure-tools.nix @@ -6,10 +6,10 @@ }: clojure.overrideAttrs (previousAttrs: { pname = "babashka-clojure-tools"; - version = "1.11.3.1463"; + version = "1.12.0.1479"; src = fetchurl { url = previousAttrs.src.url; - hash = "sha256-26QZ3j54XztpW2WJ1xg0Gc+OwrsvmfK4iv0GsLV8FIc="; + hash = "sha256-KlFcRXVd8e3zeP36+zgCUcdzbeLbFffb5V7XKV8NKWw="; }; }) diff --git a/pkgs/development/interpreters/babashka/default.nix b/pkgs/development/interpreters/babashka/default.nix index fc54f3e0311d..f4b51b37c480 100644 --- a/pkgs/development/interpreters/babashka/default.nix +++ b/pkgs/development/interpreters/babashka/default.nix @@ -9,11 +9,11 @@ let babashka-unwrapped = buildGraalvmNativeImage rec { pname = "babashka-unwrapped"; - version = "1.3.191"; + version = "1.4.192"; src = fetchurl { url = "https://github.com/babashka/babashka/releases/download/v${version}/babashka-${version}-standalone.jar"; - sha256 = "sha256-xF0u2VO0xdNvRElhUb7atpvy2Y5T9/V1b92ffaOMga8="; + sha256 = "sha256-uVRk1/lfOXMSp3qOdeMoAFpwJaEBxF1MYtFOv364H7Y="; }; graalvmDrv = graalvmCEPackages.graalvm-ce; From 57679d3f7196662f28de1f026a8020066b15501c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 15 Sep 2024 02:03:12 +0000 Subject: [PATCH 061/236] openvas-scanner: 23.8.5 -> 23.9.0 --- pkgs/by-name/op/openvas-scanner/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/op/openvas-scanner/package.nix b/pkgs/by-name/op/openvas-scanner/package.nix index 5fa7966cd5c1..38411adb4ea2 100644 --- a/pkgs/by-name/op/openvas-scanner/package.nix +++ b/pkgs/by-name/op/openvas-scanner/package.nix @@ -31,13 +31,13 @@ stdenv.mkDerivation rec { pname = "openvas-scanner"; - version = "23.8.5"; + version = "23.9.0"; src = fetchFromGitHub { owner = "greenbone"; repo = "openvas-scanner"; rev = "refs/tags/v${version}"; - hash = "sha256-0zVhrnDimmSg5auIT1NQaNRsilASkkXK6tVimoWsXn8="; + hash = "sha256-vdqIM0qkCpOjohmMP245Og87wOmejlCBEIceBfwEB8U="; }; nativeBuildInputs = [ From 52995c2117fbd9e0aa00b8dea0b5576819edf51f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 15 Sep 2024 02:22:44 +0000 Subject: [PATCH 062/236] python312Packages.pysigma-pipeline-crowdstrike: 1.0.3 -> 2.0.0 --- .../python-modules/pysigma-pipeline-crowdstrike/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pysigma-pipeline-crowdstrike/default.nix b/pkgs/development/python-modules/pysigma-pipeline-crowdstrike/default.nix index 89708f443d1b..53c693974c2a 100644 --- a/pkgs/development/python-modules/pysigma-pipeline-crowdstrike/default.nix +++ b/pkgs/development/python-modules/pysigma-pipeline-crowdstrike/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "pysigma-pipeline-crowdstrike"; - version = "1.0.3"; + version = "2.0.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "SigmaHQ"; repo = "pySigma-pipeline-crowdstrike"; rev = "refs/tags/v${version}"; - hash = "sha256-0uSoZC2cUgdOGE5saLlx5n0gbVPX61kkASCBFD4F5QM="; + hash = "sha256-9rYTBMVb664R9heOw/N/PUFotwOP1avdPUjPDhICkVU="; }; build-system = [ poetry-core ]; From ef58b536a1d7f3de8456bb069575df8a81923b31 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 15 Sep 2024 02:28:08 +0000 Subject: [PATCH 063/236] python312Packages.spython: 0.3.12 -> 0.3.14 --- pkgs/development/python-modules/spython/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/spython/default.nix b/pkgs/development/python-modules/spython/default.nix index 60786d3cd48a..ef615ce8407e 100644 --- a/pkgs/development/python-modules/spython/default.nix +++ b/pkgs/development/python-modules/spython/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "spython"; - version = "0.3.12"; + version = "0.3.14"; pyproject = true; disabled = pythonOlder "3.9"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "singularityhub"; repo = "singularity-cli"; rev = "refs/tags/${version}"; - hash = "sha256-fRtqOpDgVMYlVDwbPkrnpd7PT4fV+2WS6RmpJoxaKdQ="; + hash = "sha256-PNMzqnKb691wcd8aGSleqHOcsUrahl8e0r5s5ek5GmQ="; }; postPatch = '' From 32e62d8a5158f8db0943db2d68f5cd6a763a6c48 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 15 Sep 2024 04:58:55 +0000 Subject: [PATCH 064/236] httm: 0.42.4 -> 0.43.0 --- pkgs/by-name/ht/httm/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ht/httm/package.nix b/pkgs/by-name/ht/httm/package.nix index 8fbb842e9629..4b2b6d4c2b27 100644 --- a/pkgs/by-name/ht/httm/package.nix +++ b/pkgs/by-name/ht/httm/package.nix @@ -7,16 +7,16 @@ rustPlatform.buildRustPackage rec { pname = "httm"; - version = "0.42.4"; + version = "0.43.0"; src = fetchFromGitHub { owner = "kimono-koans"; repo = pname; rev = version; - hash = "sha256-NX4cDq9bByfpGiXmLCwE97W2KLIXyPczbBNRRkSGTqs="; + hash = "sha256-v+KqH+pGbf7zYTLVYPBjPs3O8cOl4gLuphHN70C0UXc="; }; - cargoHash = "sha256-kIpzwQhhCt5V2ZueYZNirv+QOLXDtHtoYjrD3FI7DQU="; + cargoHash = "sha256-xdAHXscnUCeoG2coK+Bci+v+uxjXhTxARXeeGdQvc48="; nativeBuildInputs = [ installShellFiles ]; From 9c3825f09d434311acc9b6d7ebc73044ba88bb92 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 15 Sep 2024 05:16:37 +0000 Subject: [PATCH 065/236] rpcs3: 0.0.33-16892-7e3b8b5cd -> 0.0.33-16930-d1648dd70 --- pkgs/by-name/rp/rpcs3/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/rp/rpcs3/package.nix b/pkgs/by-name/rp/rpcs3/package.nix index 3a272c9127e5..223055fa2b84 100644 --- a/pkgs/by-name/rp/rpcs3/package.nix +++ b/pkgs/by-name/rp/rpcs3/package.nix @@ -33,10 +33,10 @@ let # Keep these separate so the update script can regex them - rpcs3GitVersion = "16892-7e3b8b5cd"; - rpcs3Version = "0.0.33-16892-7e3b8b5cd"; - rpcs3Revision = "7e3b8b5cdb0c0579382a93d223bfb6e776999a35"; - rpcs3Hash = "sha256-3wqJNn4/wP5f3+hUCvYjxrcuMZ6MegpuNot5Mq+DQdI="; + rpcs3GitVersion = "16930-d1648dd70"; + rpcs3Version = "0.0.33-16930-d1648dd70"; + rpcs3Revision = "d1648dd707687c336dff1397daf8a657881c230e"; + rpcs3Hash = "sha256-Kw5Kui0jnSRZwu7wRMCPj5RgQQHbTp5O0alLNus2Jvg="; inherit (qt6Packages) qtbase qtmultimedia wrapQtAppsHook qtwayland; in From 4c44f40cebf2bdc1149effa62eb0b8b90ab05c96 Mon Sep 17 00:00:00 2001 From: natsukium Date: Thu, 12 Sep 2024 22:56:33 +0900 Subject: [PATCH 066/236] python312Packages.linien-common: fix test --- .../python-modules/linien-common/tests.nix | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/linien-common/tests.nix b/pkgs/development/python-modules/linien-common/tests.nix index 40a69986187c..b95307fce9ac 100644 --- a/pkgs/development/python-modules/linien-common/tests.nix +++ b/pkgs/development/python-modules/linien-common/tests.nix @@ -1,26 +1,45 @@ { buildPythonPackage, - linien-common, + cma, linien-client, + linien-common, + matplotlib, + migen, + misoc, + pytest-plt, pytestCheckHook, }: buildPythonPackage { pname = "linien-tests"; inherit (linien-common) version src; - format = "other"; pyproject = false; dontBuild = true; dontInstall = true; nativeCheckInputs = [ - linien-common + cma linien-client + linien-common + matplotlib + migen + misoc + pytest-plt pytestCheckHook ]; preCheck = '' export HOME=$(mktemp -d) ''; + + disabledTestPaths = [ + # require linien-server which is not packaged + "tests/test_algorithm_selection.py" + "tests/test_approacher.py" + "tests/test_optimizer_engines.py" + "tests/test_optimizer_utils.py" + "tests/test_robust_autolock.py" + "tests/test_simple_autolock_cpu.py" + ]; } From 6595e8bc57926edc2f482c49da5cb2ec7bdcab9e Mon Sep 17 00:00:00 2001 From: natsukium Date: Thu, 12 Sep 2024 23:11:52 +0900 Subject: [PATCH 067/236] python312Packages.rpyc4: remove --- .../python-modules/rpyc4/default.nix | 69 ------------------- pkgs/top-level/python-packages.nix | 2 - 2 files changed, 71 deletions(-) delete mode 100644 pkgs/development/python-modules/rpyc4/default.nix diff --git a/pkgs/development/python-modules/rpyc4/default.nix b/pkgs/development/python-modules/rpyc4/default.nix deleted file mode 100644 index 09842a0045d6..000000000000 --- a/pkgs/development/python-modules/rpyc4/default.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ - lib, - stdenv, - buildPythonPackage, - fetchFromGitHub, - setuptools, - hatchling, - plumbum, - pytestCheckHook, - pythonOlder, - pythonAtLeast, -}: - -buildPythonPackage rec { - pname = "rpyc4"; - # Pinned version for linien, see also: - # https://github.com/linien-org/pyrp3/pull/10#discussion_r1302816237 - version = "4.1.5"; - format = "pyproject"; - - # Since this is an outdated version, upstream might have fixed the - # compatibility issues with Python3.12, but we can't enjoy them yet. - disabled = pythonOlder "3.7" || pythonAtLeast "3.12"; - - src = fetchFromGitHub { - owner = "tomerfiliba"; - repo = "rpyc"; - rev = version; - hash = "sha256-8NOcXZDR3w0TNj1+LZ7lzQAt7yDgspjOp2zk1bsbVls="; - }; - - nativeBuildInputs = [ - setuptools - hatchling - ]; - - propagatedBuildInputs = [ plumbum ]; - - nativeCheckInputs = [ pytestCheckHook ]; - - disabledTests = [ - # Disable tests that requires network access - "test_api" - "test_close_timeout" - "test_deploy" - "test_listing" - "test_pruning" - "test_rpyc" - # Test is outdated - # ssl.SSLError: [SSL: NO_CIPHERS_AVAILABLE] no ciphers available (_ssl.c:997) - "test_ssl_conenction" - ]; - disabledTestPaths = [ - "tests/test_ssh.py" - "tests/test_teleportation.py" - ]; - - pythonImportsCheck = [ "rpyc" ]; - - doCheck = !stdenv.isDarwin; - - meta = with lib; { - description = "Remote Python Call (RPyC), a transparent and symmetric RPC library"; - homepage = "https://rpyc.readthedocs.org"; - changelog = "https://github.com/tomerfiliba-org/rpyc/blob/${version}/CHANGELOG.rst"; - 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 097cdd400a68..43bf261e48b5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13706,8 +13706,6 @@ self: super: with self; { rpyc = callPackage ../development/python-modules/rpyc { }; - rpyc4 = callPackage ../development/python-modules/rpyc4 { }; - rq = callPackage ../development/python-modules/rq { redis-server = pkgs.redis; }; From 4eea6262f4ea1bcda1643dfdc45f6e9faab69901 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 15 Sep 2024 06:07:33 +0000 Subject: [PATCH 068/236] stevenblack-blocklist: 3.14.104 -> 3.14.107 --- pkgs/by-name/st/stevenblack-blocklist/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/st/stevenblack-blocklist/package.nix b/pkgs/by-name/st/stevenblack-blocklist/package.nix index d1a5dea4f30d..bf6bac615d03 100644 --- a/pkgs/by-name/st/stevenblack-blocklist/package.nix +++ b/pkgs/by-name/st/stevenblack-blocklist/package.nix @@ -6,13 +6,13 @@ }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "stevenblack-blocklist"; - version = "3.14.104"; + version = "3.14.107"; src = fetchFromGitHub { owner = "StevenBlack"; repo = "hosts"; rev = "refs/tags/${finalAttrs.version}"; - hash = "sha256-APxlS1c68AGOGUBv/SVHTFDYuvMZHxFVEqXDlfEJlqk="; + hash = "sha256-2YJRNkIDqU5ruMNPiU1PvfURBE93WGPJuwBmyUJw5Ho="; }; outputs = [ From 02aba12b71bd0cdd3df71752f8a2318c5ecb9aa6 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 15 Sep 2024 06:53:50 +0000 Subject: [PATCH 069/236] thonny: 4.1.4 -> 4.1.6 --- pkgs/applications/editors/thonny/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/thonny/default.nix b/pkgs/applications/editors/thonny/default.nix index d2aabf5a92f8..d051d2818e23 100644 --- a/pkgs/applications/editors/thonny/default.nix +++ b/pkgs/applications/editors/thonny/default.nix @@ -4,13 +4,13 @@ with python3.pkgs; buildPythonApplication rec { pname = "thonny"; - version = "4.1.4"; + version = "4.1.6"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-f4wR5OPzWbtSqE+hSW2zD8u3pPl5nPTtGvf2LzOXjI4="; + hash = "sha256-/ms2RESnV3bsJpK1zYYLHNUu1FtA6PntaseTbKMfUMc="; }; nativeBuildInputs = [ copyDesktopItems ]; From e2de8e4f635a292b6c281677552b5791c2819d2a Mon Sep 17 00:00:00 2001 From: aleksana Date: Sun, 15 Sep 2024 14:53:26 +0800 Subject: [PATCH 070/236] maintainers: add danerieber --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 41f9005cbc97..ada6cd24065f 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4518,6 +4518,12 @@ githubId = 24708079; name = "Dan Eads"; }; + danerieber = { + email = "danerieber@gmail.com"; + github = "danerieber"; + githubId = 6487079; + name = "Dane Rieber"; + }; danid3v = { email = "sch220233@spengergasse.at"; github = "DaniD3v"; From 7d2f0381d632ccb8f69a9986fd8ad2d577818ee0 Mon Sep 17 00:00:00 2001 From: DaRacci Date: Tue, 13 Aug 2024 12:32:17 +1000 Subject: [PATCH 071/236] maintainers: add racci --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index ada6cd24065f..459bf84cae84 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -17190,6 +17190,12 @@ githubId = 131856; name = "Arnout Engelen"; }; + racci = { + name = "James Draycott"; + email = "me@racci.dev"; + github = "DaRacci"; + githubId = 90304606; + }; raehik = { email = "thefirstmuffinman@gmail.com"; github = "raehik"; From 246c4d4fd95d970d8786ed6c1fc6c1fa0ca23be3 Mon Sep 17 00:00:00 2001 From: dane Date: Sat, 10 Aug 2024 10:20:59 -0500 Subject: [PATCH 072/236] universal-pidff: init at 0.0.6 Co-authored-by: DaRacci --- .../linux/universal-pidff/default.nix | 46 +++++++++++++++++++ pkgs/top-level/linux-kernels.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/os-specific/linux/universal-pidff/default.nix diff --git a/pkgs/os-specific/linux/universal-pidff/default.nix b/pkgs/os-specific/linux/universal-pidff/default.nix new file mode 100644 index 000000000000..3325735c279b --- /dev/null +++ b/pkgs/os-specific/linux/universal-pidff/default.nix @@ -0,0 +1,46 @@ +{ + stdenv, + lib, + fetchFromGitHub, + kernel, +}: + +stdenv.mkDerivation rec { + pname = "universal-pidff"; + version = "0.0.8"; + + src = fetchFromGitHub { + owner = "JacKeTUs"; + repo = "universal-pidff"; + rev = "refs/tags/${version}"; + hash = "sha256-DptLqyjfRCpkbyFAQI8sylyKu2XyZZGrSITva9vcXGQ="; + }; + + postPatch = '' + sed -i 's|depmod|#depmod|' Makefile + ''; + + hardeningDisable = [ + "pic" + "format" + ]; + nativeBuildInputs = kernel.moduleBuildDependencies; + + makeFlags = [ + "KVERSION=${kernel.modDirVersion}" + "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + "INSTALL_MOD_PATH=$(out)" + ]; + installTargets = [ "install" ]; + + meta = { + description = "PIDFF driver with useful patches for initialization of FFB devices"; + homepage = "https://github.com/JacKeTUs/universal-pidff"; + license = lib.licenses.gpl2Plus; + maintainers = with lib.maintainers; [ + danerieber + racci + ]; + platforms = lib.platforms.linux; + }; +} diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index 45f68e06aac0..3e910943790e 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -538,6 +538,8 @@ in { trelay = callPackage ../os-specific/linux/trelay { }; + universal-pidff = callPackage ../os-specific/linux/universal-pidff { }; + usbip = callPackage ../os-specific/linux/usbip { }; v86d = callPackage ../os-specific/linux/v86d { }; From c804a3f931abd10f5c16cb53588787655e3a2f90 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 15 Sep 2024 07:13:30 +0000 Subject: [PATCH 073/236] cargo-dist: 0.22.0 -> 0.22.1 --- pkgs/development/tools/rust/cargo-dist/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-dist/default.nix b/pkgs/development/tools/rust/cargo-dist/default.nix index 489baf50ae28..e7f5003768a6 100644 --- a/pkgs/development/tools/rust/cargo-dist/default.nix +++ b/pkgs/development/tools/rust/cargo-dist/default.nix @@ -14,16 +14,16 @@ rustPlatform.buildRustPackage rec { pname = "cargo-dist"; - version = "0.22.0"; + version = "0.22.1"; src = fetchFromGitHub { owner = "axodotdev"; repo = "cargo-dist"; rev = "v${version}"; - hash = "sha256-h8LiR+eU0d80OdXNi4/jdQocNPHEWP3qHY3hC0bPflw="; + hash = "sha256-Pq7gVZWvtWhS7HJPwKPDq3TJqwurG6fXisM5FsSMZ9k="; }; - cargoHash = "sha256-HacPF457CvKo4xsygSVyRNYOb8ToHEG1OFOXbFRhsDs="; + cargoHash = "sha256-0j3u4oQ8JxJP+lBufDiSMyvFrW70X1snpHstjaM9tDg="; nativeBuildInputs = [ pkg-config From eab0c8fb5ce89c0b819fc6d2cd1dea8221cad39f Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 15 Sep 2024 16:21:29 +0900 Subject: [PATCH 074/236] waypaper: build with pypaBuildHook --- pkgs/applications/misc/waypaper/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/waypaper/default.nix b/pkgs/applications/misc/waypaper/default.nix index 29b8072318f3..924a7e766a70 100644 --- a/pkgs/applications/misc/waypaper/default.nix +++ b/pkgs/applications/misc/waypaper/default.nix @@ -9,6 +9,7 @@ python3.pkgs.buildPythonApplication rec { pname = "waypaper"; version = "2.3"; + pyproject = true; src = fetchFromGitHub { owner = "anufrievroman"; @@ -22,14 +23,17 @@ python3.pkgs.buildPythonApplication rec { wrapGAppsHook3 ]; - propagatedBuildInputs = [ + build-system = [ python3.pkgs.setuptools ]; + + dependencies = [ python3.pkgs.pygobject3 python3.pkgs.platformdirs python3.pkgs.importlib-metadata python3.pkgs.pillow - killall ]; + propagatedBuildInputs = [ killall ]; + # has no tests doCheck = false; From ec8e04499bd86aaee9502394bded84ec649ee473 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 15 Sep 2024 10:14:29 +0200 Subject: [PATCH 075/236] uv: 0.4.8 -> 0.4.10 Diff: https://github.com/astral-sh/uv/compare/refs/tags/0.4.8...0.4.10 Changelog: https://github.com/astral-sh/uv/blob/refs/tags/0.4.10/CHANGELOG.md --- pkgs/by-name/uv/uv/Cargo.lock | 73 ++++++++++++++++++++++------------ pkgs/by-name/uv/uv/package.nix | 4 +- 2 files changed, 49 insertions(+), 28 deletions(-) diff --git a/pkgs/by-name/uv/uv/Cargo.lock b/pkgs/by-name/uv/uv/Cargo.lock index 28a850fcf312..d84c5e66b3eb 100644 --- a/pkgs/by-name/uv/uv/Cargo.lock +++ b/pkgs/by-name/uv/uv/Cargo.lock @@ -712,9 +712,9 @@ dependencies = [ [[package]] name = "codspeed" -version = "2.6.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a104ac948e0188b921eb3fcbdd55dcf62e542df4c7ab7e660623f6288302089" +checksum = "b0c6f324a032703f286b0fbbdb390971f914b41f3410e1615c59730e4b24ebc2" dependencies = [ "colored", "libc", @@ -723,9 +723,9 @@ dependencies = [ [[package]] name = "codspeed-criterion-compat" -version = "2.6.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722c36bdc62d9436d027256ce2627af81ac7a596dfc7d13d849d0d212448d7fe" +checksum = "0ae52f6f2545ffcd2ac1308f34043eb6ab81e4c741af419b348b2325574f48ee" dependencies = [ "codspeed", "colored", @@ -1923,6 +1923,22 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "krata-tokio-tar" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8bd5fee9b96acb5fc36b401896d601e6fdcce52b0e651ce24a3b21fb524e79f" +dependencies = [ + "filetime", + "futures-core", + "libc", + "portable-atomic", + "redox_syscall 0.3.5", + "tokio", + "tokio-stream", + "xattr", +] + [[package]] name = "kurbo" version = "0.8.3" @@ -4073,21 +4089,6 @@ dependencies = [ "tokio-util", ] -[[package]] -name = "tokio-tar" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5714c010ca3e5c27114c1cdeb9d14641ace49874aa5626d7149e47aedace75" -dependencies = [ - "filetime", - "futures-core", - "libc", - "redox_syscall 0.3.5", - "tokio", - "tokio-stream", - "xattr", -] - [[package]] name = "tokio-util" version = "0.7.11" @@ -4444,7 +4445,7 @@ checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" [[package]] name = "uv" -version = "0.4.8" +version = "0.4.10" dependencies = [ "anstream", "anyhow", @@ -4463,6 +4464,7 @@ dependencies = [ "flate2", "fs-err", "futures", + "http", "ignore", "indexmap", "indicatif", @@ -4609,6 +4611,7 @@ name = "uv-cache-info" version = "0.0.1" dependencies = [ "fs-err", + "globwalk", "schemars", "serde", "thiserror", @@ -4661,7 +4664,6 @@ dependencies = [ "hyper", "hyper-util", "insta", - "install-wheel-rs", "itertools 0.13.0", "jiff", "pep440_rs", @@ -4687,6 +4689,7 @@ dependencies = [ "uv-cache", "uv-configuration", "uv-fs", + "uv-metadata", "uv-normalize", "uv-version", "uv-warnings", @@ -4699,7 +4702,6 @@ dependencies = [ "anyhow", "cache-key", "clap", - "distribution-types", "either", "pep508_rs", "platform-tags", @@ -4787,13 +4789,13 @@ name = "uv-distribution" version = "0.0.1" dependencies = [ "anyhow", + "cache-key", "distribution-filename", "distribution-types", "fs-err", "futures", "indoc", "insta", - "install-wheel-rs", "nanoid", "pep440_rs", "pep508_rs", @@ -4817,6 +4819,7 @@ dependencies = [ "uv-extract", "uv-fs", "uv-git", + "uv-metadata", "uv-normalize", "uv-types", "uv-warnings", @@ -4834,6 +4837,7 @@ dependencies = [ "distribution-filename", "fs-err", "futures", + "krata-tokio-tar", "md-5", "pypi-types", "rayon", @@ -4842,7 +4846,6 @@ dependencies = [ "sha2", "thiserror", "tokio", - "tokio-tar", "tokio-util", "tracing", "xz2", @@ -4938,6 +4941,24 @@ dependencies = [ "textwrap", ] +[[package]] +name = "uv-metadata" +version = "0.1.0" +dependencies = [ + "async_zip", + "distribution-filename", + "fs-err", + "futures", + "pep440_rs", + "pypi-types", + "thiserror", + "tokio", + "tokio-util", + "tracing", + "uv-normalize", + "zip", +] + [[package]] name = "uv-normalize" version = "0.0.1" @@ -5065,7 +5086,6 @@ dependencies = [ "futures", "indexmap", "insta", - "install-wheel-rs", "itertools 0.13.0", "jiff", "once-map", @@ -5095,6 +5115,7 @@ dependencies = [ "uv-distribution", "uv-fs", "uv-git", + "uv-metadata", "uv-normalize", "uv-pubgrub", "uv-python", @@ -5217,7 +5238,7 @@ dependencies = [ [[package]] name = "uv-version" -version = "0.4.8" +version = "0.4.10" [[package]] name = "uv-virtualenv" diff --git a/pkgs/by-name/uv/uv/package.nix b/pkgs/by-name/uv/uv/package.nix index b94a3ee1ed45..c2a469cb17c3 100644 --- a/pkgs/by-name/uv/uv/package.nix +++ b/pkgs/by-name/uv/uv/package.nix @@ -16,14 +16,14 @@ python3Packages.buildPythonApplication rec { pname = "uv"; - version = "0.4.8"; + version = "0.4.10"; pyproject = true; src = fetchFromGitHub { owner = "astral-sh"; repo = "uv"; rev = "refs/tags/${version}"; - hash = "sha256-Rdeq6M3uZhXMALHkHEtYUr5Q1ghkfQmaBUMQGduZ5Qw="; + hash = "sha256-JI45AoTW3k1DP6RXCl8qfe6yl16PkS8xlpvl0FUISmk="; }; cargoDeps = rustPlatform.importCargoLock { From e5b1bf103a391a3ae80bdbe675f92e6cf64b8542 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Sep 2024 10:37:05 +0200 Subject: [PATCH 076/236] python312Packages.spython: refactor --- pkgs/development/python-modules/spython/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/spython/default.nix b/pkgs/development/python-modules/spython/default.nix index ef615ce8407e..aeddaa35e788 100644 --- a/pkgs/development/python-modules/spython/default.nix +++ b/pkgs/development/python-modules/spython/default.nix @@ -23,10 +23,10 @@ buildPythonPackage rec { postPatch = '' substituteInPlace setup.py \ - --replace '"pytest-runner"' "" + --replace-fail '"pytest-runner"' "" ''; - nativeBuildInputs = [ setuptools ]; + build-system = [ setuptools ]; nativeCheckInputs = [ pytestCheckHook ]; @@ -46,10 +46,10 @@ buildPythonPackage rec { meta = with lib; { description = "Streamlined singularity python client (spython) for singularity"; - mainProgram = "spython"; homepage = "https://github.com/singularityhub/singularity-cli"; changelog = "https://github.com/singularityhub/singularity-cli/blob/${version}/CHANGELOG.md"; license = licenses.mpl20; maintainers = with maintainers; [ fab ]; + mainProgram = "spython"; }; } From a15394d51a40315f749ee87728a2e5b6461456f3 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:52 +0200 Subject: [PATCH 077/236] nixos/iso-image: remove `with lib;` --- nixos/modules/installer/cd-dvd/installation-cd-base.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/nixos/modules/installer/cd-dvd/installation-cd-base.nix b/nixos/modules/installer/cd-dvd/installation-cd-base.nix index 3f92b779d60a..d36c90c6254e 100644 --- a/nixos/modules/installer/cd-dvd/installation-cd-base.nix +++ b/nixos/modules/installer/cd-dvd/installation-cd-base.nix @@ -1,10 +1,6 @@ # This module contains the basic configuration for building a NixOS # installation CD. - { config, lib, options, pkgs, ... }: - -with lib; - { imports = [ ./iso-image.nix @@ -32,8 +28,8 @@ with lib; # An installation media cannot tolerate a host config defined file # system layout on a fresh machine, before it has been formatted. - swapDevices = mkImageMediaOverride [ ]; - fileSystems = mkImageMediaOverride config.lib.isoFileSystems; + swapDevices = lib.mkImageMediaOverride [ ]; + fileSystems = lib.mkImageMediaOverride config.lib.isoFileSystems; boot.postBootCommands = '' for o in $( Date: Wed, 28 Aug 2024 21:18:52 +0200 Subject: [PATCH 078/236] nixos/installation-cd-graphical-base: remove `with lib;` --- .../installer/cd-dvd/installation-cd-graphical-base.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/nixos/modules/installer/cd-dvd/installation-cd-graphical-base.nix b/nixos/modules/installer/cd-dvd/installation-cd-graphical-base.nix index 7f7ab9ede47e..f4a2884964f5 100644 --- a/nixos/modules/installer/cd-dvd/installation-cd-graphical-base.nix +++ b/nixos/modules/installer/cd-dvd/installation-cd-graphical-base.nix @@ -1,10 +1,6 @@ # This module contains the basic configuration for building a graphical NixOS # installation CD. - { lib, pkgs, ... }: - -with lib; - { imports = [ ./installation-cd-base.nix ]; @@ -26,7 +22,7 @@ with lib; # Provide networkmanager for easy wireless configuration. networking.networkmanager.enable = true; - networking.wireless.enable = mkImageMediaOverride false; + networking.wireless.enable = lib.mkImageMediaOverride false; # KDE complains if power management is disabled (to be precise, if # there is no power management backend such as upower). From de2bbebb7f126974d20cf2fe41232b520bb74e58 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:52 +0200 Subject: [PATCH 079/236] nixos/installer.scan: remove `with lib;` --- nixos/modules/installer/scan/detected.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/nixos/modules/installer/scan/detected.nix b/nixos/modules/installer/scan/detected.nix index 5c5fba56f517..d66ee8983d6b 100644 --- a/nixos/modules/installer/scan/detected.nix +++ b/nixos/modules/installer/scan/detected.nix @@ -1,11 +1,8 @@ # List all devices which are detected by nixos-generate-config. # Common devices are enabled by default. { lib, ... }: - -with lib; - { - config = mkDefault { + config = lib.mkDefault { # Common firmware, i.e. for wifi cards hardware.enableRedistributableFirmware = true; }; From 6af918a564d3eb923850f7ef6b3ff4f67e4fb40e Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:52 +0200 Subject: [PATCH 080/236] nixos/flake: remove `with lib;` --- nixos/modules/misc/nixpkgs-flake.nix | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/nixos/modules/misc/nixpkgs-flake.nix b/nixos/modules/misc/nixpkgs-flake.nix index f58c3fbbe2e2..4c91d5e604f2 100644 --- a/nixos/modules/misc/nixpkgs-flake.nix +++ b/nixos/modules/misc/nixpkgs-flake.nix @@ -1,19 +1,16 @@ { config, options, lib, pkgs, ... }: - -with lib; - let cfg = config.nixpkgs.flake; in { options.nixpkgs.flake = { - source = mkOption { + source = lib.mkOption { # In newer Nix versions, particularly with lazy trees, outPath of # flakes becomes a Nix-language path object. We deliberately allow this # to gracefully come through the interface in discussion with @roberth. # # See: https://github.com/NixOS/nixpkgs/pull/278522#discussion_r1460292639 - type = types.nullOr (types.either types.str types.path); + type = lib.types.nullOr (lib.types.either lib.types.str lib.types.path); default = null; defaultText = "if (using nixpkgsFlake.lib.nixosSystem) then self.outPath else null"; @@ -34,8 +31,8 @@ in ''; }; - setNixPath = mkOption { - type = types.bool; + setNixPath = lib.mkOption { + type = lib.types.bool; default = cfg.source != null; defaultText = "config.nixpkgs.flake.source != null"; @@ -54,8 +51,8 @@ in ''; }; - setFlakeRegistry = mkOption { - type = types.bool; + setFlakeRegistry = lib.mkOption { + type = lib.types.bool; default = cfg.source != null; defaultText = "config.nixpkgs.flake.source != null"; @@ -75,7 +72,7 @@ in }; }; - config = mkIf (cfg.source != null) (mkMerge [ + config = lib.mkIf (cfg.source != null) (lib.mkMerge [ { assertions = [ { @@ -87,19 +84,19 @@ in } ]; } - (mkIf cfg.setFlakeRegistry { - nix.registry.nixpkgs.to = mkDefault { + (lib.mkIf cfg.setFlakeRegistry { + nix.registry.nixpkgs.to = lib.mkDefault { type = "path"; path = cfg.source; }; }) - (mkIf cfg.setNixPath { + (lib.mkIf cfg.setNixPath { # N.B. This does not include nixos-config in NIX_PATH unlike modules/config/nix-channel.nix # because we would need some kind of evil shim taking the *calling* flake's self path, # perhaps, to ever make that work (in order to know where the Nix expr for the system came # from and how to call it). - nix.nixPath = mkDefault ([ "nixpkgs=flake:nixpkgs" ] - ++ optional config.nix.channel.enable "/nix/var/nix/profiles/per-user/root/channels"); + nix.nixPath = lib.mkDefault ([ "nixpkgs=flake:nixpkgs" ] + ++ lib.optional config.nix.channel.enable "/nix/var/nix/profiles/per-user/root/channels"); }) ]); } From 609e57485d1fa111e3a689498d9d338dc03a7bc5 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:52 +0200 Subject: [PATCH 081/236] nixos/nixpkgs: remove `with lib;` --- nixos/modules/misc/nixpkgs.nix | 81 ++++++++++++++++------------------ 1 file changed, 39 insertions(+), 42 deletions(-) diff --git a/nixos/modules/misc/nixpkgs.nix b/nixos/modules/misc/nixpkgs.nix index 60a6fb57c7a2..393c19c99217 100644 --- a/nixos/modules/misc/nixpkgs.nix +++ b/nixos/modules/misc/nixpkgs.nix @@ -1,7 +1,4 @@ { config, options, lib, pkgs, ... }: - -with lib; - let cfg = config.nixpkgs; opt = options.nixpkgs; @@ -19,19 +16,19 @@ let lhs = optCall lhs_ { inherit pkgs; }; rhs = optCall rhs_ { inherit pkgs; }; in - recursiveUpdate lhs rhs // - optionalAttrs (lhs ? packageOverrides) { + lib.recursiveUpdate lhs rhs // + lib.optionalAttrs (lhs ? packageOverrides) { packageOverrides = pkgs: optCall lhs.packageOverrides pkgs // - optCall (attrByPath [ "packageOverrides" ] { } rhs) pkgs; + optCall (lib.attrByPath [ "packageOverrides" ] { } rhs) pkgs; } // - optionalAttrs (lhs ? perlPackageOverrides) { + lib.optionalAttrs (lhs ? perlPackageOverrides) { perlPackageOverrides = pkgs: optCall lhs.perlPackageOverrides pkgs // - optCall (attrByPath [ "perlPackageOverrides" ] { } rhs) pkgs; + optCall (lib.attrByPath [ "perlPackageOverrides" ] { } rhs) pkgs; }; - configType = mkOptionType { + configType = lib.mkOptionType { name = "nixpkgs-config"; description = "nixpkgs config"; check = x: @@ -39,34 +36,34 @@ let if c x then true else lib.traceSeqN 1 x false; in traceXIfNot isConfig; - merge = args: foldr (def: mergeConfig def.value) {}; + merge = args: lib.foldr (def: mergeConfig def.value) {}; }; - overlayType = mkOptionType { + overlayType = lib.mkOptionType { name = "nixpkgs-overlay"; description = "nixpkgs overlay"; check = lib.isFunction; merge = lib.mergeOneOption; }; - pkgsType = types.pkgs // { + pkgsType = lib.types.pkgs // { # This type is only used by itself, so let's elaborate the description a bit # for the purpose of documentation. description = "An evaluation of Nixpkgs; the top level attribute set of packages"; }; - hasBuildPlatform = opt.buildPlatform.highestPrio < (mkOptionDefault {}).priority; + hasBuildPlatform = opt.buildPlatform.highestPrio < (lib.mkOptionDefault {}).priority; hasHostPlatform = opt.hostPlatform.isDefined; hasPlatform = hasHostPlatform || hasBuildPlatform; # Context for messages - hostPlatformLine = optionalString hasHostPlatform "${showOptionWithDefLocs opt.hostPlatform}"; - buildPlatformLine = optionalString hasBuildPlatform "${showOptionWithDefLocs opt.buildPlatform}"; + hostPlatformLine = lib.optionalString hasHostPlatform "${lib.showOptionWithDefLocs opt.hostPlatform}"; + buildPlatformLine = lib.optionalString hasBuildPlatform "${lib.showOptionWithDefLocs opt.buildPlatform}"; legacyOptionsDefined = - optional (opt.localSystem.highestPrio < (mkDefault {}).priority) opt.system - ++ optional (opt.localSystem.highestPrio < (mkOptionDefault {}).priority) opt.localSystem - ++ optional (opt.crossSystem.highestPrio < (mkOptionDefault {}).priority) opt.crossSystem + lib.optional (opt.localSystem.highestPrio < (lib.mkDefault {}).priority) opt.system + ++ lib.optional (opt.localSystem.highestPrio < (lib.mkOptionDefault {}).priority) opt.localSystem + ++ lib.optional (opt.crossSystem.highestPrio < (lib.mkOptionDefault {}).priority) opt.crossSystem ; defaultPkgs = @@ -99,19 +96,19 @@ in imports = [ ./assertions.nix ./meta.nix - (mkRemovedOptionModule [ "nixpkgs" "initialSystem" ] "The NixOS options `nesting.clone` and `nesting.children` have been deleted, and replaced with named specialisation. Therefore `nixpgks.initialSystem` has no effect anymore.") + (lib.mkRemovedOptionModule [ "nixpkgs" "initialSystem" ] "The NixOS options `nesting.clone` and `nesting.children` have been deleted, and replaced with named specialisation. Therefore `nixpgks.initialSystem` has no effect lib.anymore.") ]; options.nixpkgs = { - pkgs = mkOption { - defaultText = literalExpression '' + pkgs = lib.mkOption { + defaultText = lib.literalExpression '' import "''${nixos}/.." { inherit (cfg) config overlays localSystem crossSystem; } ''; type = pkgsType; - example = literalExpression "import {}"; + example = lib.literalExpression "import {}"; description = '' If set, the pkgs argument to all NixOS modules is the value of this option, extended with `nixpkgs.overlays`, if @@ -145,9 +142,9 @@ in ''; }; - config = mkOption { + config = lib.mkOption { default = {}; - example = literalExpression + example = lib.literalExpression '' { allowBroken = true; allowUnfree = true; } ''; @@ -160,9 +157,9 @@ in ''; }; - overlays = mkOption { + overlays = lib.mkOption { default = []; - example = literalExpression + example = lib.literalExpression '' [ (self: super: { @@ -173,7 +170,7 @@ in }) ] ''; - type = types.listOf overlayType; + type = lib.types.listOf overlayType; description = '' List of overlays to apply to Nixpkgs. This option allows modifying the Nixpkgs package set accessed through the `pkgs` module argument. @@ -184,13 +181,13 @@ in ''; }; - hostPlatform = mkOption { - type = types.either types.str types.attrs; # TODO utilize lib.systems.parsedPlatform + hostPlatform = lib.mkOption { + type = lib.types.either lib.types.str lib.types.attrs; # TODO utilize lib.systems.parsedPlatform example = { system = "aarch64-linux"; }; # Make sure that the final value has all fields for sake of other modules # referring to this. TODO make `lib.systems` itself use the module system. apply = lib.systems.elaborate; - defaultText = literalExpression + defaultText = lib.literalExpression ''(import "''${nixos}/../lib").lib.systems.examples.aarch64-multiplatform''; description = '' Specifies the platform where the NixOS configuration will run. @@ -201,8 +198,8 @@ in ''; }; - buildPlatform = mkOption { - type = types.either types.str types.attrs; # TODO utilize lib.systems.parsedPlatform + buildPlatform = lib.mkOption { + type = lib.types.either lib.types.str lib.types.attrs; # TODO utilize lib.systems.parsedPlatform default = cfg.hostPlatform; example = { system = "x86_64-linux"; }; # Make sure that the final value has all fields for sake of other modules @@ -212,7 +209,7 @@ in in if lib.systems.equals elaborated cfg.hostPlatform then cfg.hostPlatform # make identical, so that `==` equality works; see https://github.com/NixOS/nixpkgs/issues/278001 else elaborated; - defaultText = literalExpression + defaultText = lib.literalExpression ''config.nixpkgs.hostPlatform''; description = '' Specifies the platform on which NixOS should be built. @@ -228,14 +225,14 @@ in ''; }; - localSystem = mkOption { - type = types.attrs; # TODO utilize lib.systems.parsedPlatform + localSystem = lib.mkOption { + type = lib.types.attrs; # TODO utilize lib.systems.parsedPlatform default = { inherit (cfg) system; }; example = { system = "aarch64-linux"; }; # Make sure that the final value has all fields for sake of other modules # referring to this. TODO make `lib.systems` itself use the module system. apply = lib.systems.elaborate; - defaultText = literalExpression + defaultText = lib.literalExpression ''(import "''${nixos}/../lib").lib.systems.examples.aarch64-multiplatform''; description = '' Systems with a recently generated `hardware-configuration.nix` @@ -262,8 +259,8 @@ in # TODO deprecate. "crossSystem" is a nonsense identifier, because "cross" # is a relation between at least 2 systems in the context of a # specific build step, not a single system. - crossSystem = mkOption { - type = types.nullOr types.attrs; # TODO utilize lib.systems.parsedPlatform + crossSystem = lib.mkOption { + type = lib.types.nullOr lib.types.attrs; # TODO utilize lib.systems.parsedPlatform default = null; example = { system = "aarch64-linux"; }; description = '' @@ -283,8 +280,8 @@ in ''; }; - system = mkOption { - type = types.str; + system = lib.mkOption { + type = lib.types.str; example = "i686-linux"; default = if opt.hostPlatform.isDefined @@ -372,12 +369,12 @@ in { assertion = constructedByMe -> hasPlatform -> legacyOptionsDefined == []; message = '' - Your system configures nixpkgs with the platform parameter${optionalString hasBuildPlatform "s"}: + Your system configures nixpkgs with the platform parameter${lib.optionalString hasBuildPlatform "s"}: ${hostPlatformLine }${buildPlatformLine } However, it also defines the legacy options: - ${concatMapStrings showOptionWithDefLocs legacyOptionsDefined} + ${lib.concatMapStrings lib.showOptionWithDefLocs legacyOptionsDefined} For a future proof system configuration, we recommend to remove the legacy definitions. ''; From 30c85fe74df77e80cbe72076502d91ab14f3207e Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:52 +0200 Subject: [PATCH 082/236] nixos/wordlist: remove `with lib;` --- nixos/modules/misc/wordlist.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/nixos/modules/misc/wordlist.nix b/nixos/modules/misc/wordlist.nix index 988b522d7431..67c83ff2baaa 100644 --- a/nixos/modules/misc/wordlist.nix +++ b/nixos/modules/misc/wordlist.nix @@ -1,5 +1,4 @@ { config, lib, pkgs, ... }: -with lib; let concatAndSort = name: files: pkgs.runCommand name {} '' awk 1 ${lib.escapeShellArgs files} | sed '{ /^\s*$/d; s/^\s\+//; s/\s\+$// }' | sort | uniq > $out @@ -8,16 +7,16 @@ in { options = { environment.wordlist = { - enable = mkEnableOption "environment variables for lists of words"; + enable = lib.mkEnableOption "environment variables for lists of words"; - lists = mkOption { - type = types.attrsOf (types.nonEmptyListOf types.path); + lists = lib.mkOption { + type = lib.types.attrsOf (lib.types.nonEmptyListOf lib.types.path); default = { WORDLIST = [ "${pkgs.scowl}/share/dict/words.txt" ]; }; - defaultText = literalExpression '' + defaultText = lib.literalExpression '' { WORDLIST = [ "''${pkgs.scowl}/share/dict/words.txt" ]; } @@ -34,7 +33,7 @@ in task. ''; - example = literalExpression '' + example = lib.literalExpression '' { WORDLIST = [ "''${pkgs.scowl}/share/dict/words.txt" ]; AUGMENTED_WORDLIST = [ @@ -50,7 +49,7 @@ in }; }; - config = mkIf config.environment.wordlist.enable { + config = lib.mkIf config.environment.wordlist.enable { environment.variables = lib.mapAttrs (name: value: "${concatAndSort "wordlist-${name}" value}") From c99cbe65c4ffcab445f3c389cccf37788bbfdcee Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:53 +0200 Subject: [PATCH 083/236] nixos/security: remove `with lib;` --- nixos/modules/security/misc.nix | 47 +++++++++++++++------------------ 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/nixos/modules/security/misc.nix b/nixos/modules/security/misc.nix index 5e13b4caddd8..d3ffefe46fc6 100644 --- a/nixos/modules/security/misc.nix +++ b/nixos/modules/security/misc.nix @@ -1,10 +1,7 @@ { config, lib, ... }: - -with lib; - { meta = { - maintainers = [ maintainers.joachifm ]; + maintainers = [ lib.maintainers.joachifm ]; }; imports = [ @@ -12,8 +9,8 @@ with lib; ]; options = { - security.allowUserNamespaces = mkOption { - type = types.bool; + security.allowUserNamespaces = lib.mkOption { + type = lib.types.bool; default = true; description = '' Whether to allow creation of user namespaces. @@ -31,8 +28,8 @@ with lib; ''; }; - security.unprivilegedUsernsClone = mkOption { - type = types.bool; + security.unprivilegedUsernsClone = lib.mkOption { + type = lib.types.bool; default = false; description = '' When disabled, unprivileged users will not be able to create new namespaces. @@ -41,16 +38,16 @@ with lib; ''; }; - security.protectKernelImage = mkOption { - type = types.bool; + security.protectKernelImage = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to prevent replacing the running kernel image. ''; }; - security.allowSimultaneousMultithreading = mkOption { - type = types.bool; + security.allowSimultaneousMultithreading = lib.mkOption { + type = lib.types.bool; default = true; description = '' Whether to allow SMT/hyperthreading. Disabling SMT means that only @@ -68,8 +65,8 @@ with lib; ''; }; - security.forcePageTableIsolation = mkOption { - type = types.bool; + security.forcePageTableIsolation = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to force-enable the Page Table Isolation (PTI) Linux kernel @@ -80,8 +77,8 @@ with lib; ''; }; - security.virtualisation.flushL1DataCache = mkOption { - type = types.nullOr (types.enum [ "never" "cond" "always" ]); + security.virtualisation.flushL1DataCache = lib.mkOption { + type = lib.types.nullOr (lib.types.enum [ "never" "cond" "always" ]); default = null; description = '' Whether the hypervisor should flush the L1 data cache before @@ -100,8 +97,8 @@ with lib; }; }; - config = mkMerge [ - (mkIf (!config.security.allowUserNamespaces) { + config = lib.mkMerge [ + (lib.mkIf (!config.security.allowUserNamespaces) { # Setting the number of allowed user namespaces to 0 effectively disables # the feature at runtime. Note that root may raise the limit again # at any time. @@ -114,26 +111,26 @@ with lib; ]; }) - (mkIf config.security.unprivilegedUsernsClone { - boot.kernel.sysctl."kernel.unprivileged_userns_clone" = mkDefault true; + (lib.mkIf config.security.unprivilegedUsernsClone { + boot.kernel.sysctl."kernel.unprivileged_userns_clone" = lib.mkDefault true; }) - (mkIf config.security.protectKernelImage { + (lib.mkIf config.security.protectKernelImage { # Disable hibernation (allows replacing the running kernel) boot.kernelParams = [ "nohibernate" ]; # Prevent replacing the running kernel image w/o reboot - boot.kernel.sysctl."kernel.kexec_load_disabled" = mkDefault true; + boot.kernel.sysctl."kernel.kexec_load_disabled" = lib.mkDefault true; }) - (mkIf (!config.security.allowSimultaneousMultithreading) { + (lib.mkIf (!config.security.allowSimultaneousMultithreading) { boot.kernelParams = [ "nosmt" ]; }) - (mkIf config.security.forcePageTableIsolation { + (lib.mkIf config.security.forcePageTableIsolation { boot.kernelParams = [ "pti=on" ]; }) - (mkIf (config.security.virtualisation.flushL1DataCache != null) { + (lib.mkIf (config.security.virtualisation.flushL1DataCache != null) { boot.kernelParams = [ "kvm-intel.vmentry_l1d_flush=${config.security.virtualisation.flushL1DataCache}" ]; }) ]; From b0d554537c3b6dbf96f234490a88202bbdc05983 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:53 +0200 Subject: [PATCH 084/236] nixos/security.pam: remove `with lib;` --- nixos/modules/security/oath.nix | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/nixos/modules/security/oath.nix b/nixos/modules/security/oath.nix index 93bdc851117a..acf9440b9b92 100644 --- a/nixos/modules/security/oath.nix +++ b/nixos/modules/security/oath.nix @@ -1,32 +1,28 @@ # This module provides configuration for the OATH PAM modules. - { lib, ... }: - -with lib; - { options = { security.pam.oath = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Enable the OATH (one-time password) PAM module. ''; }; - digits = mkOption { - type = types.enum [ 6 7 8 ]; + digits = lib.mkOption { + type = lib.types.enum [ 6 7 8 ]; default = 6; description = '' - Specify the length of the one-time password in number of + Specify the lib.length of the one-time password in number of digits. ''; }; - window = mkOption { - type = types.int; + window = lib.mkOption { + type = lib.types.int; default = 5; description = '' Specify the number of one-time passwords to check in order @@ -36,8 +32,8 @@ with lib; ''; }; - usersFile = mkOption { - type = types.path; + usersFile = lib.mkOption { + type = lib.types.path; default = "/etc/users.oath"; description = '' Set the path to file where the user's credentials are From 5e67f3e4c84e24c17518ebaece0ac684e37fd153 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:53 +0200 Subject: [PATCH 085/236] nixos/services.pgadmin: remove `with lib;` --- nixos/modules/services/admin/pgadmin.nix | 85 ++++++++++++------------ 1 file changed, 41 insertions(+), 44 deletions(-) diff --git a/nixos/modules/services/admin/pgadmin.nix b/nixos/modules/services/admin/pgadmin.nix index 9c430bd05e71..c9da556b763d 100644 --- a/nixos/modules/services/admin/pgadmin.nix +++ b/nixos/modules/services/admin/pgadmin.nix @@ -1,15 +1,12 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.pgadmin; - _base = with types; [ int bool str ]; - base = with types; oneOf ([ (listOf (oneOf _base)) (attrsOf (oneOf _base)) ] ++ _base); + _base = with lib.types; [ int bool str ]; + base = with lib.types; oneOf ([ (listOf (oneOf _base)) (attrsOf (oneOf _base)) ] ++ _base); formatAttrset = attr: - "{${concatStringsSep "\n" (mapAttrsToList (key: value: "${builtins.toJSON key}: ${formatPyValue value},") attr)}}"; + "{${lib.concatStringsSep "\n" (lib.mapAttrsToList (key: value: "${builtins.toJSON key}: ${formatPyValue value},") attr)}}"; formatPyValue = value: if builtins.isString value then builtins.toJSON value @@ -17,98 +14,98 @@ let else if builtins.isInt value then toString value else if builtins.isBool value then (if value then "True" else "False") else if builtins.isAttrs value then (formatAttrset value) - else if builtins.isList value then "[${concatStringsSep "\n" (map (v: "${formatPyValue v},") value)}]" + else if builtins.isList value then "[${lib.concatStringsSep "\n" (map (v: "${formatPyValue v},") value)}]" else throw "Unrecognized type"; formatPy = attrs: - concatStringsSep "\n" (mapAttrsToList (key: value: "${key} = ${formatPyValue value}") attrs); + lib.concatStringsSep "\n" (lib.mapAttrsToList (key: value: "${key} = ${formatPyValue value}") attrs); - pyType = with types; attrsOf (oneOf [ (attrsOf base) (listOf base) base ]); + pyType = with lib.types; attrsOf (oneOf [ (attrsOf base) (listOf base) base ]); in { options.services.pgadmin = { - enable = mkEnableOption "PostgreSQL Admin 4"; + enable = lib.mkEnableOption "PostgreSQL Admin 4"; - port = mkOption { + port = lib.mkOption { description = "Port for pgadmin4 to run on"; - type = types.port; + type = lib.types.port; default = 5050; }; - package = mkPackageOption pkgs "pgadmin4" { }; + package = lib.mkPackageOption pkgs "pgadmin4" { }; - initialEmail = mkOption { + initialEmail = lib.mkOption { description = "Initial email for the pgAdmin account"; - type = types.str; + type = lib.types.str; }; - initialPasswordFile = mkOption { + initialPasswordFile = lib.mkOption { description = '' Initial password file for the pgAdmin account. Minimum length by default is 6. Please see `services.pgadmin.minimumPasswordLength`. NOTE: Should be string not a store path, to prevent the password from being world readable ''; - type = types.path; + type = lib.types.path; }; - minimumPasswordLength = mkOption { + minimumPasswordLength = lib.mkOption { description = "Minimum length of the password"; - type = types.int; + type = lib.types.int; default = 6; }; emailServer = { - enable = mkOption { + enable = lib.mkOption { description = '' Enable SMTP email server. This is necessary, if you want to use password recovery or change your own password ''; - type = types.bool; + type = lib.types.bool; default = false; }; - address = mkOption { + address = lib.mkOption { description = "SMTP server for email delivery"; - type = types.str; + type = lib.types.str; default = "localhost"; }; - port = mkOption { + port = lib.mkOption { description = "SMTP server port for email delivery"; - type = types.port; + type = lib.types.port; default = 25; }; - useSSL = mkOption { + useSSL = lib.mkOption { description = "SMTP server should use SSL"; - type = types.bool; + type = lib.types.bool; default = false; }; - useTLS = mkOption { + useTLS = lib.mkOption { description = "SMTP server should use TLS"; - type = types.bool; + type = lib.types.bool; default = false; }; - username = mkOption { + username = lib.mkOption { description = "SMTP server username for email delivery"; - type = types.nullOr types.str; + type = lib.types.nullOr lib.types.str; default = null; }; - sender = mkOption { + sender = lib.mkOption { description = '' SMTP server sender email for email delivery. Some servers require this to be a valid email address from that server ''; - type = types.str; + type = lib.types.str; example = "noreply@example.com"; }; - passwordFile = mkOption { + passwordFile = lib.mkOption { description = '' Password for SMTP email account. NOTE: Should be string not a store path, to prevent the password from being world readable ''; - type = types.path; + type = lib.types.path; }; }; - openFirewall = mkEnableOption "firewall passthrough for pgadmin4"; + openFirewall = lib.mkEnableOption "firewall passthrough for pgadmin4"; - settings = mkOption { + settings = lib.mkOption { description = '' Settings for pgadmin4. [Documentation](https://www.pgadmin.org/docs/pgadmin4/development/config_py.html) @@ -118,17 +115,17 @@ in }; }; - config = mkIf (cfg.enable) { - networking.firewall.allowedTCPPorts = mkIf (cfg.openFirewall) [ cfg.port ]; + config = lib.mkIf (cfg.enable) { + networking.firewall.allowedTCPPorts = lib.mkIf (cfg.openFirewall) [ cfg.port ]; services.pgadmin.settings = { DEFAULT_SERVER_PORT = cfg.port; PASSWORD_LENGTH_MIN = cfg.minimumPasswordLength; SERVER_MODE = true; UPGRADE_CHECK_ENABLED = false; - } // (optionalAttrs cfg.openFirewall { - DEFAULT_SERVER = mkDefault "::"; - }) // (optionalAttrs cfg.emailServer.enable { + } // (lib.optionalAttrs cfg.openFirewall { + DEFAULT_SERVER = lib.mkDefault "::"; + }) // (lib.optionalAttrs cfg.emailServer.enable { MAIL_SERVER = cfg.emailServer.address; MAIL_PORT = cfg.emailServer.port; MAIL_USE_SSL = cfg.emailServer.useSSL; @@ -160,7 +157,7 @@ in fi ( # Email address: - echo ${escapeShellArg cfg.initialEmail} + echo ${lib.escapeShellArg cfg.initialEmail} # file might not contain newline. echo hack fixes that. PW=$(cat "$PW_FILE") @@ -183,7 +180,7 @@ in StateDirectory = "pgadmin"; ExecStart = "${cfg.package}/bin/pgadmin4"; LoadCredential = [ "initial_password:${cfg.initialPasswordFile}" ] - ++ optional cfg.emailServer.enable "email_password:${cfg.emailServer.passwordFile}"; + ++ lib.optional cfg.emailServer.enable "email_password:${cfg.emailServer.passwordFile}"; }; }; From 02145eb69237f6a3239ef57b51a02c92f45ba160 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:53 +0200 Subject: [PATCH 086/236] nixos/services.mysqlBackup: remove `with lib;` --- .../modules/services/backup/mysql-backup.nix | 41 +++++++++---------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/nixos/modules/services/backup/mysql-backup.nix b/nixos/modules/services/backup/mysql-backup.nix index e3fa7f45844f..8ad4f98dce8a 100644 --- a/nixos/modules/services/backup/mysql-backup.nix +++ b/nixos/modules/services/backup/mysql-backup.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let inherit (pkgs) mariadb gzip; @@ -12,7 +9,7 @@ let backupScript = '' set -o pipefail failed="" - ${concatMapStringsSep "\n" backupDatabaseScript cfg.databases} + ${lib.concatMapStringsSep "\n" backupDatabaseScript cfg.databases} if [ -n "$failed" ]; then echo "Backup of database(s) failed:$failed" exit 1 @@ -20,7 +17,7 @@ let ''; backupDatabaseScript = db: '' dest="${cfg.location}/${db}.gz" - if ${mariadb}/bin/mysqldump ${optionalString cfg.singleTransaction "--single-transaction"} ${db} | ${gzip}/bin/gzip -c ${cfg.gzipOptions} > $dest.tmp; then + if ${mariadb}/bin/mysqldump ${lib.optionalString cfg.singleTransaction "--single-transaction"} ${db} | ${gzip}/bin/gzip -c ${cfg.gzipOptions} > $dest.tmp; then mv $dest.tmp $dest echo "Backed up to $dest" else @@ -37,51 +34,51 @@ in services.mysqlBackup = { - enable = mkEnableOption "MySQL backups"; + enable = lib.mkEnableOption "MySQL backups"; - calendar = mkOption { - type = types.str; + calendar = lib.mkOption { + type = lib.types.str; default = "01:15:00"; description = '' Configured when to run the backup service systemd unit (DayOfWeek Year-Month-Day Hour:Minute:Second). ''; }; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = defaultUser; description = '' User to be used to perform backup. ''; }; - databases = mkOption { + databases = lib.mkOption { default = []; - type = types.listOf types.str; + type = lib.types.listOf lib.types.str; description = '' List of database names to dump. ''; }; - location = mkOption { - type = types.path; + location = lib.mkOption { + type = lib.types.path; default = "/var/backup/mysql"; description = '' Location to put the gzipped MySQL database dumps. ''; }; - singleTransaction = mkOption { + singleTransaction = lib.mkOption { default = false; - type = types.bool; + type = lib.types.bool; description = '' Whether to create database dump in a single transaction ''; }; - gzipOptions = mkOption { + gzipOptions = lib.mkOption { default = "--no-name --rsyncable"; - type = types.str; + type = lib.types.str; description = '' Command line options to use when invoking `gzip`. ''; @@ -90,8 +87,8 @@ in }; - config = mkIf cfg.enable { - users.users = optionalAttrs (cfg.user == defaultUser) { + config = lib.mkIf cfg.enable { + users.users = lib.optionalAttrs (cfg.user == defaultUser) { ${defaultUser} = { isSystemUser = true; createHome = false; @@ -105,9 +102,9 @@ in ensurePermissions = with lib; let privs = "SELECT, SHOW VIEW, TRIGGER, LOCK TABLES"; - grant = db: nameValuePair "${db}.*" privs; + grant = db: lib.nameValuePair "${db}.*" privs; in - listToAttrs (map grant cfg.databases); + lib.listToAttrs (map grant cfg.databases); }]; systemd = { From 5c0e7f70a5133f63d571eed31b4d59c8cf3e8927 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:53 +0200 Subject: [PATCH 087/236] nixos/services.postgresqlBackup: remove `with lib;` --- .../services/backup/postgresql-backup.nix | 51 +++++++++---------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/nixos/modules/services/backup/postgresql-backup.nix b/nixos/modules/services/backup/postgresql-backup.nix index 5dd9e075862d..3302375c7889 100644 --- a/nixos/modules/services/backup/postgresql-backup.nix +++ b/nixos/modules/services/backup/postgresql-backup.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.postgresqlBackup; @@ -13,9 +10,9 @@ let "gzip" = ".gz"; "zstd" = ".zstd"; }; - compressSuffix = getAttr cfg.compression compressSuffixes; + compressSuffix = lib.getAttr cfg.compression compressSuffixes; - compressCmd = getAttr cfg.compression { + compressCmd = lib.getAttr cfg.compression { "none" = "cat"; "gzip" = "${pkgs.gzip}/bin/gzip -c -${toString cfg.compressionLevel} --rsyncable"; "zstd" = "${pkgs.zstd}/bin/zstd -c -${toString cfg.compressionLevel} --rsyncable"; @@ -24,7 +21,7 @@ let mkSqlPath = prefix: suffix: "${cfg.location}/${db}${prefix}.sql${suffix}"; curFile = mkSqlPath "" compressSuffix; prevFile = mkSqlPath ".prev" compressSuffix; - prevFiles = map (mkSqlPath ".prev") (attrValues compressSuffixes); + prevFiles = map (mkSqlPath ".prev") (lib.attrValues compressSuffixes); inProgressFile = mkSqlPath ".in-progress" compressSuffix; in { enable = true; @@ -63,7 +60,7 @@ let in { imports = [ - (mkRemovedOptionModule [ "services" "postgresqlBackup" "period" ] '' + (lib.mkRemovedOptionModule [ "services" "postgresqlBackup" "period" ] '' A systemd timer is now used instead of cron. The starting time can be configured via services.postgresqlBackup.startAt. '') @@ -71,11 +68,11 @@ in { options = { services.postgresqlBackup = { - enable = mkEnableOption "PostgreSQL dumps"; + enable = lib.mkEnableOption "PostgreSQL dumps"; - startAt = mkOption { + startAt = lib.mkOption { default = "*-*-* 01:15:00"; - type = with types; either (listOf str) str; + type = with lib.types; either (listOf str) str; description = '' This option defines (see `systemd.time` for format) when the databases should be dumped. @@ -83,9 +80,9 @@ in { ''; }; - backupAll = mkOption { + backupAll = lib.mkOption { default = cfg.databases == []; - defaultText = literalExpression "services.postgresqlBackup.databases == []"; + defaultText = lib.literalExpression "services.postgresqlBackup.databases == []"; type = lib.types.bool; description = '' Backup all databases using pg_dumpall. @@ -96,24 +93,24 @@ in { ''; }; - databases = mkOption { + databases = lib.mkOption { default = []; - type = types.listOf types.str; + type = lib.types.listOf lib.types.str; description = '' List of database names to dump. ''; }; - location = mkOption { + location = lib.mkOption { default = "/var/backup/postgresql"; - type = types.path; + type = lib.types.path; description = '' Path of directory where the PostgreSQL database dumps will be placed. ''; }; - pgdumpOptions = mkOption { - type = types.separatedString " "; + pgdumpOptions = lib.mkOption { + type = lib.types.separatedString " "; default = "-C"; description = '' Command line options for pg_dump. This options is not used @@ -123,16 +120,16 @@ in { ''; }; - compression = mkOption { - type = types.enum ["none" "gzip" "zstd"]; + compression = lib.mkOption { + type = lib.types.enum ["none" "gzip" "zstd"]; default = "gzip"; description = '' The type of compression to use on the generated database dump. ''; }; - compressionLevel = mkOption { - type = types.ints.between 1 19; + compressionLevel = lib.mkOption { + type = lib.types.ints.between 1 19; default = 6; description = '' The compression level used when compression is enabled. @@ -143,7 +140,7 @@ in { }; - config = mkMerge [ + config = lib.mkMerge [ { assertions = [ { @@ -158,17 +155,17 @@ in { } ]; } - (mkIf cfg.enable { + (lib.mkIf cfg.enable { systemd.tmpfiles.rules = [ "d '${cfg.location}' 0700 postgres - - -" ]; }) - (mkIf (cfg.enable && cfg.backupAll) { + (lib.mkIf (cfg.enable && cfg.backupAll) { systemd.services.postgresqlBackup = postgresqlBackupService "all" "pg_dumpall"; }) - (mkIf (cfg.enable && !cfg.backupAll) { - systemd.services = listToAttrs (map (db: + (lib.mkIf (cfg.enable && !cfg.backupAll) { + systemd.services = lib.listToAttrs (map (db: let cmd = "pg_dump ${cfg.pgdumpOptions} ${db}"; in { From dee892a4460265e9d7ced474f6012d65c7858ebc Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:53 +0200 Subject: [PATCH 088/236] nixos/services.postgresqlWalReceiver: remove `with lib;` --- .../backup/postgresql-wal-receiver.nix | 77 +++++++++---------- 1 file changed, 37 insertions(+), 40 deletions(-) diff --git a/nixos/modules/services/backup/postgresql-wal-receiver.nix b/nixos/modules/services/backup/postgresql-wal-receiver.nix index a8f2cf514d54..b355637ff5a0 100644 --- a/nixos/modules/services/backup/postgresql-wal-receiver.nix +++ b/nixos/modules/services/backup/postgresql-wal-receiver.nix @@ -1,24 +1,21 @@ { config, lib, pkgs, ... }: - -with lib; - let receiverSubmodule = { options = { - postgresqlPackage = mkPackageOption pkgs "postgresql" { + postgresqlPackage = lib.mkPackageOption pkgs "postgresql" { example = "postgresql_15"; }; - directory = mkOption { - type = types.path; - example = literalExpression "/mnt/pg_wal/main/"; + directory = lib.mkOption { + type = lib.types.path; + example = lib.literalExpression "/mnt/pg_wal/main/"; description = '' Directory to write the output to. ''; }; - statusInterval = mkOption { - type = types.int; + statusInterval = lib.mkOption { + type = lib.types.int; default = 10; description = '' Specifies the number of seconds between status packets sent back to the server. @@ -28,8 +25,8 @@ let ''; }; - slot = mkOption { - type = types.str; + slot = lib.mkOption { + type = lib.types.str; default = ""; example = "some_slot_name"; description = '' @@ -45,8 +42,8 @@ let ''; }; - synchronous = mkOption { - type = types.bool; + synchronous = lib.mkOption { + type = lib.types.bool; default = false; description = '' Flush the WAL data to disk immediately after it has been received. @@ -57,8 +54,8 @@ let ''; }; - compress = mkOption { - type = types.ints.between 0 9; + compress = lib.mkOption { + type = lib.types.ints.between 0 9; default = 0; description = '' Enables gzip compression of write-ahead logs, and specifies the compression level @@ -69,8 +66,8 @@ let ''; }; - connection = mkOption { - type = types.str; + connection = lib.mkOption { + type = lib.types.str; example = "postgresql://user@somehost"; description = '' Specifies parameters used to connect to the server, as a connection string. @@ -81,10 +78,10 @@ let ''; }; - extraArgs = mkOption { - type = with types; listOf str; + extraArgs = lib.mkOption { + type = with lib.types; listOf str; default = [ ]; - example = literalExpression '' + example = lib.literalExpression '' [ "--no-sync" ] @@ -94,10 +91,10 @@ let ''; }; - environment = mkOption { - type = with types; attrsOf str; + environment = lib.mkOption { + type = with lib.types; attrsOf str; default = { }; - example = literalExpression '' + example = lib.literalExpression '' { PGPASSFILE = "/private/passfile"; PGSSLMODE = "require"; @@ -114,10 +111,10 @@ let in { options = { services.postgresqlWalReceiver = { - receivers = mkOption { - type = with types; attrsOf (submodule receiverSubmodule); + receivers = lib.mkOption { + type = with lib.types; attrsOf (submodule receiverSubmodule); default = { }; - example = literalExpression '' + example = lib.literalExpression '' { main = { postgresqlPackage = pkgs.postgresql_15; @@ -138,7 +135,7 @@ in { config = let receivers = config.services.postgresqlWalReceiver.receivers; - in mkIf (receivers != { }) { + in lib.mkIf (receivers != { }) { users = { users.postgres = { uid = config.ids.uids.postgres; @@ -151,18 +148,18 @@ in { }; }; - assertions = concatLists (attrsets.mapAttrsToList (name: config: [ + assertions = lib.concatLists (lib.attrsets.mapAttrsToList (name: config: [ { - assertion = config.compress > 0 -> versionAtLeast config.postgresqlPackage.version "10"; + assertion = config.compress > 0 -> lib.versionAtLeast config.postgresqlPackage.version "10"; message = "Invalid configuration for WAL receiver \"${name}\": compress requires PostgreSQL version >= 10."; } ]) receivers); - systemd.tmpfiles.rules = mapAttrsToList (name: config: '' - d ${escapeShellArg config.directory} 0750 postgres postgres - - + systemd.tmpfiles.rules = lib.mapAttrsToList (name: config: '' + d ${lib.escapeShellArg config.directory} 0750 postgres postgres - - '') receivers; - systemd.services = with attrsets; mapAttrs' (name: config: nameValuePair "postgresql-wal-receiver-${name}" { + systemd.services = lib.mapAttrs' (name: config: lib.nameValuePair "postgresql-wal-receiver-${name}" { description = "PostgreSQL WAL receiver (${name})"; wantedBy = [ "multi-user.target" ]; startLimitIntervalSec = 0; # retry forever, useful in case of network disruption @@ -179,22 +176,22 @@ in { script = let receiverCommand = postgresqlPackage: - if (versionAtLeast postgresqlPackage.version "10") + if (lib.versionAtLeast postgresqlPackage.version "10") then "${postgresqlPackage}/bin/pg_receivewal" else "${postgresqlPackage}/bin/pg_receivexlog"; in '' ${receiverCommand config.postgresqlPackage} \ --no-password \ - --directory=${escapeShellArg config.directory} \ + --directory=${lib.escapeShellArg config.directory} \ --status-interval=${toString config.statusInterval} \ - --dbname=${escapeShellArg config.connection} \ - ${optionalString (config.compress > 0) "--compress=${toString config.compress}"} \ - ${optionalString (config.slot != "") "--slot=${escapeShellArg config.slot}"} \ - ${optionalString config.synchronous "--synchronous"} \ - ${concatStringsSep " " config.extraArgs} + --dbname=${lib.escapeShellArg config.connection} \ + ${lib.optionalString (config.compress > 0) "--compress=${toString config.compress}"} \ + ${lib.optionalString (config.slot != "") "--slot=${lib.escapeShellArg config.slot}"} \ + ${lib.optionalString config.synchronous "--synchronous"} \ + ${lib.concatStringsSep " " config.extraArgs} ''; }) receivers; }; - meta.maintainers = with maintainers; [ pacien ]; + meta.maintainers = with lib.maintainers; [ pacien ]; } From 9ad1866434650215dba774cb963dec1362634f5f Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:53 +0200 Subject: [PATCH 089/236] nixos/services.restic.server: remove `with lib;` --- .../services/backup/restic-rest-server.nix | 45 +++++++++---------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/nixos/modules/services/backup/restic-rest-server.nix b/nixos/modules/services/backup/restic-rest-server.nix index eb7b57800333..333609444da2 100644 --- a/nixos/modules/services/backup/restic-rest-server.nix +++ b/nixos/modules/services/backup/restic-rest-server.nix @@ -1,32 +1,29 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.restic.server; in { - meta.maintainers = [ maintainers.bachp ]; + meta.maintainers = [ lib.maintainers.bachp ]; options.services.restic.server = { - enable = mkEnableOption "Restic REST Server"; + enable = lib.mkEnableOption "Restic REST Server"; - listenAddress = mkOption { + listenAddress = lib.mkOption { default = "8000"; example = "127.0.0.1:8080"; - type = types.str; + type = lib.types.str; description = "Listen on a specific IP address and port or unix socket."; }; - dataDir = mkOption { + dataDir = lib.mkOption { default = "/var/lib/restic"; - type = types.path; + type = lib.types.path; description = "The directory for storing the restic repository."; }; - appendOnly = mkOption { + appendOnly = lib.mkOption { default = false; - type = types.bool; + type = lib.types.bool; description = '' Enable append only mode. This mode allows creation of new backups but prevents deletion and modification of existing backups. @@ -34,33 +31,33 @@ in ''; }; - privateRepos = mkOption { + privateRepos = lib.mkOption { default = false; - type = types.bool; + type = lib.types.bool; description = '' Enable private repos. Grants access only when a subdirectory with the same name as the user is specified in the repository URL. ''; }; - prometheus = mkOption { + prometheus = lib.mkOption { default = false; - type = types.bool; + type = lib.types.bool; description = "Enable Prometheus metrics at /metrics."; }; - extraFlags = mkOption { - type = types.listOf types.str; + extraFlags = lib.mkOption { + type = lib.types.listOf lib.types.str; default = []; description = '' Extra commandline options to pass to Restic REST server. ''; }; - package = mkPackageOption pkgs "restic-rest-server" { }; + package = lib.mkPackageOption pkgs "restic-rest-server" { }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { assertions = [{ assertion = lib.substring 0 1 cfg.listenAddress != ":"; message = "The restic-rest-server now uses systemd socket activation, which expects only the Port number: services.restic.server.listenAddress = \"${lib.substring 1 6 cfg.listenAddress}\";"; @@ -75,10 +72,10 @@ in ExecStart = '' ${cfg.package}/bin/rest-server \ --path ${cfg.dataDir} \ - ${optionalString cfg.appendOnly "--append-only"} \ - ${optionalString cfg.privateRepos "--private-repos"} \ - ${optionalString cfg.prometheus "--prometheus"} \ - ${escapeShellArgs cfg.extraFlags} \ + ${lib.optionalString cfg.appendOnly "--append-only"} \ + ${lib.optionalString cfg.privateRepos "--private-repos"} \ + ${lib.optionalString cfg.prometheus "--prometheus"} \ + ${lib.escapeShellArgs cfg.extraFlags} \ ''; Type = "simple"; User = "restic"; @@ -119,7 +116,7 @@ in wantedBy = [ "sockets.target" ]; }; - systemd.tmpfiles.rules = mkIf cfg.privateRepos [ + systemd.tmpfiles.rules = lib.mkIf cfg.privateRepos [ "f ${cfg.dataDir}/.htpasswd 0700 restic restic -" ]; From 27f54eb43e9c1639bbcefaa30522737f1a43b3d4 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:54 +0200 Subject: [PATCH 090/236] nixos/services.restic.backups: remove `with lib;` --- nixos/modules/services/backup/restic.nix | 163 +++++++++++------------ 1 file changed, 80 insertions(+), 83 deletions(-) diff --git a/nixos/modules/services/backup/restic.nix b/nixos/modules/services/backup/restic.nix index a7c2ef2eacd5..0fb601cce589 100644 --- a/nixos/modules/services/backup/restic.nix +++ b/nixos/modules/services/backup/restic.nix @@ -1,28 +1,25 @@ { config, lib, pkgs, utils, ... }: - -with lib; - let # Type for a valid systemd unit option. Needed for correctly passing "timerConfig" to "systemd.timers" inherit (utils.systemdUtils.unitOptions) unitOption; in { - options.services.restic.backups = mkOption { + options.services.restic.backups = lib.mkOption { description = '' Periodic backups to create with Restic. ''; - type = types.attrsOf (types.submodule ({ name, ... }: { + type = lib.types.attrsOf (lib.types.submodule ({ name, ... }: { options = { - passwordFile = mkOption { - type = types.str; + passwordFile = lib.mkOption { + type = lib.types.str; description = '' Read the repository password from a file. ''; example = "/etc/nixos/restic-password"; }; - environmentFile = mkOption { - type = with types; nullOr str; + environmentFile = lib.mkOption { + type = with lib.types; nullOr str; default = null; description = '' file containing the credentials to access the repository, in the @@ -30,8 +27,8 @@ in ''; }; - rcloneOptions = mkOption { - type = with types; nullOr (attrsOf (oneOf [ str bool ])); + rcloneOptions = lib.mkOption { + type = with lib.types; nullOr (attrsOf (oneOf [ str bool ])); default = null; description = '' Options to pass to rclone to control its behavior. @@ -47,8 +44,8 @@ in }; }; - rcloneConfig = mkOption { - type = with types; nullOr (attrsOf (oneOf [ str bool ])); + rcloneConfig = lib.mkOption { + type = with lib.types; nullOr (attrsOf (oneOf [ str bool ])); default = null; description = '' Configuration for the rclone remote being used for backup. @@ -71,8 +68,8 @@ in }; }; - rcloneConfigFile = mkOption { - type = with types; nullOr path; + rcloneConfigFile = lib.mkOption { + type = with lib.types; nullOr path; default = null; description = '' Path to the file containing rclone configuration. This file @@ -83,17 +80,17 @@ in ''; }; - inhibitsSleep = mkOption { + inhibitsSleep = lib.mkOption { default = false; - type = types.bool; + type = lib.types.bool; example = true; description = '' Prevents the system from sleeping while backing up. ''; }; - repository = mkOption { - type = with types; nullOr str; + repository = lib.mkOption { + type = with lib.types; nullOr str; default = null; description = '' repository to backup to. @@ -101,18 +98,18 @@ in example = "sftp:backup@192.168.1.100:/backups/${name}"; }; - repositoryFile = mkOption { - type = with types; nullOr path; + repositoryFile = lib.mkOption { + type = with lib.types; nullOr path; default = null; description = '' Path to the file containing the repository location to backup to. ''; }; - paths = mkOption { + paths = lib.mkOption { # This is nullable for legacy reasons only. We should consider making it a pure listOf # after some time has passed since this comment was added. - type = types.nullOr (types.listOf types.str); + type = lib.types.nullOr (lib.types.listOf lib.types.str); default = [ ]; description = '' Which paths to backup, in addition to ones specified via @@ -126,8 +123,8 @@ in ]; }; - exclude = mkOption { - type = types.listOf types.str; + exclude = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; description = '' Patterns to exclude when backing up. See @@ -141,8 +138,8 @@ in ]; }; - timerConfig = mkOption { - type = types.nullOr (types.attrsOf unitOption); + timerConfig = lib.mkOption { + type = lib.types.nullOr (lib.types.attrsOf unitOption); default = { OnCalendar = "daily"; Persistent = true; @@ -159,8 +156,8 @@ in }; }; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = "root"; description = '' As which user the backup should run. @@ -168,8 +165,8 @@ in example = "postgresql"; }; - extraBackupArgs = mkOption { - type = types.listOf types.str; + extraBackupArgs = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; description = '' Extra arguments passed to restic backup. @@ -179,8 +176,8 @@ in ]; }; - extraOptions = mkOption { - type = types.listOf types.str; + extraOptions = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; description = '' Extra extended options to be passed to the restic --option flag. @@ -190,16 +187,16 @@ in ]; }; - initialize = mkOption { - type = types.bool; + initialize = lib.mkOption { + type = lib.types.bool; default = false; description = '' Create the repository if it doesn't exist. ''; }; - pruneOpts = mkOption { - type = types.listOf types.str; + pruneOpts = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; description = '' A list of options (--keep-\* et al.) for 'restic forget @@ -215,16 +212,16 @@ in ]; }; - runCheck = mkOption { - type = types.bool; + runCheck = lib.mkOption { + type = lib.types.bool; default = (builtins.length config.services.restic.backups.${name}.checkOpts > 0); - defaultText = literalExpression ''builtins.length config.services.backups.${name}.checkOpts > 0''; + defaultText = lib.literalExpression ''builtins.length config.services.backups.${name}.checkOpts > 0''; description = "Whether to run the `check` command with the provided `checkOpts` options."; example = true; }; - checkOpts = mkOption { - type = types.listOf types.str; + checkOpts = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; description = '' A list of options for 'restic check'. @@ -234,8 +231,8 @@ in ]; }; - dynamicFilesFrom = mkOption { - type = with types; nullOr str; + dynamicFilesFrom = lib.mkOption { + type = with lib.types; nullOr str; default = null; description = '' A script that produces a list of files to back up. The @@ -245,23 +242,23 @@ in example = "find /home/matt/git -type d -name .git"; }; - backupPrepareCommand = mkOption { - type = with types; nullOr str; + backupPrepareCommand = lib.mkOption { + type = with lib.types; nullOr str; default = null; description = '' A script that must run before starting the backup process. ''; }; - backupCleanupCommand = mkOption { - type = with types; nullOr str; + backupCleanupCommand = lib.mkOption { + type = with lib.types; nullOr str; default = null; description = '' A script that must run after finishing the backup process. ''; }; - package = mkPackageOption pkgs "restic" { }; + package = lib.mkPackageOption pkgs "restic" { }; createWrapper = lib.mkOption { type = lib.types.bool; @@ -299,54 +296,54 @@ in }; config = { - assertions = mapAttrsToList (n: v: { + assertions = lib.mapAttrsToList (n: v: { assertion = (v.repository == null) != (v.repositoryFile == null); message = "services.restic.backups.${n}: exactly one of repository or repositoryFile should be set"; }) config.services.restic.backups; systemd.services = - mapAttrs' + lib.mapAttrs' (name: backup: let - extraOptions = concatMapStrings (arg: " -o ${arg}") backup.extraOptions; - inhibitCmd = concatStringsSep " " [ + extraOptions = lib.concatMapStrings (arg: " -o ${arg}") backup.extraOptions; + inhibitCmd = lib.concatStringsSep " " [ "${pkgs.systemd}/bin/systemd-inhibit" "--mode='block'" "--who='restic'" "--what='sleep'" - "--why=${escapeShellArg "Scheduled backup ${name}"} " + "--why=${lib.escapeShellArg "Scheduled backup ${name}"} " ]; - resticCmd = "${optionalString backup.inhibitsSleep inhibitCmd}${backup.package}/bin/restic${extraOptions}"; - excludeFlags = optional (backup.exclude != []) "--exclude-file=${pkgs.writeText "exclude-patterns" (concatStringsSep "\n" backup.exclude)}"; + resticCmd = "${lib.optionalString backup.inhibitsSleep inhibitCmd}${backup.package}/bin/restic${extraOptions}"; + excludeFlags = lib.optional (backup.exclude != []) "--exclude-file=${pkgs.writeText "exclude-patterns" (lib.concatStringsSep "\n" backup.exclude)}"; filesFromTmpFile = "/run/restic-backups-${name}/includes"; doBackup = (backup.dynamicFilesFrom != null) || (backup.paths != null && backup.paths != []); - pruneCmd = optionals (builtins.length backup.pruneOpts > 0) [ - (resticCmd + " forget --prune " + (concatStringsSep " " backup.pruneOpts)) + pruneCmd = lib.optionals (builtins.length backup.pruneOpts > 0) [ + (resticCmd + " forget --prune " + (lib.concatStringsSep " " backup.pruneOpts)) ]; - checkCmd = optionals backup.runCheck [ - (resticCmd + " check " + (concatStringsSep " " backup.checkOpts)) + checkCmd = lib.optionals backup.runCheck [ + (resticCmd + " check " + (lib.concatStringsSep " " backup.checkOpts)) ]; # Helper functions for rclone remotes - rcloneRemoteName = builtins.elemAt (splitString ":" backup.repository) 1; - rcloneAttrToOpt = v: "RCLONE_" + toUpper (builtins.replaceStrings [ "-" ] [ "_" ] v); - rcloneAttrToConf = v: "RCLONE_CONFIG_" + toUpper (rcloneRemoteName + "_" + v); + rcloneRemoteName = builtins.elemAt (lib.splitString ":" backup.repository) 1; + rcloneAttrToOpt = v: "RCLONE_" + lib.toUpper (builtins.replaceStrings [ "-" ] [ "_" ] v); + rcloneAttrToConf = v: "RCLONE_CONFIG_" + lib.toUpper (rcloneRemoteName + "_" + v); toRcloneVal = v: if lib.isBool v then lib.boolToString v else v; in - nameValuePair "restic-backups-${name}" ({ + lib.nameValuePair "restic-backups-${name}" ({ environment = { # not %C, because that wouldn't work in the wrapper script RESTIC_CACHE_DIR = "/var/cache/restic-backups-${name}"; RESTIC_PASSWORD_FILE = backup.passwordFile; RESTIC_REPOSITORY = backup.repository; RESTIC_REPOSITORY_FILE = backup.repositoryFile; - } // optionalAttrs (backup.rcloneOptions != null) (mapAttrs' + } // lib.optionalAttrs (backup.rcloneOptions != null) (lib.mapAttrs' (name: value: - nameValuePair (rcloneAttrToOpt name) (toRcloneVal value) + lib.nameValuePair (rcloneAttrToOpt name) (toRcloneVal value) ) - backup.rcloneOptions) // optionalAttrs (backup.rcloneConfigFile != null) { + backup.rcloneOptions) // lib.optionalAttrs (backup.rcloneConfigFile != null) { RCLONE_CONFIG = backup.rcloneConfigFile; - } // optionalAttrs (backup.rcloneConfig != null) (mapAttrs' + } // lib.optionalAttrs (backup.rcloneConfig != null) (lib.mapAttrs' (name: value: - nameValuePair (rcloneAttrToConf name) (toRcloneVal value) + lib.nameValuePair (rcloneAttrToConf name) (toRcloneVal value) ) backup.rcloneConfig); path = [ config.programs.ssh.package ]; @@ -355,37 +352,37 @@ in after = [ "network-online.target" ]; serviceConfig = { Type = "oneshot"; - ExecStart = (optionals doBackup [ "${resticCmd} backup ${concatStringsSep " " (backup.extraBackupArgs ++ excludeFlags)} --files-from=${filesFromTmpFile}" ]) + ExecStart = (lib.optionals doBackup [ "${resticCmd} backup ${lib.concatStringsSep " " (backup.extraBackupArgs ++ excludeFlags)} --files-from=${filesFromTmpFile}" ]) ++ pruneCmd ++ checkCmd; User = backup.user; RuntimeDirectory = "restic-backups-${name}"; CacheDirectory = "restic-backups-${name}"; CacheDirectoryMode = "0700"; PrivateTmp = true; - } // optionalAttrs (backup.environmentFile != null) { + } // lib.optionalAttrs (backup.environmentFile != null) { EnvironmentFile = backup.environmentFile; }; - } // optionalAttrs (backup.initialize || doBackup || backup.backupPrepareCommand != null) { + } // lib.optionalAttrs (backup.initialize || doBackup || backup.backupPrepareCommand != null) { preStart = '' - ${optionalString (backup.backupPrepareCommand != null) '' + ${lib.optionalString (backup.backupPrepareCommand != null) '' ${pkgs.writeScript "backupPrepareCommand" backup.backupPrepareCommand} ''} - ${optionalString (backup.initialize) '' + ${lib.optionalString (backup.initialize) '' ${resticCmd} cat config > /dev/null || ${resticCmd} init ''} - ${optionalString (backup.paths != null && backup.paths != []) '' - cat ${pkgs.writeText "staticPaths" (concatLines backup.paths)} >> ${filesFromTmpFile} + ${lib.optionalString (backup.paths != null && backup.paths != []) '' + cat ${pkgs.writeText "staticPaths" (lib.concatLines backup.paths)} >> ${filesFromTmpFile} ''} - ${optionalString (backup.dynamicFilesFrom != null) '' + ${lib.optionalString (backup.dynamicFilesFrom != null) '' ${pkgs.writeScript "dynamicFilesFromScript" backup.dynamicFilesFrom} >> ${filesFromTmpFile} ''} ''; - } // optionalAttrs (doBackup || backup.backupCleanupCommand != null) { + } // lib.optionalAttrs (doBackup || backup.backupCleanupCommand != null) { postStop = '' - ${optionalString (backup.backupCleanupCommand != null) '' + ${lib.optionalString (backup.backupCleanupCommand != null) '' ${pkgs.writeScript "backupCleanupCommand" backup.backupCleanupCommand} ''} - ${optionalString doBackup '' + ${lib.optionalString doBackup '' rm ${filesFromTmpFile} ''} ''; @@ -393,12 +390,12 @@ in ) config.services.restic.backups; systemd.timers = - mapAttrs' - (name: backup: nameValuePair "restic-backups-${name}" { + lib.mapAttrs' + (name: backup: lib.nameValuePair "restic-backups-${name}" { wantedBy = [ "timers.target" ]; timerConfig = backup.timerConfig; }) - (filterAttrs (_: backup: backup.timerConfig != null) config.services.restic.backups); + (lib.filterAttrs (_: backup: backup.timerConfig != null) config.services.restic.backups); # generate wrapper scripts, as described in the createWrapper option environment.systemPackages = lib.mapAttrsToList (name: backup: let From dfb290a6c6a8e41acd57939b0135d3ea753aaa91 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:54 +0200 Subject: [PATCH 091/236] nixos/services.rsnapshot: remove `with lib;` --- nixos/modules/services/backup/rsnapshot.nix | 23 +++++++++------------ 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/nixos/modules/services/backup/rsnapshot.nix b/nixos/modules/services/backup/rsnapshot.nix index 6635a51ec2c6..aedb8acd60ac 100644 --- a/nixos/modules/services/backup/rsnapshot.nix +++ b/nixos/modules/services/backup/rsnapshot.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.rsnapshot; cfgfile = pkgs.writeText "rsnapshot.conf" '' @@ -22,21 +19,21 @@ in { options = { services.rsnapshot = { - enable = mkEnableOption "rsnapshot backups"; - enableManualRsnapshot = mkOption { + enable = lib.mkEnableOption "rsnapshot backups"; + enableManualRsnapshot = lib.mkOption { description = "Whether to enable manual usage of the rsnapshot command with this module."; default = true; - type = types.bool; + type = lib.types.bool; }; - extraConfig = mkOption { + extraConfig = lib.mkOption { default = ""; example = '' retains hourly 24 retain daily 365 backup /home/ localhost/ ''; - type = types.lines; + type = lib.types.lines; description = '' rsnapshot configuration option in addition to the defaults from rsnapshot and this module. @@ -49,10 +46,10 @@ in ''; }; - cronIntervals = mkOption { + cronIntervals = lib.mkOption { default = {}; example = { hourly = "0 * * * *"; daily = "50 21 * * *"; }; - type = types.attrsOf types.str; + type = lib.types.attrsOf lib.types.str; description = '' Periodicity at which intervals should be run by cron. Note that the intervals also have to exist in configuration @@ -62,12 +59,12 @@ in }; }; - config = mkIf cfg.enable (mkMerge [ + config = lib.mkIf cfg.enable (lib.mkMerge [ { services.cron.systemCronJobs = - mapAttrsToList (interval: time: "${time} root ${pkgs.rsnapshot}/bin/rsnapshot -c ${cfgfile} ${interval}") cfg.cronIntervals; + lib.mapAttrsToList (interval: time: "${time} root ${pkgs.rsnapshot}/bin/rsnapshot -c ${cfgfile} ${interval}") cfg.cronIntervals; } - (mkIf cfg.enableManualRsnapshot { + (lib.mkIf cfg.enableManualRsnapshot { environment.systemPackages = [ pkgs.rsnapshot ]; environment.etc."rsnapshot.conf".source = cfgfile; }) From 4682ba9d881f3214623c070a7a6d74712f87910c Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:54 +0200 Subject: [PATCH 092/236] nixos/services.sanoid: remove `with lib;` --- nixos/modules/services/backup/sanoid.nix | 91 ++++++++++++------------ 1 file changed, 44 insertions(+), 47 deletions(-) diff --git a/nixos/modules/services/backup/sanoid.nix b/nixos/modules/services/backup/sanoid.nix index 1b9ace358cab..823a2ed565e7 100644 --- a/nixos/modules/services/backup/sanoid.nix +++ b/nixos/modules/services/backup/sanoid.nix @@ -1,85 +1,82 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.sanoid; - datasetSettingsType = with types; + datasetSettingsType = with lib.types; (attrsOf (nullOr (oneOf [ str int bool (listOf str) ]))) // { description = "dataset/template options"; }; commonOptions = { - hourly = mkOption { + hourly = lib.mkOption { description = "Number of hourly snapshots."; - type = with types; nullOr ints.unsigned; + type = with lib.types; nullOr ints.unsigned; default = null; }; - daily = mkOption { + daily = lib.mkOption { description = "Number of daily snapshots."; - type = with types; nullOr ints.unsigned; + type = with lib.types; nullOr ints.unsigned; default = null; }; - monthly = mkOption { + monthly = lib.mkOption { description = "Number of monthly snapshots."; - type = with types; nullOr ints.unsigned; + type = with lib.types; nullOr ints.unsigned; default = null; }; - yearly = mkOption { + yearly = lib.mkOption { description = "Number of yearly snapshots."; - type = with types; nullOr ints.unsigned; + type = with lib.types; nullOr ints.unsigned; default = null; }; - autoprune = mkOption { + autoprune = lib.mkOption { description = "Whether to automatically prune old snapshots."; - type = with types; nullOr bool; + type = with lib.types; nullOr bool; default = null; }; - autosnap = mkOption { + autosnap = lib.mkOption { description = "Whether to automatically take snapshots."; - type = with types; nullOr bool; + type = with lib.types; nullOr bool; default = null; }; }; datasetOptions = rec { - use_template = mkOption { + use_template = lib.mkOption { description = "Names of the templates to use for this dataset."; - type = types.listOf (types.str // { - check = (types.enum (attrNames cfg.templates)).check; + type = lib.types.listOf (lib.types.str // { + check = (lib.types.enum (lib.attrNames cfg.templates)).check; description = "configured template name"; }); default = [ ]; }; useTemplate = use_template; - recursive = mkOption { + recursive = lib.mkOption { description = '' Whether to recursively snapshot dataset children. You can also set this to `"zfs"` to handle datasets recursively in an atomic way without the possibility to override settings for child datasets. ''; - type = with types; oneOf [ bool (enum [ "zfs" ]) ]; + type = with lib.types; oneOf [ bool (enum [ "zfs" ]) ]; default = false; }; - process_children_only = mkOption { + process_children_only = lib.mkOption { description = "Whether to only snapshot child datasets if recursing."; - type = types.bool; + type = lib.types.bool; default = false; }; processChildrenOnly = process_children_only; }; # Extract unique dataset names - datasets = unique (attrNames cfg.datasets); + datasets = lib.unique (lib.attrNames cfg.datasets); # Function to build "zfs allow" and "zfs unallow" commands for the # filesystems we've delegated permissions to. @@ -88,23 +85,23 @@ let "-+/run/booted-system/sw/bin/zfs" zfsAction "sanoid" - (concatStringsSep "," permissions) + (lib.concatStringsSep "," permissions) dataset ]; configFile = let mkValueString = v: - if builtins.isList v then concatStringsSep "," v - else generators.mkValueStringDefault { } v; + if lib.isList v then lib.concatStringsSep "," v + else lib.generators.mkValueStringDefault { } v; mkKeyValue = k: v: if v == null then "" else if k == "processChildrenOnly" then "" else if k == "useTemplate" then "" - else generators.mkKeyValueDefault { inherit mkValueString; } "=" k v; + else lib.generators.mkKeyValueDefault { inherit mkValueString; } "=" k v; in - generators.toINI { inherit mkKeyValue; } cfg.settings; + lib.generators.toINI { inherit mkKeyValue; } cfg.settings; in { @@ -112,12 +109,12 @@ in # Interface options.services.sanoid = { - enable = mkEnableOption "Sanoid ZFS snapshotting service"; + enable = lib.mkEnableOption "Sanoid ZFS snapshotting service"; package = lib.mkPackageOption pkgs "sanoid" {}; - interval = mkOption { - type = types.str; + interval = lib.mkOption { + type = lib.types.str; default = "hourly"; example = "daily"; description = '' @@ -128,19 +125,19 @@ in ''; }; - datasets = mkOption { - type = types.attrsOf (types.submodule ({ config, options, ... }: { + datasets = lib.mkOption { + type = lib.types.attrsOf (lib.types.submodule ({ config, options, ... }: { freeformType = datasetSettingsType; options = commonOptions // datasetOptions; - config.use_template = modules.mkAliasAndWrapDefsWithPriority id (options.useTemplate or { }); - config.process_children_only = modules.mkAliasAndWrapDefsWithPriority id (options.processChildrenOnly or { }); + config.use_template = lib.modules.mkAliasAndWrapDefsWithPriority lib.id (options.useTemplate or { }); + config.process_children_only = lib.modules.mkAliasAndWrapDefsWithPriority lib.id (options.processChildrenOnly or { }); })); default = { }; description = "Datasets to snapshot."; }; - templates = mkOption { - type = types.attrsOf (types.submodule { + templates = lib.mkOption { + type = lib.types.attrsOf (lib.types.submodule { freeformType = datasetSettingsType; options = commonOptions; }); @@ -148,8 +145,8 @@ in description = "Templates for datasets."; }; - settings = mkOption { - type = types.attrsOf datasetSettingsType; + settings = lib.mkOption { + type = lib.types.attrsOf datasetSettingsType; description = '' Free-form settings written directly to the config file. See @@ -157,8 +154,8 @@ in ''; }; - extraArgs = mkOption { - type = types.listOf types.str; + extraArgs = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; example = [ "--verbose" "--readonly" "--debug" ]; description = '' @@ -171,10 +168,10 @@ in # Implementation - config = mkIf cfg.enable { - services.sanoid.settings = mkMerge [ - (mapAttrs' (d: v: nameValuePair ("template_" + d) v) cfg.templates) - (mapAttrs (d: v: v) cfg.datasets) + config = lib.mkIf cfg.enable { + services.sanoid.settings = lib.mkMerge [ + (lib.mapAttrs' (d: v: lib.nameValuePair ("template_" + d) v) cfg.templates) + (lib.mapAttrs (d: v: v) cfg.datasets) ]; systemd.services.sanoid = { @@ -201,5 +198,5 @@ in }; }; - meta.maintainers = with maintainers; [ lopsided98 ]; + meta.maintainers = with lib.maintainers; [ lopsided98 ]; } From 48d46271cb4162d10ed2e19332d28c7ce24a6ef5 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:54 +0200 Subject: [PATCH 093/236] nixos/services.snapraid: remove `with lib;` --- nixos/modules/services/backup/snapraid.nix | 45 ++++++++++------------ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/nixos/modules/services/backup/snapraid.nix b/nixos/modules/services/backup/snapraid.nix index a621c9f62ff7..02dabce18811 100644 --- a/nixos/modules/services/backup/snapraid.nix +++ b/nixos/modules/services/backup/snapraid.nix @@ -1,18 +1,15 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.snapraid; in { imports = [ # Should have never been on the top-level. - (mkRenamedOptionModule [ "snapraid" ] [ "services" "snapraid" ]) + (lib.mkRenamedOptionModule [ "snapraid" ] [ "services" "snapraid" ]) ]; - options.services.snapraid = with types; { - enable = mkEnableOption "SnapRAID"; - dataDisks = mkOption { + options.services.snapraid = with lib.types; { + enable = lib.mkEnableOption "SnapRAID"; + dataDisks = lib.mkOption { default = { }; example = { d1 = "/mnt/disk1/"; @@ -22,7 +19,7 @@ in description = "SnapRAID data disks."; type = attrsOf str; }; - parityFiles = mkOption { + parityFiles = lib.mkOption { default = [ ]; example = [ "/mnt/diskp/snapraid.parity" @@ -35,7 +32,7 @@ in description = "SnapRAID parity files."; type = listOf str; }; - contentFiles = mkOption { + contentFiles = lib.mkOption { default = [ ]; example = [ "/var/snapraid.content" @@ -45,40 +42,40 @@ in description = "SnapRAID content list files."; type = listOf str; }; - exclude = mkOption { + exclude = lib.mkOption { default = [ ]; example = [ "*.unrecoverable" "/tmp/" "/lost+found/" ]; description = "SnapRAID exclude directives."; type = listOf str; }; - touchBeforeSync = mkOption { + touchBeforeSync = lib.mkOption { default = true; example = false; description = "Whether {command}`snapraid touch` should be run before {command}`snapraid sync`."; type = bool; }; - sync.interval = mkOption { + sync.interval = lib.mkOption { default = "01:00"; example = "daily"; description = "How often to run {command}`snapraid sync`."; type = str; }; scrub = { - interval = mkOption { + interval = lib.mkOption { default = "Mon *-*-* 02:00:00"; example = "weekly"; description = "How often to run {command}`snapraid scrub`."; type = str; }; - plan = mkOption { + plan = lib.mkOption { default = 8; example = 5; description = "Percent of the array that should be checked by {command}`snapraid scrub`."; type = int; }; - olderThan = mkOption { + olderThan = lib.mkOption { default = 10; example = 20; description = @@ -86,7 +83,7 @@ in type = int; }; }; - extraConfig = mkOption { + extraConfig = lib.mkOption { default = ""; example = '' nohidden @@ -105,7 +102,7 @@ in nParity = builtins.length cfg.parityFiles; mkPrepend = pre: s: pre + s; in - mkIf cfg.enable { + lib.mkIf cfg.enable { assertions = [ { assertion = nParity <= 6; @@ -128,9 +125,9 @@ in prependContent = mkPrepend "content "; prependExclude = mkPrepend "exclude "; in - concatStringsSep "\n" + lib.concatStringsSep "\n" (map prependData - ((mapAttrsToList (name: value: name + " " + value)) dataDisks) + ((lib.mapAttrsToList (name: value: name + " " + value)) dataDisks) ++ zipListsWith (a: b: a + b) ([ "parity " ] ++ map (i: toString i + "-parity ") (range 2 6)) parityFiles ++ map prependContent contentFiles @@ -179,8 +176,8 @@ in let contentDirs = map dirOf contentFiles; in - unique ( - attrValues dataDisks ++ contentDirs + lib.unique ( + lib.attrValues dataDisks ++ contentDirs ); }; unitConfig.After = "snapraid-sync.service"; @@ -227,10 +224,10 @@ in # https://www.snapraid.it/manual#7.1 splitParityFiles = map (s: splitString "," s) parityFiles; in - unique ( - attrValues dataDisks ++ splitParityFiles ++ contentDirs + lib.unique ( + lib.attrValues dataDisks ++ splitParityFiles ++ contentDirs ); - } // optionalAttrs touchBeforeSync { + } // lib.optionalAttrs touchBeforeSync { ExecStartPre = "${pkgs.snapraid}/bin/snapraid touch"; }; }; From 8442ed34aca533fdd71904e54cf174cb92da6d33 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:54 +0200 Subject: [PATCH 094/236] nixos/services.syncoid: remove `with lib;` --- nixos/modules/services/backup/syncoid.nix | 131 +++++++++++----------- 1 file changed, 64 insertions(+), 67 deletions(-) diff --git a/nixos/modules/services/backup/syncoid.nix b/nixos/modules/services/backup/syncoid.nix index ec9ccaa46d42..97d39544d5bb 100644 --- a/nixos/modules/services/backup/syncoid.nix +++ b/nixos/modules/services/backup/syncoid.nix @@ -1,14 +1,11 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.syncoid; # Extract local dasaset names (so no datasets containing "@") - localDatasetName = d: optionals (d != null) ( + localDatasetName = d: lib.optionals (d != null) ( let m = builtins.match "([^/@]+[^@]*)" d; in - optionals (m != null) m + lib.optionals (m != null) m ); # Escape as required by: https://www.freedesktop.org/software/systemd/man/systemd.unit.html @@ -35,7 +32,7 @@ let "/run/booted-system/sw/bin/zfs" "allow" cfg.user - (concatStringsSep "," permissions) + (lib.concatStringsSep "," permissions) dataset ]} ${lib.optionalString ((builtins.dirOf dataset) != ".") '' @@ -44,7 +41,7 @@ let "/run/booted-system/sw/bin/zfs" "allow" cfg.user - (concatStringsSep "," permissions) + (lib.concatStringsSep "," permissions) # Remove the last part of the path (builtins.dirOf dataset) ]} @@ -66,14 +63,14 @@ let "/run/booted-system/sw/bin/zfs" "unallow" cfg.user - (concatStringsSep "," permissions) + (lib.concatStringsSep "," permissions) dataset ]} ${lib.optionalString ((builtins.dirOf dataset) != ".") (lib.escapeShellArgs [ "/run/booted-system/sw/bin/zfs" "unallow" cfg.user - (concatStringsSep "," permissions) + (lib.concatStringsSep "," permissions) # Remove the last part of the path (builtins.dirOf dataset) ])} @@ -85,12 +82,12 @@ in # Interface options.services.syncoid = { - enable = mkEnableOption "Syncoid ZFS synchronization service"; + enable = lib.mkEnableOption "Syncoid ZFS synchronization service"; package = lib.mkPackageOption pkgs "sanoid" {}; - interval = mkOption { - type = types.str; + interval = lib.mkOption { + type = lib.types.str; default = "hourly"; example = "*-*-* *:15:00"; description = '' @@ -101,8 +98,8 @@ in ''; }; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = "syncoid"; example = "backup"; description = '' @@ -115,15 +112,15 @@ in ''; }; - group = mkOption { - type = types.str; + group = lib.mkOption { + type = lib.types.str; default = "syncoid"; example = "backup"; description = "The group for the service."; }; - sshKey = mkOption { - type = with types; nullOr (coercedTo path toString str); + sshKey = lib.mkOption { + type = with lib.types; nullOr (coercedTo path toString str); default = null; description = '' SSH private key file to use to login to the remote system. Can be @@ -131,8 +128,8 @@ in ''; }; - localSourceAllow = mkOption { - type = types.listOf types.str; + localSourceAllow = lib.mkOption { + type = lib.types.listOf lib.types.str; # Permissions snapshot and destroy are in case --no-sync-snap is not used default = [ "bookmark" "hold" "send" "snapshot" "destroy" "mount" ]; description = '' @@ -143,8 +140,8 @@ in ''; }; - localTargetAllow = mkOption { - type = types.listOf types.str; + localTargetAllow = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ "change-key" "compression" "create" "mount" "mountpoint" "receive" "rollback" ]; example = [ "create" "mount" "receive" "rollback" ]; description = '' @@ -158,8 +155,8 @@ in ''; }; - commonArgs = mkOption { - type = types.listOf types.str; + commonArgs = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; example = [ "--no-sync-snap" ]; description = '' @@ -170,19 +167,19 @@ in ''; }; - service = mkOption { - type = types.attrs; + service = lib.mkOption { + type = lib.types.attrs; default = { }; description = '' Systemd configuration common to all syncoid services. ''; }; - commands = mkOption { - type = types.attrsOf (types.submodule ({ name, ... }: { + commands = lib.mkOption { + type = lib.types.attrsOf (lib.types.submodule ({ name, ... }: { options = { - source = mkOption { - type = types.str; + source = lib.mkOption { + type = lib.types.str; example = "pool/dataset"; description = '' Source ZFS dataset. Can be either local or remote. Defaults to @@ -190,8 +187,8 @@ in ''; }; - target = mkOption { - type = types.str; + target = lib.mkOption { + type = lib.types.str; example = "user@server:pool/dataset"; description = '' Target ZFS dataset. Can be either local @@ -200,18 +197,18 @@ in ''; }; - recursive = mkEnableOption ''the transfer of child datasets''; + recursive = lib.mkEnableOption ''the transfer of child datasets''; - sshKey = mkOption { - type = with types; nullOr (coercedTo path toString str); + sshKey = lib.mkOption { + type = with lib.types; nullOr (coercedTo path toString str); description = '' SSH private key file to use to login to the remote system. Defaults to {option}`services.syncoid.sshKey` option. ''; }; - localSourceAllow = mkOption { - type = types.listOf types.str; + localSourceAllow = lib.mkOption { + type = lib.types.listOf lib.types.str; description = '' Permissions granted for the {option}`services.syncoid.user` user for local source datasets. See @@ -221,8 +218,8 @@ in ''; }; - localTargetAllow = mkOption { - type = types.listOf types.str; + localTargetAllow = lib.mkOption { + type = lib.types.listOf lib.types.str; description = '' Permissions granted for the {option}`services.syncoid.user` user for local target datasets. See @@ -234,8 +231,8 @@ in ''; }; - sendOptions = mkOption { - type = types.separatedString " "; + sendOptions = lib.mkOption { + type = lib.types.separatedString " "; default = ""; example = "Lc e"; description = '' @@ -244,8 +241,8 @@ in ''; }; - recvOptions = mkOption { - type = types.separatedString " "; + recvOptions = lib.mkOption { + type = lib.types.separatedString " "; default = ""; example = "ux recordsize o compression=lz4"; description = '' @@ -254,38 +251,38 @@ in ''; }; - useCommonArgs = mkOption { - type = types.bool; + useCommonArgs = lib.mkOption { + type = lib.types.bool; default = true; description = '' Whether to add the configured common arguments to this command. ''; }; - service = mkOption { - type = types.attrs; + service = lib.mkOption { + type = lib.types.attrs; default = { }; description = '' Systemd configuration specific to this syncoid service. ''; }; - extraArgs = mkOption { - type = types.listOf types.str; + extraArgs = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; example = [ "--sshport 2222" ]; description = "Extra syncoid arguments for this command."; }; }; config = { - source = mkDefault name; - sshKey = mkDefault cfg.sshKey; - localSourceAllow = mkDefault cfg.localSourceAllow; - localTargetAllow = mkDefault cfg.localTargetAllow; + source = lib.mkDefault name; + sshKey = lib.mkDefault cfg.sshKey; + localSourceAllow = lib.mkDefault cfg.localSourceAllow; + localTargetAllow = lib.mkDefault cfg.localTargetAllow; }; })); default = { }; - example = literalExpression '' + example = lib.literalExpression '' { "pool/test".target = "root@target:pool/test"; } @@ -296,9 +293,9 @@ in # Implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users = { - users = mkIf (cfg.user == "syncoid") { + users = lib.mkIf (cfg.user == "syncoid") { syncoid = { group = cfg.group; isSystemUser = true; @@ -308,14 +305,14 @@ in createHome = false; }; }; - groups = mkIf (cfg.group == "syncoid") { + groups = lib.mkIf (cfg.group == "syncoid") { syncoid = { }; }; }; - systemd.services = mapAttrs' + systemd.services = lib.mapAttrs' (name: c: - nameValuePair "syncoid-${escapeUnitName name}" (mkMerge [ + lib.nameValuePair "syncoid-${lib.escapeUnitName name}" (lib.mkMerge [ { description = "Syncoid ZFS synchronization from ${c.source} to ${c.target}"; after = [ "zfs.target" ]; @@ -330,9 +327,9 @@ in (map (buildUnallowCommand c.localSourceAllow) (localDatasetName c.source)) ++ (map (buildUnallowCommand c.localTargetAllow) (localDatasetName c.target)); ExecStart = lib.escapeShellArgs ([ "${cfg.package}/bin/syncoid" ] - ++ optionals c.useCommonArgs cfg.commonArgs - ++ optional c.recursive "-r" - ++ optionals (c.sshKey != null) [ "--sshkey" c.sshKey ] + ++ lib.optionals c.useCommonArgs cfg.commonArgs + ++ lib.optional c.recursive "-r" + ++ lib.optionals (c.sshKey != null) [ "--sshkey" c.sshKey ] ++ c.extraArgs ++ [ "--sendoptions" @@ -364,7 +361,7 @@ in NoNewPrivileges = true; PrivateDevices = true; PrivateMounts = true; - PrivateNetwork = mkDefault false; + PrivateNetwork = lib.mkDefault false; PrivateUsers = false; # Enabling this breaks on zfs-2.2.0 ProtectClock = true; ProtectControlGroups = true; @@ -379,15 +376,15 @@ in RestrictNamespaces = true; RestrictRealtime = true; RestrictSUIDSGID = true; - RootDirectory = "/run/syncoid/${escapeUnitName name}"; + RootDirectory = "/run/syncoid/${lib.escapeUnitName name}"; RootDirectoryStartOnly = true; BindPaths = [ "/dev/zfs" ]; BindReadOnlyPaths = [ builtins.storeDir "/etc" "/run" "/bin/sh" ]; # Avoid useless mounting of RootDirectory= in the own RootDirectory= of ExecStart='s mount namespace. - InaccessiblePaths = [ "-+/run/syncoid/${escapeUnitName name}" ]; + InaccessiblePaths = [ "-+/run/syncoid/${lib.escapeUnitName name}" ]; MountAPIVFS = true; # Create RootDirectory= in the host's mount namespace. - RuntimeDirectory = [ "syncoid/${escapeUnitName name}" ]; + RuntimeDirectory = [ "syncoid/${lib.escapeUnitName name}" ]; RuntimeDirectoryMode = "700"; SystemCallFilter = [ "@system-service" @@ -416,5 +413,5 @@ in cfg.commands; }; - meta.maintainers = with maintainers; [ julm lopsided98 ]; + meta.maintainers = with lib.maintainers; [ julm lopsided98 ]; } From e53c595a18fde18b7abf5c1973211c1f08f5c4de Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:54 +0200 Subject: [PATCH 095/236] nixos/services.tarsnap: remove `with lib;` --- nixos/modules/services/backup/tarsnap.nix | 155 +++++++++++----------- 1 file changed, 76 insertions(+), 79 deletions(-) diff --git a/nixos/modules/services/backup/tarsnap.nix b/nixos/modules/services/backup/tarsnap.nix index b8f848451d40..ef531a0707c5 100644 --- a/nixos/modules/services/backup/tarsnap.nix +++ b/nixos/modules/services/backup/tarsnap.nix @@ -1,41 +1,38 @@ { config, lib, options, pkgs, utils, ... }: - -with lib; - let gcfg = config.services.tarsnap; opt = options.services.tarsnap; configFile = name: cfg: '' keyfile ${cfg.keyfile} - ${optionalString (cfg.cachedir != null) "cachedir ${cfg.cachedir}"} - ${optionalString cfg.nodump "nodump"} - ${optionalString cfg.printStats "print-stats"} - ${optionalString cfg.printStats "humanize-numbers"} - ${optionalString (cfg.checkpointBytes != null) ("checkpoint-bytes "+cfg.checkpointBytes)} - ${optionalString cfg.aggressiveNetworking "aggressive-networking"} - ${concatStringsSep "\n" (map (v: "exclude ${v}") cfg.excludes)} - ${concatStringsSep "\n" (map (v: "include ${v}") cfg.includes)} - ${optionalString cfg.lowmem "lowmem"} - ${optionalString cfg.verylowmem "verylowmem"} - ${optionalString (cfg.maxbw != null) "maxbw ${toString cfg.maxbw}"} - ${optionalString (cfg.maxbwRateUp != null) "maxbw-rate-up ${toString cfg.maxbwRateUp}"} - ${optionalString (cfg.maxbwRateDown != null) "maxbw-rate-down ${toString cfg.maxbwRateDown}"} + ${lib.optionalString (cfg.cachedir != null) "cachedir ${cfg.cachedir}"} + ${lib.optionalString cfg.nodump "nodump"} + ${lib.optionalString cfg.printStats "print-stats"} + ${lib.optionalString cfg.printStats "humanize-numbers"} + ${lib.optionalString (cfg.checkpointBytes != null) ("checkpoint-bytes "+cfg.checkpointBytes)} + ${lib.optionalString cfg.aggressiveNetworking "aggressive-networking"} + ${lib.concatStringsSep "\n" (map (v: "exclude ${v}") cfg.excludes)} + ${lib.concatStringsSep "\n" (map (v: "include ${v}") cfg.includes)} + ${lib.optionalString cfg.lowmem "lowmem"} + ${lib.optionalString cfg.verylowmem "verylowmem"} + ${lib.optionalString (cfg.maxbw != null) "maxbw ${toString cfg.maxbw}"} + ${lib.optionalString (cfg.maxbwRateUp != null) "maxbw-rate-up ${toString cfg.maxbwRateUp}"} + ${lib.optionalString (cfg.maxbwRateDown != null) "maxbw-rate-down ${toString cfg.maxbwRateDown}"} ''; in { imports = [ - (mkRemovedOptionModule [ "services" "tarsnap" "cachedir" ] "Use services.tarsnap.archives..cachedir") + (lib.mkRemovedOptionModule [ "services" "tarsnap" "cachedir" ] "Use services.tarsnap.archives..cachedir") ]; options = { services.tarsnap = { - enable = mkEnableOption "periodic tarsnap backups"; + enable = lib.mkEnableOption "periodic tarsnap backups"; - package = mkPackageOption pkgs "tarsnap" { }; + package = lib.mkPackageOption pkgs "tarsnap" { }; - keyfile = mkOption { - type = types.str; + keyfile = lib.mkOption { + type = lib.types.str; default = "/root/tarsnap.key"; description = '' The keyfile which associates this machine with your tarsnap @@ -61,14 +58,14 @@ in ''; }; - archives = mkOption { - type = types.attrsOf (types.submodule ({ config, options, ... }: + archives = lib.mkOption { + type = lib.types.attrsOf (lib.types.submodule ({ config, options, ... }: { options = { - keyfile = mkOption { - type = types.str; + keyfile = lib.mkOption { + type = lib.types.str; default = gcfg.keyfile; - defaultText = literalExpression "config.${opt.keyfile}"; + defaultText = lib.literalExpression "config.${opt.keyfile}"; description = '' Set a specific keyfile for this archive. This defaults to `"/root/tarsnap.key"` if left unspecified. @@ -88,10 +85,10 @@ in ''; }; - cachedir = mkOption { - type = types.nullOr types.path; - default = "/var/cache/tarsnap/${utils.escapeSystemdPath config.keyfile}"; - defaultText = literalExpression '' + cachedir = lib.mkOption { + type = lib.types.nullOr lib.types.path; + default = "/var/cache/tarsnap/${utils.lib.escapeSystemdPath config.keyfile}"; + defaultText = lib.literalExpression '' "/var/cache/tarsnap/''${utils.escapeSystemdPath config.${options.keyfile}}" ''; description = '' @@ -106,16 +103,16 @@ in ''; }; - nodump = mkOption { - type = types.bool; + nodump = lib.mkOption { + type = lib.types.bool; default = true; description = '' Exclude files with the `nodump` flag. ''; }; - printStats = mkOption { - type = types.bool; + printStats = lib.mkOption { + type = lib.types.bool; default = true; description = '' Print global archive statistics upon completion. @@ -124,8 +121,8 @@ in ''; }; - checkpointBytes = mkOption { - type = types.nullOr types.str; + checkpointBytes = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = "1GB"; description = '' Create a checkpoint every `checkpointBytes` @@ -138,8 +135,8 @@ in ''; }; - period = mkOption { - type = types.str; + period = lib.mkOption { + type = lib.types.str; default = "01:15"; example = "hourly"; description = '' @@ -150,8 +147,8 @@ in ''; }; - aggressiveNetworking = mkOption { - type = types.bool; + aggressiveNetworking = lib.mkOption { + type = lib.types.bool; default = false; description = '' Upload data over multiple TCP connections, potentially @@ -162,22 +159,22 @@ in ''; }; - directories = mkOption { - type = types.listOf types.path; + directories = lib.mkOption { + type = lib.types.listOf lib.types.path; default = []; description = "List of filesystem paths to archive."; }; - excludes = mkOption { - type = types.listOf types.str; + excludes = lib.mkOption { + type = lib.types.listOf lib.types.str; default = []; description = '' Exclude files and directories matching these patterns. ''; }; - includes = mkOption { - type = types.listOf types.str; + includes = lib.mkOption { + type = lib.types.listOf lib.types.str; default = []; description = '' Include only files and directories matching these @@ -187,8 +184,8 @@ in ''; }; - lowmem = mkOption { - type = types.bool; + lowmem = lib.mkOption { + type = lib.types.bool; default = false; description = '' Reduce memory consumption by not caching small files. @@ -198,8 +195,8 @@ in ''; }; - verylowmem = mkOption { - type = types.bool; + verylowmem = lib.mkOption { + type = lib.types.bool; default = false; description = '' Reduce memory consumption by a factor of 2 beyond what @@ -208,8 +205,8 @@ in ''; }; - maxbw = mkOption { - type = types.nullOr types.int; + maxbw = lib.mkOption { + type = lib.types.nullOr lib.types.int; default = null; description = '' Abort archival if upstream bandwidth usage in bytes @@ -217,40 +214,40 @@ in ''; }; - maxbwRateUp = mkOption { - type = types.nullOr types.int; + maxbwRateUp = lib.mkOption { + type = lib.types.nullOr lib.types.int; default = null; - example = literalExpression "25 * 1000"; + example = lib.literalExpression "25 * 1000"; description = '' Upload bandwidth rate limit in bytes. ''; }; - maxbwRateDown = mkOption { - type = types.nullOr types.int; + maxbwRateDown = lib.mkOption { + type = lib.types.nullOr lib.types.int; default = null; - example = literalExpression "50 * 1000"; + example = lib.literalExpression "50 * 1000"; description = '' Download bandwidth rate limit in bytes. ''; }; - verbose = mkOption { - type = types.bool; + verbose = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to produce verbose logging output. ''; }; - explicitSymlinks = mkOption { - type = types.bool; + explicitSymlinks = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to follow symlinks specified as archives. ''; }; - followSymlinks = mkOption { - type = types.bool; + followSymlinks = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to follow all symlinks in archive trees. @@ -262,7 +259,7 @@ in default = {}; - example = literalExpression '' + example = lib.literalExpression '' { nixos = { directories = [ "/home" "/root/ssl" ]; @@ -292,19 +289,19 @@ in }; }; - config = mkIf gcfg.enable { + config = lib.mkIf gcfg.enable { assertions = - (mapAttrsToList (name: cfg: + (lib.mapAttrsToList (name: cfg: { assertion = cfg.directories != []; message = "Must specify paths for tarsnap to back up"; }) gcfg.archives) ++ - (mapAttrsToList (name: cfg: + (lib.mapAttrsToList (name: cfg: { assertion = !(cfg.lowmem && cfg.verylowmem); message = "You cannot set both lowmem and verylowmem"; }) gcfg.archives); systemd.services = - (mapAttrs' (name: cfg: nameValuePair "tarsnap-${name}" { + (lib.mapAttrs' (name: cfg: lib.nameValuePair "tarsnap-${name}" { description = "Tarsnap archive '${name}'"; requires = [ "network-online.target" ]; after = [ "network-online.target" ]; @@ -322,11 +319,11 @@ in script = let tarsnap = ''${lib.getExe gcfg.package} --configfile "/etc/tarsnap/${name}.conf"''; run = ''${tarsnap} -c -f "${name}-$(date +"%Y%m%d%H%M%S")" \ - ${optionalString cfg.verbose "-v"} \ - ${optionalString cfg.explicitSymlinks "-H"} \ - ${optionalString cfg.followSymlinks "-L"} \ - ${concatStringsSep " " cfg.directories}''; - cachedir = escapeShellArg cfg.cachedir; + ${lib.optionalString cfg.verbose "-v"} \ + ${lib.optionalString cfg.explicitSymlinks "-H"} \ + ${lib.optionalString cfg.followSymlinks "-L"} \ + ${lib.concatStringsSep " " cfg.directories}''; + cachedir = lib.escapeShellArg cfg.cachedir; in if (cfg.cachedir != null) then '' mkdir -p ${cachedir} chmod 0700 ${cachedir} @@ -353,7 +350,7 @@ in }; }) gcfg.archives) // - (mapAttrs' (name: cfg: nameValuePair "tarsnap-restore-${name}"{ + (lib.mapAttrs' (name: cfg: lib.nameValuePair "tarsnap-restore-${name}"{ description = "Tarsnap restore '${name}'"; requires = [ "network-online.target" ]; @@ -362,8 +359,8 @@ in script = let tarsnap = ''${lib.getExe gcfg.package} --configfile "/etc/tarsnap/${name}.conf"''; lastArchive = "$(${tarsnap} --list-archives | sort | tail -1)"; - run = ''${tarsnap} -x -f "${lastArchive}" ${optionalString cfg.verbose "-v"}''; - cachedir = escapeShellArg cfg.cachedir; + run = ''${tarsnap} -x -f "${lastArchive}" ${lib.optionalString cfg.verbose "-v"}''; + cachedir = lib.escapeShellArg cfg.cachedir; in if (cfg.cachedir != null) then '' mkdir -p ${cachedir} @@ -393,14 +390,14 @@ in # Note: the timer must be Persistent=true, so that systemd will start it even # if e.g. your laptop was asleep while the latest interval occurred. - systemd.timers = mapAttrs' (name: cfg: nameValuePair "tarsnap-${name}" + systemd.timers = lib.mapAttrs' (name: cfg: lib.nameValuePair "tarsnap-${name}" { timerConfig.OnCalendar = cfg.period; timerConfig.Persistent = "true"; wantedBy = [ "timers.target" ]; }) gcfg.archives; environment.etc = - mapAttrs' (name: cfg: nameValuePair "tarsnap/${name}.conf" + lib.mapAttrs' (name: cfg: lib.nameValuePair "tarsnap/${name}.conf" { text = configFile name cfg; }) gcfg.archives; From 8a7d699812d1e71aed70366aa3c6d33c73817212 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:54 +0200 Subject: [PATCH 096/236] nixos/services.zfs.autoReplication: remove `with lib;` --- .../services/backup/zfs-replication.nix | 39 +++++++++---------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/nixos/modules/services/backup/zfs-replication.nix b/nixos/modules/services/backup/zfs-replication.nix index c89d6fb8ad60..5aefaa35df50 100644 --- a/nixos/modules/services/backup/zfs-replication.nix +++ b/nixos/modules/services/backup/zfs-replication.nix @@ -1,56 +1,53 @@ { lib, pkgs, config, ... }: - -with lib; - let cfg = config.services.zfs.autoReplication; - recursive = optionalString cfg.recursive " --recursive"; - followDelete = optionalString cfg.followDelete " --follow-delete"; + recursive = lib.optionalString cfg.recursive " --recursive"; + followDelete = lib.optionalString cfg.followDelete " --follow-delete"; in { options = { services.zfs.autoReplication = { - enable = mkEnableOption "ZFS snapshot replication"; + enable = lib.mkEnableOption "ZFS snapshot replication"; - followDelete = mkOption { + followDelete = lib.mkOption { description = "Remove remote snapshots that don't have a local correspondent."; default = true; - type = types.bool; + type = lib.types.bool; }; - host = mkOption { + host = lib.mkOption { description = "Remote host where snapshots should be sent. `lz4` is expected to be installed on this host."; example = "example.com"; - type = types.str; + type = lib.types.str; }; - identityFilePath = mkOption { + identityFilePath = lib.mkOption { description = "Path to SSH key used to login to host."; example = "/home/username/.ssh/id_rsa"; - type = types.path; + type = lib.types.path; }; - localFilesystem = mkOption { + localFilesystem = lib.mkOption { description = "Local ZFS filesystem from which snapshots should be sent. Defaults to the attribute name."; example = "pool/file/path"; - type = types.str; + type = lib.types.str; }; - remoteFilesystem = mkOption { + remoteFilesystem = lib.mkOption { description = "Remote ZFS filesystem where snapshots should be sent."; example = "pool/file/path"; - type = types.str; + type = lib.types.str; }; - recursive = mkOption { + recursive = lib.mkOption { description = "Recursively discover snapshots to send."; default = true; - type = types.bool; + type = lib.types.bool; }; - username = mkOption { + username = lib.mkOption { description = "Username used by SSH to login to remote host."; example = "username"; - type = types.str; + type = lib.types.str; }; }; }; @@ -73,7 +70,7 @@ in { "https://github.com/alunduil/zfs-replicate" ]; restartIfChanged = false; - serviceConfig.ExecStart = "${pkgs.zfs-replicate}/bin/zfs-replicate${recursive} -l ${escapeShellArg cfg.username} -i ${escapeShellArg cfg.identityFilePath}${followDelete} ${escapeShellArg cfg.host} ${escapeShellArg cfg.remoteFilesystem} ${escapeShellArg cfg.localFilesystem}"; + serviceConfig.ExecStart = "${pkgs.zfs-replicate}/bin/zfs-replicate${recursive} -l ${lib.escapeShellArg cfg.username} -i ${lib.escapeShellArg cfg.identityFilePath}${followDelete} ${lib.escapeShellArg cfg.host} ${lib.escapeShellArg cfg.remoteFilesystem} ${lib.escapeShellArg cfg.localFilesystem}"; wantedBy = [ "zfs-snapshot-daily.service" "zfs-snapshot-frequent.service" From 561d58c49c8ba1a466382020e435db39b0b27497 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:55 +0200 Subject: [PATCH 097/236] nixos/services.zrepl: remove `with lib;` --- nixos/modules/services/backup/zrepl.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/backup/zrepl.nix b/nixos/modules/services/backup/zrepl.nix index a0e9a0da7e49..d46823adbadb 100644 --- a/nixos/modules/services/backup/zrepl.nix +++ b/nixos/modules/services/backup/zrepl.nix @@ -1,27 +1,25 @@ { config, pkgs, lib, ... }: - -with lib; let cfg = config.services.zrepl; format = pkgs.formats.yaml { }; configFile = format.generate "zrepl.yml" cfg.settings; in { - meta.maintainers = with maintainers; [ cole-h ]; + meta.maintainers = with lib.maintainers; [ cole-h ]; options = { services.zrepl = { - enable = mkEnableOption "zrepl"; + enable = lib.mkEnableOption "zrepl"; - package = mkPackageOption pkgs "zrepl" { }; + package = lib.mkPackageOption pkgs "zrepl" { }; - settings = mkOption { + settings = lib.mkOption { default = { }; description = '' Configuration for zrepl. See for more information. ''; - type = types.submodule { + type = lib.types.submodule { freeformType = format.type; }; }; @@ -30,7 +28,7 @@ in ### Implementation ### - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.systemPackages = [ cfg.package ]; # zrepl looks for its config in this location by default. This From bf759e5dd4fd13351c9b67e746d14dc8893e69c0 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:55 +0200 Subject: [PATCH 098/236] nixos/services.erigon: remove `with lib;` --- .../services/blockchain/ethereum/erigon.nix | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/nixos/modules/services/blockchain/ethereum/erigon.nix b/nixos/modules/services/blockchain/ethereum/erigon.nix index 24705b3433df..5ac952339151 100644 --- a/nixos/modules/services/blockchain/ethereum/erigon.nix +++ b/nixos/modules/services/blockchain/ethereum/erigon.nix @@ -1,6 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; let cfg = config.services.erigon; @@ -11,18 +9,18 @@ in { options = { services.erigon = { - enable = mkEnableOption "Ethereum implementation on the efficiency frontier"; + enable = lib.mkEnableOption "Ethereum implementation on the efficiency frontier"; - package = mkPackageOption pkgs "erigon" { }; + package = lib.mkPackageOption pkgs "erigon" { }; - extraArgs = mkOption { - type = types.listOf types.str; + extraArgs = lib.mkOption { + type = lib.types.listOf lib.types.str; description = "Additional arguments passed to Erigon"; default = [ ]; }; - secretJwtPath = mkOption { - type = types.path; + secretJwtPath = lib.mkOption { + type = lib.types.path; description = '' Path to the secret jwt used for the http api authentication. ''; @@ -30,7 +28,7 @@ in { example = "config.age.secrets.ERIGON_JWT.path"; }; - settings = mkOption { + settings = lib.mkOption { description = '' Configuration for Erigon Refer to for details on supported values. @@ -52,7 +50,7 @@ in { "log.console.verbosity" = 3; # info }; - defaultText = literalExpression '' + defaultText = lib.literalExpression '' { datadir = "/var/lib/erigon"; chain = "mainnet"; @@ -71,20 +69,20 @@ in { }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { # Default values are the same as in the binary, they are just written here for convenience. services.erigon.settings = { - datadir = mkDefault "/var/lib/erigon"; - chain = mkDefault "mainnet"; - http = mkDefault true; - "http.port" = mkDefault 8545; - "http.api" = mkDefault ["eth" "debug" "net" "trace" "web3" "erigon"]; - ws = mkDefault true; - port = mkDefault 30303; - "authrpc.port" = mkDefault 8551; - "torrent.port" = mkDefault 42069; - "private.api.addr" = mkDefault "localhost:9090"; - "log.console.verbosity" = mkDefault 3; # info + datadir = lib.mkDefault "/var/lib/erigon"; + chain = lib.mkDefault "mainnet"; + http = lib.mkDefault true; + "http.port" = lib.mkDefault 8545; + "http.api" = lib.mkDefault ["eth" "debug" "net" "trace" "web3" "erigon"]; + ws = lib.mkDefault true; + port = lib.mkDefault 30303; + "authrpc.port" = lib.mkDefault 8551; + "torrent.port" = lib.mkDefault 42069; + "private.api.addr" = lib.mkDefault "localhost:9090"; + "log.console.verbosity" = lib.mkDefault 3; # info }; systemd.services.erigon = { From 1674361601ee77fc6b1765b38a2c79a600259f46 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:55 +0200 Subject: [PATCH 099/236] nixos/services.geth: remove `with lib;` --- .../services/blockchain/ethereum/geth.nix | 101 +++++++++--------- 1 file changed, 49 insertions(+), 52 deletions(-) diff --git a/nixos/modules/services/blockchain/ethereum/geth.nix b/nixos/modules/services/blockchain/ethereum/geth.nix index f2a7e080ada1..adf9fc1db32a 100644 --- a/nixos/modules/services/blockchain/ethereum/geth.nix +++ b/nixos/modules/services/blockchain/ethereum/geth.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let eachGeth = config.services.geth; @@ -11,28 +8,28 @@ let enable = lib.mkEnableOption "Go Ethereum Node"; - port = mkOption { - type = types.port; + port = lib.mkOption { + type = lib.types.port; default = 30303; description = "Port number Go Ethereum will be listening on, both TCP and UDP."; }; http = { enable = lib.mkEnableOption "Go Ethereum HTTP API"; - address = mkOption { - type = types.str; + address = lib.mkOption { + type = lib.types.str; default = "127.0.0.1"; description = "Listen address of Go Ethereum HTTP API."; }; - port = mkOption { - type = types.port; + port = lib.mkOption { + type = lib.types.port; default = 8545; description = "Port number of Go Ethereum HTTP API."; }; - apis = mkOption { - type = types.nullOr (types.listOf types.str); + apis = lib.mkOption { + type = lib.types.nullOr (lib.types.listOf lib.types.str); default = null; description = "APIs to enable over WebSocket"; example = ["net" "eth"]; @@ -41,20 +38,20 @@ let websocket = { enable = lib.mkEnableOption "Go Ethereum WebSocket API"; - address = mkOption { - type = types.str; + address = lib.mkOption { + type = lib.types.str; default = "127.0.0.1"; description = "Listen address of Go Ethereum WebSocket API."; }; - port = mkOption { - type = types.port; + port = lib.mkOption { + type = lib.types.port; default = 8546; description = "Port number of Go Ethereum WebSocket API."; }; - apis = mkOption { - type = types.nullOr (types.listOf types.str); + apis = lib.mkOption { + type = lib.types.nullOr (lib.types.listOf lib.types.str); default = null; description = "APIs to enable over WebSocket"; example = ["net" "eth"]; @@ -63,27 +60,27 @@ let authrpc = { enable = lib.mkEnableOption "Go Ethereum Auth RPC API"; - address = mkOption { - type = types.str; + address = lib.mkOption { + type = lib.types.str; default = "127.0.0.1"; description = "Listen address of Go Ethereum Auth RPC API."; }; - port = mkOption { - type = types.port; + port = lib.mkOption { + type = lib.types.port; default = 8551; description = "Port number of Go Ethereum Auth RPC API."; }; - vhosts = mkOption { - type = types.nullOr (types.listOf types.str); + vhosts = lib.mkOption { + type = lib.types.nullOr (lib.types.listOf lib.types.str); default = ["localhost"]; description = "List of virtual hostnames from which to accept requests."; example = ["localhost" "geth.example.org"]; }; - jwtsecret = mkOption { - type = types.str; + jwtsecret = lib.mkOption { + type = lib.types.str; default = ""; description = "Path to a JWT secret for authenticated RPC endpoint."; example = "/var/run/geth/jwtsecret"; @@ -92,50 +89,50 @@ let metrics = { enable = lib.mkEnableOption "Go Ethereum prometheus metrics"; - address = mkOption { - type = types.str; + address = lib.mkOption { + type = lib.types.str; default = "127.0.0.1"; description = "Listen address of Go Ethereum metrics service."; }; - port = mkOption { - type = types.port; + port = lib.mkOption { + type = lib.types.port; default = 6060; description = "Port number of Go Ethereum metrics service."; }; }; - network = mkOption { - type = types.nullOr (types.enum [ "goerli" "rinkeby" "yolov2" "ropsten" ]); + network = lib.mkOption { + type = lib.types.nullOr (lib.types.enum [ "goerli" "rinkeby" "yolov2" "ropsten" ]); default = null; description = "The network to connect to. Mainnet (null) is the default ethereum network."; }; - syncmode = mkOption { - type = types.enum [ "snap" "fast" "full" "light" ]; + syncmode = lib.mkOption { + type = lib.types.enum [ "snap" "fast" "full" "light" ]; default = "snap"; description = "Blockchain sync mode."; }; - gcmode = mkOption { - type = types.enum [ "full" "archive" ]; + gcmode = lib.mkOption { + type = lib.types.enum [ "full" "archive" ]; default = "full"; description = "Blockchain garbage collection mode."; }; - maxpeers = mkOption { - type = types.int; + maxpeers = lib.mkOption { + type = lib.types.int; default = 50; description = "Maximum peers to connect to."; }; - extraArgs = mkOption { - type = types.listOf types.str; + extraArgs = lib.mkOption { + type = lib.types.listOf lib.types.str; description = "Additional arguments passed to Go Ethereum."; default = []; }; - package = mkPackageOption pkgs [ "go-ethereum" "geth" ] { }; + package = lib.mkPackageOption pkgs [ "go-ethereum" "geth" ] { }; }; }; in @@ -145,8 +142,8 @@ in ###### interface options = { - services.geth = mkOption { - type = types.attrsOf (types.submodule gethOpts); + services.geth = lib.mkOption { + type = lib.types.attrsOf (lib.types.submodule gethOpts); default = {}; description = "Specification of one or more geth instances."; }; @@ -154,17 +151,17 @@ in ###### implementation - config = mkIf (eachGeth != {}) { + config = lib.mkIf (eachGeth != {}) { - environment.systemPackages = flatten (mapAttrsToList (gethName: cfg: [ + environment.systemPackages = lib.flatten (lib.mapAttrsToList (gethName: cfg: [ cfg.package ]) eachGeth); - systemd.services = mapAttrs' (gethName: cfg: let + systemd.services = lib.mapAttrs' (gethName: cfg: let stateDir = "goethereum/${gethName}/${if (cfg.network == null) then "mainnet" else cfg.network}"; dataDir = "/var/lib/${stateDir}"; in ( - nameValuePair "geth-${gethName}" (mkIf cfg.enable { + lib.nameValuePair "geth-${gethName}" (lib.mkIf cfg.enable { description = "Go Ethereum node (${gethName})"; wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; @@ -186,16 +183,16 @@ in ${cfg.package}/bin/geth \ --nousb \ --ipcdisable \ - ${optionalString (cfg.network != null) ''--${cfg.network}''} \ + ${lib.optionalString (cfg.network != null) ''--${cfg.network}''} \ --syncmode ${cfg.syncmode} \ --gcmode ${cfg.gcmode} \ --port ${toString cfg.port} \ --maxpeers ${toString cfg.maxpeers} \ - ${optionalString cfg.http.enable ''--http --http.addr ${cfg.http.address} --http.port ${toString cfg.http.port}''} \ - ${optionalString (cfg.http.apis != null) ''--http.api ${lib.concatStringsSep "," cfg.http.apis}''} \ - ${optionalString cfg.websocket.enable ''--ws --ws.addr ${cfg.websocket.address} --ws.port ${toString cfg.websocket.port}''} \ - ${optionalString (cfg.websocket.apis != null) ''--ws.api ${lib.concatStringsSep "," cfg.websocket.apis}''} \ - ${optionalString cfg.metrics.enable ''--metrics --metrics.addr ${cfg.metrics.address} --metrics.port ${toString cfg.metrics.port}''} \ + ${lib.optionalString cfg.http.enable ''--http --http.addr ${cfg.http.address} --http.port ${toString cfg.http.port}''} \ + ${lib.optionalString (cfg.http.apis != null) ''--http.api ${lib.concatStringsSep "," cfg.http.apis}''} \ + ${lib.optionalString cfg.websocket.enable ''--ws --ws.addr ${cfg.websocket.address} --ws.port ${toString cfg.websocket.port}''} \ + ${lib.optionalString (cfg.websocket.apis != null) ''--ws.api ${lib.concatStringsSep "," cfg.websocket.apis}''} \ + ${lib.optionalString cfg.metrics.enable ''--metrics --metrics.addr ${cfg.metrics.address} --metrics.port ${toString cfg.metrics.port}''} \ --authrpc.addr ${cfg.authrpc.address} --authrpc.port ${toString cfg.authrpc.port} --authrpc.vhosts ${lib.concatStringsSep "," cfg.authrpc.vhosts} \ ${if (cfg.authrpc.jwtsecret != "") then ''--authrpc.jwtsecret ${cfg.authrpc.jwtsecret}'' else ''--authrpc.jwtsecret ${dataDir}/geth/jwtsecret''} \ ${lib.escapeShellArgs cfg.extraArgs} \ From 1a519763fbfce0f4475c67558e7819db5e267cba Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:55 +0200 Subject: [PATCH 100/236] nixos/services.lighthouse: remove `with lib;` --- .../blockchain/ethereum/lighthouse.nix | 108 +++++++++--------- 1 file changed, 53 insertions(+), 55 deletions(-) diff --git a/nixos/modules/services/blockchain/ethereum/lighthouse.nix b/nixos/modules/services/blockchain/ethereum/lighthouse.nix index a5ace1a9450f..66a762763cb8 100644 --- a/nixos/modules/services/blockchain/ethereum/lighthouse.nix +++ b/nixos/modules/services/blockchain/ethereum/lighthouse.nix @@ -1,6 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; let cfg = config.services.lighthouse; @@ -8,47 +6,47 @@ in { options = { services.lighthouse = { - beacon = mkOption { + beacon = lib.mkOption { description = "Beacon node"; default = {}; - type = types.submodule { + type = lib.types.submodule { options = { enable = lib.mkEnableOption "Lightouse Beacon node"; - dataDir = mkOption { - type = types.str; + dataDir = lib.mkOption { + type = lib.types.str; default = "/var/lib/lighthouse-beacon"; description = '' Directory where data will be stored. Each chain will be stored under it's own specific subdirectory. ''; }; - address = mkOption { - type = types.str; + address = lib.mkOption { + type = lib.types.str; default = "0.0.0.0"; description = '' Listen address of Beacon node. ''; }; - port = mkOption { - type = types.port; + port = lib.mkOption { + type = lib.types.port; default = 9000; description = '' Port number the Beacon node will be listening on. ''; }; - openFirewall = mkOption { - type = types.bool; + openFirewall = lib.mkOption { + type = lib.types.bool; default = false; description = '' Open the port in the firewall ''; }; - disableDepositContractSync = mkOption { - type = types.bool; + disableDepositContractSync = lib.mkOption { + type = lib.types.bool; default = false; description = '' Explicitly disables syncing of deposit logs from the execution node. @@ -58,24 +56,24 @@ in { }; execution = { - address = mkOption { - type = types.str; + address = lib.mkOption { + type = lib.types.str; default = "127.0.0.1"; description = '' Listen address for the execution layer. ''; }; - port = mkOption { - type = types.port; + port = lib.mkOption { + type = lib.types.port; default = 8551; description = '' Port number the Beacon node will be listening on for the execution layer. ''; }; - jwtPath = mkOption { - type = types.str; + jwtPath = lib.mkOption { + type = lib.types.str; default = ""; description = '' Path for the jwt secret required to connect to the execution layer. @@ -85,16 +83,16 @@ in { http = { enable = lib.mkEnableOption "Beacon node http api"; - port = mkOption { - type = types.port; + port = lib.mkOption { + type = lib.types.port; default = 5052; description = '' Port number of Beacon node RPC service. ''; }; - address = mkOption { - type = types.str; + address = lib.mkOption { + type = lib.types.str; default = "127.0.0.1"; description = '' Listen address of Beacon node RPC service. @@ -104,16 +102,16 @@ in { metrics = { enable = lib.mkEnableOption "Beacon node prometheus metrics"; - address = mkOption { - type = types.str; + address = lib.mkOption { + type = lib.types.str; default = "127.0.0.1"; description = '' Listen address of Beacon node metrics service. ''; }; - port = mkOption { - type = types.port; + port = lib.mkOption { + type = lib.types.port; default = 5054; description = '' Port number of Beacon node metrics service. @@ -121,8 +119,8 @@ in { }; }; - extraArgs = mkOption { - type = types.str; + extraArgs = lib.mkOption { + type = lib.types.str; description = '' Additional arguments passed to the lighthouse beacon command. ''; @@ -133,27 +131,27 @@ in { }; }; - validator = mkOption { + validator = lib.mkOption { description = "Validator node"; default = {}; - type = types.submodule { + type = lib.types.submodule { options = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = "Enable Lightouse Validator node."; }; - dataDir = mkOption { - type = types.str; + dataDir = lib.mkOption { + type = lib.types.str; default = "/var/lib/lighthouse-validator"; description = '' Directory where data will be stored. Each chain will be stored under it's own specific subdirectory. ''; }; - beaconNodes = mkOption { - type = types.listOf types.str; + beaconNodes = lib.mkOption { + type = lib.types.listOf lib.types.str; default = ["http://localhost:5052"]; description = '' Beacon nodes to connect to. @@ -162,16 +160,16 @@ in { metrics = { enable = lib.mkEnableOption "Validator node prometheus metrics"; - address = mkOption { - type = types.str; + address = lib.mkOption { + type = lib.types.str; default = "127.0.0.1"; description = '' Listen address of Validator node metrics service. ''; }; - port = mkOption { - type = types.port; + port = lib.mkOption { + type = lib.types.port; default = 5056; description = '' Port number of Validator node metrics service. @@ -179,8 +177,8 @@ in { }; }; - extraArgs = mkOption { - type = types.str; + extraArgs = lib.mkOption { + type = lib.types.str; description = '' Additional arguments passed to the lighthouse validator command. ''; @@ -191,16 +189,16 @@ in { }; }; - network = mkOption { - type = types.enum [ "mainnet" "gnosis" "chiado" "sepolia" "holesky" ]; + network = lib.mkOption { + type = lib.types.enum [ "mainnet" "gnosis" "chiado" "sepolia" "holesky" ]; default = "mainnet"; description = '' The network to connect to. Mainnet is the default ethereum network. ''; }; - extraArgs = mkOption { - type = types.str; + extraArgs = lib.mkOption { + type = lib.types.str; description = '' Additional arguments passed to every lighthouse command. ''; @@ -210,17 +208,17 @@ in { }; }; - config = mkIf (cfg.beacon.enable || cfg.validator.enable) { + config = lib.mkIf (cfg.beacon.enable || cfg.validator.enable) { environment.systemPackages = [ pkgs.lighthouse ] ; - networking.firewall = mkIf cfg.beacon.enable { - allowedTCPPorts = mkIf cfg.beacon.openFirewall [ cfg.beacon.port ]; - allowedUDPPorts = mkIf cfg.beacon.openFirewall [ cfg.beacon.port ]; + networking.firewall = lib.mkIf cfg.beacon.enable { + allowedTCPPorts = lib.mkIf cfg.beacon.openFirewall [ cfg.beacon.port ]; + allowedUDPPorts = lib.mkIf cfg.beacon.openFirewall [ cfg.beacon.port ]; }; - systemd.services.lighthouse-beacon = mkIf cfg.beacon.enable { + systemd.services.lighthouse-beacon = lib.mkIf cfg.beacon.enable { description = "Lighthouse beacon node (connect to P2P nodes and verify blocks)"; wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; @@ -268,7 +266,7 @@ in { }; }; - systemd.services.lighthouse-validator = mkIf cfg.validator.enable { + systemd.services.lighthouse-validator = lib.mkIf cfg.validator.enable { description = "Lighthouse validtor node (manages validators, using data obtained from the beacon node via a HTTP API)"; wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; @@ -281,7 +279,7 @@ in { --network ${cfg.network} \ --beacon-nodes ${lib.concatStringsSep "," cfg.validator.beaconNodes} \ --datadir ${cfg.validator.dataDir}/${cfg.network} \ - ${optionalString cfg.validator.metrics.enable ''--metrics --metrics-address ${cfg.validator.metrics.address} --metrics-port ${toString cfg.validator.metrics.port}''} \ + ${lib.optionalString cfg.validator.metrics.enable ''--metrics --metrics-address ${cfg.validator.metrics.address} --metrics-port ${toString cfg.validator.metrics.port}''} \ ${cfg.extraArgs} ${cfg.validator.extraArgs} ''; From 6ebec4f097510f2b3de5d1b8569701d9b03265e3 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:55 +0200 Subject: [PATCH 101/236] nixos/services.k3s: remove `with lib;` --- .../modules/services/cluster/k3s/default.nix | 80 +++++++++---------- 1 file changed, 39 insertions(+), 41 deletions(-) diff --git a/nixos/modules/services/cluster/k3s/default.nix b/nixos/modules/services/cluster/k3s/default.nix index 83dfe2067147..2925745c9e09 100644 --- a/nixos/modules/services/cluster/k3s/default.nix +++ b/nixos/modules/services/cluster/k3s/default.nix @@ -4,8 +4,6 @@ pkgs, ... }: - -with lib; let cfg = config.services.k3s; removeOption = @@ -98,7 +96,7 @@ let } ); - enabledManifests = with builtins; filter (m: m.enable) (attrValues cfg.manifests); + enabledManifests = lib.filter (m: m.enable) (lib.attrValues cfg.manifests); linkManifestEntry = m: "${pkgs.coreutils-full}/bin/ln -sfn ${m.source} ${manifestDir}/${m.target}"; linkImageEntry = image: "${pkgs.coreutils-full}/bin/ln -sfn ${image} ${imageDir}/${image.name}"; linkChartEntry = @@ -132,11 +130,11 @@ in # interface options.services.k3s = { - enable = mkEnableOption "k3s"; + enable = lib.mkEnableOption "k3s"; - package = mkPackageOption pkgs "k3s" { }; + package = lib.mkPackageOption pkgs "k3s" { }; - role = mkOption { + role = lib.mkOption { description = '' Whether k3s should run as a server or agent. @@ -152,14 +150,14 @@ in - `serverAddr` is required. ''; default = "server"; - type = types.enum [ + type = lib.types.enum [ "server" "agent" ]; }; - serverAddr = mkOption { - type = types.str; + serverAddr = lib.mkOption { + type = lib.types.str; description = '' The k3s server to connect to. @@ -171,8 +169,8 @@ in default = ""; }; - clusterInit = mkOption { - type = types.bool; + clusterInit = lib.mkOption { + type = lib.types.bool; default = false; description = '' Initialize HA cluster using an embedded etcd datastore. @@ -193,8 +191,8 @@ in ''; }; - token = mkOption { - type = types.str; + token = lib.mkOption { + type = lib.types.str; description = '' The k3s token to use when connecting to a server. @@ -204,15 +202,15 @@ in default = ""; }; - tokenFile = mkOption { - type = types.nullOr types.path; + tokenFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; description = "File path containing k3s token to use when connecting to the server."; default = null; }; - extraFlags = mkOption { + extraFlags = lib.mkOption { description = "Extra flags to pass to the k3s command."; - type = with types; either str (listOf str); + type = with lib.types; either str (listOf str); default = [ ]; example = [ "--no-deploy traefik" @@ -220,28 +218,28 @@ in ]; }; - disableAgent = mkOption { - type = types.bool; + disableAgent = lib.mkOption { + type = lib.types.bool; default = false; description = "Only run the server. This option only makes sense for a server."; }; - environmentFile = mkOption { - type = types.nullOr types.path; + environmentFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; description = '' File path containing environment variables for configuring the k3s service in the format of an EnvironmentFile. See systemd.exec(5). ''; default = null; }; - configPath = mkOption { - type = types.nullOr types.path; + configPath = lib.mkOption { + type = lib.types.nullOr lib.types.path; default = null; description = "File path containing the k3s YAML config. This is useful when the config is generated (for example on boot)."; }; - manifests = mkOption { - type = types.attrsOf manifestModule; + manifests = lib.mkOption { + type = lib.types.attrsOf manifestModule; default = { }; example = lib.literalExpression '' deployment.source = ../manifests/deployment.yaml; @@ -328,8 +326,8 @@ in ''; }; - charts = mkOption { - type = with types; attrsOf (either path package); + charts = lib.mkOption { + type = with lib.types; attrsOf (either path package); default = { }; example = lib.literalExpression '' nginx = ../charts/my-nginx-chart.tgz; @@ -346,8 +344,8 @@ in ''; }; - containerdConfigTemplate = mkOption { - type = types.nullOr types.str; + containerdConfigTemplate = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; example = lib.literalExpression '' # Base K3s config @@ -366,8 +364,8 @@ in ''; }; - images = mkOption { - type = with types; listOf package; + images = lib.mkOption { + type = with lib.types; listOf package; default = [ ]; example = lib.literalExpression '' [ @@ -440,7 +438,7 @@ in # implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { warnings = (lib.optional (cfg.role != "server" && cfg.manifests != { }) "k3s: Auto deploying manifests are only installed on server nodes (role == server), they will be ignored by this node." @@ -500,7 +498,7 @@ in "network-online.target" ]; wantedBy = [ "multi-user.target" ]; - path = optional config.boot.zfs.enabled config.boot.zfs.package; + path = lib.optional config.boot.zfs.enabled config.boot.zfs.package; serviceConfig = { # See: https://github.com/rancher/k3s/blob/dddbd16305284ae4bd14c0aade892412310d7edc/install.sh#L197 Type = if cfg.role == "agent" then "exec" else "notify"; @@ -514,15 +512,15 @@ in TasksMax = "infinity"; EnvironmentFile = cfg.environmentFile; ExecStartPre = activateK3sContent; - ExecStart = concatStringsSep " \\\n " ( + ExecStart = lib.concatStringsSep " \\\n " ( [ "${cfg.package}/bin/k3s ${cfg.role}" ] - ++ (optional cfg.clusterInit "--cluster-init") - ++ (optional cfg.disableAgent "--disable-agent") - ++ (optional (cfg.serverAddr != "") "--server ${cfg.serverAddr}") - ++ (optional (cfg.token != "") "--token ${cfg.token}") - ++ (optional (cfg.tokenFile != null) "--token-file ${cfg.tokenFile}") - ++ (optional (cfg.configPath != null) "--config ${cfg.configPath}") - ++ (optional (kubeletParams != { }) "--kubelet-arg=config=${kubeletConfig}") + ++ (lib.optional cfg.clusterInit "--cluster-init") + ++ (lib.optional cfg.disableAgent "--disable-agent") + ++ (lib.optional (cfg.serverAddr != "") "--server ${cfg.serverAddr}") + ++ (lib.optional (cfg.token != "") "--token ${cfg.token}") + ++ (lib.optional (cfg.tokenFile != null) "--token-file ${cfg.tokenFile}") + ++ (lib.optional (cfg.configPath != null) "--config ${cfg.configPath}") + ++ (lib.optional (kubeletParams != { }) "--kubelet-arg=config=${kubeletConfig}") ++ (lib.flatten cfg.extraFlags) ); }; From 980a655feba3f919be03224ee6085b5fcc30f473 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:55 +0200 Subject: [PATCH 102/236] nixos/services.kubernetes.addons.dns: remove `with lib;` --- .../cluster/kubernetes/addons/dns.nix | 43 +++++++++---------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/nixos/modules/services/cluster/kubernetes/addons/dns.nix b/nixos/modules/services/cluster/kubernetes/addons/dns.nix index a03aa7329a32..485c6f8e2b5f 100644 --- a/nixos/modules/services/cluster/kubernetes/addons/dns.nix +++ b/nixos/modules/services/cluster/kubernetes/addons/dns.nix @@ -1,7 +1,4 @@ { config, options, pkgs, lib, ... }: - -with lib; - let version = "1.10.1"; cfg = config.services.kubernetes.addons.dns; @@ -12,37 +9,37 @@ let }; in { options.services.kubernetes.addons.dns = { - enable = mkEnableOption "kubernetes dns addon"; + enable = lib.mkEnableOption "kubernetes dns addon"; - clusterIp = mkOption { + clusterIp = lib.mkOption { description = "Dns addon clusterIP"; # this default is also what kubernetes users default = ( - concatStringsSep "." ( - take 3 (splitString "." config.services.kubernetes.apiserver.serviceClusterIpRange + lib.concatStringsSep "." ( + lib.take 3 (lib.splitString "." config.services.kubernetes.apiserver.serviceClusterIpRange )) ) + ".254"; - defaultText = literalMD '' + defaultText = lib.literalMD '' The `x.y.z.254` IP of `config.${options.services.kubernetes.apiserver.serviceClusterIpRange}`. ''; - type = types.str; + type = lib.types.str; }; - clusterDomain = mkOption { + clusterDomain = lib.mkOption { description = "Dns cluster domain"; default = "cluster.local"; - type = types.str; + type = lib.types.str; }; - replicas = mkOption { + replicas = lib.mkOption { description = "Number of DNS pod replicas to deploy in the cluster."; default = 2; - type = types.int; + type = lib.types.int; }; - reconcileMode = mkOption { + reconcileMode = lib.mkOption { description = '' Controls the addon manager reconciliation mode for the DNS addon. @@ -51,12 +48,12 @@ in { See: . ''; default = "Reconcile"; - type = types.enum [ "Reconcile" "EnsureExists" ]; + type = lib.types.enum [ "Reconcile" "EnsureExists" ]; }; - coredns = mkOption { + coredns = lib.mkOption { description = "Docker image to seed for the CoreDNS container."; - type = types.attrs; + type = lib.types.attrs; default = { imageName = "coredns/coredns"; imageDigest = "sha256:a0ead06651cf580044aeb0a0feba63591858fb2e43ade8c9dea45a6a89ae7e5e"; @@ -65,13 +62,13 @@ in { }; }; - corefile = mkOption { + corefile = lib.mkOption { description = '' Custom coredns corefile configuration. See: . ''; - type = types.str; + type = lib.types.str; default = '' .:${toString ports.dns} { errors @@ -87,7 +84,7 @@ in { reload loadbalance }''; - defaultText = literalExpression '' + defaultText = lib.literalExpression '' ''' .:${toString ports.dns} { errors @@ -108,9 +105,9 @@ in { }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { services.kubernetes.kubelet.seedDockerImages = - singleton (pkgs.dockerTools.pullImage cfg.coredns); + lib.singleton (pkgs.dockerTools.pullImage cfg.coredns); services.kubernetes.addonManager.bootstrapAddons = { coredns-cr = { @@ -366,7 +363,7 @@ in { }; }; - services.kubernetes.kubelet.clusterDns = mkDefault [ cfg.clusterIp ]; + services.kubernetes.kubelet.clusterDns = lib.mkDefault [ cfg.clusterIp ]; }; meta.buildDocsInSandbox = false; From 7b141e6b8f11be0f1a9b908d8e0a159fe3f75f69 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:55 +0200 Subject: [PATCH 103/236] nixos/services.pacemaker: remove `with lib;` --- nixos/modules/services/cluster/pacemaker/default.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/cluster/pacemaker/default.nix b/nixos/modules/services/cluster/pacemaker/default.nix index 005a952e8025..92cd9311eb7d 100644 --- a/nixos/modules/services/cluster/pacemaker/default.nix +++ b/nixos/modules/services/cluster/pacemaker/default.nix @@ -1,19 +1,17 @@ { config, lib, pkgs, ... }: - -with lib; let cfg = config.services.pacemaker; in { # interface options.services.pacemaker = { - enable = mkEnableOption "pacemaker"; + enable = lib.mkEnableOption "pacemaker"; - package = mkPackageOption pkgs "pacemaker" { }; + package = lib.mkPackageOption pkgs "pacemaker" { }; }; # implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { assertions = [ { assertion = config.services.corosync.enable; message = '' From 92566faf1c5eef9fe34e7b8fc0676a04945eb893 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:56 +0200 Subject: [PATCH 104/236] nixos/services.patroni: remove `with lib;` --- .../services/cluster/patroni/default.nix | 85 +++++++++---------- 1 file changed, 42 insertions(+), 43 deletions(-) diff --git a/nixos/modules/services/cluster/patroni/default.nix b/nixos/modules/services/cluster/patroni/default.nix index 3b563bb89fff..91eb9214a60e 100644 --- a/nixos/modules/services/cluster/patroni/default.nix +++ b/nixos/modules/services/cluster/patroni/default.nix @@ -1,5 +1,4 @@ { config, lib, pkgs, ... }: -with lib; let cfg = config.services.patroni; defaultUser = "patroni"; @@ -21,20 +20,20 @@ in options.services.patroni = { - enable = mkEnableOption "Patroni"; + enable = lib.mkEnableOption "Patroni"; - postgresqlPackage = mkOption { - type = types.package; - example = literalExpression "pkgs.postgresql_14"; + postgresqlPackage = lib.mkOption { + type = lib.types.package; + example = lib.literalExpression "pkgs.postgresql_14"; description = '' PostgreSQL package to use. Plugins can be enabled like this `pkgs.postgresql_14.withPackages (p: [ p.pg_safeupdate p.postgis ])`. ''; }; - postgresqlDataDir = mkOption { - type = types.path; - defaultText = literalExpression ''"/var/lib/postgresql/''${config.services.patroni.postgresqlPackage.psqlSchema}"''; + postgresqlDataDir = lib.mkOption { + type = lib.types.path; + defaultText = lib.literalExpression ''"/var/lib/postgresql/''${config.services.patroni.postgresqlPackage.psqlSchema}"''; example = "/var/lib/postgresql/14"; default = "/var/lib/postgresql/${cfg.postgresqlPackage.psqlSchema}"; description = '' @@ -45,16 +44,16 @@ in ''; }; - postgresqlPort = mkOption { - type = types.port; + postgresqlPort = lib.mkOption { + type = lib.types.port; default = 5432; description = '' The port on which PostgreSQL listens. ''; }; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = defaultUser; example = "postgres"; description = '' @@ -63,8 +62,8 @@ in ''; }; - group = mkOption { - type = types.str; + group = lib.mkOption { + type = lib.types.str; default = defaultGroup; example = "postgres"; description = '' @@ -73,64 +72,64 @@ in ''; }; - dataDir = mkOption { - type = types.path; + dataDir = lib.mkOption { + type = lib.types.path; default = "/var/lib/patroni"; description = '' Folder where Patroni data will be written, this is where the pgpass password file will be written. ''; }; - scope = mkOption { - type = types.str; + scope = lib.mkOption { + type = lib.types.str; example = "cluster1"; description = '' Cluster name. ''; }; - name = mkOption { - type = types.str; + name = lib.mkOption { + type = lib.types.str; example = "node1"; description = '' The name of the host. Must be unique for the cluster. ''; }; - namespace = mkOption { - type = types.str; + namespace = lib.mkOption { + type = lib.types.str; default = "/service"; description = '' Path within the configuration store where Patroni will keep information about the cluster. ''; }; - nodeIp = mkOption { - type = types.str; + nodeIp = lib.mkOption { + type = lib.types.str; example = "192.168.1.1"; description = '' IP address of this node. ''; }; - otherNodesIps = mkOption { - type = types.listOf types.str; + otherNodesIps = lib.mkOption { + type = lib.types.listOf lib.types.str; example = [ "192.168.1.2" "192.168.1.3" ]; description = '' IP addresses of the other nodes. ''; }; - restApiPort = mkOption { - type = types.port; + restApiPort = lib.mkOption { + type = lib.types.port; default = 8008; description = '' The port on Patroni's REST api listens. ''; }; - softwareWatchdog = mkOption { - type = types.bool; + softwareWatchdog = lib.mkOption { + type = lib.types.bool; default = false; description = '' This will configure Patroni to use the software watchdog built into the Linux kernel @@ -138,7 +137,7 @@ in ''; }; - settings = mkOption { + settings = lib.mkOption { type = format.type; default = { }; description = '' @@ -148,8 +147,8 @@ in ''; }; - environmentFiles = mkOption { - type = with types; attrsOf (nullOr (oneOf [ str path package ])); + environmentFiles = lib.mkOption { + type = with lib.types; attrsOf (nullOr (oneOf [ str path package ])); default = { }; example = { PATRONI_REPLICATION_PASSWORD = "/secret/file"; @@ -159,7 +158,7 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { services.patroni.settings = { scope = cfg.scope; @@ -179,7 +178,7 @@ in pgpass = "${cfg.dataDir}/pgpass"; }; - watchdog = mkIf cfg.softwareWatchdog { + watchdog = lib.mkIf cfg.softwareWatchdog { mode = "required"; device = "/dev/watchdog"; safety_margin = 5; @@ -188,13 +187,13 @@ in users = { - users = mkIf (cfg.user == defaultUser) { + users = lib.mkIf (cfg.user == defaultUser) { patroni = { group = cfg.group; isSystemUser = true; }; }; - groups = mkIf (cfg.group == defaultGroup) { + groups = lib.mkIf (cfg.group == defaultGroup) { patroni = { }; }; }; @@ -207,11 +206,11 @@ in after = [ "network.target" ]; script = '' - ${concatStringsSep "\n" (attrValues (mapAttrs (name: path: ''export ${name}="$(< ${escapeShellArg path})"'') cfg.environmentFiles))} + ${lib.concatStringsSep "\n" (lib.attrValues (lib.mapAttrs (name: path: ''export ${name}="$(< ${lib.escapeShellArg path})"'') cfg.environmentFiles))} exec ${pkgs.patroni}/bin/patroni ${configFile} ''; - serviceConfig = mkMerge [ + serviceConfig = lib.mkMerge [ { User = cfg.user; Group = cfg.group; @@ -221,7 +220,7 @@ in ExecReload = "${pkgs.coreutils}/bin/kill -s HUP $MAINPID"; KillMode = "process"; } - (mkIf (cfg.postgresqlDataDir == "/var/lib/postgresql/${cfg.postgresqlPackage.psqlSchema}" && cfg.dataDir == "/var/lib/patroni") { + (lib.mkIf (cfg.postgresqlDataDir == "/var/lib/postgresql/${cfg.postgresqlPackage.psqlSchema}" && cfg.dataDir == "/var/lib/patroni") { StateDirectory = "patroni postgresql postgresql/${cfg.postgresqlPackage.psqlSchema}"; StateDirectoryMode = "0750"; }) @@ -229,9 +228,9 @@ in }; }; - boot.kernelModules = mkIf cfg.softwareWatchdog [ "softdog" ]; + boot.kernelModules = lib.mkIf cfg.softwareWatchdog [ "softdog" ]; - services.udev.extraRules = mkIf cfg.softwareWatchdog '' + services.udev.extraRules = lib.mkIf cfg.softwareWatchdog '' KERNEL=="watchdog", OWNER="${cfg.user}", GROUP="${cfg.group}", MODE="0600" ''; @@ -247,5 +246,5 @@ in }; }; - meta.maintainers = [ maintainers.phfroidmont ]; + meta.maintainers = [ lib.maintainers.phfroidmont ]; } From 7e25c525fe8aeb88605ab1212cbc9b596a6b4de6 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:56 +0200 Subject: [PATCH 105/236] nixos/services.rke2: remove `with lib;` --- .../modules/services/cluster/rke2/default.nix | 122 +++++++++--------- 1 file changed, 60 insertions(+), 62 deletions(-) diff --git a/nixos/modules/services/cluster/rke2/default.nix b/nixos/modules/services/cluster/rke2/default.nix index 51b849ebcc80..2e6816f43374 100644 --- a/nixos/modules/services/cluster/rke2/default.nix +++ b/nixos/modules/services/cluster/rke2/default.nix @@ -1,6 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; let cfg = config.services.rke2; in @@ -8,12 +6,12 @@ in imports = [ ]; options.services.rke2 = { - enable = mkEnableOption "rke2"; + enable = lib.mkEnableOption "rke2"; - package = mkPackageOption pkgs "rke2" { }; + package = lib.mkPackageOption pkgs "rke2" { }; - role = mkOption { - type = types.enum [ "server" "agent" ]; + role = lib.mkOption { + type = lib.types.enum [ "server" "agent" ]; description = '' Whether rke2 should run as a server or agent. @@ -31,26 +29,26 @@ in default = "server"; }; - configPath = mkOption { - type = types.path; + configPath = lib.mkOption { + type = lib.types.path; description = "Load configuration from FILE."; default = "/etc/rancher/rke2/config.yaml"; }; - debug = mkOption { - type = types.bool; + debug = lib.mkOption { + type = lib.types.bool; description = "Turn on debug logs."; default = false; }; - dataDir = mkOption { - type = types.path; + dataDir = lib.mkOption { + type = lib.types.path; description = "The folder to hold state in."; default = "/var/lib/rancher/rke2"; }; - token = mkOption { - type = types.str; + token = lib.mkOption { + type = lib.types.str; description = '' Shared secret used to join a server or agent to a cluster. @@ -60,44 +58,44 @@ in default = ""; }; - tokenFile = mkOption { - type = types.nullOr types.path; + tokenFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; description = "File path containing rke2 token to use when connecting to the server."; default = null; }; - disable = mkOption { - type = types.listOf types.str; + disable = lib.mkOption { + type = lib.types.listOf lib.types.str; description = "Do not deploy packaged components and delete any deployed components."; default = [ ]; }; - nodeName = mkOption { - type = types.nullOr types.str; + nodeName = lib.mkOption { + type = lib.types.nullOr lib.types.str; description = "Node name."; default = null; }; - nodeLabel = mkOption { - type = types.listOf types.str; + nodeLabel = lib.mkOption { + type = lib.types.listOf lib.types.str; description = "Registering and starting kubelet with set of labels."; default = [ ]; }; - nodeTaint = mkOption { - type = types.listOf types.str; + nodeTaint = lib.mkOption { + type = lib.types.listOf lib.types.str; description = "Registering kubelet with set of taints."; default = [ ]; }; - nodeIP = mkOption { - type = types.nullOr types.str; + nodeIP = lib.mkOption { + type = lib.types.nullOr lib.types.str; description = "IPv4/IPv6 addresses to advertise for node."; default = null; }; - agentToken = mkOption { - type = types.str; + agentToken = lib.mkOption { + type = lib.types.str; description = '' Shared secret used to join agents to the cluster, but not servers. @@ -107,27 +105,27 @@ in default = ""; }; - agentTokenFile = mkOption { - type = types.nullOr types.path; + agentTokenFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; description = "File path containing rke2 agent token to use when connecting to the server."; default = null; }; - serverAddr = mkOption { - type = types.str; + serverAddr = lib.mkOption { + type = lib.types.str; description = "The rke2 server to connect to, used to join a cluster."; example = "https://10.0.0.10:6443"; default = ""; }; - selinux = mkOption { - type = types.bool; + selinux = lib.mkOption { + type = lib.types.bool; description = "Enable SELinux in containerd."; default = false; }; - cni = mkOption { - type = types.enum [ "none" "canal" "cilium" "calico" "flannel" ]; + cni = lib.mkOption { + type = lib.types.enum [ "none" "canal" "cilium" "calico" "flannel" ]; description = '' CNI Plugins to deploy, one of `none`, `calico`, `canal`, `cilium` or `flannel`. @@ -141,8 +139,8 @@ in default = "canal"; }; - cisHardening = mkOption { - type = types.bool; + cisHardening = lib.mkOption { + type = lib.types.bool; description = '' Enable CIS Hardening for RKE2. @@ -162,8 +160,8 @@ in default = false; }; - extraFlags = mkOption { - type = types.listOf types.str; + extraFlags = lib.mkOption { + type = lib.types.listOf lib.types.str; description = '' Extra flags to pass to the rke2 service/agent. @@ -176,8 +174,8 @@ in default = [ ]; }; - environmentVars = mkOption { - type = types.attrsOf types.str; + environmentVars = lib.mkOption { + type = lib.types.attrsOf lib.types.str; description = '' Environment variables for configuring the rke2 service/agent. @@ -199,7 +197,7 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { assertions = [ { assertion = cfg.role == "agent" -> (builtins.pathExists cfg.configPath || cfg.serverAddr != ""); @@ -234,7 +232,7 @@ in ''; }; # See: https://docs.rke2.io/security/hardening_guide#set-kernel-parameters - boot.kernel.sysctl = mkIf cfg.cisHardening { + boot.kernel.sysctl = lib.mkIf cfg.cisHardening { "vm.panic_on_oom" = 0; "vm.overcommit_memory" = 1; "kernel.panic" = 10; @@ -254,7 +252,7 @@ in "-/etc/sysconfig/%N" "-/usr/local/lib/systemd/system/%N.env" ]; - Environment = mapAttrsToList (k: v: "${k}=${v}") cfg.environmentVars; + Environment = lib.mapAttrsToList (k: v: "${k}=${v}") cfg.environmentVars; KillMode = "process"; Delegate = "yes"; LimitNOFILE = 1048576; @@ -277,23 +275,23 @@ in "-${pkgs.kmod}/bin/modprobe br_netfilter" "-${pkgs.kmod}/bin/modprobe overlay" ]; - ExecStart = "${cfg.package}/bin/rke2 '${cfg.role}' ${escapeShellArgs ( - (optional (cfg.configPath != "/etc/rancher/rke2/config.yaml") "--config=${cfg.configPath}") - ++ (optional cfg.debug "--debug") - ++ (optional (cfg.dataDir != "/var/lib/rancher/rke2") "--data-dir=${cfg.dataDir}") - ++ (optional (cfg.token != "") "--token=${cfg.token}") - ++ (optional (cfg.tokenFile != null) "--token-file=${cfg.tokenFile}") - ++ (optionals (cfg.role == "server" && cfg.disable != [ ]) (map (d: "--disable=${d}") cfg.disable)) - ++ (optional (cfg.nodeName != null) "--node-name=${cfg.nodeName}") - ++ (optionals (cfg.nodeLabel != [ ]) (map (l: "--node-label=${l}") cfg.nodeLabel)) - ++ (optionals (cfg.nodeTaint != [ ]) (map (t: "--node-taint=${t}") cfg.nodeTaint)) - ++ (optional (cfg.nodeIP != null) "--node-ip=${cfg.nodeIP}") - ++ (optional (cfg.role == "server" && cfg.agentToken != "") "--agent-token=${cfg.agentToken}") - ++ (optional (cfg.role == "server" && cfg.agentTokenFile != null) "--agent-token-file=${cfg.agentTokenFile}") - ++ (optional (cfg.serverAddr != "") "--server=${cfg.serverAddr}") - ++ (optional cfg.selinux "--selinux") - ++ (optional (cfg.role == "server" && cfg.cni != "canal") "--cni=${cfg.cni}") - ++ (optional cfg.cisHardening "--profile=${if cfg.package.version >= "1.25" then "cis-1.23" else "cis-1.6"}") + ExecStart = "${cfg.package}/bin/rke2 '${cfg.role}' ${lib.escapeShellArgs ( + (lib.optional (cfg.configPath != "/etc/rancher/rke2/config.yaml") "--config=${cfg.configPath}") + ++ (lib.optional cfg.debug "--debug") + ++ (lib.optional (cfg.dataDir != "/var/lib/rancher/rke2") "--data-dir=${cfg.dataDir}") + ++ (lib.optional (cfg.token != "") "--token=${cfg.token}") + ++ (lib.optional (cfg.tokenFile != null) "--token-file=${cfg.tokenFile}") + ++ (lib.optionals (cfg.role == "server" && cfg.disable != [ ]) (map (d: "--disable=${d}") cfg.disable)) + ++ (lib.optional (cfg.nodeName != null) "--node-name=${cfg.nodeName}") + ++ (lib.optionals (cfg.nodeLabel != [ ]) (map (l: "--node-label=${l}") cfg.nodeLabel)) + ++ (lib.optionals (cfg.nodeTaint != [ ]) (map (t: "--node-taint=${t}") cfg.nodeTaint)) + ++ (lib.optional (cfg.nodeIP != null) "--node-ip=${cfg.nodeIP}") + ++ (lib.optional (cfg.role == "server" && cfg.agentToken != "") "--agent-token=${cfg.agentToken}") + ++ (lib.optional (cfg.role == "server" && cfg.agentTokenFile != null) "--agent-token-file=${cfg.agentTokenFile}") + ++ (lib.optional (cfg.serverAddr != "") "--server=${cfg.serverAddr}") + ++ (lib.optional cfg.selinux "--selinux") + ++ (lib.optional (cfg.role == "server" && cfg.cni != "canal") "--cni=${cfg.cni}") + ++ (lib.optional cfg.cisHardening "--profile=${if cfg.package.version >= "1.25" then "cis-1.23" else "cis-1.6"}") ++ cfg.extraFlags )}"; ExecStopPost = let From 400d31aeb54e8f5115f7934c43177faa48765d35 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:56 +0200 Subject: [PATCH 106/236] nixos/services.spark: remove `with lib;` --- .../services/cluster/spark/default.nix | 45 +++++++++---------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/nixos/modules/services/cluster/spark/default.nix b/nixos/modules/services/cluster/spark/default.nix index 7a3f768471c2..c4ebd3424392 100644 --- a/nixos/modules/services/cluster/spark/default.nix +++ b/nixos/modules/services/cluster/spark/default.nix @@ -2,20 +2,19 @@ let cfg = config.services.spark; in -with lib; { options = { services.spark = { master = { - enable = mkEnableOption "Spark master service"; - bind = mkOption { - type = types.str; + enable = lib.mkEnableOption "Spark master service"; + bind = lib.mkOption { + type = lib.types.str; description = "Address the spark master binds to."; default = "127.0.0.1"; example = "0.0.0.0"; }; - restartIfChanged = mkOption { - type = types.bool; + restartIfChanged = lib.mkOption { + type = lib.types.bool; description = '' Automatically restart master service on config change. This can be set to false to defer restarts on clusters running critical applications. @@ -24,8 +23,8 @@ with lib; ''; default = true; }; - extraEnvironment = mkOption { - type = types.attrsOf types.str; + extraEnvironment = lib.mkOption { + type = lib.types.attrsOf lib.types.str; description = "Extra environment variables to pass to spark master. See spark-standalone documentation."; default = {}; example = { @@ -35,19 +34,19 @@ with lib; }; }; worker = { - enable = mkEnableOption "Spark worker service"; - workDir = mkOption { - type = types.path; + enable = lib.mkEnableOption "Spark worker service"; + workDir = lib.mkOption { + type = lib.types.path; description = "Spark worker work dir."; default = "/var/lib/spark"; }; - master = mkOption { - type = types.str; + master = lib.mkOption { + type = lib.types.str; description = "Address of the spark master."; default = "127.0.0.1:7077"; }; - restartIfChanged = mkOption { - type = types.bool; + restartIfChanged = lib.mkOption { + type = lib.types.bool; description = '' Automatically restart worker service on config change. This can be set to false to defer restarts on clusters running critical applications. @@ -56,8 +55,8 @@ with lib; ''; default = true; }; - extraEnvironment = mkOption { - type = types.attrsOf types.str; + extraEnvironment = lib.mkOption { + type = lib.types.attrsOf lib.types.str; description = "Extra environment variables to pass to spark worker."; default = {}; example = { @@ -66,18 +65,18 @@ with lib; }; }; }; - confDir = mkOption { - type = types.path; + confDir = lib.mkOption { + type = lib.types.path; description = "Spark configuration directory. Spark will use the configuration files (spark-defaults.conf, spark-env.sh, log4j.properties, etc) from this directory."; default = "${cfg.package}/conf"; - defaultText = literalExpression ''"''${package}/conf"''; + defaultText = lib.literalExpression ''"''${package}/conf"''; }; - logDir = mkOption { - type = types.path; + logDir = lib.mkOption { + type = lib.types.path; description = "Spark log directory."; default = "/var/log/spark"; }; - package = mkPackageOption pkgs "spark" { + package = lib.mkPackageOption pkgs "spark" { example = '' spark.overrideAttrs (super: rec { pname = "spark"; From c37db9c3ee26f675df86c4bdd2e58754ee40b6a6 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:56 +0200 Subject: [PATCH 107/236] nixos/services.boinc: remove `with lib;` --- .../services/computing/boinc/client.nix | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/nixos/modules/services/computing/boinc/client.nix b/nixos/modules/services/computing/boinc/client.nix index f22e6360e0fd..01608d33d8d1 100644 --- a/nixos/modules/services/computing/boinc/client.nix +++ b/nixos/modules/services/computing/boinc/client.nix @@ -1,10 +1,7 @@ {config, lib, pkgs, ...}: - -with lib; - let cfg = config.services.boinc; - allowRemoteGuiRpcFlag = optionalString cfg.allowRemoteGuiRpc "--allow_remote_gui_rpc"; + allowRemoteGuiRpcFlag = lib.optionalString cfg.allowRemoteGuiRpc "--allow_remote_gui_rpc"; fhsEnv = pkgs.buildFHSEnv { name = "boinc-fhs-env"; @@ -16,8 +13,8 @@ let in { options.services.boinc = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to enable the BOINC distributed computing client. If this @@ -27,20 +24,20 @@ in ''; }; - package = mkPackageOption pkgs "boinc" { + package = lib.mkPackageOption pkgs "boinc" { example = "boinc-headless"; }; - dataDir = mkOption { - type = types.path; + dataDir = lib.mkOption { + type = lib.types.path; default = "/var/lib/boinc"; description = '' The directory in which to store BOINC's configuration and data files. ''; }; - allowRemoteGuiRpc = mkOption { - type = types.bool; + allowRemoteGuiRpc = lib.mkOption { + type = lib.types.bool; default = false; description = '' If set to true, any remote host can connect to and control this BOINC @@ -52,10 +49,10 @@ in ''; }; - extraEnvPackages = mkOption { - type = types.listOf types.package; + extraEnvPackages = lib.mkOption { + type = lib.types.listOf lib.types.package; default = []; - example = literalExpression "[ pkgs.virtualbox ]"; + example = lib.literalExpression "[ pkgs.virtualbox ]"; description = '' Additional packages to make available in the environment in which BOINC will run. Common choices are: @@ -77,7 +74,7 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.systemPackages = [cfg.package]; users.users.boinc = { From af42ae43527a8ea4b1983a38ce4c86cf51b7e2f7 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:56 +0200 Subject: [PATCH 108/236] nixos/services.foldingathome: remove `with lib;` --- .../computing/foldingathome/client.nix | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/nixos/modules/services/computing/foldingathome/client.nix b/nixos/modules/services/computing/foldingathome/client.nix index 8d330fd8717b..71fc58669d33 100644 --- a/nixos/modules/services/computing/foldingathome/client.nix +++ b/nixos/modules/services/computing/foldingathome/client.nix @@ -1,5 +1,4 @@ { config, lib, pkgs, ... }: -with lib; let cfg = config.services.foldingathome; @@ -11,19 +10,19 @@ let in { imports = [ - (mkRenamedOptionModule [ "services" "foldingAtHome" ] [ "services" "foldingathome" ]) - (mkRenamedOptionModule [ "services" "foldingathome" "nickname" ] [ "services" "foldingathome" "user" ]) - (mkRemovedOptionModule [ "services" "foldingathome" "config" ] '' + (lib.mkRenamedOptionModule [ "services" "foldingAtHome" ] [ "services" "foldingathome" ]) + (lib.mkRenamedOptionModule [ "services" "foldingathome" "nickname" ] [ "services" "foldingathome" "user" ]) + (lib.mkRemovedOptionModule [ "services" "foldingathome" "config" ] '' Use services.foldingathome.extraArgs instead '') ]; options.services.foldingathome = { - enable = mkEnableOption "Folding@home client"; + enable = lib.mkEnableOption "Folding@home client"; - package = mkPackageOption pkgs "fahclient" { }; + package = lib.mkPackageOption pkgs "fahclient" { }; - user = mkOption { - type = types.nullOr types.str; + user = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; description = '' The user associated with the reported computation results. This will @@ -31,8 +30,8 @@ in ''; }; - team = mkOption { - type = types.int; + team = lib.mkOption { + type = lib.types.int; default = 236565; description = '' The team ID associated with the reported computation results. This @@ -42,8 +41,8 @@ in ''; }; - daemonNiceLevel = mkOption { - type = types.ints.between (-20) 19; + daemonNiceLevel = lib.mkOption { + type = lib.types.ints.between (-20) 19; default = 0; description = '' Daemon process priority for FAHClient. @@ -51,8 +50,8 @@ in ''; }; - extraArgs = mkOption { - type = types.listOf types.str; + extraArgs = lib.mkOption { + type = lib.types.listOf lib.types.str; default = []; description = '' Extra startup options for the FAHClient. Run @@ -61,7 +60,7 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.foldingathome = { description = "Folding@home client"; after = [ "network.target" ]; From 7108ded8fe32bd284e156667ef879348f8050bd3 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:56 +0200 Subject: [PATCH 109/236] nixos/services.slurm: remove `with lib;` --- .../services/computing/slurm/slurm.nix | 135 +++++++++--------- 1 file changed, 66 insertions(+), 69 deletions(-) diff --git a/nixos/modules/services/computing/slurm/slurm.nix b/nixos/modules/services/computing/slurm/slurm.nix index 360a72677ce0..f4944d3ce318 100644 --- a/nixos/modules/services/computing/slurm/slurm.nix +++ b/nixos/modules/services/computing/slurm/slurm.nix @@ -1,7 +1,4 @@ { config, lib, options, pkgs, ... }: - -with lib; - let cfg = config.services.slurm; @@ -15,8 +12,8 @@ let ClusterName=${cfg.clusterName} StateSaveLocation=${cfg.stateSaveLocation} SlurmUser=${cfg.user} - ${optionalString (cfg.controlMachine != null) "controlMachine=${cfg.controlMachine}"} - ${optionalString (cfg.controlAddr != null) "controlAddr=${cfg.controlAddr}"} + ${lib.optionalString (cfg.controlMachine != null) "controlMachine=${cfg.controlMachine}"} + ${lib.optionalString (cfg.controlAddr != null) "controlAddr=${cfg.controlAddr}"} ${toString (map (x: "NodeName=${x}\n") cfg.nodeName)} ${toString (map (x: "PartitionName=${x}\n") cfg.partitionName)} PlugStackConfig=${plugStackConfig}/plugstack.conf @@ -26,7 +23,7 @@ let plugStackConfig = pkgs.writeTextDir "plugstack.conf" '' - ${optionalString cfg.enableSrunX11 "optional ${pkgs.slurm-spank-x11}/lib/x11.so"} + ${lib.optionalString cfg.enableSrunX11 "optional ${pkgs.slurm-spank-x11}/lib/x11.so"} ${cfg.extraPlugstackConfig} ''; @@ -56,15 +53,15 @@ in ###### interface - meta.maintainers = [ maintainers.markuskowa ]; + meta.maintainers = [ lib.maintainers.markuskowa ]; options = { services.slurm = { server = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to enable the slurm control daemon. @@ -76,29 +73,29 @@ in }; dbdserver = { - enable = mkEnableOption "SlurmDBD service"; + enable = lib.mkEnableOption "SlurmDBD service"; - dbdHost = mkOption { - type = types.str; + dbdHost = lib.mkOption { + type = lib.types.str; default = config.networking.hostName; - defaultText = literalExpression "config.networking.hostName"; + defaultText = lib.literalExpression "config.networking.hostName"; description = '' Hostname of the machine where `slurmdbd` is running (i.e. name returned by `hostname -s`). ''; }; - storageUser = mkOption { - type = types.str; + storageUser = lib.mkOption { + type = lib.types.str; default = cfg.user; - defaultText = literalExpression "config.${opt.user}"; + defaultText = lib.literalExpression "config.${opt.user}"; description = '' Database user name. ''; }; - storagePassFile = mkOption { - type = with types; nullOr str; + storagePassFile = lib.mkOption { + type = with lib.types; nullOr str; default = null; description = '' Path to file with database password. The content of this will be used to @@ -106,8 +103,8 @@ in ''; }; - extraConfig = mkOption { - type = types.lines; + extraConfig = lib.mkOption { + type = lib.types.lines; default = ""; description = '' Extra configuration for `slurmdbd.conf` See also: @@ -117,11 +114,11 @@ in }; client = { - enable = mkEnableOption "slurm client daemon"; + enable = lib.mkEnableOption "slurm client daemon"; }; - enableStools = mkOption { - type = types.bool; + enableStools = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to provide a slurm.conf file. @@ -131,14 +128,14 @@ in ''; }; - package = mkPackageOption pkgs "slurm" { + package = lib.mkPackageOption pkgs "slurm" { example = "slurm-full"; } // { default = pkgs.slurm.override { enableX11 = ! cfg.enableSrunX11; }; }; - controlMachine = mkOption { - type = types.nullOr types.str; + controlMachine = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; example = null; description = '' @@ -148,10 +145,10 @@ in ''; }; - controlAddr = mkOption { - type = types.nullOr types.str; + controlAddr = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = cfg.controlMachine; - defaultText = literalExpression "config.${opt.controlMachine}"; + defaultText = lib.literalExpression "config.${opt.controlMachine}"; example = null; description = '' Name that ControlMachine should be referred to in establishing a @@ -159,8 +156,8 @@ in ''; }; - clusterName = mkOption { - type = types.str; + clusterName = lib.mkOption { + type = lib.types.str; default = "default"; example = "myCluster"; description = '' @@ -168,10 +165,10 @@ in ''; }; - nodeName = mkOption { - type = types.listOf types.str; + nodeName = lib.mkOption { + type = lib.types.listOf lib.types.str; default = []; - example = literalExpression ''[ "linux[1-32] CPUs=1 State=UNKNOWN" ];''; + example = lib.literalExpression ''[ "linux[1-32] CPUs=1 State=UNKNOWN" ];''; description = '' Name that SLURM uses to refer to a node (or base partition for BlueGene systems). Typically this would be the string that "/bin/hostname -s" @@ -179,19 +176,19 @@ in ''; }; - partitionName = mkOption { - type = types.listOf types.str; + partitionName = lib.mkOption { + type = lib.types.listOf lib.types.str; default = []; - example = literalExpression ''[ "debug Nodes=linux[1-32] Default=YES MaxTime=INFINITE State=UP" ];''; + example = lib.literalExpression ''[ "debug Nodes=linux[1-32] Default=YES MaxTime=INFINITE State=UP" ];''; description = '' Name by which the partition may be referenced. Note that now you have to write the partition's parameters after the name. ''; }; - enableSrunX11 = mkOption { + enableSrunX11 = lib.mkOption { default = false; - type = types.bool; + type = lib.types.bool; description = '' If enabled srun will accept the option "--x11" to allow for X11 forwarding from within an interactive session or a batch job. This activates the @@ -207,8 +204,8 @@ in ''; }; - procTrackType = mkOption { - type = types.str; + procTrackType = lib.mkOption { + type = lib.types.str; default = "proctrack/linuxproc"; description = '' Plugin to be used for process tracking on a job step basis. @@ -217,16 +214,16 @@ in ''; }; - stateSaveLocation = mkOption { - type = types.str; + stateSaveLocation = lib.mkOption { + type = lib.types.str; default = "/var/spool/slurmctld"; description = '' Directory into which the Slurm controller, slurmctld, saves its state. ''; }; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = defaultUser; description = '' Set this option when you want to run the slurmctld daemon @@ -236,34 +233,34 @@ in ''; }; - extraConfig = mkOption { + extraConfig = lib.mkOption { default = ""; - type = types.lines; + type = lib.types.lines; description = '' Extra configuration options that will be added verbatim at the end of the slurm configuration file. ''; }; - extraPlugstackConfig = mkOption { + extraPlugstackConfig = lib.mkOption { default = ""; - type = types.lines; + type = lib.types.lines; description = '' Extra configuration that will be added to the end of `plugstack.conf`. ''; }; - extraCgroupConfig = mkOption { + extraCgroupConfig = lib.mkOption { default = ""; - type = types.lines; + type = lib.types.lines; description = '' Extra configuration for `cgroup.conf`. This file is used when `procTrackType=proctrack/cgroup`. ''; }; - extraConfigPaths = mkOption { - type = with types; listOf path; + extraConfigPaths = lib.mkOption { + type = with lib.types; listOf path; default = []; description = '' Slurm expects config files for plugins in the same path @@ -273,11 +270,11 @@ in ''; }; - etcSlurm = mkOption { - type = types.path; + etcSlurm = lib.mkOption { + type = lib.types.path; internal = true; default = etcSlurm; - defaultText = literalMD '' + defaultText = lib.literalMD '' Directory created from generated config files and `config.${opt.extraConfigPaths}`. ''; @@ -292,11 +289,11 @@ in }; imports = [ - (mkRemovedOptionModule [ "services" "slurm" "dbdserver" "storagePass" ] '' + (lib.mkRemovedOptionModule [ "services" "slurm" "dbdserver" "storagePass" ] '' This option has been removed so that the database password is not exposed via the nix store. Use services.slurm.dbdserver.storagePassFile to provide the database password. '') - (mkRemovedOptionModule [ "services" "slurm" "dbdserver" "configFile" ] '' + (lib.mkRemovedOptionModule [ "services" "slurm" "dbdserver" "configFile" ] '' This option has been removed. Use services.slurm.dbdserver.storagePassFile and services.slurm.dbdserver.extraConfig instead. '') @@ -312,7 +309,7 @@ in builder = pkgs.writeText "builder.sh" '' source $stdenv/setup mkdir -p $out/bin - find ${getBin cfg.package}/bin -type f -executable | while read EXE + find ${lib.getBin cfg.package}/bin -type f -executable | while read EXE do exename="$(basename $EXE)" wrappername="$out/bin/$exename" @@ -329,21 +326,21 @@ in done mkdir -p $out/share - ln -s ${getBin cfg.package}/share/man $out/share/man + ln -s ${lib.getBin cfg.package}/share/man $out/share/man ''; }; - in mkIf ( cfg.enableStools || + in lib.mkIf ( cfg.enableStools || cfg.client.enable || cfg.server.enable || cfg.dbdserver.enable ) { environment.systemPackages = [ wrappedSlurm ]; - services.munge.enable = mkDefault true; + services.munge.enable = lib.mkDefault true; # use a static uid as default to ensure it is the same on all nodes - users.users.slurm = mkIf (cfg.user == defaultUser) { + users.users.slurm = lib.mkIf (cfg.user == defaultUser) { name = defaultUser; group = "slurm"; uid = config.ids.uids.slurm; @@ -351,7 +348,7 @@ in users.groups.slurm.gid = config.ids.uids.slurm; - systemd.services.slurmd = mkIf (cfg.client.enable) { + systemd.services.slurmd = lib.mkIf (cfg.client.enable) { path = with pkgs; [ wrappedSlurm coreutils ] ++ lib.optional cfg.enableSrunX11 slurm-spank-x11; @@ -375,13 +372,13 @@ in }; }; - systemd.tmpfiles.rules = mkIf cfg.client.enable [ + systemd.tmpfiles.rules = lib.mkIf cfg.client.enable [ "d /var/spool/slurmd 755 root root -" ]; - services.openssh.settings.X11Forwarding = mkIf cfg.client.enable (mkDefault true); + services.openssh.settings.X11Forwarding = lib.mkIf cfg.client.enable (lib.mkDefault true); - systemd.services.slurmctld = mkIf (cfg.server.enable) { + systemd.services.slurmctld = lib.mkIf (cfg.server.enable) { path = with pkgs; [ wrappedSlurm munge coreutils ] ++ lib.optional cfg.enableSrunX11 slurm-spank-x11; @@ -405,7 +402,7 @@ in systemd.services.slurmdbd = let # slurm strips the last component off the path configPath = "$RUNTIME_DIRECTORY/slurmdbd.conf"; - in mkIf (cfg.dbdserver.enable) { + in lib.mkIf (cfg.dbdserver.enable) { path = with pkgs; [ wrappedSlurm munge coreutils ]; wantedBy = [ "multi-user.target" ]; @@ -414,7 +411,7 @@ in preStart = '' install -m 600 -o ${cfg.user} -T ${slurmdbdConf} ${configPath} - ${optionalString (cfg.dbdserver.storagePassFile != null) '' + ${lib.optionalString (cfg.dbdserver.storagePassFile != null) '' echo "StoragePass=$(cat ${cfg.dbdserver.storagePassFile})" \ >> ${configPath} ''} From 5b4982c0e0cff26276443c334024a9601422c8c8 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:56 +0200 Subject: [PATCH 110/236] nixos/services.torque.mom: remove `with lib;` --- nixos/modules/services/computing/torque/mom.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/nixos/modules/services/computing/torque/mom.nix b/nixos/modules/services/computing/torque/mom.nix index 6747bd4b0d5a..8bc5fc134fcb 100644 --- a/nixos/modules/services/computing/torque/mom.nix +++ b/nixos/modules/services/computing/torque/mom.nix @@ -1,7 +1,4 @@ { config, pkgs, lib, ... }: - -with lib; - let cfg = config.services.torque.mom; @@ -17,10 +14,10 @@ in options = { services.torque.mom = { - enable = mkEnableOption "torque computing node"; + enable = lib.mkEnableOption "torque computing node"; - serverNode = mkOption { - type = types.str; + serverNode = lib.mkOption { + type = lib.types.str; description = "Hostname running pbs server."; }; @@ -28,7 +25,7 @@ in }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.systemPackages = [ pkgs.torque ]; systemd.services.torque-mom-init = { From 2dc19bf4e0d33c08cb92561ed1ee94602f5d901a Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:57 +0200 Subject: [PATCH 111/236] nixos/services.torque.server: remove `with lib;` --- nixos/modules/services/computing/torque/server.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/computing/torque/server.nix b/nixos/modules/services/computing/torque/server.nix index 8d923fc04d46..27be2c65b7e0 100644 --- a/nixos/modules/services/computing/torque/server.nix +++ b/nixos/modules/services/computing/torque/server.nix @@ -1,7 +1,4 @@ { config, pkgs, lib, ... }: - -with lib; - let cfg = config.services.torque.server; torque = pkgs.torque; @@ -11,13 +8,13 @@ in services.torque.server = { - enable = mkEnableOption "torque server"; + enable = lib.mkEnableOption "torque server"; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.systemPackages = [ pkgs.torque ]; systemd.services.torque-server-init = { From d43e1678e71e6627d1e62e1203b2e02314ab8ef1 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:57 +0200 Subject: [PATCH 112/236] nixos/services.buildbot-master: remove `with lib;` --- .../buildbot/master.nix | 150 +++++++++--------- 1 file changed, 73 insertions(+), 77 deletions(-) diff --git a/nixos/modules/services/continuous-integration/buildbot/master.nix b/nixos/modules/services/continuous-integration/buildbot/master.nix index a4a9eee672cf..d744b73bf158 100644 --- a/nixos/modules/services/continuous-integration/buildbot/master.nix +++ b/nixos/modules/services/continuous-integration/buildbot/master.nix @@ -1,9 +1,5 @@ # NixOS module for Buildbot continuous integration server. - { config, lib, options, pkgs, ... }: - -with lib; - let cfg = config.services.buildbot-master; opt = options.services.buildbot-master; @@ -11,27 +7,27 @@ let package = pkgs.python3.pkgs.toPythonModule cfg.package; python = package.pythonModule; - escapeStr = escape [ "'" ]; + escapeStr = lib.escape [ "'" ]; defaultMasterCfg = pkgs.writeText "master.cfg" '' from buildbot.plugins import * ${cfg.extraImports} factory = util.BuildFactory() c = BuildmasterConfig = dict( - workers = [${concatStringsSep "," cfg.workers}], + workers = [${lib.concatStringsSep "," cfg.workers}], protocols = { 'pb': {'port': ${toString cfg.pbPort} } }, - title = '${escapeStr cfg.title}', - titleURL = '${escapeStr cfg.titleUrl}', - buildbotURL = '${escapeStr cfg.buildbotUrl}', - db = dict(db_url='${escapeStr cfg.dbUrl}'), + title = '${lib.escapeStr cfg.title}', + titleURL = '${lib.escapeStr cfg.titleUrl}', + buildbotURL = '${lib.escapeStr cfg.buildbotUrl}', + db = dict(db_url='${lib.escapeStr cfg.dbUrl}'), www = dict(port=${toString cfg.port}), - change_source = [ ${concatStringsSep "," cfg.changeSource} ], - schedulers = [ ${concatStringsSep "," cfg.schedulers} ], - builders = [ ${concatStringsSep "," cfg.builders} ], - services = [ ${concatStringsSep "," cfg.reporters} ], - configurators = [ ${concatStringsSep "," cfg.configurators} ], + change_source = [ ${lib.concatStringsSep "," cfg.changeSource} ], + schedulers = [ ${lib.concatStringsSep "," cfg.schedulers} ], + builders = [ ${lib.concatStringsSep "," cfg.builders} ], + services = [ ${lib.concatStringsSep "," cfg.reporters} ], + configurators = [ ${lib.concatStringsSep "," cfg.configurators} ], ) - for step in [ ${concatStringsSep "," cfg.factorySteps} ]: + for step in [ ${lib.concatStringsSep "," cfg.factorySteps} ]: factory.addStep(step) ${cfg.extraConfig} @@ -62,8 +58,8 @@ in { options = { services.buildbot-master = { - factorySteps = mkOption { - type = types.listOf types.str; + factorySteps = lib.mkOption { + type = lib.types.listOf lib.types.str; description = "Factory Steps"; default = []; example = [ @@ -72,8 +68,8 @@ in { ]; }; - changeSource = mkOption { - type = types.listOf types.str; + changeSource = lib.mkOption { + type = lib.types.listOf lib.types.str; description = "List of Change Sources."; default = []; example = [ @@ -81,8 +77,8 @@ in { ]; }; - configurators = mkOption { - type = types.listOf types.str; + configurators = lib.mkOption { + type = lib.types.listOf lib.types.str; description = "Configurator Steps, see https://docs.buildbot.net/latest/manual/configuration/configurators.html"; default = []; example = [ @@ -90,35 +86,35 @@ in { ]; }; - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = "Whether to enable the Buildbot continuous integration server."; }; - extraConfig = mkOption { - type = types.str; + extraConfig = lib.mkOption { + type = lib.types.str; description = "Extra configuration to append to master.cfg"; default = "c['buildbotNetUsageData'] = None"; }; - extraImports = mkOption { - type = types.str; + extraImports = lib.mkOption { + type = lib.types.str; description = "Extra python imports to prepend to master.cfg"; default = ""; example = "from buildbot.process.project import Project"; }; - masterCfg = mkOption { - type = types.path; + masterCfg = lib.mkOption { + type = lib.types.path; description = "Optionally pass master.cfg path. Other options in this configuration will be ignored."; default = defaultMasterCfg; - defaultText = literalMD ''generated configuration file''; + defaultText = lib.literalMD ''generated configuration file''; example = "/etc/nixos/buildbot/master.cfg"; }; - schedulers = mkOption { - type = types.listOf types.str; + schedulers = lib.mkOption { + type = lib.types.listOf lib.types.str; description = "List of Schedulers."; default = [ "schedulers.SingleBranchScheduler(name='all', change_filter=util.ChangeFilter(branch='master'), treeStableTimer=None, builderNames=['runtests'])" @@ -126,60 +122,60 @@ in { ]; }; - builders = mkOption { - type = types.listOf types.str; + builders = lib.mkOption { + type = lib.types.listOf lib.types.str; description = "List of Builders."; default = [ "util.BuilderConfig(name='runtests',workernames=['example-worker'],factory=factory)" ]; }; - workers = mkOption { - type = types.listOf types.str; + workers = lib.mkOption { + type = lib.types.listOf lib.types.str; description = "List of Workers."; default = [ "worker.Worker('example-worker', 'pass')" ]; }; - reporters = mkOption { + reporters = lib.mkOption { default = []; - type = types.listOf types.str; + type = lib.types.listOf lib.types.str; description = "List of reporter objects used to present build status to various users."; }; - user = mkOption { + user = lib.mkOption { default = "buildbot"; - type = types.str; + type = lib.types.str; description = "User the buildbot server should execute under."; }; - group = mkOption { + group = lib.mkOption { default = "buildbot"; - type = types.str; + type = lib.types.str; description = "Primary group of buildbot user."; }; - extraGroups = mkOption { - type = types.listOf types.str; + extraGroups = lib.mkOption { + type = lib.types.listOf lib.types.str; default = []; description = "List of extra groups that the buildbot user should be a part of."; }; - home = mkOption { + home = lib.mkOption { default = "/home/buildbot"; - type = types.path; + type = lib.types.path; description = "Buildbot home directory."; }; - buildbotDir = mkOption { + buildbotDir = lib.mkOption { default = "${cfg.home}/master"; - defaultText = literalExpression ''"''${config.${opt.home}}/master"''; - type = types.path; + defaultText = lib.literalExpression ''"''${config.${opt.home}}/master"''; + type = lib.types.path; description = "Specifies the Buildbot directory."; }; - pbPort = mkOption { + pbPort = lib.mkOption { default = 9989; - type = types.either types.str types.int; + type = lib.types.either lib.types.str lib.types.int; example = "'tcp:9990:interface=127.0.0.1'"; description = '' The buildmaster will listen on a TCP port of your choosing @@ -193,69 +189,69 @@ in { ''; }; - listenAddress = mkOption { + listenAddress = lib.mkOption { default = "0.0.0.0"; - type = types.str; + type = lib.types.str; description = "Specifies the bind address on which the buildbot HTTP interface listens."; }; - buildbotUrl = mkOption { + buildbotUrl = lib.mkOption { default = "http://localhost:8010/"; - type = types.str; + type = lib.types.str; description = "Specifies the Buildbot URL."; }; - title = mkOption { + title = lib.mkOption { default = "Buildbot"; - type = types.str; + type = lib.types.str; description = "Specifies the Buildbot Title."; }; - titleUrl = mkOption { + titleUrl = lib.mkOption { default = "Buildbot"; - type = types.str; + type = lib.types.str; description = "Specifies the Buildbot TitleURL."; }; - dbUrl = mkOption { + dbUrl = lib.mkOption { default = "sqlite:///state.sqlite"; - type = types.str; + type = lib.types.str; description = "Specifies the database connection string."; }; - port = mkOption { + port = lib.mkOption { default = 8010; - type = types.port; + type = lib.types.port; description = "Specifies port number on which the buildbot HTTP interface listens."; }; - package = mkPackageOption pkgs "buildbot-full" { + package = lib.mkPackageOption pkgs "buildbot-full" { example = "buildbot"; }; - packages = mkOption { + packages = lib.mkOption { default = [ pkgs.git ]; - defaultText = literalExpression "[ pkgs.git ]"; - type = types.listOf types.package; + defaultText = lib.literalExpression "[ pkgs.git ]"; + type = lib.types.listOf lib.types.package; description = "Packages to add to PATH for the buildbot process."; }; - pythonPackages = mkOption { - type = types.functionTo (types.listOf types.package); + pythonPackages = lib.mkOption { + type = lib.types.functionTo (lib.types.listOf lib.types.package); default = pythonPackages: with pythonPackages; [ ]; - defaultText = literalExpression "pythonPackages: with pythonPackages; [ ]"; + defaultText = lib.literalExpression "pythonPackages: with pythonPackages; [ ]"; description = "Packages to add the to the PYTHONPATH of the buildbot process."; - example = literalExpression "pythonPackages: with pythonPackages; [ requests ]"; + example = lib.literalExpression "pythonPackages: with pythonPackages; [ requests ]"; }; }; }; - config = mkIf cfg.enable { - users.groups = optionalAttrs (cfg.group == "buildbot") { + config = lib.mkIf cfg.enable { + users.groups = lib.optionalAttrs (cfg.group == "buildbot") { buildbot = { }; }; - users.users = optionalAttrs (cfg.user == "buildbot") { + users.users = lib.optionalAttrs (cfg.user == "buildbot") { buildbot = { description = "Buildbot User."; isNormalUser = true; @@ -298,8 +294,8 @@ in { }; imports = [ - (mkRenamedOptionModule [ "services" "buildbot-master" "bpPort" ] [ "services" "buildbot-master" "pbPort" ]) - (mkRemovedOptionModule [ "services" "buildbot-master" "status" ] '' + (lib.mkRenamedOptionModule [ "services" "buildbot-master" "bpPort" ] [ "services" "buildbot-master" "pbPort" ]) + (lib.mkRemovedOptionModule [ "services" "buildbot-master" "status" ] '' Since Buildbot 0.9.0, status targets are deprecated and ignored. Review your configuration and migrate to reporters (available at services.buildbot-master.reporters). '') From 7d32787294f6122045e90927b804bc6cd6d3693e Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:57 +0200 Subject: [PATCH 113/236] nixos/services.etcd: remove `with lib;` --- nixos/modules/services/databases/etcd.nix | 123 +++++++++++----------- 1 file changed, 60 insertions(+), 63 deletions(-) diff --git a/nixos/modules/services/databases/etcd.nix b/nixos/modules/services/databases/etcd.nix index ebc905ad08f6..b10fdb801c50 100644 --- a/nixos/modules/services/databases/etcd.nix +++ b/nixos/modules/services/databases/etcd.nix @@ -1,7 +1,4 @@ { config, lib, options, pkgs, ... }: - -with lib; - let cfg = config.services.etcd; opt = options.services.etcd; @@ -9,98 +6,98 @@ let in { options.services.etcd = { - enable = mkOption { + enable = lib.mkOption { description = "Whether to enable etcd."; default = false; - type = types.bool; + type = lib.types.bool; }; - package = mkPackageOption pkgs "etcd" { }; + package = lib.mkPackageOption pkgs "etcd" { }; - name = mkOption { + name = lib.mkOption { description = "Etcd unique node name."; default = config.networking.hostName; - defaultText = literalExpression "config.networking.hostName"; - type = types.str; + defaultText = lib.literalExpression "config.networking.hostName"; + type = lib.types.str; }; - advertiseClientUrls = mkOption { + advertiseClientUrls = lib.mkOption { description = "Etcd list of this member's client URLs to advertise to the rest of the cluster."; default = cfg.listenClientUrls; - defaultText = literalExpression "config.${opt.listenClientUrls}"; - type = types.listOf types.str; + defaultText = lib.literalExpression "config.${opt.listenClientUrls}"; + type = lib.types.listOf lib.types.str; }; - listenClientUrls = mkOption { + listenClientUrls = lib.mkOption { description = "Etcd list of URLs to listen on for client traffic."; default = ["http://127.0.0.1:2379"]; - type = types.listOf types.str; + type = lib.types.listOf lib.types.str; }; - listenPeerUrls = mkOption { + listenPeerUrls = lib.mkOption { description = "Etcd list of URLs to listen on for peer traffic."; default = ["http://127.0.0.1:2380"]; - type = types.listOf types.str; + type = lib.types.listOf lib.types.str; }; - initialAdvertisePeerUrls = mkOption { + initialAdvertisePeerUrls = lib.mkOption { description = "Etcd list of this member's peer URLs to advertise to rest of the cluster."; default = cfg.listenPeerUrls; - defaultText = literalExpression "config.${opt.listenPeerUrls}"; - type = types.listOf types.str; + defaultText = lib.literalExpression "config.${opt.listenPeerUrls}"; + type = lib.types.listOf lib.types.str; }; - initialCluster = mkOption { + initialCluster = lib.mkOption { description = "Etcd initial cluster configuration for bootstrapping."; default = ["${cfg.name}=http://127.0.0.1:2380"]; - defaultText = literalExpression ''["''${config.${opt.name}}=http://127.0.0.1:2380"]''; - type = types.listOf types.str; + defaultText = lib.literalExpression ''["''${config.${opt.name}}=http://127.0.0.1:2380"]''; + type = lib.types.listOf lib.types.str; }; - initialClusterState = mkOption { + initialClusterState = lib.mkOption { description = "Etcd initial cluster configuration for bootstrapping."; default = "new"; - type = types.enum ["new" "existing"]; + type = lib.types.enum ["new" "existing"]; }; - initialClusterToken = mkOption { + initialClusterToken = lib.mkOption { description = "Etcd initial cluster token for etcd cluster during bootstrap."; default = "etcd-cluster"; - type = types.str; + type = lib.types.str; }; - discovery = mkOption { + discovery = lib.mkOption { description = "Etcd discovery url"; default = ""; - type = types.str; + type = lib.types.str; }; - clientCertAuth = mkOption { + clientCertAuth = lib.mkOption { description = "Whether to use certs for client authentication"; default = false; - type = types.bool; + type = lib.types.bool; }; - trustedCaFile = mkOption { + trustedCaFile = lib.mkOption { description = "Certificate authority file to use for clients"; default = null; - type = types.nullOr types.path; + type = lib.types.nullOr lib.types.path; }; - certFile = mkOption { + certFile = lib.mkOption { description = "Cert file to use for clients"; default = null; - type = types.nullOr types.path; + type = lib.types.nullOr lib.types.path; }; - keyFile = mkOption { + keyFile = lib.mkOption { description = "Key file to use for clients"; default = null; - type = types.nullOr types.path; + type = lib.types.nullOr lib.types.path; }; - openFirewall = mkOption { - type = types.bool; + openFirewall = lib.mkOption { + type = lib.types.bool; default = false; description = '' Open etcd ports in the firewall. @@ -110,41 +107,41 @@ in { ''; }; - peerCertFile = mkOption { + peerCertFile = lib.mkOption { description = "Cert file to use for peer to peer communication"; default = cfg.certFile; - defaultText = literalExpression "config.${opt.certFile}"; - type = types.nullOr types.path; + defaultText = lib.literalExpression "config.${opt.certFile}"; + type = lib.types.nullOr lib.types.path; }; - peerKeyFile = mkOption { + peerKeyFile = lib.mkOption { description = "Key file to use for peer to peer communication"; default = cfg.keyFile; - defaultText = literalExpression "config.${opt.keyFile}"; - type = types.nullOr types.path; + defaultText = lib.literalExpression "config.${opt.keyFile}"; + type = lib.types.nullOr lib.types.path; }; - peerTrustedCaFile = mkOption { + peerTrustedCaFile = lib.mkOption { description = "Certificate authority file to use for peer to peer communication"; default = cfg.trustedCaFile; - defaultText = literalExpression "config.${opt.trustedCaFile}"; - type = types.nullOr types.path; + defaultText = lib.literalExpression "config.${opt.trustedCaFile}"; + type = lib.types.nullOr lib.types.path; }; - peerClientCertAuth = mkOption { + peerClientCertAuth = lib.mkOption { description = "Whether to check all incoming peer requests from the cluster for valid client certificates signed by the supplied CA"; default = false; - type = types.bool; + type = lib.types.bool; }; - extraConf = mkOption { + extraConf = lib.mkOption { description = '' Etcd extra configuration. See ''; - type = types.attrsOf types.str; + type = lib.types.attrsOf lib.types.str; default = {}; - example = literalExpression '' + example = lib.literalExpression '' { "CORS" = "*"; "NAME" = "default-name"; @@ -155,14 +152,14 @@ in { ''; }; - dataDir = mkOption { - type = types.path; + dataDir = lib.mkOption { + type = lib.types.path; default = "/var/lib/etcd"; description = "Etcd data directory."; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.tmpfiles.settings."10-etcd".${cfg.dataDir}.d = { user = "etcd"; mode = "0700"; @@ -176,14 +173,14 @@ in { wants = [ "network-online.target" ] ++ lib.optional config.networking.firewall.enable "firewall.service"; - environment = (filterAttrs (n: v: v != null) { + environment = (lib.filterAttrs (n: v: v != null) { ETCD_NAME = cfg.name; ETCD_DISCOVERY = cfg.discovery; ETCD_DATA_DIR = cfg.dataDir; - ETCD_ADVERTISE_CLIENT_URLS = concatStringsSep "," cfg.advertiseClientUrls; - ETCD_LISTEN_CLIENT_URLS = concatStringsSep "," cfg.listenClientUrls; - ETCD_LISTEN_PEER_URLS = concatStringsSep "," cfg.listenPeerUrls; - ETCD_INITIAL_ADVERTISE_PEER_URLS = concatStringsSep "," cfg.initialAdvertisePeerUrls; + ETCD_ADVERTISE_CLIENT_URLS = lib.concatStringsSep "," cfg.advertiseClientUrls; + ETCD_LISTEN_CLIENT_URLS = lib.concatStringsSep "," cfg.listenClientUrls; + ETCD_LISTEN_PEER_URLS = lib.concatStringsSep "," cfg.listenPeerUrls; + ETCD_INITIAL_ADVERTISE_PEER_URLS = lib.concatStringsSep "," cfg.initialAdvertisePeerUrls; ETCD_PEER_CLIENT_CERT_AUTH = toString cfg.peerClientCertAuth; ETCD_PEER_TRUSTED_CA_FILE = cfg.peerTrustedCaFile; ETCD_PEER_CERT_FILE = cfg.peerCertFile; @@ -192,11 +189,11 @@ in { ETCD_TRUSTED_CA_FILE = cfg.trustedCaFile; ETCD_CERT_FILE = cfg.certFile; ETCD_KEY_FILE = cfg.keyFile; - }) // (optionalAttrs (cfg.discovery == ""){ - ETCD_INITIAL_CLUSTER = concatStringsSep "," cfg.initialCluster; + }) // (lib.optionalAttrs (cfg.discovery == ""){ + ETCD_INITIAL_CLUSTER = lib.concatStringsSep "," cfg.initialCluster; ETCD_INITIAL_CLUSTER_STATE = cfg.initialClusterState; ETCD_INITIAL_CLUSTER_TOKEN = cfg.initialClusterToken; - }) // (mapAttrs' (n: v: nameValuePair "ETCD_${n}" v) cfg.extraConf); + }) // (lib.mapAttrs' (n: v: lib.nameValuePair "ETCD_${n}" v) cfg.extraConf); unitConfig = { Documentation = "https://github.com/coreos/etcd"; From 13c9b59247bf5eafb634f8243c991268a9f7ee13 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:57 +0200 Subject: [PATCH 114/236] nixos/services.accounts-daemon: remove `with lib;` --- .../services/desktops/accountsservice.nix | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/nixos/modules/services/desktops/accountsservice.nix b/nixos/modules/services/desktops/accountsservice.nix index ae2ecb5ffeb7..4c407ca3828a 100644 --- a/nixos/modules/services/desktops/accountsservice.nix +++ b/nixos/modules/services/desktops/accountsservice.nix @@ -1,23 +1,17 @@ # AccountsService daemon. - { config, lib, pkgs, ... }: - -with lib; - { - meta = { - maintainers = teams.freedesktop.members; + maintainers = lib.teams.freedesktop.members; }; ###### interface - options = { services.accounts-daemon = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to enable AccountsService, a DBus service for accessing @@ -29,10 +23,8 @@ with lib; }; - ###### implementation - - config = mkIf config.services.accounts-daemon.enable { + config = lib.mkIf config.services.accounts-daemon.enable { environment.systemPackages = [ pkgs.accountsservice ]; @@ -43,14 +35,14 @@ with lib; systemd.packages = [ pkgs.accountsservice ]; - systemd.services.accounts-daemon = recursiveUpdate { + systemd.services.accounts-daemon = lib.recursiveUpdate { wantedBy = [ "graphical.target" ]; # Accounts daemon looks for dbus interfaces in $XDG_DATA_DIRS/accountsservice environment.XDG_DATA_DIRS = "${config.system.path}/share"; - } (optionalAttrs (!config.users.mutableUsers) { + } (lib.optionalAttrs (!config.users.mutableUsers) { environment.NIXOS_USERS_PURE = "true"; }); }; From 9faf71229844adea6b24613b27489d5ee1e1b68a Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:57 +0200 Subject: [PATCH 115/236] nixos/services.bamf: remove `with lib;` --- nixos/modules/services/desktops/bamf.nix | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/nixos/modules/services/desktops/bamf.nix b/nixos/modules/services/desktops/bamf.nix index 13de3a44328f..d9c46e94d9e0 100644 --- a/nixos/modules/services/desktops/bamf.nix +++ b/nixos/modules/services/desktops/bamf.nix @@ -1,25 +1,21 @@ # Bamf - { config, lib, pkgs, ... }: - -with lib; - { meta = with lib; { - maintainers = with maintainers; [ ] ++ teams.pantheon.members; + maintainers = with lib.maintainers; [ ] ++ lib.teams.pantheon.members; }; ###### interface options = { services.bamf = { - enable = mkEnableOption "bamf"; + enable = lib.mkEnableOption "bamf"; }; }; ###### implementation - config = mkIf config.services.bamf.enable { + config = lib.mkIf config.services.bamf.enable { services.dbus.packages = [ pkgs.bamf ]; systemd.packages = [ pkgs.bamf ]; From 4b4b2cca1b2fff884949e66dd7ec76032b0e89d3 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:57 +0200 Subject: [PATCH 116/236] nixos/services.rspamd-trainer: remove `with lib;` --- nixos/modules/services/mail/rspamd-trainer.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/nixos/modules/services/mail/rspamd-trainer.nix b/nixos/modules/services/mail/rspamd-trainer.nix index 81a0c460f0c3..11c4363cc1d5 100644 --- a/nixos/modules/services/mail/rspamd-trainer.nix +++ b/nixos/modules/services/mail/rspamd-trainer.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.rspamd-trainer; @@ -10,18 +7,18 @@ let in { options.services.rspamd-trainer = { - enable = mkEnableOption "Spam/ham trainer for rspamd"; + enable = lib.mkEnableOption "Spam/ham trainer for rspamd"; - settings = mkOption { + settings = lib.mkOption { default = { }; description = '' IMAP authentication configuration for rspamd-trainer. For supplying the IMAP password, use the `secrets` option. ''; - type = types.submodule { + type = lib.types.submodule { freeformType = format.type; }; - example = literalExpression '' + example = lib.literalExpression '' { HOST = "localhost"; USERNAME = "spam@example.com"; @@ -31,7 +28,7 @@ in { }; secrets = lib.mkOption { - type = with types; listOf path; + type = with lib.types; listOf path; description = '' A list of files containing the various secrets. Should be in the format expected by systemd's `EnvironmentFile` directory. For the @@ -42,7 +39,7 @@ in { }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd = { services.rspamd-trainer = { From a19107dd8a14bc20a905329c2eaf3c7f6f5d3505 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:57 +0200 Subject: [PATCH 117/236] nixos/services.rss2email: remove `with lib;` --- nixos/modules/services/mail/rss2email.nix | 35 +++++++++++------------ 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/nixos/modules/services/mail/rss2email.nix b/nixos/modules/services/mail/rss2email.nix index c3327f7b436c..12553b9d8919 100644 --- a/nixos/modules/services/mail/rss2email.nix +++ b/nixos/modules/services/mail/rss2email.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.rss2email; in { @@ -12,25 +9,25 @@ in { services.rss2email = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = "Whether to enable rss2email."; }; - to = mkOption { - type = types.str; + to = lib.mkOption { + type = lib.types.str; description = "Mail address to which to send emails"; }; - interval = mkOption { - type = types.str; + interval = lib.mkOption { + type = lib.types.str; default = "12h"; description = "How often to check the feeds, in systemd interval format"; }; - config = mkOption { - type = with types; attrsOf (oneOf [ str int bool ]); + config = lib.mkOption { + type = with lib.types; attrsOf (oneOf [ str int bool ]); default = {}; description = '' The configuration to give rss2email. @@ -48,17 +45,17 @@ in { ''; }; - feeds = mkOption { + feeds = lib.mkOption { description = "The feeds to watch."; - type = types.attrsOf (types.submodule { + type = lib.types.attrsOf (lib.types.submodule { options = { - url = mkOption { - type = types.str; + url = lib.mkOption { + type = lib.types.str; description = "The URL at which to fetch the feed."; }; - to = mkOption { - type = with types; nullOr str; + to = lib.mkOption { + type = with lib.types; nullOr str; default = null; description = '' Email address to which to send feed items. @@ -78,7 +75,7 @@ in { ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.groups = { rss2email.gid = config.ids.gids.rss2email; }; @@ -104,7 +101,7 @@ in { systemd.services.rss2email = let conf = pkgs.writeText "rss2email.cfg" (lib.generators.toINI {} ({ DEFAULT = cfg.config; - } // lib.mapAttrs' (name: feed: nameValuePair "feed.${name}" ( + } // lib.mapAttrs' (name: feed: lib.nameValuePair "feed.${name}" ( { inherit (feed) url; } // lib.optionalAttrs (feed.to != null) { inherit (feed) to; } )) cfg.feeds From 691cc4462a6783c553956eb15730f7fb97967246 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:58 +0200 Subject: [PATCH 118/236] nixos/services.gitolite: remove `with lib;` --- nixos/modules/services/misc/gitolite.nix | 57 +++++++++++------------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/nixos/modules/services/misc/gitolite.nix b/nixos/modules/services/misc/gitolite.nix index 89f72c046755..779a9ac9929d 100644 --- a/nixos/modules/services/misc/gitolite.nix +++ b/nixos/modules/services/misc/gitolite.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.gitolite; # Use writeTextDir to not leak Nix store hash into file name @@ -11,8 +8,8 @@ in { options = { services.gitolite = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Enable gitolite management under the @@ -22,8 +19,8 @@ in ''; }; - dataDir = mkOption { - type = types.str; + dataDir = lib.mkOption { + type = lib.types.str; default = "/var/lib/gitolite"; description = '' The gitolite home directory used to store all repositories. If left as the default value @@ -33,8 +30,8 @@ in ''; }; - adminPubkey = mkOption { - type = types.str; + adminPubkey = lib.mkOption { + type = lib.types.str; description = '' Initial administrative public key for Gitolite. This should be an SSH Public Key. Note that this key will only be used @@ -43,8 +40,8 @@ in ''; }; - enableGitAnnex = mkOption { - type = types.bool; + enableGitAnnex = lib.mkOption { + type = lib.types.bool; default = false; description = '' Enable git-annex support. Uses the `extraGitoliteRc` option @@ -52,18 +49,18 @@ in ''; }; - commonHooks = mkOption { - type = types.listOf types.path; + commonHooks = lib.mkOption { + type = lib.types.listOf lib.types.path; default = []; description = '' A list of custom git hooks that get copied to `~/.gitolite/hooks/common`. ''; }; - extraGitoliteRc = mkOption { - type = types.lines; + extraGitoliteRc = lib.mkOption { + type = lib.types.lines; default = ""; - example = literalExpression '' + example = lib.literalExpression '' ''' $RC{UMASK} = 0027; $RC{SITE_INFO} = 'This is our private repository host'; @@ -93,24 +90,24 @@ in ''; }; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = "gitolite"; description = '' Gitolite user account. This is the username of the gitolite endpoint. ''; }; - description = mkOption { - type = types.str; + description = lib.mkOption { + type = lib.types.str; default = "Gitolite user"; description = '' Gitolite user account's description. ''; }; - group = mkOption { - type = types.str; + group = lib.mkOption { + type = lib.types.str; default = "gitolite"; description = '' Primary group of the Gitolite user account. @@ -119,7 +116,7 @@ in }; }; - config = mkIf cfg.enable ( + config = lib.mkIf cfg.enable ( let manageGitoliteRc = cfg.extraGitoliteRc != ""; rcDir = pkgs.runCommand "gitolite-rc" { preferLocalBuild = true; } rcDirScript; @@ -136,18 +133,18 @@ in END cat "$out/gitolite.rc.default" >>"$out/gitolite.rc" '' + - optionalString (cfg.extraGitoliteRc != "") '' - echo -n ${escapeShellArg '' + lib.optionalString (cfg.extraGitoliteRc != "") '' + echo -n ${lib.escapeShellArg '' # Added by NixOS: - ${removeSuffix "\n" cfg.extraGitoliteRc} + ${lib.removeSuffix "\n" cfg.extraGitoliteRc} # per perl rules, this should be the last line in such a file: 1; ''} >>"$out/gitolite.rc" ''; in { - services.gitolite.extraGitoliteRc = optionalString cfg.enableGitAnnex '' + services.gitolite.extraGitoliteRc = lib.optionalString cfg.enableGitAnnex '' # Enable git-annex support: push( @{$RC{ENABLE}}, 'git-annex-shell ua'); ''; @@ -171,8 +168,8 @@ in GITOLITE_RC_DEFAULT = "${rcDir}/gitolite.rc.default"; }; - serviceConfig = mkMerge [ - (mkIf (cfg.dataDir == "/var/lib/gitolite") { + serviceConfig = lib.mkMerge [ + (lib.mkIf (cfg.dataDir == "/var/lib/gitolite") { StateDirectory = "gitolite gitolite/.gitolite gitolite/.gitolite/logs"; StateDirectoryMode = "0750"; }) @@ -236,6 +233,6 @@ in }; environment.systemPackages = [ pkgs.gitolite pkgs.git ] - ++ optional cfg.enableGitAnnex pkgs.git-annex; + ++ lib.optional cfg.enableGitAnnex pkgs.git-annex; }); } From d70aff48047ecf5743cbb5bbc2eab06cfafe7834 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:58 +0200 Subject: [PATCH 119/236] nixos/services.gogs: remove `with lib;` --- nixos/modules/services/misc/gogs.nix | 103 +++++++++++++-------------- 1 file changed, 50 insertions(+), 53 deletions(-) diff --git a/nixos/modules/services/misc/gogs.nix b/nixos/modules/services/misc/gogs.nix index e4e23d597237..a2c1ad0779e1 100644 --- a/nixos/modules/services/misc/gogs.nix +++ b/nixos/modules/services/misc/gogs.nix @@ -1,7 +1,4 @@ { config, lib, options, pkgs, ... }: - -with lib; - let cfg = config.services.gogs; opt = options.services.gogs; @@ -29,7 +26,7 @@ let [session] COOKIE_NAME = session - COOKIE_SECURE = ${boolToString cfg.cookieSecure} + COOKIE_SECURE = ${lib.boolToString cfg.cookieSecure} [security] SECRET_KEY = #secretkey# @@ -45,70 +42,70 @@ in { options = { services.gogs = { - enable = mkOption { + enable = lib.mkOption { default = false; - type = types.bool; + type = lib.types.bool; description = "Enable Go Git Service."; }; - useWizard = mkOption { + useWizard = lib.mkOption { default = false; - type = types.bool; + type = lib.types.bool; description = "Do not generate a configuration and use Gogs' installation wizard instead. The first registered user will be administrator."; }; - stateDir = mkOption { + stateDir = lib.mkOption { default = "/var/lib/gogs"; - type = types.str; + type = lib.types.str; description = "Gogs data directory."; }; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = "gogs"; description = "User account under which Gogs runs."; }; - group = mkOption { - type = types.str; + group = lib.mkOption { + type = lib.types.str; default = "gogs"; description = "Group account under which Gogs runs."; }; database = { - type = mkOption { - type = types.enum [ "sqlite3" "mysql" "postgres" ]; + type = lib.mkOption { + type = lib.types.enum [ "sqlite3" "mysql" "postgres" ]; example = "mysql"; default = "sqlite3"; description = "Database engine to use."; }; - host = mkOption { - type = types.str; + host = lib.mkOption { + type = lib.types.str; default = "127.0.0.1"; description = "Database host address."; }; - port = mkOption { - type = types.port; + port = lib.mkOption { + type = lib.types.port; default = 3306; description = "Database host port."; }; - name = mkOption { - type = types.str; + name = lib.mkOption { + type = lib.types.str; default = "gogs"; description = "Database name."; }; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = "gogs"; description = "Database user."; }; - password = mkOption { - type = types.str; + password = lib.mkOption { + type = lib.types.str; default = ""; description = '' The password corresponding to {option}`database.user`. @@ -117,8 +114,8 @@ in ''; }; - passwordFile = mkOption { - type = types.nullOr types.path; + passwordFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; default = null; example = "/run/keys/gogs-dbpassword"; description = '' @@ -127,53 +124,53 @@ in ''; }; - path = mkOption { - type = types.str; + path = lib.mkOption { + type = lib.types.str; default = "${cfg.stateDir}/data/gogs.db"; - defaultText = literalExpression ''"''${config.${opt.stateDir}}/data/gogs.db"''; + defaultText = lib.literalExpression ''"''${config.${opt.stateDir}}/data/gogs.db"''; description = "Path to the sqlite3 database file."; }; }; - appName = mkOption { - type = types.str; + appName = lib.mkOption { + type = lib.types.str; default = "Gogs: Go Git Service"; description = "Application name."; }; - repositoryRoot = mkOption { - type = types.str; + repositoryRoot = lib.mkOption { + type = lib.types.str; default = "${cfg.stateDir}/repositories"; - defaultText = literalExpression ''"''${config.${opt.stateDir}}/repositories"''; + defaultText = lib.literalExpression ''"''${config.${opt.stateDir}}/repositories"''; description = "Path to the git repositories."; }; - domain = mkOption { - type = types.str; + domain = lib.mkOption { + type = lib.types.str; default = "localhost"; description = "Domain name of your server."; }; - rootUrl = mkOption { - type = types.str; + rootUrl = lib.mkOption { + type = lib.types.str; default = "http://localhost:3000/"; description = "Full public URL of Gogs server."; }; - httpAddress = mkOption { - type = types.str; + httpAddress = lib.mkOption { + type = lib.types.str; default = "0.0.0.0"; description = "HTTP listen address."; }; - httpPort = mkOption { - type = types.port; + httpPort = lib.mkOption { + type = lib.types.port; default = 3000; description = "HTTP listen port."; }; - cookieSecure = mkOption { - type = types.bool; + cookieSecure = lib.mkOption { + type = lib.types.bool; default = false; description = '' Marks session cookies as "secure" as a hint for browsers to only send @@ -181,15 +178,15 @@ in ''; }; - extraConfig = mkOption { - type = types.str; + extraConfig = lib.mkOption { + type = lib.types.str; default = ""; description = "Configuration lines appended to the generated Gogs configuration file."; }; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.gogs = { description = "Gogs (Go Git Service)"; @@ -204,7 +201,7 @@ in mkdir -p ${cfg.stateDir} # copy custom configuration and generate a random secret key if needed - ${optionalString (cfg.useWizard == false) '' + ${lib.optionalString (cfg.useWizard == false) '' mkdir -p ${cfg.stateDir}/custom/conf cp -f ${configFile} ${runConfig} @@ -248,7 +245,7 @@ in }; }; - users = mkIf (cfg.user == "gogs") { + users = lib.mkIf (cfg.user == "gogs") { users.gogs = { description = "Go Git Service"; uid = config.ids.uids.gogs; @@ -260,13 +257,13 @@ in groups.gogs.gid = config.ids.gids.gogs; }; - warnings = optional (cfg.database.password != "") + warnings = lib.optional (cfg.database.password != "") ''config.services.gogs.database.password will be stored as plaintext in the Nix store. Use database.passwordFile instead.''; # Create database passwordFile default when password is configured. services.gogs.database.passwordFile = - (mkDefault (toString (pkgs.writeTextFile { + (lib.mkDefault (toString (pkgs.writeTextFile { name = "gogs-database-password"; text = cfg.database.password; }))); From c51036c276c734cff20902a78f18e5db0a4de935 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:58 +0200 Subject: [PATCH 120/236] nixos/services.kbfs: remove `with lib;` --- .../services/network-filesystems/kbfs.nix | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/nixos/modules/services/network-filesystems/kbfs.nix b/nixos/modules/services/network-filesystems/kbfs.nix index 903cae379986..034fc9576506 100644 --- a/nixos/modules/services/network-filesystems/kbfs.nix +++ b/nixos/modules/services/network-filesystems/kbfs.nix @@ -1,5 +1,4 @@ { config, lib, pkgs, ... }: -with lib; let inherit (config.security) wrapperDir; cfg = config.services.kbfs; @@ -12,14 +11,14 @@ in { services.kbfs = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = "Whether to mount the Keybase filesystem."; }; - enableRedirector = mkOption { - type = types.bool; + enableRedirector = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to enable the Keybase root redirector service, allowing @@ -28,15 +27,15 @@ in { ''; }; - mountPoint = mkOption { - type = types.str; + mountPoint = lib.mkOption { + type = lib.types.str; default = "%h/keybase"; example = "/keybase"; description = "Mountpoint for the Keybase filesystem."; }; - extraFlags = mkOption { - type = types.listOf types.str; + extraFlags = lib.mkOption { + type = lib.types.listOf lib.types.str; default = []; example = [ "-label kbfs" @@ -52,7 +51,7 @@ in { ###### implementation - config = mkIf cfg.enable (mkMerge [ + config = lib.mkIf cfg.enable (lib.mkMerge [ { # Upstream: https://github.com/keybase/client/blob/master/packaging/linux/systemd/kbfs.service systemd.user.services.kbfs = { @@ -61,7 +60,7 @@ in { # Note that the "Requires" directive will cause a unit to be restarted whenever its dependency is restarted. # Do not issue a hard dependency on keybase, because kbfs can reconnect to a restarted service. # Do not issue a hard dependency on keybase-redirector, because it's ok if it fails (e.g., if it is disabled). - wants = [ "keybase.service" ] ++ optional cfg.enableRedirector "keybase-redirector.service"; + wants = [ "keybase.service" ] ++ lib.optional cfg.enableRedirector "keybase-redirector.service"; path = [ "/run/wrappers" ]; unitConfig.ConditionUser = "!@system"; @@ -89,7 +88,7 @@ in { environment.systemPackages = [ pkgs.kbfs ]; } - (mkIf cfg.enableRedirector { + (lib.mkIf cfg.enableRedirector { security.wrappers."keybase-redirector".source = "${pkgs.kbfs}/bin/redirector"; systemd.tmpfiles.settings."10-kbfs"."/keybase".d = { From 8f72002794e3949f58dc1a667fba027dac2fe821 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:58 +0200 Subject: [PATCH 121/236] nixos/services.kubo: remove `with lib;` --- .../services/network-filesystems/kubo.nix | 171 +++++++++--------- 1 file changed, 85 insertions(+), 86 deletions(-) diff --git a/nixos/modules/services/network-filesystems/kubo.nix b/nixos/modules/services/network-filesystems/kubo.nix index d4ffda7c374e..35efd2ba0a57 100644 --- a/nixos/modules/services/network-filesystems/kubo.nix +++ b/nixos/modules/services/network-filesystems/kubo.nix @@ -1,5 +1,4 @@ { config, lib, pkgs, utils, ... }: -with lib; let cfg = config.services.kubo; @@ -35,11 +34,11 @@ let ''; kuboFlags = utils.escapeSystemdExecArgs ( - optional cfg.autoMount "--mount" ++ - optional cfg.enableGC "--enable-gc" ++ - optional (cfg.serviceFdlimit != null) "--manage-fdlimit=false" ++ - optional (cfg.defaultMode == "offline") "--offline" ++ - optional (cfg.defaultMode == "norouting") "--routing=none" ++ + lib.optional cfg.autoMount "--mount" ++ + lib.optional cfg.enableGC "--enable-gc" ++ + lib.optional (cfg.serviceFdlimit != null) "--manage-fdlimit=false" ++ + lib.optional (cfg.defaultMode == "offline") "--offline" ++ + lib.optional (cfg.defaultMode == "norouting") "--routing=none" ++ cfg.extraFlags ); @@ -99,78 +98,78 @@ in services.kubo = { - enable = mkEnableOption '' + enable = lib.mkEnableOption '' the Interplanetary File System (WARNING: may cause severe network degradation). NOTE: after enabling this option and rebuilding your system, you need to log out and back in for the `IPFS_PATH` environment variable to be present in your shell. Until you do that, the CLI tools won't be able to talk to the daemon by default ''; - package = mkPackageOption pkgs "kubo" { }; + package = lib.mkPackageOption pkgs "kubo" { }; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = "ipfs"; description = "User under which the Kubo daemon runs"; }; - group = mkOption { - type = types.str; + group = lib.mkOption { + type = lib.types.str; default = "ipfs"; description = "Group under which the Kubo daemon runs"; }; - dataDir = mkOption { - type = types.str; + dataDir = lib.mkOption { + type = lib.types.str; default = - if versionAtLeast config.system.stateVersion "17.09" + if lib.versionAtLeast config.system.stateVersion "17.09" then "/var/lib/ipfs" else "/var/lib/ipfs/.ipfs"; - defaultText = literalExpression '' - if versionAtLeast config.system.stateVersion "17.09" + defaultText = lib.literalExpression '' + if lib.versionAtLeast config.system.stateVersion "17.09" then "/var/lib/ipfs" else "/var/lib/ipfs/.ipfs" ''; description = "The data dir for Kubo"; }; - defaultMode = mkOption { - type = types.enum [ "online" "offline" "norouting" ]; + defaultMode = lib.mkOption { + type = lib.types.enum [ "online" "offline" "norouting" ]; default = "online"; description = "systemd service that is enabled by default"; }; - autoMount = mkOption { - type = types.bool; + autoMount = lib.mkOption { + type = lib.types.bool; default = false; description = "Whether Kubo should try to mount /ipfs and /ipns at startup."; }; - autoMigrate = mkOption { - type = types.bool; + autoMigrate = lib.mkOption { + type = lib.types.bool; default = true; description = "Whether Kubo should try to run the fs-repo-migration at startup."; }; - enableGC = mkOption { - type = types.bool; + enableGC = lib.mkOption { + type = lib.types.bool; default = false; description = "Whether to enable automatic garbage collection"; }; - emptyRepo = mkOption { - type = types.bool; + emptyRepo = lib.mkOption { + type = lib.types.bool; default = true; description = "If set to false, the repo will be initialized with help files"; }; - settings = mkOption { + settings = lib.mkOption { type = lib.types.submodule { freeformType = settingsFormat.type; options = { - Addresses.API = mkOption { - type = types.oneOf [ types.str (types.listOf types.str) ]; + Addresses.API = lib.mkOption { + type = lib.types.oneOf [ lib.types.str (lib.types.listOf lib.types.str) ]; default = [ ]; description = '' Multiaddr or array of multiaddrs describing the address to serve the local HTTP API on. @@ -180,14 +179,14 @@ in ''; }; - Addresses.Gateway = mkOption { - type = types.oneOf [ types.str (types.listOf types.str) ]; + Addresses.Gateway = lib.mkOption { + type = lib.types.oneOf [ lib.types.str (lib.types.listOf lib.types.str) ]; default = "/ip4/127.0.0.1/tcp/8080"; description = "Where the IPFS Gateway can be reached"; }; - Addresses.Swarm = mkOption { - type = types.listOf types.str; + Addresses.Swarm = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ "/ip4/0.0.0.0/tcp/4001" "/ip6/::/tcp/4001" @@ -199,14 +198,14 @@ in description = "Where Kubo listens for incoming p2p connections"; }; - Mounts.IPFS = mkOption { - type = types.str; + Mounts.IPFS = lib.mkOption { + type = lib.types.str; default = "/ipfs"; description = "Where to mount the IPFS namespace to"; }; - Mounts.IPNS = mkOption { - type = types.str; + Mounts.IPNS = lib.mkOption { + type = lib.types.str; default = "/ipns"; description = "Where to mount the IPNS namespace to"; }; @@ -230,29 +229,29 @@ in }; - extraFlags = mkOption { - type = types.listOf types.str; + extraFlags = lib.mkOption { + type = lib.types.listOf lib.types.str; description = "Extra flags passed to the Kubo daemon"; default = [ ]; }; - localDiscovery = mkOption { - type = types.bool; + localDiscovery = lib.mkOption { + type = lib.types.bool; description = ''Whether to enable local discovery for the Kubo daemon. This will allow Kubo to scan ports on your local network. Some hosting services will ban you if you do this. ''; default = false; }; - serviceFdlimit = mkOption { - type = types.nullOr types.int; + serviceFdlimit = lib.mkOption { + type = lib.types.nullOr lib.types.int; default = null; description = "The fdlimit for the Kubo systemd unit or `null` to have the daemon attempt to manage it"; example = 64 * 1024; }; - startWhenNeeded = mkOption { - type = types.bool; + startWhenNeeded = lib.mkOption { + type = lib.types.bool; default = false; description = "Whether to use socket activation to start Kubo when needed."; }; @@ -262,7 +261,7 @@ in ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { assertions = [ { assertion = !builtins.hasAttr "Identity" cfg.settings; @@ -288,14 +287,14 @@ in environment.variables.IPFS_PATH = fakeKuboRepo; # https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes - boot.kernel.sysctl."net.core.rmem_max" = mkDefault 2500000; - boot.kernel.sysctl."net.core.wmem_max" = mkDefault 2500000; + boot.kernel.sysctl."net.core.rmem_max" = lib.mkDefault 2500000; + boot.kernel.sysctl."net.core.wmem_max" = lib.mkDefault 2500000; - programs.fuse = mkIf cfg.autoMount { + programs.fuse = lib.mkIf cfg.autoMount { userAllowOther = true; }; - users.users = mkIf (cfg.user == "ipfs") { + users.users = lib.mkIf (cfg.user == "ipfs") { ipfs = { group = cfg.group; home = cfg.dataDir; @@ -308,7 +307,7 @@ in }; }; - users.groups = mkIf (cfg.group == "ipfs") { + users.groups = lib.mkIf (cfg.group == "ipfs") { ipfs.gid = config.ids.gids.ipfs; }; @@ -316,8 +315,8 @@ in defaultConfig = { inherit (cfg) user group; }; in { ${cfg.dataDir}.d = defaultConfig; - ${cfg.settings.Mounts.IPFS}.d = mkIf (cfg.autoMount) defaultConfig; - ${cfg.settings.Mounts.IPNS}.d = mkIf (cfg.autoMount) defaultConfig; + ${cfg.settings.Mounts.IPFS}.d = lib.mkIf (cfg.autoMount) defaultConfig; + ${cfg.settings.Mounts.IPNS}.d = lib.mkIf (cfg.autoMount) defaultConfig; }; # The hardened systemd unit breaks the fuse-mount function according to documentation in the unit file itself @@ -325,7 +324,7 @@ in then [ cfg.package.systemd_unit ] else [ cfg.package.systemd_unit_hardened ]; - services.kubo.settings = mkIf cfg.autoMount { + services.kubo.settings = lib.mkIf cfg.autoMount { Mounts.FuseAllowOther = lib.mkDefault true; }; @@ -339,7 +338,7 @@ in else # After an unclean shutdown this file may exist which will cause the config command to attempt to talk to the daemon. This will hang forever if systemd is holding our sockets open. rm -vf "$IPFS_PATH/api" - '' + optionalString cfg.autoMigrate '' + '' + lib.optionalString cfg.autoMigrate '' ${pkgs.kubo-migrator}/bin/fs-repo-migrations -to '${cfg.package.repoVersion}' -y '' + '' fi @@ -356,7 +355,7 @@ in # change when the changes are applied. Whyyyyyy..... ipfs --offline config replace - ''; - postStop = mkIf cfg.autoMount '' + postStop = lib.mkIf cfg.autoMount '' # After an unclean shutdown the fuse mounts at cfg.settings.Mounts.IPFS and cfg.settings.Mounts.IPNS are locked umount --quiet '${cfg.settings.Mounts.IPFS}' '${cfg.settings.Mounts.IPNS}' || true ''; @@ -365,11 +364,11 @@ in User = cfg.user; Group = cfg.group; StateDirectory = ""; - ReadWritePaths = optionals (!cfg.autoMount) [ "" cfg.dataDir ]; + ReadWritePaths = lib.optionals (!cfg.autoMount) [ "" cfg.dataDir ]; # Make sure the socket units are started before ipfs.service Sockets = [ "ipfs-gateway.socket" "ipfs-api.socket" ]; - } // optionalAttrs (cfg.serviceFdlimit != null) { LimitNOFILE = cfg.serviceFdlimit; }; - } // optionalAttrs (!cfg.startWhenNeeded) { + } // lib.optionalAttrs (cfg.serviceFdlimit != null) { LimitNOFILE = cfg.serviceFdlimit; }; + } // lib.optionalAttrs (!cfg.startWhenNeeded) { wantedBy = [ "default.target" ]; }; @@ -402,31 +401,31 @@ in }; imports = [ - (mkRenamedOptionModule [ "services" "ipfs" "enable" ] [ "services" "kubo" "enable" ]) - (mkRenamedOptionModule [ "services" "ipfs" "package" ] [ "services" "kubo" "package" ]) - (mkRenamedOptionModule [ "services" "ipfs" "user" ] [ "services" "kubo" "user" ]) - (mkRenamedOptionModule [ "services" "ipfs" "group" ] [ "services" "kubo" "group" ]) - (mkRenamedOptionModule [ "services" "ipfs" "dataDir" ] [ "services" "kubo" "dataDir" ]) - (mkRenamedOptionModule [ "services" "ipfs" "defaultMode" ] [ "services" "kubo" "defaultMode" ]) - (mkRenamedOptionModule [ "services" "ipfs" "autoMount" ] [ "services" "kubo" "autoMount" ]) - (mkRenamedOptionModule [ "services" "ipfs" "autoMigrate" ] [ "services" "kubo" "autoMigrate" ]) - (mkRenamedOptionModule [ "services" "ipfs" "ipfsMountDir" ] [ "services" "kubo" "settings" "Mounts" "IPFS" ]) - (mkRenamedOptionModule [ "services" "ipfs" "ipnsMountDir" ] [ "services" "kubo" "settings" "Mounts" "IPNS" ]) - (mkRenamedOptionModule [ "services" "ipfs" "gatewayAddress" ] [ "services" "kubo" "settings" "Addresses" "Gateway" ]) - (mkRenamedOptionModule [ "services" "ipfs" "apiAddress" ] [ "services" "kubo" "settings" "Addresses" "API" ]) - (mkRenamedOptionModule [ "services" "ipfs" "swarmAddress" ] [ "services" "kubo" "settings" "Addresses" "Swarm" ]) - (mkRenamedOptionModule [ "services" "ipfs" "enableGC" ] [ "services" "kubo" "enableGC" ]) - (mkRenamedOptionModule [ "services" "ipfs" "emptyRepo" ] [ "services" "kubo" "emptyRepo" ]) - (mkRenamedOptionModule [ "services" "ipfs" "extraConfig" ] [ "services" "kubo" "settings" ]) - (mkRenamedOptionModule [ "services" "ipfs" "extraFlags" ] [ "services" "kubo" "extraFlags" ]) - (mkRenamedOptionModule [ "services" "ipfs" "localDiscovery" ] [ "services" "kubo" "localDiscovery" ]) - (mkRenamedOptionModule [ "services" "ipfs" "serviceFdlimit" ] [ "services" "kubo" "serviceFdlimit" ]) - (mkRenamedOptionModule [ "services" "ipfs" "startWhenNeeded" ] [ "services" "kubo" "startWhenNeeded" ]) - (mkRenamedOptionModule [ "services" "kubo" "extraConfig" ] [ "services" "kubo" "settings" ]) - (mkRenamedOptionModule [ "services" "kubo" "gatewayAddress" ] [ "services" "kubo" "settings" "Addresses" "Gateway" ]) - (mkRenamedOptionModule [ "services" "kubo" "apiAddress" ] [ "services" "kubo" "settings" "Addresses" "API" ]) - (mkRenamedOptionModule [ "services" "kubo" "swarmAddress" ] [ "services" "kubo" "settings" "Addresses" "Swarm" ]) - (mkRenamedOptionModule [ "services" "kubo" "ipfsMountDir" ] [ "services" "kubo" "settings" "Mounts" "IPFS" ]) - (mkRenamedOptionModule [ "services" "kubo" "ipnsMountDir" ] [ "services" "kubo" "settings" "Mounts" "IPNS" ]) + (lib.mkRenamedOptionModule [ "services" "ipfs" "enable" ] [ "services" "kubo" "enable" ]) + (lib.mkRenamedOptionModule [ "services" "ipfs" "package" ] [ "services" "kubo" "package" ]) + (lib.mkRenamedOptionModule [ "services" "ipfs" "user" ] [ "services" "kubo" "user" ]) + (lib.mkRenamedOptionModule [ "services" "ipfs" "group" ] [ "services" "kubo" "group" ]) + (lib.mkRenamedOptionModule [ "services" "ipfs" "dataDir" ] [ "services" "kubo" "dataDir" ]) + (lib.mkRenamedOptionModule [ "services" "ipfs" "defaultMode" ] [ "services" "kubo" "defaultMode" ]) + (lib.mkRenamedOptionModule [ "services" "ipfs" "autoMount" ] [ "services" "kubo" "autoMount" ]) + (lib.mkRenamedOptionModule [ "services" "ipfs" "autoMigrate" ] [ "services" "kubo" "autoMigrate" ]) + (lib.mkRenamedOptionModule [ "services" "ipfs" "ipfsMountDir" ] [ "services" "kubo" "settings" "Mounts" "IPFS" ]) + (lib.mkRenamedOptionModule [ "services" "ipfs" "ipnsMountDir" ] [ "services" "kubo" "settings" "Mounts" "IPNS" ]) + (lib.mkRenamedOptionModule [ "services" "ipfs" "gatewayAddress" ] [ "services" "kubo" "settings" "Addresses" "Gateway" ]) + (lib.mkRenamedOptionModule [ "services" "ipfs" "apiAddress" ] [ "services" "kubo" "settings" "Addresses" "API" ]) + (lib.mkRenamedOptionModule [ "services" "ipfs" "swarmAddress" ] [ "services" "kubo" "settings" "Addresses" "Swarm" ]) + (lib.mkRenamedOptionModule [ "services" "ipfs" "enableGC" ] [ "services" "kubo" "enableGC" ]) + (lib.mkRenamedOptionModule [ "services" "ipfs" "emptyRepo" ] [ "services" "kubo" "emptyRepo" ]) + (lib.mkRenamedOptionModule [ "services" "ipfs" "extraConfig" ] [ "services" "kubo" "settings" ]) + (lib.mkRenamedOptionModule [ "services" "ipfs" "extraFlags" ] [ "services" "kubo" "extraFlags" ]) + (lib.mkRenamedOptionModule [ "services" "ipfs" "localDiscovery" ] [ "services" "kubo" "localDiscovery" ]) + (lib.mkRenamedOptionModule [ "services" "ipfs" "serviceFdlimit" ] [ "services" "kubo" "serviceFdlimit" ]) + (lib.mkRenamedOptionModule [ "services" "ipfs" "startWhenNeeded" ] [ "services" "kubo" "startWhenNeeded" ]) + (lib.mkRenamedOptionModule [ "services" "kubo" "extraConfig" ] [ "services" "kubo" "settings" ]) + (lib.mkRenamedOptionModule [ "services" "kubo" "gatewayAddress" ] [ "services" "kubo" "settings" "Addresses" "Gateway" ]) + (lib.mkRenamedOptionModule [ "services" "kubo" "apiAddress" ] [ "services" "kubo" "settings" "Addresses" "API" ]) + (lib.mkRenamedOptionModule [ "services" "kubo" "swarmAddress" ] [ "services" "kubo" "settings" "Addresses" "Swarm" ]) + (lib.mkRenamedOptionModule [ "services" "kubo" "ipfsMountDir" ] [ "services" "kubo" "settings" "Mounts" "IPFS" ]) + (lib.mkRenamedOptionModule [ "services" "kubo" "ipnsMountDir" ] [ "services" "kubo" "settings" "Mounts" "IPNS" ]) ]; } From 6bf4d5160646077aaa9180c3c7e8a039c066c746 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:58 +0200 Subject: [PATCH 122/236] nixos/services.litestream: remove `with lib;` --- .../network-filesystems/litestream/default.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/network-filesystems/litestream/default.nix b/nixos/modules/services/network-filesystems/litestream/default.nix index 87f07b0501be..f4b0281ebbe2 100644 --- a/nixos/modules/services/network-filesystems/litestream/default.nix +++ b/nixos/modules/services/network-filesystems/litestream/default.nix @@ -1,18 +1,15 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.litestream; settingsFormat = pkgs.formats.yaml {}; in { options.services.litestream = { - enable = mkEnableOption "litestream"; + enable = lib.mkEnableOption "litestream"; - package = mkPackageOption pkgs "litestream" { }; + package = lib.mkPackageOption pkgs "litestream" { }; - settings = mkOption { + settings = lib.mkOption { description = '' See the [documentation](https://litestream.io/reference/config/). ''; @@ -31,8 +28,8 @@ in }; }; - environmentFile = mkOption { - type = types.nullOr types.path; + environmentFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; default = null; example = "/run/secrets/litestream"; description = '' @@ -61,7 +58,7 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.systemPackages = [ cfg.package ]; environment.etc = { "litestream.yml" = { @@ -74,7 +71,7 @@ in wantedBy = [ "multi-user.target" ]; after = [ "networking.target" ]; serviceConfig = { - EnvironmentFile = mkIf (cfg.environmentFile != null) cfg.environmentFile; + EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile; ExecStart = "${cfg.package}/bin/litestream replicate"; Restart = "always"; User = "litestream"; From fb9b81cec50006242fcea1676344fe8db53b79f8 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:58 +0200 Subject: [PATCH 123/236] nixos/services.moosefs: remove `with lib;` --- .../services/network-filesystems/moosefs.nix | 97 +++++++++---------- 1 file changed, 47 insertions(+), 50 deletions(-) diff --git a/nixos/modules/services/network-filesystems/moosefs.nix b/nixos/modules/services/network-filesystems/moosefs.nix index 8d29148883ab..2fef0bec378c 100644 --- a/nixos/modules/services/network-filesystems/moosefs.nix +++ b/nixos/modules/services/network-filesystems/moosefs.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.moosefs; @@ -9,14 +6,14 @@ let settingsFormat = let listSep = " "; - allowedTypes = with types; [ bool int float str ]; + allowedTypes = with lib.types; [ bool int float str ]; valueToString = val: - if isList val then concatStringsSep listSep (map (x: valueToString x) val) - else if isBool val then (if val then "1" else "0") + if lib.isList val then lib.concatStringsSep listSep (map (x: valueToString x) val) + else if lib.isBool val then (if val then "1" else "0") else toString val; in { - type = with types; let + type = with lib.types; let valueType = oneOf ([ (listOf valueType) ] ++ allowedTypes) // { @@ -72,24 +69,24 @@ in { options = { services.moosefs = { - masterHost = mkOption { - type = types.str; + masterHost = lib.mkOption { + type = lib.types.str; default = null; description = "IP or DNS name of master host."; }; - runAsUser = mkOption { - type = types.bool; + runAsUser = lib.mkOption { + type = lib.types.bool; default = true; example = true; description = "Run daemons as user moosefs instead of root."; }; - client.enable = mkEnableOption "Moosefs client"; + client.enable = lib.mkEnableOption "Moosefs client"; master = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; description = '' Enable Moosefs master daemon. @@ -99,8 +96,8 @@ in { default = false; }; - exports = mkOption { - type = with types; listOf str; + exports = lib.mkOption { + type = with lib.types; listOf str; default = null; description = "Paths to export (see mfsexports.cfg)."; example = [ @@ -109,18 +106,18 @@ in { ]; }; - openFirewall = mkOption { - type = types.bool; + openFirewall = lib.mkOption { + type = lib.types.bool; description = "Whether to automatically open the necessary ports in the firewall."; default = false; }; - settings = mkOption { - type = types.submodule { + settings = lib.mkOption { + type = lib.types.submodule { freeformType = settingsFormat.type; - options.DATA_PATH = mkOption { - type = types.str; + options.DATA_PATH = lib.mkOption { + type = lib.types.str; default = "/var/lib/mfs"; description = "Data storage directory."; }; @@ -131,14 +128,14 @@ in { }; metalogger = { - enable = mkEnableOption "Moosefs metalogger daemon"; + enable = lib.mkEnableOption "Moosefs metalogger daemon"; - settings = mkOption { - type = types.submodule { + settings = lib.mkOption { + type = lib.types.submodule { freeformType = settingsFormat.type; - options.DATA_PATH = mkOption { - type = types.str; + options.DATA_PATH = lib.mkOption { + type = lib.types.str; default = "/var/lib/mfs"; description = "Data storage directory"; }; @@ -149,27 +146,27 @@ in { }; chunkserver = { - enable = mkEnableOption "Moosefs chunkserver daemon"; + enable = lib.mkEnableOption "Moosefs chunkserver daemon"; - openFirewall = mkOption { - type = types.bool; + openFirewall = lib.mkOption { + type = lib.types.bool; description = "Whether to automatically open the necessary ports in the firewall."; default = false; }; - hdds = mkOption { - type = with types; listOf str; + hdds = lib.mkOption { + type = with lib.types; listOf str; default = null; description = "Mount points to be used by chunkserver for storage (see mfshdd.cfg)."; example = [ "/mnt/hdd1" ]; }; - settings = mkOption { - type = types.submodule { + settings = lib.mkOption { + type = lib.types.submodule { freeformType = settingsFormat.type; - options.DATA_PATH = mkOption { - type = types.str; + options.DATA_PATH = lib.mkOption { + type = lib.types.str; default = "/var/lib/mfs"; description = "Directory for lock file."; }; @@ -183,33 +180,33 @@ in { ###### implementation - config = mkIf ( cfg.client.enable || cfg.master.enable || cfg.metalogger.enable || cfg.chunkserver.enable ) { + config = lib.mkIf ( cfg.client.enable || cfg.master.enable || cfg.metalogger.enable || cfg.chunkserver.enable ) { - warnings = [ ( mkIf (!cfg.runAsUser) "Running moosefs services as root is not recommended.") ]; + warnings = [ ( lib.mkIf (!cfg.runAsUser) "Running moosefs services as root is not recommended.") ]; # Service settings services.moosefs = { - master.settings = mkIf cfg.master.enable { + master.settings = lib.mkIf cfg.master.enable { WORKING_USER = mfsUser; EXPORTS_FILENAME = toString ( pkgs.writeText "mfsexports.cfg" - (concatStringsSep "\n" cfg.master.exports)); + (lib.concatStringsSep "\n" cfg.master.exports)); }; - metalogger.settings = mkIf cfg.metalogger.enable { + metalogger.settings = lib.mkIf cfg.metalogger.enable { WORKING_USER = mfsUser; MASTER_HOST = cfg.masterHost; }; - chunkserver.settings = mkIf cfg.chunkserver.enable { + chunkserver.settings = lib.mkIf cfg.chunkserver.enable { WORKING_USER = mfsUser; MASTER_HOST = cfg.masterHost; HDD_CONF_FILENAME = toString ( pkgs.writeText "mfshdd.cfg" - (concatStringsSep "\n" cfg.chunkserver.hdds)); + (lib.concatStringsSep "\n" cfg.chunkserver.hdds)); }; }; # Create system user account for daemons - users = mkIf ( cfg.runAsUser && ( cfg.master.enable || cfg.metalogger.enable || cfg.chunkserver.enable ) ) { + users = lib.mkIf ( cfg.runAsUser && ( cfg.master.enable || cfg.metalogger.enable || cfg.chunkserver.enable ) ) { users.moosefs = { isSystemUser = true; description = "moosefs daemon user"; @@ -228,22 +225,22 @@ in { # Ensure storage directories exist systemd.tmpfiles.rules = - optional cfg.master.enable "d ${cfg.master.settings.DATA_PATH} 0700 ${mfsUser} ${mfsUser}" - ++ optional cfg.metalogger.enable "d ${cfg.metalogger.settings.DATA_PATH} 0700 ${mfsUser} ${mfsUser}" - ++ optional cfg.chunkserver.enable "d ${cfg.chunkserver.settings.DATA_PATH} 0700 ${mfsUser} ${mfsUser}"; + lib.optional cfg.master.enable "d ${cfg.master.settings.DATA_PATH} 0700 ${mfsUser} ${mfsUser}" + ++ lib.optional cfg.metalogger.enable "d ${cfg.metalogger.settings.DATA_PATH} 0700 ${mfsUser} ${mfsUser}" + ++ lib.optional cfg.chunkserver.enable "d ${cfg.chunkserver.settings.DATA_PATH} 0700 ${mfsUser} ${mfsUser}"; # Service definitions - systemd.services.mfs-master = mkIf cfg.master.enable + systemd.services.mfs-master = lib.mkIf cfg.master.enable ( systemdService "master" { TimeoutStartSec = 1800; TimeoutStopSec = 1800; Restart = "no"; } masterCfg ); - systemd.services.mfs-metalogger = mkIf cfg.metalogger.enable + systemd.services.mfs-metalogger = lib.mkIf cfg.metalogger.enable ( systemdService "metalogger" { Restart = "on-abnormal"; } metaloggerCfg ); - systemd.services.mfs-chunkserver = mkIf cfg.chunkserver.enable + systemd.services.mfs-chunkserver = lib.mkIf cfg.chunkserver.enable ( systemdService "chunkserver" { Restart = "on-abnormal"; } chunkserverCfg ); }; } From 808c6a991be9a9742b936b631bc0cb38a8079ef6 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:58 +0200 Subject: [PATCH 124/236] nixos/services.netatalk: remove `with lib;` --- .../services/network-filesystems/netatalk.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/nixos/modules/services/network-filesystems/netatalk.nix b/nixos/modules/services/network-filesystems/netatalk.nix index d7eef33ad96c..e8c97df3151b 100644 --- a/nixos/modules/services/network-filesystems/netatalk.nix +++ b/nixos/modules/services/network-filesystems/netatalk.nix @@ -1,7 +1,4 @@ { config, pkgs, lib, ... }: - -with lib; - let cfg = config.services.netatalk; settingsFormat = pkgs.formats.ini { }; @@ -10,15 +7,15 @@ in { options = { services.netatalk = { - enable = mkEnableOption "the Netatalk AFP fileserver"; + enable = lib.mkEnableOption "the Netatalk AFP fileserver"; - port = mkOption { - type = types.port; + port = lib.mkOption { + type = lib.types.port; default = 548; description = "TCP port to be used for AFP."; }; - settings = mkOption { + settings = lib.mkOption { inherit (settingsFormat) type; default = { }; example = { @@ -38,8 +35,8 @@ in { ''; }; - extmap = mkOption { - type = types.lines; + extmap = lib.mkOption { + type = lib.types.lines; default = ""; description = '' File name extension mappings. @@ -51,14 +48,14 @@ in { }; imports = (map (option: - mkRemovedOptionModule [ "services" "netatalk" option ] + lib.mkRemovedOptionModule [ "services" "netatalk" option ] "This option was removed in favor of `services.netatalk.settings`.") [ "extraConfig" "homes" "volumes" ]); - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { services.netatalk.settings.Global = { "afp port" = toString cfg.port; From e14a371aaca5ee8713dbaaedd6f6e9f041d8ce8c Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:59 +0200 Subject: [PATCH 125/236] nixos/services.nfs.server: remove `with lib;` --- .../services/network-filesystems/nfsd.nix | 47 +++++++++---------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/nixos/modules/services/network-filesystems/nfsd.nix b/nixos/modules/services/network-filesystems/nfsd.nix index c40bcf28c28f..67597d37813f 100644 --- a/nixos/modules/services/network-filesystems/nfsd.nix +++ b/nixos/modules/services/network-filesystems/nfsd.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.nfs.server; @@ -12,8 +9,8 @@ in { imports = [ - (mkRenamedOptionModule [ "services" "nfs" "lockdPort" ] [ "services" "nfs" "server" "lockdPort" ]) - (mkRenamedOptionModule [ "services" "nfs" "statdPort" ] [ "services" "nfs" "server" "statdPort" ]) + (lib.mkRenamedOptionModule [ "services" "nfs" "lockdPort" ] [ "services" "nfs" "server" "lockdPort" ]) + (lib.mkRenamedOptionModule [ "services" "nfs" "statdPort" ] [ "services" "nfs" "server" "statdPort" ]) ]; ###### interface @@ -23,24 +20,24 @@ in services.nfs = { server = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to enable the kernel's NFS server. ''; }; - extraNfsdConfig = mkOption { - type = types.str; + extraNfsdConfig = lib.mkOption { + type = lib.types.str; default = ""; description = '' Extra configuration options for the [nfsd] section of /etc/nfs.conf. ''; }; - exports = mkOption { - type = types.lines; + exports = lib.mkOption { + type = lib.types.lines; default = ""; description = '' Contents of the /etc/exports file. See @@ -48,8 +45,8 @@ in ''; }; - hostName = mkOption { - type = types.nullOr types.str; + hostName = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; description = '' Hostname or address on which NFS requests will be accepted. @@ -58,22 +55,22 @@ in ''; }; - nproc = mkOption { - type = types.int; + nproc = lib.mkOption { + type = lib.types.int; default = 8; description = '' Number of NFS server threads. Defaults to the recommended value of 8. ''; }; - createMountPoints = mkOption { - type = types.bool; + createMountPoints = lib.mkOption { + type = lib.types.bool; default = false; description = "Whether to create the mount points in the exports file at startup time."; }; - mountdPort = mkOption { - type = types.nullOr types.int; + mountdPort = lib.mkOption { + type = lib.types.nullOr lib.types.int; default = null; example = 4002; description = '' @@ -81,8 +78,8 @@ in ''; }; - lockdPort = mkOption { - type = types.nullOr types.int; + lockdPort = lib.mkOption { + type = lib.types.nullOr lib.types.int; default = null; example = 4001; description = '' @@ -92,8 +89,8 @@ in ''; }; - statdPort = mkOption { - type = types.nullOr types.int; + statdPort = lib.mkOption { + type = lib.types.nullOr lib.types.int; default = null; example = 4000; description = '' @@ -111,7 +108,7 @@ in ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { services.rpcbind.enable = true; @@ -137,7 +134,7 @@ in '' mkdir -p /var/lib/nfs - ${optionalString cfg.createMountPoints + ${lib.optionalString cfg.createMountPoints '' # create export directories: # skip comments, take first col which may either be a quoted From 6f4eeb772232b1f45277cb1e8c847e98ed27eb4d Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:59 +0200 Subject: [PATCH 126/236] nixos/services.orangefs.client: remove `with lib;` --- .../network-filesystems/orangefs/client.nix | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/nixos/modules/services/network-filesystems/orangefs/client.nix b/nixos/modules/services/network-filesystems/orangefs/client.nix index 0632a9bc9527..3923289e6f64 100644 --- a/nixos/modules/services/network-filesystems/orangefs/client.nix +++ b/nixos/modules/services/network-filesystems/orangefs/client.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ...} : - -with lib; - let cfg = config.services.orangefs.client; @@ -10,15 +7,15 @@ in { options = { services.orangefs.client = { - enable = mkEnableOption "OrangeFS client daemon"; + enable = lib.mkEnableOption "OrangeFS client daemon"; - extraOptions = mkOption { - type = with types; listOf str; + extraOptions = lib.mkOption { + type = with lib.types; listOf str; default = []; description = "Extra command line options for pvfs2-client."; }; - fileSystems = mkOption { + fileSystems = lib.mkOption { description = '' The orangefs file systems to be mounted. This option is preferred over using {option}`fileSystems` directly since @@ -30,23 +27,23 @@ in { target = "tcp://server:3334/orangefs"; }]; - type = with types; listOf (submodule ({ ... } : { + type = with lib.types; listOf (submodule ({ ... } : { options = { - mountPoint = mkOption { - type = types.str; + mountPoint = lib.mkOption { + type = lib.types.str; default = "/orangefs"; description = "Mount point."; }; - options = mkOption { - type = with types; listOf str; + options = lib.mkOption { + type = with lib.types; listOf str; default = []; description = "Mount options"; }; - target = mkOption { - type = types.str; + target = lib.mkOption { + type = lib.types.str; example = "tcp://server:3334/orangefs"; description = "Target URL"; }; @@ -59,7 +56,7 @@ in { ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.systemPackages = [ pkgs.orangefs ]; boot.supportedFilesystems = [ "pvfs2" ]; @@ -74,7 +71,7 @@ in { ExecStart = '' ${pkgs.orangefs}/bin/pvfs2-client-core \ - --logtype=syslog ${concatStringsSep " " cfg.extraOptions} + --logtype=syslog ${lib.concatStringsSep " " cfg.extraOptions} ''; TimeoutStopSec = "120"; @@ -87,7 +84,7 @@ in { bindsTo = [ "orangefs-client.service" ]; wantedBy = [ "remote-fs.target" ]; type = "pvfs2"; - options = concatStringsSep "," fs.options; + options = lib.concatStringsSep "," fs.options; what = fs.target; where = fs.mountPoint; }) cfg.fileSystems; From 23fed458df22063e157b8a23ec203dab3065a0af Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:59 +0200 Subject: [PATCH 127/236] nixos/services.orangefs.server: remove `with lib;` --- .../network-filesystems/orangefs/server.nix | 87 +++++++++---------- 1 file changed, 42 insertions(+), 45 deletions(-) diff --git a/nixos/modules/services/network-filesystems/orangefs/server.nix b/nixos/modules/services/network-filesystems/orangefs/server.nix index 9fbf37f0d00a..c198d4764559 100644 --- a/nixos/modules/services/network-filesystems/orangefs/server.nix +++ b/nixos/modules/services/network-filesystems/orangefs/server.nix @@ -1,19 +1,16 @@ { config, lib, pkgs, ...} : - -with lib; - let cfg = config.services.orangefs.server; - aliases = mapAttrsToList (alias: url: alias) cfg.servers; + aliases = lib.mapAttrsToList (alias: url: alias) cfg.servers; # Maximum handle number is 2^63 maxHandle = 9223372036854775806; # One range of handles for each meta/data instance - handleStep = maxHandle / (length aliases) / 2; + handleStep = maxHandle / (lib.length aliases) / 2; - fileSystems = mapAttrsToList (name: fs: '' + fileSystems = lib.mapAttrsToList (name: fs: '' Name ${name} ID ${toString fs.id} @@ -22,8 +19,8 @@ let ${fs.extraConfig} - ${concatStringsSep "\n" ( - imap0 (i: alias: + ${lib.concatStringsSep "\n" ( + lib.imap0 (i: alias: let begin = i * handleStep + 3; end = begin + handleStep - 1; @@ -32,10 +29,10 @@ let - ${concatStringsSep "\n" ( - imap0 (i: alias: + ${lib.concatStringsSep "\n" ( + lib.imap0 (i: alias: let - begin = i * handleStep + 3 + (length aliases) * handleStep; + begin = i * handleStep + 3 + (lib.length aliases) * handleStep; end = begin + handleStep - 1; in "Range ${alias} ${toString begin}-${toString end}") aliases )} @@ -56,17 +53,17 @@ let DataStorageSpace ${cfg.dataStorageSpace} MetaDataStorageSpace ${cfg.metadataStorageSpace} - BMIModules ${concatStringsSep "," cfg.BMIModules} + BMIModules ${lib.concatStringsSep "," cfg.BMIModules} ${cfg.extraDefaults} ${cfg.extraConfig} - ${concatStringsSep "\n" (mapAttrsToList (alias: url: "Alias ${alias} ${url}") cfg.servers)} + ${lib.concatStringsSep "\n" (lib.mapAttrsToList (alias: url: "Alias ${alias} ${url}") cfg.servers)} - ${concatStringsSep "\n" fileSystems} + ${lib.concatStringsSep "\n" fileSystems} ''; in { @@ -74,49 +71,49 @@ in { options = { services.orangefs.server = { - enable = mkEnableOption "OrangeFS server"; + enable = lib.mkEnableOption "OrangeFS server"; - logType = mkOption { - type = with types; enum [ "file" "syslog" ]; + logType = lib.mkOption { + type = with lib.types; enum [ "file" "syslog" ]; default = "syslog"; description = "Destination for log messages."; }; - dataStorageSpace = mkOption { - type = types.nullOr types.str; + dataStorageSpace = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; example = "/data/storage"; description = "Directory for data storage."; }; - metadataStorageSpace = mkOption { - type = types.nullOr types.str; + metadataStorageSpace = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; example = "/data/meta"; description = "Directory for meta data storage."; }; - BMIModules = mkOption { - type = with types; listOf str; + BMIModules = lib.mkOption { + type = with lib.types; listOf str; default = [ "bmi_tcp" ]; example = [ "bmi_tcp" "bmi_ib"]; description = "List of BMI modules to load."; }; - extraDefaults = mkOption { - type = types.lines; + extraDefaults = lib.mkOption { + type = lib.types.lines; default = ""; description = "Extra config for `` section."; }; - extraConfig = mkOption { - type = types.lines; + extraConfig = lib.mkOption { + type = lib.types.lines; default = ""; description = "Extra config for the global section."; }; - servers = mkOption { - type = with types; attrsOf types.str; + servers = lib.mkOption { + type = with lib.types; attrsOf lib.types.str; default = {}; example = { node1 = "tcp://node1:3334"; @@ -125,12 +122,12 @@ in { description = "URLs for storage server including port. The attribute names define the server alias."; }; - fileSystems = mkOption { + fileSystems = lib.mkOption { description = '' These options will create the `` sections of config file. ''; default = { orangefs = {}; }; - example = literalExpression '' + example = lib.literalExpression '' { fs1 = { id = 101; @@ -141,40 +138,40 @@ in { }; } ''; - type = with types; attrsOf (submodule ({ ... } : { + type = with lib.types; attrsOf (submodule ({ ... } : { options = { - id = mkOption { - type = types.int; + id = lib.mkOption { + type = lib.types.int; default = 1; description = "File system ID (must be unique within configuration)."; }; - rootHandle = mkOption { - type = types.int; + rootHandle = lib.mkOption { + type = lib.types.int; default = 3; description = "File system root ID."; }; - extraConfig = mkOption { - type = types.lines; + extraConfig = lib.mkOption { + type = lib.types.lines; default = ""; description = "Extra config for `` section."; }; - troveSyncMeta = mkOption { - type = types.bool; + troveSyncMeta = lib.mkOption { + type = lib.types.bool; default = true; description = "Sync meta data."; }; - troveSyncData = mkOption { - type = types.bool; + troveSyncData = lib.mkOption { + type = lib.types.bool; default = false; description = "Sync data."; }; - extraStorageHints = mkOption { - type = types.lines; + extraStorageHints = lib.mkOption { + type = lib.types.lines; default = ""; description = "Extra config for `` section."; }; @@ -186,7 +183,7 @@ in { ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.systemPackages = [ pkgs.orangefs ]; # orangefs daemon will run as user From 442fa2e366b5661cb5689692ff35d8a149eafd0e Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:59 +0200 Subject: [PATCH 128/236] nixos/services.rsyncd: remove `with lib;` --- .../services/network-filesystems/rsyncd.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/nixos/modules/services/network-filesystems/rsyncd.nix b/nixos/modules/services/network-filesystems/rsyncd.nix index 49bc7caf2ee4..93dc41c3c956 100644 --- a/nixos/modules/services/network-filesystems/rsyncd.nix +++ b/nixos/modules/services/network-filesystems/rsyncd.nix @@ -1,7 +1,4 @@ { config, pkgs, lib, ... }: - -with lib; - let cfg = config.services.rsyncd; settingsFormat = pkgs.formats.ini { }; @@ -10,15 +7,15 @@ in { options = { services.rsyncd = { - enable = mkEnableOption "the rsync daemon"; + enable = lib.mkEnableOption "the rsync daemon"; - port = mkOption { + port = lib.mkOption { default = 873; - type = types.port; + type = lib.types.port; description = "TCP port the daemon will listen on."; }; - settings = mkOption { + settings = lib.mkOption { inherit (settingsFormat) type; default = { }; example = { @@ -45,9 +42,9 @@ in { ''; }; - socketActivated = mkOption { + socketActivated = lib.mkOption { default = false; - type = types.bool; + type = lib.types.bool; description = "If enabled Rsync will be socket-activated rather than run persistently."; }; @@ -55,7 +52,7 @@ in { }; imports = (map (option: - mkRemovedOptionModule [ "services" "rsyncd" option ] + lib.mkRemovedOptionModule [ "services" "rsyncd" option ] "This option was removed in favor of `services.rsyncd.settings`.") [ "address" "extraConfig" @@ -64,7 +61,7 @@ in { "group" ]); - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { services.rsyncd.settings.global.port = toString cfg.port; From 4174027fe9e7521b4d6c38d4a45deb418d3fa85a Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:59 +0200 Subject: [PATCH 129/236] nixos/services.samba-wsdd: remove `with lib;` --- .../network-filesystems/samba-wsdd.nix | 57 +++++++++---------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/nixos/modules/services/network-filesystems/samba-wsdd.nix b/nixos/modules/services/network-filesystems/samba-wsdd.nix index f46bf802511a..60ede5a1bda2 100644 --- a/nixos/modules/services/network-filesystems/samba-wsdd.nix +++ b/nixos/modules/services/network-filesystems/samba-wsdd.nix @@ -1,65 +1,62 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.samba-wsdd; in { options = { services.samba-wsdd = { - enable = mkEnableOption '' + enable = lib.mkEnableOption '' Web Services Dynamic Discovery host daemon. This enables (Samba) hosts, like your local NAS device, to be found by Web Service Discovery Clients like Windows ''; - interface = mkOption { - type = types.nullOr types.str; + interface = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; example = "eth0"; description = "Interface or address to use."; }; - hoplimit = mkOption { - type = types.nullOr types.int; + hoplimit = lib.mkOption { + type = lib.types.nullOr lib.types.int; default = null; example = 2; description = "Hop limit for multicast packets (default = 1)."; }; - openFirewall = mkOption { + openFirewall = lib.mkOption { description = '' Whether to open the required firewall ports in the firewall. ''; default = false; type = lib.types.bool; }; - workgroup = mkOption { - type = types.nullOr types.str; + workgroup = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; example = "HOME"; description = "Set workgroup name (default WORKGROUP)."; }; - hostname = mkOption { - type = types.nullOr types.str; + hostname = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; example = "FILESERVER"; description = "Override (NetBIOS) hostname to be used (default hostname)."; }; - domain = mkOption { - type = types.nullOr types.str; + domain = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; description = "Set domain name (disables workgroup)."; }; - discovery = mkOption { - type = types.bool; + discovery = lib.mkOption { + type = lib.types.bool; default = false; description = "Enable discovery operation mode."; }; - listen = mkOption { - type = types.str; + listen = lib.mkOption { + type = lib.types.str; default = "/run/wsdd/wsdd.sock"; description = "Listen on path or localhost port in discovery mode."; }; - extraOptions = mkOption { - type = types.listOf types.str; + extraOptions = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ "--shortlog" ]; example = [ "--verbose" "--no-http" "--ipv4only" "--no-host" ]; description = "Additional wsdd options."; @@ -67,7 +64,7 @@ in { }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.systemPackages = [ pkgs.wsdd ]; @@ -79,13 +76,13 @@ in { DynamicUser = true; Type = "simple"; ExecStart = '' - ${pkgs.wsdd}/bin/wsdd ${optionalString (cfg.interface != null) "--interface '${cfg.interface}'"} \ - ${optionalString (cfg.hoplimit != null) "--hoplimit '${toString cfg.hoplimit}'"} \ - ${optionalString (cfg.workgroup != null) "--workgroup '${cfg.workgroup}'"} \ - ${optionalString (cfg.hostname != null) "--hostname '${cfg.hostname}'"} \ - ${optionalString (cfg.domain != null) "--domain '${cfg.domain}'"} \ - ${optionalString cfg.discovery "--discovery --listen '${cfg.listen}'"} \ - ${escapeShellArgs cfg.extraOptions} + ${pkgs.wsdd}/bin/wsdd ${lib.optionalString (cfg.interface != null) "--interface '${cfg.interface}'"} \ + ${lib.optionalString (cfg.hoplimit != null) "--hoplimit '${toString cfg.hoplimit}'"} \ + ${lib.optionalString (cfg.workgroup != null) "--workgroup '${cfg.workgroup}'"} \ + ${lib.optionalString (cfg.hostname != null) "--hostname '${cfg.hostname}'"} \ + ${lib.optionalString (cfg.domain != null) "--domain '${cfg.domain}'"} \ + ${lib.optionalString cfg.discovery "--discovery --listen '${cfg.listen}'"} \ + ${lib.escapeShellArgs cfg.extraOptions} ''; # Runtime directory and mode RuntimeDirectory = "wsdd"; @@ -121,7 +118,7 @@ in { }; }; - networking.firewall = mkIf cfg.openFirewall { + networking.firewall = lib.mkIf cfg.openFirewall { allowedTCPPorts = [ 5357 ]; allowedUDPPorts = [ 3702 ]; }; From f0f841be8084c6bce5fadc824551ca23471dd365 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:59 +0200 Subject: [PATCH 130/236] nixos/services.samba: remove `with lib;` --- .../services/network-filesystems/samba.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/network-filesystems/samba.nix b/nixos/modules/services/network-filesystems/samba.nix index cb68a27b20dd..457a68d32973 100644 --- a/nixos/modules/services/network-filesystems/samba.nix +++ b/nixos/modules/services/network-filesystems/samba.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.samba; @@ -23,8 +20,8 @@ in }; imports = [ - (mkRemovedOptionModule [ "services" "samba" "defaultShare" ] "") - (mkRemovedOptionModule [ "services" "samba" "syncPasswordsByPam" ] "This option has been removed by upstream, see https://bugzilla.samba.org/show_bug.cgi?id=10669#c10") + (lib.mkRemovedOptionModule [ "services" "samba" "defaultShare" ] "") + (lib.mkRemovedOptionModule [ "services" "samba" "syncPasswordsByPam" ] "This option has been removed by upstream, see https://bugzilla.samba.org/show_bug.cgi?id=10669#c10") (lib.mkRemovedOptionModule [ "services" "samba" "configText" ] '' Use services.samba.settings instead. @@ -166,7 +163,7 @@ in ###### implementation - config = mkMerge + config = lib.mkMerge [ { assertions = [ { assertion = cfg.nsswins -> cfg.winbindd.enable; message = "If services.samba.nsswins is enabled, then services.samba.winbindd.enable must also be enabled"; @@ -177,8 +174,8 @@ in (lib.mkIf cfg.enable { environment.etc."samba/smb.conf".source = configFile; - system.nssModules = optional cfg.nsswins cfg.package; - system.nssDatabases.hosts = optional cfg.nsswins "wins"; + system.nssModules = lib.optional cfg.nsswins cfg.package; + system.nssDatabases.hosts = lib.optional cfg.nsswins "wins"; systemd = { slices.system-samba = { @@ -210,8 +207,8 @@ in setuid = true; }; - networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ 139 445 ]; - networking.firewall.allowedUDPPorts = mkIf cfg.openFirewall [ 137 138 ]; + networking.firewall.allowedTCPPorts = lib.mkIf cfg.openFirewall [ 139 445 ]; + networking.firewall.allowedUDPPorts = lib.mkIf cfg.openFirewall [ 137 138 ]; }) (lib.mkIf (cfg.enable && cfg.nmbd.enable) { From 443dc608d259bf0ccfe94bd6534b6bb508b6b770 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:18:59 +0200 Subject: [PATCH 131/236] nixos/services.tahoe: remove `with lib;` --- .../services/network-filesystems/tahoe.nix | 154 +++++++++--------- 1 file changed, 76 insertions(+), 78 deletions(-) diff --git a/nixos/modules/services/network-filesystems/tahoe.nix b/nixos/modules/services/network-filesystems/tahoe.nix index cfda62020a1e..e3296e6f66d5 100644 --- a/nixos/modules/services/network-filesystems/tahoe.nix +++ b/nixos/modules/services/network-filesystems/tahoe.nix @@ -1,57 +1,55 @@ { config, lib, pkgs, ... }: - -with lib; let cfg = config.services.tahoe; in { options.services.tahoe = { - introducers = mkOption { + introducers = lib.mkOption { default = {}; - type = with types; attrsOf (submodule { + type = with lib.types; attrsOf (submodule { options = { - nickname = mkOption { - type = types.str; + nickname = lib.mkOption { + type = lib.types.str; description = '' The nickname of this Tahoe introducer. ''; }; - tub.port = mkOption { + tub.port = lib.mkOption { default = 3458; - type = types.port; + type = lib.types.port; description = '' The port on which the introducer will listen. ''; }; - tub.location = mkOption { + tub.location = lib.mkOption { default = null; - type = types.nullOr types.str; + type = lib.types.nullOr lib.types.str; description = '' The external location that the introducer should listen on. If specified, the port should be included. ''; }; - package = mkPackageOption pkgs "tahoelafs" { }; + package = lib.mkPackageOption pkgs "tahoelafs" { }; }; }); description = '' The Tahoe introducers. ''; }; - nodes = mkOption { + nodes = lib.mkOption { default = {}; - type = with types; attrsOf (submodule { + type = with lib.types; attrsOf (submodule { options = { - nickname = mkOption { - type = types.str; + nickname = lib.mkOption { + type = lib.types.str; description = '' The nickname of this Tahoe node. ''; }; - tub.port = mkOption { + tub.port = lib.mkOption { default = 3457; - type = types.port; + type = lib.types.port; description = '' The port on which the tub will listen. @@ -59,9 +57,9 @@ in system to listen on a different port. ''; }; - tub.location = mkOption { + tub.location = lib.mkOption { default = null; - type = types.nullOr types.str; + type = lib.types.nullOr lib.types.str; description = '' The external location that the node should listen on. @@ -71,9 +69,9 @@ in If specified, the port should be included. ''; }; - web.port = mkOption { + web.port = lib.mkOption { default = 3456; - type = types.port; + type = lib.types.port; description = '' The port on which the Web server will listen. @@ -81,59 +79,59 @@ in listen on a different port. ''; }; - client.introducer = mkOption { + client.introducer = lib.mkOption { default = null; - type = types.nullOr types.str; + type = lib.types.nullOr lib.types.str; description = '' The furl for a Tahoe introducer node. Like all furls, keep this safe and don't share it. ''; }; - client.helper = mkOption { + client.helper = lib.mkOption { default = null; - type = types.nullOr types.str; + type = lib.types.nullOr lib.types.str; description = '' The furl for a Tahoe helper node. Like all furls, keep this safe and don't share it. ''; }; - client.shares.needed = mkOption { + client.shares.needed = lib.mkOption { default = 3; - type = types.int; + type = lib.types.int; description = '' The number of shares required to reconstitute a file. ''; }; - client.shares.happy = mkOption { + client.shares.happy = lib.mkOption { default = 7; - type = types.int; + type = lib.types.int; description = '' The number of distinct storage nodes required to store a file. ''; }; - client.shares.total = mkOption { + client.shares.total = lib.mkOption { default = 10; - type = types.int; + type = lib.types.int; description = '' The number of shares required to store a file. ''; }; - storage.enable = mkEnableOption "storage service"; - storage.reservedSpace = mkOption { + storage.enable = lib.mkEnableOption "storage service"; + storage.reservedSpace = lib.mkOption { default = "1G"; - type = types.str; + type = lib.types.str; description = '' The amount of filesystem space to not use for storage. ''; }; - helper.enable = mkEnableOption "helper service"; - sftpd.enable = mkEnableOption "SFTP service"; - sftpd.port = mkOption { + helper.enable = lib.mkEnableOption "helper service"; + sftpd.enable = lib.mkEnableOption "SFTP service"; + sftpd.port = lib.mkOption { default = null; - type = types.nullOr types.int; + type = lib.types.nullOr lib.types.int; description = '' The port on which the SFTP server will listen. @@ -141,35 +139,35 @@ in daemon to listen on a different port. ''; }; - sftpd.hostPublicKeyFile = mkOption { + sftpd.hostPublicKeyFile = lib.mkOption { default = null; - type = types.nullOr types.path; + type = lib.types.nullOr lib.types.path; description = '' Path to the SSH host public key. ''; }; - sftpd.hostPrivateKeyFile = mkOption { + sftpd.hostPrivateKeyFile = lib.mkOption { default = null; - type = types.nullOr types.path; + type = lib.types.nullOr lib.types.path; description = '' Path to the SSH host private key. ''; }; - sftpd.accounts.file = mkOption { + sftpd.accounts.file = lib.mkOption { default = null; - type = types.nullOr types.path; + type = lib.types.nullOr lib.types.path; description = '' Path to the accounts file. ''; }; - sftpd.accounts.url = mkOption { + sftpd.accounts.url = lib.mkOption { default = null; - type = types.nullOr types.str; + type = lib.types.nullOr lib.types.str; description = '' URL of the accounts server. ''; }; - package = mkPackageOption pkgs "tahoelafs" { }; + package = lib.mkPackageOption pkgs "tahoelafs" { }; }; }); description = '' @@ -177,11 +175,11 @@ in ''; }; }; - config = mkMerge [ - (mkIf (cfg.introducers != {}) { + config = lib.mkMerge [ + (lib.mkIf (cfg.introducers != {}) { environment = { - etc = flip mapAttrs' cfg.introducers (node: settings: - nameValuePair "tahoe-lafs/introducer-${node}.cfg" { + etc = lib.flip lib.mapAttrs' cfg.introducers (node: settings: + lib.nameValuePair "tahoe-lafs/introducer-${node}.cfg" { mode = "0444"; text = '' # This configuration is generated by Nix. Edit at your own @@ -190,25 +188,25 @@ in [node] nickname = ${settings.nickname} tub.port = ${toString settings.tub.port} - ${optionalString (settings.tub.location != null) + ${lib.optionalString (settings.tub.location != null) "tub.location = ${settings.tub.location}"} ''; }); # Actually require Tahoe, so that we will have it installed. - systemPackages = flip mapAttrsToList cfg.introducers (node: settings: + systemPackages = lib.flip lib.mapAttrsToList cfg.introducers (node: settings: settings.package ); }; # Open up the firewall. - # networking.firewall.allowedTCPPorts = flip mapAttrsToList cfg.introducers + # networking.firewall.allowedTCPPorts = lib.flip lib.mapAttrsToList cfg.introducers # (node: settings: settings.tub.port); - systemd.services = flip mapAttrs' cfg.introducers (node: settings: + systemd.services = lib.flip lib.mapAttrs' cfg.introducers (node: settings: let pidfile = "/run/tahoe.introducer-${node}.pid"; # This is a directory, but it has no trailing slash. Tahoe commands # get antsy when there's a trailing slash. nodedir = "/var/db/tahoe-lafs/introducer-${node}"; - in nameValuePair "tahoe.introducer-${node}" { + in lib.nameValuePair "tahoe.introducer-${node}" { description = "Tahoe LAFS node ${node}"; wantedBy = [ "multi-user.target" ]; path = [ settings.package ]; @@ -242,16 +240,16 @@ in cp /etc/tahoe-lafs/introducer-"${node}".cfg ${lib.escapeShellArg nodedir}/tahoe.cfg ''; }); - users.users = flip mapAttrs' cfg.introducers (node: _: - nameValuePair "tahoe.introducer-${node}" { + users.users = lib.flip lib.mapAttrs' cfg.introducers (node: _: + lib.nameValuePair "tahoe.introducer-${node}" { description = "Tahoe node user for introducer ${node}"; isSystemUser = true; }); }) - (mkIf (cfg.nodes != {}) { + (lib.mkIf (cfg.nodes != {}) { environment = { - etc = flip mapAttrs' cfg.nodes (node: settings: - nameValuePair "tahoe-lafs/${node}.cfg" { + etc = lib.flip lib.mapAttrs' cfg.nodes (node: settings: + lib.nameValuePair "tahoe-lafs/${node}.cfg" { mode = "0444"; text = '' # This configuration is generated by Nix. Edit at your own @@ -260,16 +258,16 @@ in [node] nickname = ${settings.nickname} tub.port = ${toString settings.tub.port} - ${optionalString (settings.tub.location != null) + ${lib.optionalString (settings.tub.location != null) "tub.location = ${settings.tub.location}"} # This is a Twisted endpoint. Twisted Web doesn't work on # non-TCP. ~ C. web.port = tcp:${toString settings.web.port} [client] - ${optionalString (settings.client.introducer != null) + ${lib.optionalString (settings.client.introducer != null) "introducer.furl = ${settings.client.introducer}"} - ${optionalString (settings.client.helper != null) + ${lib.optionalString (settings.client.helper != null) "helper.furl = ${settings.client.helper}"} shares.needed = ${toString settings.client.shares.needed} @@ -277,41 +275,41 @@ in shares.total = ${toString settings.client.shares.total} [storage] - enabled = ${boolToString settings.storage.enable} + enabled = ${lib.boolToString settings.storage.enable} reserved_space = ${settings.storage.reservedSpace} [helper] - enabled = ${boolToString settings.helper.enable} + enabled = ${lib.boolToString settings.helper.enable} [sftpd] - enabled = ${boolToString settings.sftpd.enable} - ${optionalString (settings.sftpd.port != null) + enabled = ${lib.boolToString settings.sftpd.enable} + ${lib.optionalString (settings.sftpd.port != null) "port = ${toString settings.sftpd.port}"} - ${optionalString (settings.sftpd.hostPublicKeyFile != null) + ${lib.optionalString (settings.sftpd.hostPublicKeyFile != null) "host_pubkey_file = ${settings.sftpd.hostPublicKeyFile}"} - ${optionalString (settings.sftpd.hostPrivateKeyFile != null) + ${lib.optionalString (settings.sftpd.hostPrivateKeyFile != null) "host_privkey_file = ${settings.sftpd.hostPrivateKeyFile}"} - ${optionalString (settings.sftpd.accounts.file != null) + ${lib.optionalString (settings.sftpd.accounts.file != null) "accounts.file = ${settings.sftpd.accounts.file}"} - ${optionalString (settings.sftpd.accounts.url != null) + ${lib.optionalString (settings.sftpd.accounts.url != null) "accounts.url = ${settings.sftpd.accounts.url}"} ''; }); # Actually require Tahoe, so that we will have it installed. - systemPackages = flip mapAttrsToList cfg.nodes (node: settings: + systemPackages = lib.flip lib.mapAttrsToList cfg.nodes (node: settings: settings.package ); }; # Open up the firewall. - # networking.firewall.allowedTCPPorts = flip mapAttrsToList cfg.nodes + # networking.firewall.allowedTCPPorts = lib.flip lib.mapAttrsToList cfg.nodes # (node: settings: settings.tub.port); - systemd.services = flip mapAttrs' cfg.nodes (node: settings: + systemd.services = lib.flip lib.mapAttrs' cfg.nodes (node: settings: let pidfile = "/run/tahoe.${node}.pid"; # This is a directory, but it has no trailing slash. Tahoe commands # get antsy when there's a trailing slash. nodedir = "/var/db/tahoe-lafs/${node}"; - in nameValuePair "tahoe.${node}" { + in lib.nameValuePair "tahoe.${node}" { description = "Tahoe LAFS node ${node}"; wantedBy = [ "multi-user.target" ]; path = [ settings.package ]; @@ -342,8 +340,8 @@ in cp /etc/tahoe-lafs/${lib.escapeShellArg node}.cfg ${lib.escapeShellArg nodedir}/tahoe.cfg ''; }); - users.users = flip mapAttrs' cfg.nodes (node: _: - nameValuePair "tahoe.${node}" { + users.users = lib.flip lib.mapAttrs' cfg.nodes (node: _: + lib.nameValuePair "tahoe.${node}" { description = "Tahoe node user for node ${node}"; isSystemUser = true; }); From 43235a1a61df6a0948db4f3b05bf4745d1cb86c5 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:00 +0200 Subject: [PATCH 132/236] nixos/services.u9fs: remove `with lib;` --- .../services/network-filesystems/u9fs.nix | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/nixos/modules/services/network-filesystems/u9fs.nix b/nixos/modules/services/network-filesystems/u9fs.nix index 2233d6f2a60d..346705f5e3d0 100644 --- a/nixos/modules/services/network-filesystems/u9fs.nix +++ b/nixos/modules/services/network-filesystems/u9fs.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.u9fs; in @@ -11,14 +8,14 @@ in services.u9fs = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = "Whether to run the u9fs 9P server for Unix."; }; - listenStreams = mkOption { - type = types.listOf types.str; + listenStreams = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ "564" ]; example = [ "192.168.16.1:564" ]; description = '' @@ -27,14 +24,14 @@ in ''; }; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = "nobody"; description = "User to run u9fs under."; }; - extraArgs = mkOption { - type = types.str; + extraArgs = lib.mkOption { + type = lib.types.str; default = ""; example = "-a none"; description = '' @@ -47,7 +44,7 @@ in }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd = { sockets.u9fs = { From e71c09b8f8f576d97e7b6cc1019f215429fcdb2f Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:00 +0200 Subject: [PATCH 133/236] nixos/services.webdav-server-rs: remove `with lib;` --- .../network-filesystems/webdav-server-rs.nix | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/nixos/modules/services/network-filesystems/webdav-server-rs.nix b/nixos/modules/services/network-filesystems/webdav-server-rs.nix index 7e83d78db5b0..31f641a82d79 100644 --- a/nixos/modules/services/network-filesystems/webdav-server-rs.nix +++ b/nixos/modules/services/network-filesystems/webdav-server-rs.nix @@ -1,10 +1,8 @@ { config, lib, pkgs, ... }: - -with lib; let cfg = config.services.webdav-server-rs; format = pkgs.formats.toml { }; - settings = recursiveUpdate + settings = lib.recursiveUpdate { server.uid = config.users.users."${cfg.user}".uid; server.gid = config.users.groups."${cfg.group}".gid; @@ -14,27 +12,27 @@ in { options = { services.webdav-server-rs = { - enable = mkEnableOption "WebDAV server"; + enable = lib.mkEnableOption "WebDAV server"; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = "webdav"; description = "User to run under when setuid is not enabled."; }; - group = mkOption { - type = types.str; + group = lib.mkOption { + type = lib.types.str; default = "webdav"; description = "Group to run under when setuid is not enabled."; }; - debug = mkOption { - type = types.bool; + debug = lib.mkOption { + type = lib.types.bool; default = false; description = "Enable debug mode."; }; - settings = mkOption { + settings = lib.mkOption { type = format.type; default = { }; description = '' @@ -42,7 +40,7 @@ in options can be found at [here](https://github.com/miquels/webdav-server-rs/blob/master/webdav-server.toml). ''; - example = literalExpression '' + example = lib.literalExpression '' { server.listen = [ "0.0.0.0:4918" "[::]:4918" ]; accounts = { @@ -75,8 +73,8 @@ in ''; }; - configFile = mkOption { - type = types.path; + configFile = lib.mkOption { + type = lib.types.path; default = format.generate "webdav-server.toml" settings; defaultText = "Config file generated from services.webdav-server-rs.settings"; description = '' @@ -88,19 +86,19 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { assertions = [ { - assertion = hasAttr cfg.user config.users.users && config.users.users."${cfg.user}".uid != null; + assertion = lib.hasAttr cfg.user config.users.users && config.users.users."${cfg.user}".uid != null; message = "users.users.${cfg.user} and users.users.${cfg.user}.uid must be defined."; } { - assertion = hasAttr cfg.group config.users.groups && config.users.groups."${cfg.group}".gid != null; + assertion = lib.hasAttr cfg.group config.users.groups && config.users.groups."${cfg.group}".gid != null; message = "users.groups.${cfg.group} and users.groups.${cfg.group}.gid must be defined."; } ]; - users.users = optionalAttrs (cfg.user == "webdav") { + users.users = lib.optionalAttrs (cfg.user == "webdav") { webdav = { description = "WebDAV user"; group = cfg.group; @@ -108,7 +106,7 @@ in }; }; - users.groups = optionalAttrs (cfg.group == "webdav") { + users.groups = lib.optionalAttrs (cfg.group == "webdav") { webdav.gid = config.ids.gids.webdav; }; @@ -146,5 +144,5 @@ in }; }; - meta.maintainers = with maintainers; [ pmy ]; + meta.maintainers = with lib.maintainers; [ pmy ]; } From 9ffa253b8746a59b2634020d0012f776fec0a05c Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:00 +0200 Subject: [PATCH 134/236] nixos/services.webdav: remove `with lib;` --- .../services/network-filesystems/webdav.nix | 34 +++++++++---------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/nixos/modules/services/network-filesystems/webdav.nix b/nixos/modules/services/network-filesystems/webdav.nix index 7e435fc65253..28f129fc12d2 100644 --- a/nixos/modules/services/network-filesystems/webdav.nix +++ b/nixos/modules/services/network-filesystems/webdav.nix @@ -1,6 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; let cfg = config.services.webdav; format = pkgs.formats.yaml { }; @@ -8,21 +6,21 @@ in { options = { services.webdav = { - enable = mkEnableOption "WebDAV server"; + enable = lib.mkEnableOption "WebDAV server"; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = "webdav"; description = "User account under which WebDAV runs."; }; - group = mkOption { - type = types.str; + group = lib.mkOption { + type = lib.types.str; default = "webdav"; description = "Group under which WebDAV runs."; }; - settings = mkOption { + settings = lib.mkOption { type = format.type; default = { }; description = '' @@ -36,7 +34,7 @@ in [EnvironmentFile](https://www.freedesktop.org/software/systemd/man/systemd.exec.html#EnvironmentFile=). This prevents adding secrets to the world-readable Nix store. ''; - example = literalExpression '' + example = lib.literalExpression '' { address = "0.0.0.0"; port = 8080; @@ -53,8 +51,8 @@ in ''; }; - configFile = mkOption { - type = types.path; + configFile = lib.mkOption { + type = lib.types.path; default = format.generate "webdav.yaml" cfg.settings; defaultText = "Config file generated from services.webdav.settings"; description = '' @@ -64,8 +62,8 @@ in example = "/etc/webdav/config.yaml"; }; - environmentFile = mkOption { - type = types.nullOr types.path; + environmentFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; default = null; description = '' Environment file as defined in {manpage}`systemd.exec(5)`. @@ -74,8 +72,8 @@ in }; }; - config = mkIf cfg.enable { - users.users = mkIf (cfg.user == "webdav") { + config = lib.mkIf cfg.enable { + users.users = lib.mkIf (cfg.user == "webdav") { webdav = { description = "WebDAV daemon user"; group = cfg.group; @@ -83,7 +81,7 @@ in }; }; - users.groups = mkIf (cfg.group == "webdav") { + users.groups = lib.mkIf (cfg.group == "webdav") { webdav.gid = config.ids.gids.webdav; }; @@ -96,10 +94,10 @@ in Restart = "on-failure"; User = cfg.user; Group = cfg.group; - EnvironmentFile = mkIf (cfg.environmentFile != null) [ cfg.environmentFile ]; + EnvironmentFile = lib.mkIf (cfg.environmentFile != null) [ cfg.environmentFile ]; }; }; }; - meta.maintainers = with maintainers; [ pmy ]; + meta.maintainers = with lib.maintainers; [ pmy ]; } From bc58f678122a5eb0e31458221a312711d440a4f6 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:00 +0200 Subject: [PATCH 135/236] nixos/services.xtreemfs: remove `with lib;` --- .../services/network-filesystems/xtreemfs.nix | 119 +++++++++--------- 1 file changed, 58 insertions(+), 61 deletions(-) diff --git a/nixos/modules/services/network-filesystems/xtreemfs.nix b/nixos/modules/services/network-filesystems/xtreemfs.nix index 78a0272c0567..e2cde1903edd 100644 --- a/nixos/modules/services/network-filesystems/xtreemfs.nix +++ b/nixos/modules/services/network-filesystems/xtreemfs.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.xtreemfs; @@ -29,13 +26,13 @@ let dirConfig = pkgs.writeText "xtreemfs-dir-config.properties" '' uuid = ${cfg.dir.uuid} listen.port = ${toString cfg.dir.port} - ${optionalString (cfg.dir.address != "") "listen.address = ${cfg.dir.address}"} + ${lib.optionalString (cfg.dir.address != "") "listen.address = ${cfg.dir.address}"} http_port = ${toString cfg.dir.httpPort} babudb.baseDir = ${home}/dir/database babudb.logDir = ${home}/dir/db-log babudb.sync = ${if cfg.dir.replication.enable then "FDATASYNC" else cfg.dir.syncMode} - ${optionalString cfg.dir.replication.enable "babudb.plugin.0 = ${dirReplicationConfig}"} + ${lib.optionalString cfg.dir.replication.enable "babudb.plugin.0 = ${dirReplicationConfig}"} ${cfg.dir.extraConfig} ''; @@ -51,13 +48,13 @@ let mrcConfig = pkgs.writeText "xtreemfs-mrc-config.properties" '' uuid = ${cfg.mrc.uuid} listen.port = ${toString cfg.mrc.port} - ${optionalString (cfg.mrc.address != "") "listen.address = ${cfg.mrc.address}"} + ${lib.optionalString (cfg.mrc.address != "") "listen.address = ${cfg.mrc.address}"} http_port = ${toString cfg.mrc.httpPort} babudb.baseDir = ${home}/mrc/database babudb.logDir = ${home}/mrc/db-log babudb.sync = ${if cfg.mrc.replication.enable then "FDATASYNC" else cfg.mrc.syncMode} - ${optionalString cfg.mrc.replication.enable "babudb.plugin.0 = ${mrcReplicationConfig}"} + ${lib.optionalString cfg.mrc.replication.enable "babudb.plugin.0 = ${mrcReplicationConfig}"} ${cfg.mrc.extraConfig} ''; @@ -65,14 +62,14 @@ let osdConfig = pkgs.writeText "xtreemfs-osd-config.properties" '' uuid = ${cfg.osd.uuid} listen.port = ${toString cfg.osd.port} - ${optionalString (cfg.osd.address != "") "listen.address = ${cfg.osd.address}"} + ${lib.optionalString (cfg.osd.address != "") "listen.address = ${cfg.osd.address}"} http_port = ${toString cfg.osd.httpPort} object_dir = ${home}/osd/ ${cfg.osd.extraConfig} ''; - optionalDir = optionals cfg.dir.enable ["xtreemfs-dir.service"]; + optionalDir = lib.optionals cfg.dir.enable ["xtreemfs-dir.service"]; systemdOptionalDependencies = { after = [ "network.target" ] ++ optionalDir; @@ -89,10 +86,10 @@ in services.xtreemfs = { - enable = mkEnableOption "XtreemFS"; + enable = lib.mkEnableOption "XtreemFS"; - homeDir = mkOption { - type = types.path; + homeDir = lib.mkOption { + type = lib.types.path; default = "/var/lib/xtreemfs"; description = '' XtreemFS home dir for the xtreemfs user. @@ -100,32 +97,32 @@ in }; dir = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = true; description = '' Whether to enable XtreemFS DIR service. ''; }; - uuid = mkOption { + uuid = lib.mkOption { example = "eacb6bab-f444-4ebf-a06a-3f72d7465e40"; - type = types.str; + type = lib.types.str; description = '' Must be set to a unique identifier, preferably a UUID according to RFC 4122. UUIDs can be generated with `uuidgen` command, found in the `util-linux` package. ''; }; - port = mkOption { + port = lib.mkOption { default = 32638; - type = types.port; + type = lib.types.port; description = '' The port to listen on for incoming connections (TCP). ''; }; - address = mkOption { - type = types.str; + address = lib.mkOption { + type = lib.types.str; example = "127.0.0.1"; default = ""; description = '' @@ -133,16 +130,16 @@ in specified, the service will listen on all interfaces (any). ''; }; - httpPort = mkOption { + httpPort = lib.mkOption { default = 30638; - type = types.port; + type = lib.types.port; description = '' Specifies the listen port for the HTTP service that returns the status page. ''; }; - syncMode = mkOption { - type = types.enum [ "ASYNC" "SYNC_WRITE_METADATA" "SYNC_WRITE" "FDATASYNC" "FSYNC" ]; + syncMode = lib.mkOption { + type = lib.types.enum [ "ASYNC" "SYNC_WRITE_METADATA" "SYNC_WRITE" "FDATASYNC" "FSYNC" ]; default = "FSYNC"; example = "FDATASYNC"; description = '' @@ -160,8 +157,8 @@ in (If xtreemfs.dir.replication.enable is true then FDATASYNC is forced) ''; }; - extraConfig = mkOption { - type = types.lines; + extraConfig = lib.mkOption { + type = lib.types.lines; default = ""; example = '' # specify whether SSL is required @@ -180,9 +177,9 @@ in ''; }; replication = { - enable = mkEnableOption "XtreemFS DIR replication plugin"; - extraConfig = mkOption { - type = types.lines; + enable = lib.mkEnableOption "XtreemFS DIR replication plugin"; + extraConfig = lib.mkOption { + type = lib.types.lines; example = '' # participants of the replication including this replica babudb.repl.participant.0 = 192.168.0.10 @@ -225,50 +222,50 @@ in }; mrc = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = true; description = '' Whether to enable XtreemFS MRC service. ''; }; - uuid = mkOption { + uuid = lib.mkOption { example = "eacb6bab-f444-4ebf-a06a-3f72d7465e41"; - type = types.str; + type = lib.types.str; description = '' Must be set to a unique identifier, preferably a UUID according to RFC 4122. UUIDs can be generated with `uuidgen` command, found in the `util-linux` package. ''; }; - port = mkOption { + port = lib.mkOption { default = 32636; - type = types.port; + type = lib.types.port; description = '' The port to listen on for incoming connections (TCP). ''; }; - address = mkOption { + address = lib.mkOption { example = "127.0.0.1"; - type = types.str; + type = lib.types.str; default = ""; description = '' If specified, it defines the interface to listen on. If not specified, the service will listen on all interfaces (any). ''; }; - httpPort = mkOption { + httpPort = lib.mkOption { default = 30636; - type = types.port; + type = lib.types.port; description = '' Specifies the listen port for the HTTP service that returns the status page. ''; }; - syncMode = mkOption { + syncMode = lib.mkOption { default = "FSYNC"; - type = types.enum [ "ASYNC" "SYNC_WRITE_METADATA" "SYNC_WRITE" "FDATASYNC" "FSYNC" ]; + type = lib.types.enum [ "ASYNC" "SYNC_WRITE_METADATA" "SYNC_WRITE" "FDATASYNC" "FSYNC" ]; example = "FDATASYNC"; description = '' The sync mode influences how operations are committed to the disk @@ -285,8 +282,8 @@ in (If xtreemfs.mrc.replication.enable is true then FDATASYNC is forced) ''; }; - extraConfig = mkOption { - type = types.lines; + extraConfig = lib.mkOption { + type = lib.types.lines; example = '' osd_check_interval = 300 no_atime = true @@ -323,9 +320,9 @@ in ''; }; replication = { - enable = mkEnableOption "XtreemFS MRC replication plugin"; - extraConfig = mkOption { - type = types.lines; + enable = lib.mkEnableOption "XtreemFS MRC replication plugin"; + extraConfig = lib.mkOption { + type = lib.types.lines; example = '' # participants of the replication including this replica babudb.repl.participant.0 = 192.168.0.10 @@ -368,49 +365,49 @@ in }; osd = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = true; description = '' Whether to enable XtreemFS OSD service. ''; }; - uuid = mkOption { + uuid = lib.mkOption { example = "eacb6bab-f444-4ebf-a06a-3f72d7465e42"; - type = types.str; + type = lib.types.str; description = '' Must be set to a unique identifier, preferably a UUID according to RFC 4122. UUIDs can be generated with `uuidgen` command, found in the `util-linux` package. ''; }; - port = mkOption { + port = lib.mkOption { default = 32640; - type = types.port; + type = lib.types.port; description = '' The port to listen on for incoming connections (TCP and UDP). ''; }; - address = mkOption { + address = lib.mkOption { example = "127.0.0.1"; - type = types.str; + type = lib.types.str; default = ""; description = '' If specified, it defines the interface to listen on. If not specified, the service will listen on all interfaces (any). ''; }; - httpPort = mkOption { + httpPort = lib.mkOption { default = 30640; - type = types.port; + type = lib.types.port; description = '' Specifies the listen port for the HTTP service that returns the status page. ''; }; - extraConfig = mkOption { - type = types.lines; + extraConfig = lib.mkOption { + type = lib.types.lines; example = '' local_clock_renewal = 0 remote_time_sync = 30000 @@ -464,7 +461,7 @@ in { gid = config.ids.gids.xtreemfs; }; - systemd.services.xtreemfs-dir = mkIf cfg.dir.enable { + systemd.services.xtreemfs-dir = lib.mkIf cfg.dir.enable { description = "XtreemFS-DIR Server"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; @@ -474,7 +471,7 @@ in }; }; - systemd.services.xtreemfs-mrc = mkIf cfg.mrc.enable ({ + systemd.services.xtreemfs-mrc = lib.mkIf cfg.mrc.enable ({ description = "XtreemFS-MRC Server"; serviceConfig = { User = "xtreemfs"; @@ -482,7 +479,7 @@ in }; } // systemdOptionalDependencies); - systemd.services.xtreemfs-osd = mkIf cfg.osd.enable ({ + systemd.services.xtreemfs-osd = lib.mkIf cfg.osd.enable ({ description = "XtreemFS-OSD Server"; serviceConfig = { User = "xtreemfs"; From 76831f7a1b220f17d83c56e727ac70013add0aae Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:00 +0200 Subject: [PATCH 136/236] nixos/services.yandex-disk: remove `with lib;` --- .../network-filesystems/yandex-disk.nix | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/nixos/modules/services/network-filesystems/yandex-disk.nix b/nixos/modules/services/network-filesystems/yandex-disk.nix index de5d42a4bcde..ee9b58b081a3 100644 --- a/nixos/modules/services/network-filesystems/yandex-disk.nix +++ b/nixos/modules/services/network-filesystems/yandex-disk.nix @@ -1,7 +1,4 @@ { config, pkgs, lib, ... }: - -with lib; - let cfg = config.services.yandex-disk; @@ -20,47 +17,47 @@ in services.yandex-disk = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to enable Yandex-disk client. See https://disk.yandex.ru/ ''; }; - username = mkOption { + username = lib.mkOption { default = ""; - type = types.str; + type = lib.types.str; description = '' Your yandex.com login name. ''; }; - password = mkOption { + password = lib.mkOption { default = ""; - type = types.str; + type = lib.types.str; description = '' Your yandex.com password. Warning: it will be world-readable in /nix/store. ''; }; - user = mkOption { + user = lib.mkOption { default = null; - type = types.nullOr types.str; + type = lib.types.nullOr lib.types.str; description = '' The user the yandex-disk daemon should run as. ''; }; - directory = mkOption { - type = types.path; + directory = lib.mkOption { + type = lib.types.path; default = "/home/Yandex.Disk"; description = "The directory to use for Yandex.Disk storage"; }; - excludes = mkOption { + excludes = lib.mkOption { default = ""; - type = types.commas; + type = lib.types.commas; example = "data,backup"; description = '' Comma-separated list of directories which are excluded from synchronization. @@ -74,9 +71,9 @@ in ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { - users.users = mkIf (cfg.user == null) [ { + users.users = lib.mkIf (cfg.user == null) [ { name = u; uid = config.ids.uids.yandexdisk; group = "nogroup"; From 02bb53fbc36d8f3bb9417b38f8e7bc39deba3ccc Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:00 +0200 Subject: [PATCH 137/236] nixos/services._3proxy: remove `with lib;` --- nixos/modules/services/networking/3proxy.nix | 139 +++++++++---------- 1 file changed, 69 insertions(+), 70 deletions(-) diff --git a/nixos/modules/services/networking/3proxy.nix b/nixos/modules/services/networking/3proxy.nix index 865916f7aff5..03c67ed2f6f8 100644 --- a/nixos/modules/services/networking/3proxy.nix +++ b/nixos/modules/services/networking/3proxy.nix @@ -1,21 +1,20 @@ { config, lib, pkgs, ... }: -with lib; let pkg = pkgs._3proxy; cfg = config.services._3proxy; - optionalList = list: if list == [ ] then "*" else concatMapStringsSep "," toString list; + optionalList = list: if list == [ ] then "*" else lib.concatMapStringsSep "," toString list; in { options.services._3proxy = { - enable = mkEnableOption "3proxy"; - confFile = mkOption { - type = types.path; + enable = lib.mkEnableOption "3proxy"; + confFile = lib.mkOption { + type = lib.types.path; example = "/var/lib/3proxy/3proxy.conf"; description = '' Ignore all other 3proxy options and load configuration from this file. ''; }; - usersFile = mkOption { - type = types.nullOr types.path; + usersFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; default = null; example = "/var/lib/3proxy/3proxy.passwd"; description = '' @@ -40,11 +39,11 @@ in { Consult [documentation](https://github.com/z3APA3A/3proxy/wiki/How-To-%28incomplete%29#USERS) for more information. ''; }; - services = mkOption { - type = types.listOf (types.submodule { + services = lib.mkOption { + type = lib.types.listOf (lib.types.submodule { options = { - type = mkOption { - type = types.enum [ + type = lib.mkOption { + type = lib.types.enum [ "proxy" "socks" "pop3p" @@ -68,32 +67,32 @@ in { - `"udppm"`: UDP portmapper. ''; }; - bindAddress = mkOption { - type = types.str; + bindAddress = lib.mkOption { + type = lib.types.str; default = "[::]"; example = "127.0.0.1"; description = '' Address used for service. ''; }; - bindPort = mkOption { - type = types.nullOr types.int; + bindPort = lib.mkOption { + type = lib.types.nullOr lib.types.int; default = null; example = 3128; description = '' Override default port used for service. ''; }; - maxConnections = mkOption { - type = types.int; + maxConnections = lib.mkOption { + type = lib.types.int; default = 100; example = 1000; description = '' Maximum number of simulationeous connections to this service. ''; }; - auth = mkOption { - type = types.listOf (types.enum [ "none" "iponly" "strong" ]); + auth = lib.mkOption { + type = lib.types.listOf (lib.types.enum [ "none" "iponly" "strong" ]); example = [ "iponly" "strong" ]; description = '' Authentication type. The following values are valid: @@ -122,11 +121,11 @@ in { In this example strong username authentication is not required to access 192.168.0.0/16. ''; }; - acl = mkOption { - type = types.listOf (types.submodule { + acl = lib.mkOption { + type = lib.types.listOf (lib.types.submodule { options = { - rule = mkOption { - type = types.enum [ "allow" "deny" ]; + rule = lib.mkOption { + type = lib.types.enum [ "allow" "deny" ]; example = "allow"; description = '' ACL rule. The following values are valid: @@ -135,24 +134,24 @@ in { - `"deny"`: connections not allowed. ''; }; - users = mkOption { - type = types.listOf types.str; + users = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; example = [ "user1" "user2" "user3" ]; description = '' List of users, use empty list for any. ''; }; - sources = mkOption { - type = types.listOf types.str; + sources = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; example = [ "127.0.0.1" "192.168.1.0/24" ]; description = '' List of source IP range, use empty list for any. ''; }; - targets = mkOption { - type = types.listOf types.str; + targets = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; example = [ "127.0.0.1" "192.168.1.0/24" ]; description = '' @@ -162,8 +161,8 @@ in { Hostname is only checked if hostname presents in request. ''; }; - targetPorts = mkOption { - type = types.listOf types.int; + targetPorts = lib.mkOption { + type = lib.types.listOf lib.types.int; default = [ ]; example = [ 80 443 ]; description = '' @@ -173,7 +172,7 @@ in { }; }); default = [ ]; - example = literalExpression '' + example = lib.literalExpression '' [ { rule = "allow"; @@ -192,8 +191,8 @@ in { Use this option to limit user access to resources. ''; }; - extraArguments = mkOption { - type = types.nullOr types.str; + extraArguments = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; example = "-46"; description = '' @@ -201,8 +200,8 @@ in { Consult "Options" section in [documentation](https://github.com/z3APA3A/3proxy/wiki/3proxy.cfg) for available arguments. ''; }; - extraConfig = mkOption { - type = types.nullOr types.lines; + extraConfig = lib.mkOption { + type = lib.types.nullOr lib.types.lines; default = null; description = '' Extra configuration for service. Use this to configure things like bandwidth limiter or ACL-based redirection. @@ -212,7 +211,7 @@ in { }; }); default = [ ]; - example = literalExpression '' + example = lib.literalExpression '' [ { type = "proxy"; @@ -238,15 +237,15 @@ in { Use this option to define 3proxy services. ''; }; - denyPrivate = mkOption { - type = types.bool; + denyPrivate = lib.mkOption { + type = lib.types.bool; default = true; description = '' Whether to deny access to private IP ranges including loopback. ''; }; - privateRanges = mkOption { - type = types.listOf types.str; + privateRanges = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ "0.0.0.0/8" "127.0.0.0/8" @@ -262,11 +261,11 @@ in { What IP ranges to deny access when denyPrivate is set tu true. ''; }; - resolution = mkOption { - type = types.submodule { + resolution = lib.mkOption { + type = lib.types.submodule { options = { - nserver = mkOption { - type = types.listOf types.str; + nserver = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; example = [ "127.0.0.53" "192.168.1.3:5353/tcp" ]; description = '' @@ -276,20 +275,20 @@ in { default system name resolution functions are used. ''; }; - nscache = mkOption { - type = types.int; + nscache = lib.mkOption { + type = lib.types.int; default = 65535; description = "Set name cache size for IPv4."; }; - nscache6 = mkOption { - type = types.int; + nscache6 = lib.mkOption { + type = lib.types.int; default = 65535; description = "Set name cache size for IPv6."; }; - nsrecord = mkOption { - type = types.attrsOf types.str; + nsrecord = lib.mkOption { + type = lib.types.attrsOf lib.types.str; default = { }; - example = literalExpression '' + example = lib.literalExpression '' { "files.local" = "192.168.1.12"; "site.local" = "192.168.1.43"; @@ -304,8 +303,8 @@ in { Use this option to configure name resolution and DNS caching. ''; }; - extraConfig = mkOption { - type = types.nullOr types.lines; + extraConfig = lib.mkOption { + type = lib.types.nullOr lib.types.lines; default = null; description = '' Extra configuration, appended to the 3proxy configuration file. @@ -314,33 +313,33 @@ in { }; }; - config = mkIf cfg.enable { - services._3proxy.confFile = mkDefault (pkgs.writeText "3proxy.conf" '' + config = lib.mkIf cfg.enable { + services._3proxy.confFile = lib.mkDefault (pkgs.writeText "3proxy.conf" '' # log to stdout log - ${concatMapStringsSep "\n" (x: "nserver " + x) cfg.resolution.nserver} + ${lib.concatMapStringsSep "\n" (x: "nserver " + x) cfg.resolution.nserver} nscache ${toString cfg.resolution.nscache} nscache6 ${toString cfg.resolution.nscache6} - ${concatMapStringsSep "\n" (x: "nsrecord " + x) - (mapAttrsToList (name: value: "${name} ${value}") + ${lib.concatMapStringsSep "\n" (x: "nsrecord " + x) + (lib.mapAttrsToList (name: value: "${name} ${value}") cfg.resolution.nsrecord)} - ${optionalString (cfg.usersFile != null) + ${lib.optionalString (cfg.usersFile != null) ''users $"${cfg.usersFile}"'' } - ${concatMapStringsSep "\n" (service: '' - auth ${concatStringsSep " " service.auth} + ${lib.concatMapStringsSep "\n" (service: '' + auth ${lib.concatStringsSep " " service.auth} - ${optionalString (cfg.denyPrivate) + ${lib.optionalString (cfg.denyPrivate) "deny * * ${optionalList cfg.privateRanges}"} - ${concatMapStringsSep "\n" (acl: + ${lib.concatMapStringsSep "\n" (acl: "${acl.rule} ${ - concatMapStringsSep " " optionalList [ + lib.concatMapStringsSep " " optionalList [ acl.users acl.sources acl.targets @@ -350,18 +349,18 @@ in { maxconn ${toString service.maxConnections} - ${optionalString (service.extraConfig != null) service.extraConfig} + ${lib.optionalString (service.extraConfig != null) service.extraConfig} ${service.type} -i${toString service.bindAddress} ${ - optionalString (service.bindPort != null) + lib.optionalString (service.bindPort != null) "-p${toString service.bindPort}" } ${ - optionalString (service.extraArguments != null) service.extraArguments + lib.optionalString (service.extraArguments != null) service.extraArguments } flush '') cfg.services} - ${optionalString (cfg.extraConfig != null) cfg.extraConfig} + ${lib.optionalString (cfg.extraConfig != null) cfg.extraConfig} ''); systemd.services."3proxy" = { description = "Tiny free proxy server"; @@ -377,5 +376,5 @@ in { }; }; - meta.maintainers = with maintainers; [ misuzu ]; + meta.maintainers = with lib.maintainers; [ misuzu ]; } From b1bbe81c8d630ba8a8a7198e7fba8f49bd0e8a64 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:00 +0200 Subject: [PATCH 138/236] nixos/services.adguardhome: remove `with lib;` --- .../services/networking/adguardhome.nix | 51 +++++++++---------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/nixos/modules/services/networking/adguardhome.nix b/nixos/modules/services/networking/adguardhome.nix index 5be3e0bea224..dab81ce18b29 100644 --- a/nixos/modules/services/networking/adguardhome.nix +++ b/nixos/modules/services/networking/adguardhome.nix @@ -1,12 +1,9 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.adguardhome; settingsFormat = pkgs.formats.yaml { }; - args = concatStringsSep " " ([ + args = lib.concatStringsSep " " ([ "--no-check-update" "--pidfile /run/AdGuardHome/AdGuardHome.pid" "--work-dir /var/lib/AdGuardHome/" @@ -28,19 +25,19 @@ let checkPhase = "${cfg.package}/bin/adguardhome -c $out --check-config"; }); in { - options.services.adguardhome = with types; { - enable = mkEnableOption "AdGuard Home network-wide ad blocker"; + options.services.adguardhome = with lib.types; { + enable = lib.mkEnableOption "AdGuard Home network-wide ad blocker"; - package = mkOption { + package = lib.mkOption { type = package; default = pkgs.adguardhome; - defaultText = literalExpression "pkgs.adguardhome"; + defaultText = lib.literalExpression "pkgs.adguardhome"; description = '' The package that runs adguardhome. ''; }; - openFirewall = mkOption { + openFirewall = lib.mkOption { default = false; type = bool; description = '' @@ -49,9 +46,9 @@ in { ''; }; - allowDHCP = mkOption { + allowDHCP = lib.mkOption { default = settings.dhcp.enabled or false; - defaultText = literalExpression "config.services.adguardhome.settings.dhcp.enabled or false"; + defaultText = lib.literalExpression "config.services.adguardhome.settings.dhcp.enabled or false"; type = bool; description = '' Allows AdGuard Home to open raw sockets (`CAP_NET_RAW`), which is @@ -63,7 +60,7 @@ in { ''; }; - mutableSettings = mkOption { + mutableSettings = lib.mkOption { default = true; type = bool; description = '' @@ -72,7 +69,7 @@ in { ''; }; - host = mkOption { + host = lib.mkOption { default = "0.0.0.0"; type = str; description = '' @@ -80,7 +77,7 @@ in { ''; }; - port = mkOption { + port = lib.mkOption { default = 3000; type = port; description = '' @@ -88,14 +85,14 @@ in { ''; }; - settings = mkOption { + settings = lib.mkOption { default = null; type = nullOr (submodule { freeformType = settingsFormat.type; options = { - schema_version = mkOption { + schema_version = lib.mkOption { default = cfg.package.schema_version; - defaultText = literalExpression "cfg.package.schema_version"; + defaultText = lib.literalExpression "cfg.package.schema_version"; type = int; description = '' Schema version for the configuration. @@ -121,7 +118,7 @@ in { ''; }; - extraArgs = mkOption { + extraArgs = lib.mkOption { default = [ ]; type = listOf str; description = '' @@ -130,27 +127,27 @@ in { }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { assertions = [ { assertion = cfg.settings != null - -> !(hasAttrByPath [ "bind_host" ] cfg.settings); + -> !(lib.hasAttrByPath [ "bind_host" ] cfg.settings); message = "AdGuard option `settings.bind_host' has been superseded by `services.adguardhome.host'"; } { assertion = cfg.settings != null - -> !(hasAttrByPath [ "bind_port" ] cfg.settings); + -> !(lib.hasAttrByPath [ "bind_port" ] cfg.settings); message = "AdGuard option `settings.bind_port' has been superseded by `services.adguardhome.port'"; } { assertion = settings != null -> cfg.mutableSettings - || hasAttrByPath [ "dns" "bootstrap_dns" ] settings; + || lib.hasAttrByPath [ "dns" "bootstrap_dns" ] settings; message = "AdGuard setting dns.bootstrap_dns needs to be configured for a minimal working configuration"; } { assertion = settings != null -> cfg.mutableSettings - || hasAttrByPath [ "dns" "bootstrap_dns" ] settings - && isList settings.dns.bootstrap_dns; + || lib.hasAttrByPath [ "dns" "bootstrap_dns" ] settings + && lib.isList settings.dns.bootstrap_dns; message = "AdGuard setting dns.bootstrap_dns needs to be a list"; } ]; @@ -164,7 +161,7 @@ in { StartLimitBurst = 10; }; - preStart = optionalString (settings != null) '' + preStart = lib.optionalString (settings != null) '' if [ -e "$STATE_DIRECTORY/AdGuardHome.yaml" ] \ && [ "${toString cfg.mutableSettings}" = "1" ]; then # First run a schema_version update on the existing configuration @@ -185,7 +182,7 @@ in { DynamicUser = true; ExecStart = "${lib.getExe cfg.package} ${args}"; AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ] - ++ optionals cfg.allowDHCP [ "CAP_NET_RAW" ]; + ++ lib.optionals cfg.allowDHCP [ "CAP_NET_RAW" ]; Restart = "always"; RestartSec = 10; RuntimeDirectory = "AdGuardHome"; @@ -193,6 +190,6 @@ in { }; }; - networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.port ]; + networking.firewall.allowedTCPPorts = lib.mkIf cfg.openFirewall [ cfg.port ]; }; } From 46dc82d477974182407123a5d9deeb47909df849 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:01 +0200 Subject: [PATCH 139/236] nixos/services.alice-lg: remove `with lib;` --- nixos/modules/services/networking/alice-lg.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/nixos/modules/services/networking/alice-lg.nix b/nixos/modules/services/networking/alice-lg.nix index dab2d38ca353..c43f898bd7d3 100644 --- a/nixos/modules/services/networking/alice-lg.nix +++ b/nixos/modules/services/networking/alice-lg.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.alice-lg; settingsFormat = pkgs.formats.ini { }; @@ -9,17 +6,17 @@ in { options = { services.alice-lg = { - enable = mkEnableOption "Alice Looking Glass"; + enable = lib.mkEnableOption "Alice Looking Glass"; - package = mkPackageOption pkgs "alice-lg" { }; + package = lib.mkPackageOption pkgs "alice-lg" { }; - settings = mkOption { + settings = lib.mkOption { type = settingsFormat.type; default = { }; description = '' alice-lg configuration, for configuration options see the example on [github](https://github.com/alice-lg/alice-lg/blob/main/etc/alice-lg/alice.example.conf) ''; - example = literalExpression '' + example = lib.literalExpression '' { server = { # configures the built-in webserver and provides global application settings From d63146859b2a33af24ac81eb39ef52ad87f6e330 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:01 +0200 Subject: [PATCH 140/236] nixos/services.amule: remove `with lib;` --- nixos/modules/services/networking/amuled.nix | 23 +++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/nixos/modules/services/networking/amuled.nix b/nixos/modules/services/networking/amuled.nix index aa72a047526b..b41d4d629ec5 100644 --- a/nixos/modules/services/networking/amuled.nix +++ b/nixos/modules/services/networking/amuled.nix @@ -1,7 +1,4 @@ { config, lib, options, pkgs, ... }: - -with lib; - let cfg = config.services.amule; opt = options.services.amule; @@ -16,18 +13,18 @@ in services.amule = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to run the AMule daemon. You need to manually run "amuled --ec-config" to configure the service for the first time. ''; }; - dataDir = mkOption { - type = types.str; + dataDir = lib.mkOption { + type = lib.types.str; default = "/home/${user}/"; - defaultText = literalExpression '' + defaultText = lib.literalExpression '' "/home/''${config.${opt.user}}/" ''; description = '' @@ -35,8 +32,8 @@ in ''; }; - user = mkOption { - type = types.nullOr types.str; + user = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; description = '' The user the AMule daemon should run as. @@ -50,16 +47,16 @@ in ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { - users.users = mkIf (cfg.user == null) [ + users.users = lib.mkIf (cfg.user == null) [ { name = "amule"; description = "AMule daemon"; group = "amule"; uid = config.ids.uids.amule; } ]; - users.groups = mkIf (cfg.user == null) [ + users.groups = lib.mkIf (cfg.user == null) [ { name = "amule"; gid = config.ids.gids.amule; } ]; From 681161adb63df62c37163e6b65096e96514c9ee8 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:01 +0200 Subject: [PATCH 141/236] nixos/services.asterisk: remove `with lib;` --- .../modules/services/networking/asterisk.nix | 41 +++++++++---------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/nixos/modules/services/networking/asterisk.nix b/nixos/modules/services/networking/asterisk.nix index 187dd5c3ccab..f165974f2ae7 100644 --- a/nixos/modules/services/networking/asterisk.nix +++ b/nixos/modules/services/networking/asterisk.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.asterisk; @@ -13,7 +10,7 @@ let logdir = "/var/log/asterisk"; # Add filecontents from files of useTheseDefaultConfFiles to confFiles, do not override - defaultConfFiles = subtractLists (attrNames cfg.confFiles) cfg.useTheseDefaultConfFiles; + defaultConfFiles = lib.subtractLists (lib.attrNames cfg.confFiles) cfg.useTheseDefaultConfFiles; allConfFiles = { # Default asterisk.conf file "asterisk.conf".text = '' @@ -48,25 +45,25 @@ let syslog.local0 => notice,warning,error ''; } // - mapAttrs (name: text: { inherit text; }) cfg.confFiles // - listToAttrs (map (x: nameValuePair x { source = cfg.package + "/etc/asterisk/" + x; }) defaultConfFiles); + lib.mapAttrs (name: text: { inherit text; }) cfg.confFiles // + lib.listToAttrs (map (x: lib.nameValuePair x { source = cfg.package + "/etc/asterisk/" + x; }) defaultConfFiles); in { options = { services.asterisk = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to enable the Asterisk PBX server. ''; }; - extraConfig = mkOption { + extraConfig = lib.mkOption { default = ""; - type = types.lines; + type = lib.types.lines; example = '' [options] verbose=3 @@ -78,10 +75,10 @@ in ''; }; - confFiles = mkOption { + confFiles = lib.mkOption { default = {}; - type = types.attrsOf types.str; - example = literalExpression + type = lib.types.attrsOf lib.types.str; + example = lib.literalExpression '' { "extensions.conf" = ''' @@ -144,9 +141,9 @@ in ''; }; - useTheseDefaultConfFiles = mkOption { + useTheseDefaultConfFiles = lib.mkOption { default = [ "ari.conf" "acl.conf" "agents.conf" "amd.conf" "calendar.conf" "cdr.conf" "cdr_syslog.conf" "cdr_custom.conf" "cel.conf" "cel_custom.conf" "cli_aliases.conf" "confbridge.conf" "dundi.conf" "features.conf" "hep.conf" "iax.conf" "pjsip.conf" "pjsip_wizard.conf" "phone.conf" "phoneprov.conf" "queues.conf" "res_config_sqlite3.conf" "res_parking.conf" "statsd.conf" "udptl.conf" "unistim.conf" ]; - type = types.listOf types.str; + type = lib.types.listOf lib.types.str; example = [ "sip.conf" "dundi.conf" ]; description = ''Sets these config files to the default content. The default value for this option contains all necesscary files to avoid errors at startup. @@ -154,24 +151,24 @@ in ''; }; - extraArguments = mkOption { + extraArguments = lib.mkOption { default = []; - type = types.listOf types.str; + type = lib.types.listOf lib.types.str; example = [ "-vvvddd" "-e" "1024" ]; description = '' Additional command line arguments to pass to Asterisk. ''; }; - package = mkPackageOption pkgs "asterisk" { }; + package = lib.mkPackageOption pkgs "asterisk" { }; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.systemPackages = [ cfg.package ]; - environment.etc = mapAttrs' (name: value: - nameValuePair "asterisk/${name}" value + environment.etc = lib.mapAttrs' (name: value: + lib.nameValuePair "asterisk/${name}" value ) allConfFiles; users.users.asterisk = @@ -214,7 +211,7 @@ in ExecStart = let # FIXME: This doesn't account for arguments with spaces - argString = concatStringsSep " " cfg.extraArguments; + argString = lib.concatStringsSep " " cfg.extraArguments; in "${cfg.package}/bin/asterisk -U ${asteriskUser} -C /etc/asterisk/asterisk.conf ${argString} -F"; ExecReload = ''${cfg.package}/bin/asterisk -x "core reload" From 06032d69560158665982eede48a3977e4ce6da54 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:01 +0200 Subject: [PATCH 142/236] nixos/services.atftpd: remove `with lib;` --- nixos/modules/services/networking/atftpd.nix | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/nixos/modules/services/networking/atftpd.nix b/nixos/modules/services/networking/atftpd.nix index da5e305201f8..ab674d85715c 100644 --- a/nixos/modules/services/networking/atftpd.nix +++ b/nixos/modules/services/networking/atftpd.nix @@ -1,9 +1,5 @@ # NixOS module for atftpd TFTP server - { config, pkgs, lib, ... }: - -with lib; - let cfg = config.services.atftpd; @@ -16,19 +12,19 @@ in services.atftpd = { - enable = mkOption { + enable = lib.mkOption { default = false; - type = types.bool; + type = lib.types.bool; description = '' Whether to enable the atftpd TFTP server. By default, the server binds to address 0.0.0.0. ''; }; - extraOptions = mkOption { + extraOptions = lib.mkOption { default = []; - type = types.listOf types.str; - example = literalExpression '' + type = lib.types.listOf lib.types.str; + example = lib.literalExpression '' [ "--bind-address 192.168.9.1" "--verbose=7" ] @@ -38,9 +34,9 @@ in ''; }; - root = mkOption { + root = lib.mkOption { default = "/srv/tftp"; - type = types.path; + type = lib.types.path; description = '' Document root directory for the atftpd. ''; @@ -50,7 +46,7 @@ in }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.atftpd = { description = "TFTP Server"; From d861803952869d31fa9938a203b25c94f74ec6de Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:01 +0200 Subject: [PATCH 143/236] nixos/services.autossh: remove `with lib;` --- nixos/modules/services/networking/autossh.nix | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/nixos/modules/services/networking/autossh.nix b/nixos/modules/services/networking/autossh.nix index 245f2bfc2cf3..f8934845c28e 100644 --- a/nixos/modules/services/networking/autossh.nix +++ b/nixos/modules/services/networking/autossh.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.autossh; @@ -16,21 +13,21 @@ in services.autossh = { - sessions = mkOption { - type = types.listOf (types.submodule { + sessions = lib.mkOption { + type = lib.types.listOf (lib.types.submodule { options = { - name = mkOption { - type = types.str; + name = lib.mkOption { + type = lib.types.str; example = "socks-peer"; description = "Name of the local AutoSSH session"; }; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; example = "bill"; description = "Name of the user the AutoSSH session should run as"; }; - monitoringPort = mkOption { - type = types.int; + monitoringPort = lib.mkOption { + type = lib.types.int; default = 0; example = 20000; description = '' @@ -39,8 +36,8 @@ in style monitoring ''; }; - extraArguments = mkOption { - type = types.separatedString " "; + extraArguments = lib.mkOption { + type = lib.types.separatedString " "; example = "-N -D4343 bill@socks.example.net"; description = '' Arguments to be passed to AutoSSH and retransmitted to SSH @@ -75,7 +72,7 @@ in ###### implementation - config = mkIf (cfg.sessions != []) { + config = lib.mkIf (cfg.sessions != []) { systemd.services = From eb8d4ed2645f173dd204d3a09a0dba11f154eca8 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:01 +0200 Subject: [PATCH 144/236] nixos/services.avahi: remove `with lib;` --- .../services/networking/avahi-daemon.nix | 131 +++++++++--------- 1 file changed, 64 insertions(+), 67 deletions(-) diff --git a/nixos/modules/services/networking/avahi-daemon.nix b/nixos/modules/services/networking/avahi-daemon.nix index 8bb8e71ec3fb..72ccb910982c 100644 --- a/nixos/modules/services/networking/avahi-daemon.nix +++ b/nixos/modules/services/networking/avahi-daemon.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.avahi; @@ -13,15 +10,15 @@ let # a host name from DHCP. In that case, let Avahi take whatever the # current host name is; setting `host-name' to the empty string in # `avahi-daemon.conf' would be invalid. - optionalString (hostName != "") "host-name=${hostName}"} - browse-domains=${concatStringsSep ", " browseDomains} + lib.optionalString (hostName != "") "host-name=${hostName}"} + browse-domains=${lib.concatStringsSep ", " browseDomains} use-ipv4=${yesNo ipv4} use-ipv6=${yesNo ipv6} - ${optionalString (allowInterfaces!=null) "allow-interfaces=${concatStringsSep "," allowInterfaces}"} - ${optionalString (denyInterfaces!=null) "deny-interfaces=${concatStringsSep "," denyInterfaces}"} - ${optionalString (domainName!=null) "domain-name=${domainName}"} + ${lib.optionalString (allowInterfaces!=null) "allow-interfaces=${lib.concatStringsSep "," allowInterfaces}"} + ${lib.optionalString (denyInterfaces!=null) "deny-interfaces=${lib.concatStringsSep "," denyInterfaces}"} + ${lib.optionalString (domainName!=null) "domain-name=${domainName}"} allow-point-to-point=${yesNo allowPointToPoint} - ${optionalString (cacheEntriesMax!=null) "cache-entries-max=${toString cacheEntriesMax}"} + ${lib.optionalString (cacheEntriesMax!=null) "cache-entries-max=${toString cacheEntriesMax}"} [wide-area] enable-wide-area=${yesNo wideArea} @@ -46,8 +43,8 @@ in ]; options.services.avahi = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to run the Avahi daemon, which allows Avahi clients @@ -57,28 +54,28 @@ in ''; }; - package = mkPackageOption pkgs "avahi" { }; + package = lib.mkPackageOption pkgs "avahi" { }; - hostName = mkOption { - type = types.str; + hostName = lib.mkOption { + type = lib.types.str; default = config.networking.hostName; - defaultText = literalExpression "config.networking.hostName"; + defaultText = lib.literalExpression "config.networking.hostName"; description = '' Host name advertised on the LAN. If not set, avahi will use the value of {option}`config.networking.hostName`. ''; }; - domainName = mkOption { - type = types.str; + domainName = lib.mkOption { + type = lib.types.str; default = "local"; description = '' Domain name for all advertisements. ''; }; - browseDomains = mkOption { - type = types.listOf types.str; + browseDomains = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; example = [ "0pointer.de" "zeroconf.org" ]; description = '' @@ -86,20 +83,20 @@ in ''; }; - ipv4 = mkOption { - type = types.bool; + ipv4 = lib.mkOption { + type = lib.types.bool; default = true; description = "Whether to use IPv4."; }; - ipv6 = mkOption { - type = types.bool; + ipv6 = lib.mkOption { + type = lib.types.bool; default = false; description = "Whether to use IPv6."; }; - allowInterfaces = mkOption { - type = types.nullOr (types.listOf types.str); + allowInterfaces = lib.mkOption { + type = lib.types.nullOr (lib.types.listOf lib.types.str); default = null; description = '' List of network interfaces that should be used by the {command}`avahi-daemon`. @@ -108,8 +105,8 @@ in ''; }; - denyInterfaces = mkOption { - type = types.nullOr (types.listOf types.str); + denyInterfaces = lib.mkOption { + type = lib.types.nullOr (lib.types.listOf lib.types.str); default = null; description = '' List of network interfaces that should be ignored by the @@ -119,8 +116,8 @@ in ''; }; - openFirewall = mkOption { - type = types.bool; + openFirewall = lib.mkOption { + type = lib.types.bool; default = true; description = '' Whether to open the firewall for UDP port 5353. @@ -128,8 +125,8 @@ in ''; }; - allowPointToPoint = mkOption { - type = types.bool; + allowPointToPoint = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to use POINTTOPOINT interfaces. Might make mDNS unreliable due to usually large @@ -138,22 +135,22 @@ in ''; }; - wideArea = mkOption { - type = types.bool; + wideArea = lib.mkOption { + type = lib.types.bool; default = true; description = "Whether to enable wide-area service discovery."; }; - reflector = mkOption { - type = types.bool; + reflector = lib.mkOption { + type = lib.types.bool; default = false; description = "Reflect incoming mDNS requests to all allowed network interfaces."; }; - extraServiceFiles = mkOption { - type = with types; attrsOf (either str path); + extraServiceFiles = lib.mkOption { + type = with lib.types; attrsOf (either str path); default = { }; - example = literalExpression '' + example = lib.literalExpression '' { ssh = "''${pkgs.avahi}/etc/avahi/services/ssh.service"; smb = ''' @@ -176,26 +173,26 @@ in }; publish = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = "Whether to allow publishing in general."; }; - userServices = mkOption { - type = types.bool; + userServices = lib.mkOption { + type = lib.types.bool; default = false; description = "Whether to publish user services. Will set `addresses=true`."; }; - addresses = mkOption { - type = types.bool; + addresses = lib.mkOption { + type = lib.types.bool; default = false; description = "Whether to register mDNS address records for all local IP addresses."; }; - hinfo = mkOption { - type = types.bool; + hinfo = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to register a mDNS HINFO record which contains information about the @@ -203,23 +200,23 @@ in ''; }; - workstation = mkOption { - type = types.bool; + workstation = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to register a service of type "_workstation._tcp" on the local LAN. ''; }; - domain = mkOption { - type = types.bool; + domain = lib.mkOption { + type = lib.types.bool; default = false; description = "Whether to announce the locally used domain name for browsing by other hosts."; }; }; - nssmdns4 = mkOption { - type = types.bool; + nssmdns4 = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to enable the mDNS NSS (Name Service Switch) plug-in for IPv4. @@ -228,8 +225,8 @@ in ''; }; - nssmdns6 = mkOption { - type = types.bool; + nssmdns6 = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to enable the mDNS NSS (Name Service Switch) plug-in for IPv6. @@ -243,8 +240,8 @@ in ''; }; - cacheEntriesMax = mkOption { - type = types.nullOr types.int; + cacheEntriesMax = lib.mkOption { + type = lib.types.nullOr lib.types.int; default = null; description = '' Number of resource records to be cached per interface. Use 0 to @@ -252,8 +249,8 @@ in ''; }; - extraConfig = mkOption { - type = types.lines; + extraConfig = lib.mkOption { + type = lib.types.lines; default = ""; description = '' Extra config to append to avahi-daemon.conf. @@ -261,7 +258,7 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.avahi = { description = "avahi-daemon privilege separation user"; home = "/var/empty"; @@ -271,7 +268,7 @@ in users.groups.avahi = { }; - system.nssModules = optional (cfg.nssmdns4 || cfg.nssmdns6) pkgs.nssmdns; + system.nssModules = lib.optional (cfg.nssmdns4 || cfg.nssmdns6) pkgs.nssmdns; system.nssDatabases.hosts = let mdns = if (cfg.nssmdns4 && cfg.nssmdns6) then "mdns" @@ -281,17 +278,17 @@ in "mdns4" else ""; - in optionals (cfg.nssmdns4 || cfg.nssmdns6) (mkMerge [ - (mkBefore [ "${mdns}_minimal [NOTFOUND=return]" ]) # before resolve - (mkAfter [ "${mdns}" ]) # after dns + in lib.optionals (cfg.nssmdns4 || cfg.nssmdns6) (lib.mkMerge [ + (lib.mkBefore [ "${mdns}_minimal [NOTFOUND=return]" ]) # before resolve + (lib.mkAfter [ "${mdns}" ]) # after dns ]); environment.systemPackages = [ cfg.package ]; - environment.etc = (mapAttrs' - (n: v: nameValuePair + environment.etc = (lib.mapAttrs' + (n: v: lib.nameValuePair "avahi/services/${n}.service" - { ${if types.path.check v then "source" else "text"} = v; } + { ${if lib.types.path.check v then "source" else "text"} = v; } ) cfg.extraServiceFiles); @@ -326,6 +323,6 @@ in services.dbus.enable = true; services.dbus.packages = [ cfg.package ]; - networking.firewall.allowedUDPPorts = mkIf cfg.openFirewall [ 5353 ]; + networking.firewall.allowedUDPPorts = lib.mkIf cfg.openFirewall [ 5353 ]; }; } From 7da36d70ff30788e9cda4e8200290367c0a99129 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:01 +0200 Subject: [PATCH 145/236] nixos/services.babeld: remove `with lib;` --- nixos/modules/services/networking/babeld.nix | 33 +++++++++----------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/nixos/modules/services/networking/babeld.nix b/nixos/modules/services/networking/babeld.nix index 5a3e92d9c813..538654f90ae4 100644 --- a/nixos/modules/services/networking/babeld.nix +++ b/nixos/modules/services/networking/babeld.nix @@ -1,20 +1,17 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.babeld; - conditionalBoolToString = value: if (isBool value) then (boolToString value) else (toString value); + conditionalBoolToString = value: if (lib.isBool value) then (lib.boolToString value) else (toString value); paramsString = params: - concatMapStringsSep " " (name: "${name} ${conditionalBoolToString (getAttr name params)}") - (attrNames params); + lib.concatMapStringsSep " " (name: "${name} ${conditionalBoolToString (lib.getAttr name params)}") + (lib.attrNames params); interfaceConfig = name: let - interface = getAttr name cfg.interfaces; + interface = lib.getAttr name cfg.interfaces; in "interface ${name} ${paramsString interface}\n"; @@ -22,17 +19,17 @@ let '' skip-kernel-setup true '' - + (optionalString (cfg.interfaceDefaults != null) '' + + (lib.optionalString (cfg.interfaceDefaults != null) '' default ${paramsString cfg.interfaceDefaults} '') - + (concatMapStrings interfaceConfig (attrNames cfg.interfaces)) + + (lib.concatMapStrings interfaceConfig (lib.attrNames cfg.interfaces)) + extraConfig); in { - meta.maintainers = with maintainers; [ hexa ]; + meta.maintainers = with lib.maintainers; [ hexa ]; ###### interface @@ -40,15 +37,15 @@ in services.babeld = { - enable = mkEnableOption "the babeld network routing daemon"; + enable = lib.mkEnableOption "the babeld network routing daemon"; - interfaceDefaults = mkOption { + interfaceDefaults = lib.mkOption { default = null; description = '' A set describing default parameters for babeld interfaces. See {manpage}`babeld(8)` for options. ''; - type = types.nullOr (types.attrsOf types.unspecified); + type = lib.types.nullOr (lib.types.attrsOf lib.types.unspecified); example = { type = "tunnel"; @@ -56,13 +53,13 @@ in }; }; - interfaces = mkOption { + interfaces = lib.mkOption { default = {}; description = '' A set describing babeld interfaces. See {manpage}`babeld(8)` for options. ''; - type = types.attrsOf (types.attrsOf types.unspecified); + type = lib.types.attrsOf (lib.types.attrsOf lib.types.unspecified); example = { enp0s2 = { type = "wired"; @@ -72,9 +69,9 @@ in }; }; - extraConfig = mkOption { + extraConfig = lib.mkOption { default = ""; - type = types.lines; + type = lib.types.lines; description = '' Options that will be copied to babeld.conf. See {manpage}`babeld(8)` for details. @@ -87,7 +84,7 @@ in ###### implementation - config = mkIf config.services.babeld.enable { + config = lib.mkIf config.services.babeld.enable { boot.kernel.sysctl = { "net.ipv6.conf.all.forwarding" = 1; From 6bf37cd2010d68f2b09e396a78438ca31261de97 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:02 +0200 Subject: [PATCH 146/236] nixos/services.bee: remove `with lib;` --- nixos/modules/services/networking/bee.nix | 30 +++++++++++------------ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/nixos/modules/services/networking/bee.nix b/nixos/modules/services/networking/bee.nix index 83ce522ba62a..6f3f7af607fb 100644 --- a/nixos/modules/services/networking/bee.nix +++ b/nixos/modules/services/networking/bee.nix @@ -1,6 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; let cfg = config.services.bee; format = pkgs.formats.yaml {}; @@ -15,13 +13,13 @@ in { options = { services.bee = { - enable = mkEnableOption "Ethereum Swarm Bee"; + enable = lib.mkEnableOption "Ethereum Swarm Bee"; - package = mkPackageOption pkgs "bee" { + package = lib.mkPackageOption pkgs "bee" { example = "bee-unstable"; }; - settings = mkOption { + settings = lib.mkOption { type = format.type; description = '' Ethereum Swarm Bee configuration. Refer to @@ -30,8 +28,8 @@ in { ''; }; - daemonNiceLevel = mkOption { - type = types.int; + daemonNiceLevel = lib.mkOption { + type = lib.types.int; default = 0; description = '' Daemon process priority for bee. @@ -39,16 +37,16 @@ in { ''; }; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = "bee"; description = '' User the bee binary should execute under. ''; }; - group = mkOption { - type = types.str; + group = lib.mkOption { + type = lib.types.str; default = "bee"; description = '' Group the bee binary should execute under. @@ -59,14 +57,14 @@ in { ### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { assertions = [ - { assertion = (hasAttr "password" cfg.settings) != true; + { assertion = (lib.hasAttr "password" cfg.settings) != true; message = '' `services.bee.settings.password` is insecure. Use `services.bee.settings.password-file` or `systemd.services.bee.serviceConfig.EnvironmentFile` instead. ''; } - { assertion = (hasAttr "swap-endpoint" cfg.settings) || (cfg.settings.swap-enable or true == false); + { assertion = (lib.hasAttr "swap-endpoint" cfg.settings) || (cfg.settings.swap-enable or true == false); message = '' In a swap-enabled network a working Ethereum blockchain node is required. You must specify one using `services.bee.settings.swap-endpoint`, or disable `services.bee.settings.swap-enable` = false. ''; @@ -119,7 +117,7 @@ After you finish configuration run 'sudo bee-get-addr'." ''; }; - users.users = optionalAttrs (cfg.user == "bee") { + users.users = lib.optionalAttrs (cfg.user == "bee") { bee = { group = cfg.group; home = cfg.settings.data-dir; @@ -128,7 +126,7 @@ After you finish configuration run 'sudo bee-get-addr'." }; }; - users.groups = optionalAttrs (cfg.group == "bee") { + users.groups = lib.optionalAttrs (cfg.group == "bee") { bee = {}; }; }; From 42facf73b7c7a7ee9dc9fd9597f046c0b5840d92 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:02 +0200 Subject: [PATCH 147/236] nixos/services.biboumi: remove `with lib;` --- nixos/modules/services/networking/biboumi.nix | 89 +++++++++---------- 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/nixos/modules/services/networking/biboumi.nix b/nixos/modules/services/networking/biboumi.nix index d92290626c31..33cb1d95bc51 100644 --- a/nixos/modules/services/networking/biboumi.nix +++ b/nixos/modules/services/networking/biboumi.nix @@ -1,62 +1,61 @@ { config, lib, pkgs, options, ... }: -with lib; let cfg = config.services.biboumi; inherit (config.environment) etc; rootDir = "/run/biboumi/mnt-root"; stateDir = "/var/lib/biboumi"; settingsFile = pkgs.writeText "biboumi.cfg" ( - generators.toKeyValue { + lib.generators.toKeyValue { mkKeyValue = k: v: - lib.optionalString (v != null) (generators.mkKeyValueDefault {} "=" k v); + lib.optionalString (v != null) (lib.generators.mkKeyValueDefault {} "=" k v); } cfg.settings); need_CAP_NET_BIND_SERVICE = cfg.settings.identd_port != 0 && cfg.settings.identd_port < 1024; in { options = { services.biboumi = { - enable = mkEnableOption "the Biboumi XMPP gateway to IRC"; + enable = lib.mkEnableOption "the Biboumi XMPP gateway to IRC"; - settings = mkOption { + settings = lib.mkOption { description = '' See [biboumi 8.5](https://lab.louiz.org/louiz/biboumi/blob/8.5/doc/biboumi.1.rst) for documentation. ''; default = {}; - type = types.submodule { - freeformType = with types; + type = lib.types.submodule { + freeformType = with lib.types; (attrsOf (nullOr (oneOf [str int bool]))) // { description = "settings option"; }; - options.admin = mkOption { - type = with types; listOf str; + options.admin = lib.mkOption { + type = with lib.types; listOf str; default = []; example = ["admin@example.org"]; - apply = concatStringsSep ":"; + apply = lib.concatStringsSep ":"; description = '' The bare JID of the gateway administrator. This JID will have more privileges than other standard users, for example some administration ad-hoc commands will only be available to that JID. ''; }; - options.ca_file = mkOption { - type = types.path; + options.ca_file = lib.mkOption { + type = lib.types.path; default = "/etc/ssl/certs/ca-certificates.crt"; description = '' Specifies which file should be used as the list of trusted CA when negotiating a TLS session. ''; }; - options.db_name = mkOption { - type = with types; either path str; + options.db_name = lib.mkOption { + type = with lib.types; either path str; default = "${stateDir}/biboumi.sqlite"; description = '' The name of the database to use. ''; example = "postgresql://user:secret@localhost"; }; - options.hostname = mkOption { - type = types.str; + options.hostname = lib.mkOption { + type = lib.types.str; example = "biboumi.example.org"; description = '' The hostname served by the XMPP gateway. @@ -64,24 +63,24 @@ in as an external component. ''; }; - options.identd_port = mkOption { - type = types.port; + options.identd_port = lib.mkOption { + type = lib.types.port; default = 113; example = 0; description = '' The TCP port on which to listen for identd queries. ''; }; - options.log_level = mkOption { - type = types.ints.between 0 3; + options.log_level = lib.mkOption { + type = lib.types.ints.between 0 3; default = 1; description = '' Indicate what type of log messages to write in the logs. 0 is debug, 1 is info, 2 is warning, 3 is error. ''; }; - options.password = mkOption { - type = with types; nullOr str; + options.password = lib.mkOption { + type = with lib.types; nullOr str; description = '' The password used to authenticate the XMPP component to your XMPP server. This password must be configured in the XMPP server, @@ -92,8 +91,8 @@ in if you do not want this password to go into the Nix store. ''; }; - options.persistent_by_default = mkOption { - type = types.bool; + options.persistent_by_default = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether all rooms will be persistent by default: @@ -103,25 +102,25 @@ in “persistent” configuration option to false in order to override this. ''; }; - options.policy_directory = mkOption { - type = types.path; + options.policy_directory = lib.mkOption { + type = lib.types.path; default = "${pkgs.biboumi}/etc/biboumi"; - defaultText = literalExpression ''"''${pkgs.biboumi}/etc/biboumi"''; + defaultText = lib.literalExpression ''"''${pkgs.biboumi}/etc/biboumi"''; description = '' A directory that should contain the policy files, used to customize Botan’s behaviour when negotiating the TLS connections with the IRC servers. ''; }; - options.port = mkOption { - type = types.port; + options.port = lib.mkOption { + type = lib.types.port; default = 5347; description = '' The TCP port to use to connect to the local XMPP component. ''; }; - options.realname_customization = mkOption { - type = types.bool; + options.realname_customization = lib.mkOption { + type = lib.types.bool; default = true; description = '' Whether the users will be able to use @@ -129,8 +128,8 @@ in their realname and username. ''; }; - options.realname_from_jid = mkOption { - type = types.bool; + options.realname_from_jid = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether the realname and username of each biboumi @@ -139,8 +138,8 @@ in they used to connect to the IRC server. ''; }; - options.xmpp_server_ip = mkOption { - type = types.str; + options.xmpp_server_ip = lib.mkOption { + type = lib.types.str; default = "127.0.0.1"; description = '' The IP address to connect to the XMPP server on. @@ -152,8 +151,8 @@ in }; }; - credentialsFile = mkOption { - type = types.path; + credentialsFile = lib.mkOption { + type = lib.types.path; description = '' Path to a configuration file to be merged with the settings. Beware not to surround "=" with spaces when setting biboumi's options in this file. @@ -165,12 +164,12 @@ in example = "/run/keys/biboumi.cfg"; }; - openFirewall = mkEnableOption "opening of the identd port in the firewall"; + openFirewall = lib.mkEnableOption "opening of the identd port in the firewall"; }; }; - config = mkIf cfg.enable { - networking.firewall = mkIf (cfg.openFirewall && cfg.settings.identd_port != 0) + config = lib.mkIf cfg.enable { + networking.firewall = lib.mkIf (cfg.openFirewall && cfg.settings.identd_port != 0) { allowedTCPPorts = [ cfg.settings.identd_port ]; }; systemd.services.biboumi = { @@ -202,7 +201,7 @@ in RootDirectory = rootDir; RootDirectoryStartOnly = true; InaccessiblePaths = [ "-+${rootDir}" ]; - RuntimeDirectory = [ "biboumi" (removePrefix "/run/" rootDir) ]; + RuntimeDirectory = [ "biboumi" (lib.removePrefix "/run/" rootDir) ]; RuntimeDirectoryMode = "700"; StateDirectory = "biboumi"; StateDirectoryMode = "700"; @@ -221,8 +220,8 @@ in ]; # The following options are only for optimizing: # systemd-analyze security biboumi - AmbientCapabilities = [ (optionalString need_CAP_NET_BIND_SERVICE "CAP_NET_BIND_SERVICE") ]; - CapabilityBoundingSet = [ (optionalString need_CAP_NET_BIND_SERVICE "CAP_NET_BIND_SERVICE") ]; + AmbientCapabilities = [ (lib.optionalString need_CAP_NET_BIND_SERVICE "CAP_NET_BIND_SERVICE") ]; + CapabilityBoundingSet = [ (lib.optionalString need_CAP_NET_BIND_SERVICE "CAP_NET_BIND_SERVICE") ]; # ProtectClock= adds DeviceAllow=char-rtc r DeviceAllow = ""; LockPersonality = true; @@ -230,7 +229,7 @@ in NoNewPrivileges = true; PrivateDevices = true; PrivateMounts = true; - PrivateNetwork = mkDefault false; + PrivateNetwork = lib.mkDefault false; PrivateTmp = true; # PrivateUsers=true breaks AmbientCapabilities=CAP_NET_BIND_SERVICE # See https://bugs.archlinux.org/task/65921 @@ -265,5 +264,5 @@ in }; }; - meta.maintainers = with maintainers; [ julm ]; + meta.maintainers = with lib.maintainers; [ julm ]; } From 9ce866bc9b479d0a56e27f95b382f1cb1115edc0 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:02 +0200 Subject: [PATCH 148/236] nixos/services.bind: remove `with lib;` --- nixos/modules/services/networking/bind.nix | 113 ++++++++++----------- 1 file changed, 55 insertions(+), 58 deletions(-) diff --git a/nixos/modules/services/networking/bind.nix b/nixos/modules/services/networking/bind.nix index 6c5c59a88dec..225e330ad184 100644 --- a/nixos/modules/services/networking/bind.nix +++ b/nixos/modules/services/networking/bind.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.bind; @@ -14,30 +11,30 @@ let bindZoneOptions = { name, config, ... }: { options = { - name = mkOption { - type = types.str; + name = lib.mkOption { + type = lib.types.str; default = name; description = "Name of the zone."; }; - master = mkOption { + master = lib.mkOption { description = "Master=false means slave server"; - type = types.bool; + type = lib.types.bool; }; - file = mkOption { - type = types.either types.str types.path; + file = lib.mkOption { + type = lib.types.either lib.types.str lib.types.path; description = "Zone file resource records contain columns of data, separated by whitespace, that define the record."; }; - masters = mkOption { - type = types.listOf types.str; + masters = lib.mkOption { + type = lib.types.listOf lib.types.str; description = "List of servers for inclusion in stub and secondary zones."; }; - slaves = mkOption { - type = types.listOf types.str; + slaves = lib.mkOption { + type = lib.types.listOf lib.types.str; description = "Addresses who may request zone transfers."; default = [ ]; }; - allowQuery = mkOption { - type = types.listOf types.str; + allowQuery = lib.mkOption { + type = lib.types.listOf lib.types.str; description = '' List of address ranges allowed to query this zone. Instead of the address(es), this may instead contain the single string "any". @@ -47,8 +44,8 @@ let ''; default = [ "any" ]; }; - extraConfig = mkOption { - type = types.str; + extraConfig = lib.mkOption { + type = lib.types.str; description = "Extra zone config to be appended at the end of the zone section."; default = ""; }; @@ -62,16 +59,16 @@ let inet 127.0.0.1 allow {localhost;} keys {"rndc-key";}; }; - acl cachenetworks { ${concatMapStrings (entry: " ${entry}; ") cfg.cacheNetworks} }; - acl badnetworks { ${concatMapStrings (entry: " ${entry}; ") cfg.blockedNetworks} }; + acl cachenetworks { ${lib.concatMapStrings (entry: " ${entry}; ") cfg.cacheNetworks} }; + acl badnetworks { ${lib.concatMapStrings (entry: " ${entry}; ") cfg.blockedNetworks} }; options { - listen-on { ${concatMapStrings (entry: " ${entry}; ") cfg.listenOn} }; - listen-on-v6 { ${concatMapStrings (entry: " ${entry}; ") cfg.listenOnIpv6} }; + listen-on { ${lib.concatMapStrings (entry: " ${entry}; ") cfg.listenOn} }; + listen-on-v6 { ${lib.concatMapStrings (entry: " ${entry}; ") cfg.listenOnIpv6} }; allow-query { cachenetworks; }; blackhole { badnetworks; }; forward ${cfg.forward}; - forwarders { ${concatMapStrings (entry: " ${entry}; ") cfg.forwarders} }; + forwarders { ${lib.concatMapStrings (entry: " ${entry}; ") cfg.forwarders} }; directory "${cfg.directory}"; pid-file "/run/named/named.pid"; ${cfg.extraOptions} @@ -79,7 +76,7 @@ let ${cfg.extraConfig} - ${ concatMapStrings + ${ lib.concatMapStrings ({ name, file, master ? true, slaves ? [], masters ? [], allowQuery ? [], extraConfig ? "" }: '' zone "${name}" { @@ -88,21 +85,21 @@ let ${ if master then '' allow-transfer { - ${concatMapStrings (ip: "${ip};\n") slaves} + ${lib.concatMapStrings (ip: "${ip};\n") slaves} }; '' else '' masters { - ${concatMapStrings (ip: "${ip};\n") masters} + ${lib.concatMapStrings (ip: "${ip};\n") masters} }; '' } - allow-query { ${concatMapStrings (ip: "${ip}; ") allowQuery}}; + allow-query { ${lib.concatMapStrings (ip: "${ip}; ") allowQuery}}; ${extraConfig} }; '') - (attrValues cfg.zones) } + (lib.attrValues cfg.zones) } ''; in @@ -115,14 +112,14 @@ in services.bind = { - enable = mkEnableOption "BIND domain name server"; + enable = lib.mkEnableOption "BIND domain name server"; - package = mkPackageOption pkgs "bind" { }; + package = lib.mkPackageOption pkgs "bind" { }; - cacheNetworks = mkOption { + cacheNetworks = lib.mkOption { default = [ "127.0.0.0/24" "::1/128" ]; - type = types.listOf types.str; + type = lib.types.listOf lib.types.str; description = '' What networks are allowed to use us as a resolver. Note that this is for recursive queries -- all networks are @@ -134,64 +131,64 @@ in ''; }; - blockedNetworks = mkOption { + blockedNetworks = lib.mkOption { default = [ ]; - type = types.listOf types.str; + type = lib.types.listOf lib.types.str; description = '' What networks are just blocked. ''; }; - ipv4Only = mkOption { + ipv4Only = lib.mkOption { default = false; - type = types.bool; + type = lib.types.bool; description = '' Only use ipv4, even if the host supports ipv6. ''; }; - forwarders = mkOption { + forwarders = lib.mkOption { default = config.networking.nameservers; - defaultText = literalExpression "config.networking.nameservers"; - type = types.listOf types.str; + defaultText = lib.literalExpression "config.networking.nameservers"; + type = lib.types.listOf lib.types.str; description = '' List of servers we should forward requests to. ''; }; - forward = mkOption { + forward = lib.mkOption { default = "first"; - type = types.enum ["first" "only"]; + type = lib.types.enum ["first" "only"]; description = '' Whether to forward 'first' (try forwarding but lookup directly if forwarding fails) or 'only'. ''; }; - listenOn = mkOption { + listenOn = lib.mkOption { default = [ "any" ]; - type = types.listOf types.str; + type = lib.types.listOf lib.types.str; description = '' Interfaces to listen on. ''; }; - listenOnIpv6 = mkOption { + listenOnIpv6 = lib.mkOption { default = [ "any" ]; - type = types.listOf types.str; + type = lib.types.listOf lib.types.str; description = '' Ipv6 interfaces to listen on. ''; }; - directory = mkOption { - type = types.str; + directory = lib.mkOption { + type = lib.types.str; default = "/run/named"; description = "Working directory of BIND."; }; - zones = mkOption { + zones = lib.mkOption { default = [ ]; - type = with types; coercedTo (listOf attrs) bindZoneCoerce (attrsOf (types.submodule bindZoneOptions)); + type = with lib.types; coercedTo (listOf attrs) bindZoneCoerce (attrsOf (lib.types.submodule bindZoneOptions)); description = '' List of zones we claim authority over. ''; @@ -206,16 +203,16 @@ in }; }; - extraConfig = mkOption { - type = types.lines; + extraConfig = lib.mkOption { + type = lib.types.lines; default = ""; description = '' Extra lines to be added verbatim to the generated named configuration file. ''; }; - extraOptions = mkOption { - type = types.lines; + extraOptions = lib.mkOption { + type = lib.types.lines; default = ""; description = '' Extra lines to be added verbatim to the options section of the @@ -223,10 +220,10 @@ in ''; }; - configFile = mkOption { - type = types.path; + configFile = lib.mkOption { + type = lib.types.path; default = confFile; - defaultText = literalExpression "confFile"; + defaultText = lib.literalExpression "confFile"; description = '' Overridable config file to use for named. By default, that generated by nixos. @@ -240,9 +237,9 @@ in ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { - networking.resolvconf.useLocalResolver = mkDefault true; + networking.resolvconf.useLocalResolver = lib.mkDefault true; users.users.${bindUser} = { @@ -272,7 +269,7 @@ in serviceConfig = { Type = "forking"; # Set type to forking, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900788 - ExecStart = "${bindPkg.out}/sbin/named -u ${bindUser} ${optionalString cfg.ipv4Only "-4"} -c ${cfg.configFile}"; + ExecStart = "${bindPkg.out}/sbin/named -u ${bindUser} ${lib.optionalString cfg.ipv4Only "-4"} -c ${cfg.configFile}"; ExecReload = "${bindPkg.out}/sbin/rndc -k '/etc/bind/rndc.key' reload"; ExecStop = "${bindPkg.out}/sbin/rndc -k '/etc/bind/rndc.key' stop"; }; From c666e7b2dd9f69b118a503663e8b7a20f1d7072f Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:02 +0200 Subject: [PATCH 149/236] nixos/services.bird-lg: remove `with lib;` --- nixos/modules/services/networking/bird-lg.nix | 153 +++++++++--------- 1 file changed, 75 insertions(+), 78 deletions(-) diff --git a/nixos/modules/services/networking/bird-lg.nix b/nixos/modules/services/networking/bird-lg.nix index 0c69b72fec10..f73c0b796e6f 100644 --- a/nixos/modules/services/networking/bird-lg.nix +++ b/nixos/modules/services/networking/bird-lg.nix @@ -1,176 +1,173 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.bird-lg; - stringOrConcat = sep: v: if builtins.isString v then v else concatStringsSep sep v; + stringOrConcat = sep: v: if builtins.isString v then v else lib.concatStringsSep sep v; frontend_args = let fe = cfg.frontend; in { - "--servers" = concatStringsSep "," fe.servers; + "--servers" = lib.concatStringsSep "," fe.servers; "--domain" = fe.domain; "--listen" = fe.listenAddress; "--proxy-port" = fe.proxyPort; "--whois" = fe.whois; "--dns-interface" = fe.dnsInterface; - "--bgpmap-info" = concatStringsSep "," cfg.frontend.bgpMapInfo; + "--bgpmap-info" = lib.concatStringsSep "," cfg.frontend.bgpMapInfo; "--title-brand" = fe.titleBrand; "--navbar-brand" = fe.navbar.brand; "--navbar-brand-url" = fe.navbar.brandURL; "--navbar-all-servers" = fe.navbar.allServers; "--navbar-all-url" = fe.navbar.allServersURL; "--net-specific-mode" = fe.netSpecificMode; - "--protocol-filter" = concatStringsSep "," cfg.frontend.protocolFilter; + "--protocol-filter" = lib.concatStringsSep "," cfg.frontend.protocolFilter; }; proxy_args = let px = cfg.proxy; in { - "--allowed" = concatStringsSep "," px.allowedIPs; + "--allowed" = lib.concatStringsSep "," px.allowedIPs; "--bird" = px.birdSocket; "--listen" = px.listenAddress; "--traceroute_bin" = px.traceroute.binary; - "--traceroute_flags" = concatStringsSep " " px.traceroute.flags; + "--traceroute_flags" = lib.concatStringsSep " " px.traceroute.flags; "--traceroute_raw" = px.traceroute.rawOutput; }; mkArgValue = value: - if isString value - then escapeShellArg value - else if isBool value - then boolToString value + if lib.isString value + then lib.escapeShellArg value + else if lib.isBool value + then lib.boolToString value else toString value; - filterNull = filterAttrs (_: v: v != "" && v != null && v != []); + filterNull = lib.filterAttrs (_: v: v != "" && v != null && v != []); - argsAttrToList = args: mapAttrsToList (name: value: "${name} " + mkArgValue value ) (filterNull args); + argsAttrToList = args: lib.mapAttrsToList (name: value: "${name} " + mkArgValue value ) (filterNull args); in { options = { services.bird-lg = { - package = mkPackageOption pkgs "bird-lg" { }; + package = lib.mkPackageOption pkgs "bird-lg" { }; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = "bird-lg"; description = "User to run the service."; }; - group = mkOption { - type = types.str; + group = lib.mkOption { + type = lib.types.str; default = "bird-lg"; description = "Group to run the service."; }; frontend = { - enable = mkEnableOption "Bird Looking Glass Frontend Webserver"; + enable = lib.mkEnableOption "Bird Looking Glass Frontend Webserver"; - listenAddress = mkOption { - type = types.str; + listenAddress = lib.mkOption { + type = lib.types.str; default = "127.0.0.1:5000"; description = "Address to listen on."; }; - proxyPort = mkOption { - type = types.port; + proxyPort = lib.mkOption { + type = lib.types.port; default = 8000; description = "Port bird-lg-proxy is running on."; }; - domain = mkOption { - type = types.str; + domain = lib.mkOption { + type = lib.types.str; example = "dn42.lantian.pub"; description = "Server name domain suffixes."; }; - servers = mkOption { - type = types.listOf types.str; + servers = lib.mkOption { + type = lib.types.listOf lib.types.str; example = [ "gigsgigscloud" "hostdare" ]; description = "Server name prefixes."; }; - whois = mkOption { - type = types.str; + whois = lib.mkOption { + type = lib.types.str; default = "whois.verisign-grs.com"; description = "Whois server for queries."; }; - dnsInterface = mkOption { - type = types.str; + dnsInterface = lib.mkOption { + type = lib.types.str; default = "asn.cymru.com"; description = "DNS zone to query ASN information."; }; - bgpMapInfo = mkOption { - type = types.listOf types.str; + bgpMapInfo = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ "asn" "as-name" "ASName" "descr" ]; description = "Information displayed in bgpmap."; }; - titleBrand = mkOption { - type = types.str; + titleBrand = lib.mkOption { + type = lib.types.str; default = "Bird-lg Go"; description = "Prefix of page titles in browser tabs."; }; - netSpecificMode = mkOption { - type = types.str; + netSpecificMode = lib.mkOption { + type = lib.types.str; default = ""; example = "dn42"; description = "Apply network-specific changes for some networks."; }; - protocolFilter = mkOption { - type = types.listOf types.str; + protocolFilter = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; example = [ "ospf" ]; description = "Information displayed in bgpmap."; }; - nameFilter = mkOption { - type = types.str; + nameFilter = lib.mkOption { + type = lib.types.str; default = ""; example = "^ospf"; description = "Protocol names to hide in summary tables (RE2 syntax),"; }; - timeout = mkOption { - type = types.int; + timeout = lib.mkOption { + type = lib.types.int; default = 120; description = "Time before request timed out, in seconds."; }; navbar = { - brand = mkOption { - type = types.str; + brand = lib.mkOption { + type = lib.types.str; default = "Bird-lg Go"; description = "Brand to show in the navigation bar ."; }; - brandURL = mkOption { - type = types.str; + brandURL = lib.mkOption { + type = lib.types.str; default = "/"; description = "URL of the brand to show in the navigation bar."; }; - allServers = mkOption { - type = types.str; + allServers = lib.mkOption { + type = lib.types.str; default = "ALL Servers"; description = "Text of 'All server' button in the navigation bar."; }; - allServersURL = mkOption { - type = types.str; + allServersURL = lib.mkOption { + type = lib.types.str; default = "all"; description = "URL of 'All servers' button."; }; }; - extraArgs = mkOption { - type = with types; either lines (listOf str); + extraArgs = lib.mkOption { + type = with lib.types; either lines (listOf str); default = [ ]; description = '' Extra parameters documented [here](https://github.com/xddxdd/bird-lg-go#frontend). @@ -183,50 +180,50 @@ in }; proxy = { - enable = mkEnableOption "Bird Looking Glass Proxy"; + enable = lib.mkEnableOption "Bird Looking Glass Proxy"; - listenAddress = mkOption { - type = types.str; + listenAddress = lib.mkOption { + type = lib.types.str; default = "127.0.0.1:8000"; description = "Address to listen on."; }; - allowedIPs = mkOption { - type = types.listOf types.str; + allowedIPs = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; example = [ "192.168.25.52" "192.168.25.53" "192.168.0.0/24" ]; description = "List of IPs or networks to allow (default all allowed)."; }; - birdSocket = mkOption { - type = types.str; + birdSocket = lib.mkOption { + type = lib.types.str; default = "/var/run/bird/bird.ctl"; description = "Bird control socket path."; }; traceroute = { - binary = mkOption { - type = types.str; + binary = lib.mkOption { + type = lib.types.str; default = "${pkgs.traceroute}/bin/traceroute"; - defaultText = literalExpression ''"''${pkgs.traceroute}/bin/traceroute"''; + defaultText = lib.literalExpression ''"''${pkgs.traceroute}/bin/traceroute"''; description = "Traceroute's binary path."; }; - flags = mkOption { - type = with types; listOf str; + flags = lib.mkOption { + type = with lib.types; listOf str; default = [ ]; description = "Flags for traceroute process"; }; - rawOutput = mkOption { - type = types.bool; + rawOutput = lib.mkOption { + type = lib.types.bool; default = false; description = "Display traceroute output in raw format."; }; }; - extraArgs = mkOption { - type = with types; either lines (listOf str); + extraArgs = lib.mkOption { + type = with lib.types; either lines (listOf str); default = [ ]; description = '' Extra parameters documented [here](https://github.com/xddxdd/bird-lg-go#proxy). @@ -254,7 +251,7 @@ in ; systemd.services = { - bird-lg-frontend = mkIf cfg.frontend.enable { + bird-lg-frontend = lib.mkIf cfg.frontend.enable { enable = true; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; @@ -270,12 +267,12 @@ in }; script = '' ${cfg.package}/bin/frontend \ - ${concatStringsSep " \\\n " (argsAttrToList frontend_args)} \ + ${lib.concatStringsSep " \\\n " (argsAttrToList frontend_args)} \ ${stringOrConcat " " cfg.frontend.extraArgs} ''; }; - bird-lg-proxy = mkIf cfg.proxy.enable { + bird-lg-proxy = lib.mkIf cfg.proxy.enable { enable = true; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; @@ -291,14 +288,14 @@ in }; script = '' ${cfg.package}/bin/proxy \ - ${concatStringsSep " \\\n " (argsAttrToList proxy_args)} \ + ${lib.concatStringsSep " \\\n " (argsAttrToList proxy_args)} \ ${stringOrConcat " " cfg.proxy.extraArgs} ''; }; }; - users = mkIf (cfg.frontend.enable || cfg.proxy.enable) { - groups."bird-lg" = mkIf (cfg.group == "bird-lg") { }; - users."bird-lg" = mkIf (cfg.user == "bird-lg") { + users = lib.mkIf (cfg.frontend.enable || cfg.proxy.enable) { + groups."bird-lg" = lib.mkIf (cfg.group == "bird-lg") { }; + users."bird-lg" = lib.mkIf (cfg.user == "bird-lg") { description = "Bird Looking Glass user"; extraGroups = lib.optionals (config.services.bird2.enable) [ "bird2" ]; group = cfg.group; From 416649cbe631f1f37897f3aeffc6cbfa69fef60b Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:02 +0200 Subject: [PATCH 150/236] nixos/services.birdwatcher: remove `with lib;` --- .../services/networking/birdwatcher.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/nixos/modules/services/networking/birdwatcher.nix b/nixos/modules/services/networking/birdwatcher.nix index 4baab1e60a2d..434f0e2095f3 100644 --- a/nixos/modules/services/networking/birdwatcher.nix +++ b/nixos/modules/services/networking/birdwatcher.nix @@ -1,31 +1,28 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.birdwatcher; in { options = { services.birdwatcher = { - package = mkPackageOption pkgs "birdwatcher" { }; - enable = mkEnableOption "Birdwatcher"; - flags = mkOption { + package = lib.mkPackageOption pkgs "birdwatcher" { }; + enable = lib.mkEnableOption "Birdwatcher"; + flags = lib.mkOption { default = [ ]; - type = types.listOf types.str; + type = lib.types.listOf lib.types.str; example = [ "-worker-pool-size 16" "-6" ]; description = '' Flags to append to the program call ''; }; - settings = mkOption { - type = types.lines; + settings = lib.mkOption { + type = lib.types.lines; default = { }; description = '' birdwatcher configuration, for configuration options see the example on [github](https://github.com/alice-lg/birdwatcher/blob/master/etc/birdwatcher/birdwatcher.conf) ''; - example = literalExpression '' + example = lib.literalExpression '' [server] allow_from = [] allow_uncached = false @@ -72,7 +69,7 @@ in }; config = - let flagsStr = escapeShellArgs cfg.flags; + let flagsStr = lib.escapeShellArgs cfg.flags; in lib.mkIf cfg.enable { environment.etc."birdwatcher/birdwatcher.conf".source = pkgs.writeTextFile { name = "birdwatcher.conf"; From d9c47dac162152ea3c782797da441a0deae49906 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:02 +0200 Subject: [PATCH 151/236] nixos/services.bitlbee: remove `with lib;` --- nixos/modules/services/networking/bitlbee.nix | 61 +++++++++---------- 1 file changed, 29 insertions(+), 32 deletions(-) diff --git a/nixos/modules/services/networking/bitlbee.nix b/nixos/modules/services/networking/bitlbee.nix index 20488e5f33fe..3ebbab97b68e 100644 --- a/nixos/modules/services/networking/bitlbee.nix +++ b/nixos/modules/services/networking/bitlbee.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.bitlbee; @@ -46,8 +43,8 @@ in services.bitlbee = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to run the BitlBee IRC to other chat network gateway. @@ -56,8 +53,8 @@ in ''; }; - interface = mkOption { - type = types.str; + interface = lib.mkOption { + type = lib.types.str; default = "127.0.0.1"; description = '' The interface the BitlBee daemon will be listening to. If `127.0.0.1`, @@ -66,17 +63,17 @@ in ''; }; - portNumber = mkOption { + portNumber = lib.mkOption { default = 6667; - type = types.port; + type = lib.types.port; description = '' Number of the port BitlBee will be listening to. ''; }; - authBackend = mkOption { + authBackend = lib.mkOption { default = "storage"; - type = types.enum [ "storage" "pam" ]; + type = lib.types.enum [ "storage" "pam" ]; description = '' How users are authenticated storage -- save passwords internally @@ -84,9 +81,9 @@ in ''; }; - authMode = mkOption { + authMode = lib.mkOption { default = "Open"; - type = types.enum [ "Open" "Closed" "Registered" ]; + type = lib.types.enum [ "Open" "Closed" "Registered" ]; description = '' The following authentication modes are available: Open -- Accept connections from anyone, use NickServ for user authentication. @@ -95,9 +92,9 @@ in ''; }; - hostName = mkOption { + hostName = lib.mkOption { default = ""; - type = types.str; + type = lib.types.str; description = '' Normally, BitlBee gets a hostname using getsockname(). If you have a nicer alias for your BitlBee daemon, you can set it here and BitlBee will identify @@ -105,53 +102,53 @@ in ''; }; - plugins = mkOption { - type = types.listOf types.package; + plugins = lib.mkOption { + type = lib.types.listOf lib.types.package; default = []; - example = literalExpression "[ pkgs.bitlbee-facebook ]"; + example = lib.literalExpression "[ pkgs.bitlbee-facebook ]"; description = '' The list of bitlbee plugins to install. ''; }; - libpurple_plugins = mkOption { - type = types.listOf types.package; + libpurple_plugins = lib.mkOption { + type = lib.types.listOf lib.types.package; default = []; - example = literalExpression "[ pkgs.purple-matrix ]"; + example = lib.literalExpression "[ pkgs.purple-matrix ]"; description = '' The list of libpurple plugins to install. ''; }; - configDir = mkOption { + configDir = lib.mkOption { default = "/var/lib/bitlbee"; - type = types.path; + type = lib.types.path; description = '' Specify an alternative directory to store all the per-user configuration files. ''; }; - protocols = mkOption { + protocols = lib.mkOption { default = ""; - type = types.str; + type = lib.types.str; description = '' This option allows to remove the support of protocol, even if compiled in. If nothing is given, there are no restrictions. ''; }; - extraSettings = mkOption { + extraSettings = lib.mkOption { default = ""; - type = types.lines; + type = lib.types.lines; description = '' Will be inserted in the Settings section of the config file. ''; }; - extraDefaults = mkOption { + extraDefaults = lib.mkOption { default = ""; - type = types.lines; + type = lib.types.lines; description = '' Will be inserted in the Default section of the config file. ''; @@ -163,8 +160,8 @@ in ###### implementation - config = mkMerge [ - (mkIf config.services.bitlbee.enable { + config = lib.mkMerge [ + (lib.mkIf config.services.bitlbee.enable { systemd.services.bitlbee = { environment.PURPLE_PLUGIN_PATH = purple_plugin_path; description = "BitlBee IRC to other chat networks gateway"; @@ -182,7 +179,7 @@ in environment.systemPackages = [ bitlbeePkg ]; }) - (mkIf (config.services.bitlbee.authBackend == "pam") { + (lib.mkIf (config.services.bitlbee.authBackend == "pam") { security.pam.services.bitlbee = {}; }) ]; From 939ba8a2c3452cba4d507eba710ad4beda43ff76 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:02 +0200 Subject: [PATCH 152/236] nixos/services.blockbook-frontend: remove `with lib;` --- .../networking/blockbook-frontend.nix | 131 +++++++++--------- 1 file changed, 64 insertions(+), 67 deletions(-) diff --git a/nixos/modules/services/networking/blockbook-frontend.nix b/nixos/modules/services/networking/blockbook-frontend.nix index 504c98e9ab8e..6200a098c34a 100644 --- a/nixos/modules/services/networking/blockbook-frontend.nix +++ b/nixos/modules/services/networking/blockbook-frontend.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let eachBlockbook = config.services.blockbook-frontend; @@ -10,24 +7,24 @@ let options = { - enable = mkEnableOption "blockbook-frontend application"; + enable = lib.mkEnableOption "blockbook-frontend application"; - package = mkPackageOption pkgs "blockbook" { }; + package = lib.mkPackageOption pkgs "blockbook" { }; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = "blockbook-frontend-${name}"; description = "The user as which to run blockbook-frontend-${name}."; }; - group = mkOption { - type = types.str; + group = lib.mkOption { + type = lib.types.str; default = "${config.user}"; description = "The group as which to run blockbook-frontend-${name}."; }; - certFile = mkOption { - type = types.nullOr types.path; + certFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; default = null; example = "/etc/secrets/blockbook-frontend-${name}/certFile"; description = '' @@ -36,15 +33,15 @@ let ''; }; - configFile = mkOption { - type = with types; nullOr path; + configFile = lib.mkOption { + type = with lib.types; nullOr path; default = null; example = "${config.dataDir}/config.json"; description = "Location of the blockbook configuration file."; }; - coinName = mkOption { - type = types.str; + coinName = lib.mkOption { + type = lib.types.str; default = "Bitcoin"; description = '' See @@ -52,68 +49,68 @@ let ''; }; - cssDir = mkOption { - type = types.path; + cssDir = lib.mkOption { + type = lib.types.path; default = "${config.package}/share/css/"; - defaultText = literalExpression ''"''${package}/share/css/"''; - example = literalExpression ''"''${dataDir}/static/css/"''; + defaultText = lib.literalExpression ''"''${package}/share/css/"''; + example = lib.literalExpression ''"''${dataDir}/static/css/"''; description = '' Location of the dir with {file}`main.css` CSS file. By default, the one shipped with the package is used. ''; }; - dataDir = mkOption { - type = types.path; + dataDir = lib.mkOption { + type = lib.types.path; default = "/var/lib/blockbook-frontend-${name}"; description = "Location of blockbook-frontend-${name} data directory."; }; - debug = mkOption { - type = types.bool; + debug = lib.mkOption { + type = lib.types.bool; default = false; description = "Debug mode, return more verbose errors, reload templates on each request."; }; - internal = mkOption { - type = types.nullOr types.str; + internal = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = ":9030"; description = "Internal http server binding `[address]:port`."; }; - messageQueueBinding = mkOption { - type = types.str; + messageQueueBinding = lib.mkOption { + type = lib.types.str; default = "tcp://127.0.0.1:38330"; description = "Message Queue Binding `address:port`."; }; - public = mkOption { - type = types.nullOr types.str; + public = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = ":9130"; description = "Public http server binding `[address]:port`."; }; rpc = { - url = mkOption { - type = types.str; + url = lib.mkOption { + type = lib.types.str; default = "http://127.0.0.1"; description = "URL for JSON-RPC connections."; }; - port = mkOption { - type = types.port; + port = lib.mkOption { + type = lib.types.port; default = 8030; description = "Port for JSON-RPC connections."; }; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = "rpc"; description = "Username for JSON-RPC connections."; }; - password = mkOption { - type = types.str; + password = lib.mkOption { + type = lib.types.str; default = "rpc"; description = '' RPC password for JSON-RPC connections. @@ -122,8 +119,8 @@ let ''; }; - passwordFile = mkOption { - type = types.nullOr types.path; + passwordFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; default = null; description = '' File containing password of the RPC user. @@ -132,24 +129,24 @@ let }; }; - sync = mkOption { - type = types.bool; + sync = lib.mkOption { + type = lib.types.bool; default = true; description = "Synchronizes until tip, if together with zeromq, keeps index synchronized."; }; - templateDir = mkOption { - type = types.path; + templateDir = lib.mkOption { + type = lib.types.path; default = "${config.package}/share/templates/"; - defaultText = literalExpression ''"''${package}/share/templates/"''; - example = literalExpression ''"''${dataDir}/templates/static/"''; + defaultText = lib.literalExpression ''"''${package}/share/templates/"''; + example = lib.literalExpression ''"''${dataDir}/templates/static/"''; description = "Location of the HTML templates. By default, ones shipped with the package are used."; }; - extraConfig = mkOption { - type = types.attrs; + extraConfig = lib.mkOption { + type = lib.types.attrs; default = {}; - example = literalExpression '' { + example = lib.literalExpression '' { "alternative_estimate_fee" = "whatthefee-disabled"; "alternative_estimate_fee_params" = "{\"url\": \"https://whatthefee.io/data.json\", \"periodSeconds\": 60}"; "fiat_rates" = "coingecko"; @@ -174,8 +171,8 @@ let ''; }; - extraCmdLineOptions = mkOption { - type = types.listOf types.str; + extraCmdLineOptions = lib.mkOption { + type = lib.types.listOf lib.types.str; default = []; example = [ "-workers=1" "-dbcache=0" "-logtosderr" ]; description = '' @@ -190,8 +187,8 @@ in # interface options = { - services.blockbook-frontend = mkOption { - type = types.attrsOf (types.submodule blockbookOpts); + services.blockbook-frontend = lib.mkOption { + type = lib.types.attrsOf (lib.types.submodule blockbookOpts); default = {}; description = "Specification of one or more blockbook-frontend instances."; }; @@ -199,10 +196,10 @@ in # implementation - config = mkIf (eachBlockbook != {}) { + config = lib.mkIf (eachBlockbook != {}) { - systemd.services = mapAttrs' (blockbookName: cfg: ( - nameValuePair "blockbook-frontend-${blockbookName}" ( + systemd.services = lib.mapAttrs' (blockbookName: cfg: ( + lib.nameValuePair "blockbook-frontend-${blockbookName}" ( let configFile = if cfg.configFile != null then cfg.configFile else pkgs.writeText "config.conf" (builtins.toJSON ( { @@ -220,7 +217,7 @@ in preStart = '' ln -sf ${cfg.templateDir} ${cfg.dataDir}/static/ ln -sf ${cfg.cssDir} ${cfg.dataDir}/static/ - ${optionalString (cfg.rpc.passwordFile != null && cfg.configFile == null) '' + ${lib.optionalString (cfg.rpc.passwordFile != null && cfg.configFile == null) '' CONFIGTMP=$(mktemp) ${pkgs.jq}/bin/jq ".rpc_pass = \"$(cat ${cfg.rpc.passwordFile})\"" ${configFile} > $CONFIGTMP mv $CONFIGTMP ${cfg.dataDir}/${blockbookName}-config.json @@ -237,11 +234,11 @@ in "-blockchaincfg=${configFile}" } \ -datadir=${cfg.dataDir} \ - ${optionalString (cfg.sync != false) "-sync"} \ - ${optionalString (cfg.certFile != null) "-certfile=${toString cfg.certFile}"} \ - ${optionalString (cfg.debug != false) "-debug"} \ - ${optionalString (cfg.internal != null) "-internal=${toString cfg.internal}"} \ - ${optionalString (cfg.public != null) "-public=${toString cfg.public}"} \ + ${lib.optionalString (cfg.sync != false) "-sync"} \ + ${lib.optionalString (cfg.certFile != null) "-certfile=${toString cfg.certFile}"} \ + ${lib.optionalString (cfg.debug != false) "-debug"} \ + ${lib.optionalString (cfg.internal != null) "-internal=${toString cfg.internal}"} \ + ${lib.optionalString (cfg.public != null) "-public=${toString cfg.public}"} \ ${toString cfg.extraCmdLineOptions} ''; Restart = "on-failure"; @@ -251,23 +248,23 @@ in } ) )) eachBlockbook; - systemd.tmpfiles.rules = flatten (mapAttrsToList (blockbookName: cfg: [ + systemd.tmpfiles.rules = lib.flatten (lib.mapAttrsToList (blockbookName: cfg: [ "d ${cfg.dataDir} 0750 ${cfg.user} ${cfg.group} - -" "d ${cfg.dataDir}/static 0750 ${cfg.user} ${cfg.group} - -" ]) eachBlockbook); - users.users = mapAttrs' (blockbookName: cfg: ( - nameValuePair "blockbook-frontend-${blockbookName}" { + users.users = lib.mapAttrs' (blockbookName: cfg: ( + lib.nameValuePair "blockbook-frontend-${blockbookName}" { name = cfg.user; group = cfg.group; home = cfg.dataDir; isSystemUser = true; })) eachBlockbook; - users.groups = mapAttrs' (instanceName: cfg: ( - nameValuePair "${cfg.group}" { })) eachBlockbook; + users.groups = lib.mapAttrs' (instanceName: cfg: ( + lib.nameValuePair "${cfg.group}" { })) eachBlockbook; }; - meta.maintainers = with maintainers; [ _1000101 ]; + meta.maintainers = with lib.maintainers; [ _1000101 ]; } From 8e6795a0296ae7c22cf38622246b32ba0dbca6de Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:03 +0200 Subject: [PATCH 153/236] nixos/services.blocky: remove `with lib;` --- nixos/modules/services/networking/blocky.nix | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/networking/blocky.nix b/nixos/modules/services/networking/blocky.nix index 4bc6ffa3f46a..1260d9da7ac2 100644 --- a/nixos/modules/services/networking/blocky.nix +++ b/nixos/modules/services/networking/blocky.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.blocky; @@ -10,11 +7,11 @@ let in { options.services.blocky = { - enable = mkEnableOption "blocky, a fast and lightweight DNS proxy as ad-blocker for local network with many features"; + enable = lib.mkEnableOption "blocky, a fast and lightweight DNS proxy as ad-blocker for local network with many features"; - package = mkPackageOption pkgs "blocky" { }; + package = lib.mkPackageOption pkgs "blocky" { }; - settings = mkOption { + settings = lib.mkOption { type = format.type; default = { }; description = '' @@ -25,14 +22,14 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.blocky = { description = "A DNS proxy and ad-blocker for the local network"; wantedBy = [ "multi-user.target" ]; serviceConfig = { DynamicUser = true; - ExecStart = "${getExe cfg.package} --config ${configFile}"; + ExecStart = "${lib.getExe cfg.package} --config ${configFile}"; Restart = "on-failure"; AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ]; From 87c989da08bee3449907a3fbee38be78c944dfe9 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:03 +0200 Subject: [PATCH 154/236] nixos/services.cgit: remove `with lib;` --- nixos/modules/services/networking/cgit.nix | 97 +++++++++++----------- 1 file changed, 47 insertions(+), 50 deletions(-) diff --git a/nixos/modules/services/networking/cgit.nix b/nixos/modules/services/networking/cgit.nix index 910db84a2641..208979364684 100644 --- a/nixos/modules/services/networking/cgit.nix +++ b/nixos/modules/services/networking/cgit.nix @@ -1,14 +1,11 @@ { config, lib, pkgs, ...}: - -with lib; - let cfgs = config.services.cgit; - settingType = with types; oneOf [ bool int str ]; - repeatedSettingType = with types; oneOf [ settingType (listOf settingType) ]; + settingType = with lib.types; oneOf [ bool int str ]; + repeatedSettingType = with lib.types; oneOf [ settingType (listOf settingType) ]; - genAttrs' = names: f: listToAttrs (map f names); + genAttrs' = names: f: lib.listToAttrs (map f names); regexEscape = let @@ -20,9 +17,9 @@ let " " # \f / 0x0C ]; in - replaceStrings special (map (c: "\\${c}") special); + lib.replaceStrings special (map (c: "\\${c}") special); - stripLocation = cfg: removeSuffix "/" cfg.nginx.location; + stripLocation = cfg: lib.removeSuffix "/" cfg.nginx.location; regexLocation = cfg: regexEscape (stripLocation cfg); @@ -47,29 +44,29 @@ let # list value as multiple lines (for "readme" for example) cgitrcEntry = name: value: - if isList value then + if lib.isList value then map (cgitrcLine name) value else [ (cgitrcLine name value) ]; mkCgitrc = cfg: pkgs.writeText "cgitrc" '' # global settings - ${concatStringsSep "\n" ( - flatten (mapAttrsToList + ${lib.concatStringsSep "\n" ( + lib.flatten (lib.mapAttrsToList cgitrcEntry ({ virtual-root = cfg.nginx.location; } // cfg.settings) ) ) } - ${optionalString (cfg.scanPath != null) (cgitrcLine "scan-path" cfg.scanPath)} + ${lib.optionalString (cfg.scanPath != null) (cgitrcLine "scan-path" cfg.scanPath)} # repository settings - ${concatStrings ( - mapAttrsToList + ${lib.concatStrings ( + lib.mapAttrsToList (url: settings: '' ${cgitrcLine "repo.url" url} - ${concatStringsSep "\n" ( - mapAttrsToList (name: cgitrcLine "repo.${name}") settings + ${lib.concatStringsSep "\n" ( + lib.mapAttrsToList (name: cgitrcLine "repo.${name}") settings ) } '') @@ -90,32 +87,32 @@ let in { options = { - services.cgit = mkOption { + services.cgit = lib.mkOption { description = "Configure cgit instances."; default = {}; - type = types.attrsOf (types.submodule ({ config, ... }: { + type = lib.types.attrsOf (lib.types.submodule ({ config, ... }: { options = { - enable = mkEnableOption "cgit"; + enable = lib.mkEnableOption "cgit"; - package = mkPackageOption pkgs "cgit" {}; + package = lib.mkPackageOption pkgs "cgit" {}; - nginx.virtualHost = mkOption { + nginx.virtualHost = lib.mkOption { description = "VirtualHost to serve cgit on, defaults to the attribute name."; - type = types.str; + type = lib.types.str; default = config._module.args.name; example = "git.example.com"; }; - nginx.location = mkOption { + nginx.location = lib.mkOption { description = "Location to serve cgit under."; - type = types.str; + type = lib.types.str; default = "/"; example = "/git/"; }; - repos = mkOption { + repos = lib.mkOption { description = "cgit repository settings, see cgitrc(5)"; - type = with types; attrsOf (attrsOf settingType); + type = with lib.types; attrsOf (attrsOf settingType); default = {}; example = { blah = { @@ -125,18 +122,18 @@ in }; }; - scanPath = mkOption { + scanPath = lib.mkOption { description = "A path which will be scanned for repositories."; - type = types.nullOr types.path; + type = lib.types.nullOr lib.types.path; default = null; example = "/var/lib/git"; }; - settings = mkOption { + settings = lib.mkOption { description = "cgit configuration, see cgitrc(5)"; - type = types.attrsOf repeatedSettingType; + type = lib.types.attrsOf repeatedSettingType; default = {}; - example = literalExpression '' + example = lib.literalExpression '' { enable-follow-links = true; source-filter = "''${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py"; @@ -144,21 +141,21 @@ in ''; }; - extraConfig = mkOption { + extraConfig = lib.mkOption { description = "These lines go to the end of cgitrc verbatim."; - type = types.lines; + type = lib.types.lines; default = ""; }; - user = mkOption { + user = lib.mkOption { description = "User to run the cgit service as."; - type = types.str; + type = lib.types.str; default = "cgit"; }; - group = mkOption { + group = lib.mkOption { description = "Group to run the cgit service as."; - type = types.str; + type = lib.types.str; default = "cgit"; }; }; @@ -166,13 +163,13 @@ in }; }; - config = mkIf (any (cfg: cfg.enable) (attrValues cfgs)) { - assertions = mapAttrsToList (vhost: cfg: { + config = lib.mkIf (lib.any (cfg: cfg.enable) (lib.attrValues cfgs)) { + assertions = lib.mapAttrsToList (vhost: cfg: { assertion = !cfg.enable || (cfg.scanPath == null) != (cfg.repos == {}); message = "Exactly one of services.cgit.${vhost}.scanPath or services.cgit.${vhost}.repos must be set."; }) cfgs; - users = mkMerge (flip mapAttrsToList cfgs (_: cfg: { + users = lib.mkMerge (lib.flip lib.mapAttrsToList cfgs (_: cfg: { users.${cfg.user} = { isSystemUser = true; inherit (cfg) group; @@ -180,23 +177,23 @@ in groups.${cfg.group} = { }; })); - services.fcgiwrap.instances = flip mapAttrs' cfgs (name: cfg: - nameValuePair "cgit-${name}" { + services.fcgiwrap.instances = lib.flip lib.mapAttrs' cfgs (name: cfg: + lib.nameValuePair "cgit-${name}" { process = { inherit (cfg) user group; }; socket = { inherit (config.services.nginx) user group; }; } ); - systemd.services = flip mapAttrs' cfgs (name: cfg: - nameValuePair (fcgiwrapUnitName name) - (mkIf (cfg.repos != { }) { + systemd.services = lib.flip lib.mapAttrs' cfgs (name: cfg: + lib.nameValuePair (fcgiwrapUnitName name) + (lib.mkIf (cfg.repos != { }) { serviceConfig.RuntimeDirectory = fcgiwrapUnitName name; preStart = '' - GIT_PROJECT_ROOT=${escapeShellArg (gitProjectRoot name cfg)} + GIT_PROJECT_ROOT=${lib.escapeShellArg (gitProjectRoot name cfg)} mkdir -p "$GIT_PROJECT_ROOT" cd "$GIT_PROJECT_ROOT" - ${concatLines (flip mapAttrsToList cfg.repos (name: repo: '' - ln -s ${escapeShellArg repo.path} ${escapeShellArg name} + ${lib.concatLines (lib.flip lib.mapAttrsToList cfg.repos (name: repo: '' + ln -s ${lib.escapeShellArg repo.path} ${lib.escapeShellArg name} ''))} ''; } @@ -204,12 +201,12 @@ in services.nginx.enable = true; - services.nginx.virtualHosts = mkMerge (mapAttrsToList (name: cfg: { + services.nginx.virtualHosts = lib.mkMerge (lib.mapAttrsToList (name: cfg: { ${cfg.nginx.virtualHost} = { locations = ( genAttrs' [ "cgit.css" "cgit.png" "favicon.ico" "robots.txt" ] - (fileName: nameValuePair "= ${stripLocation cfg}/${fileName}" { + (fileName: lib.nameValuePair "= ${stripLocation cfg}/${fileName}" { extraConfig = '' alias ${cfg.package}/cgit/${fileName}; ''; From f6077c6bcd5db83261bcfae4553e86115efd7002 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:03 +0200 Subject: [PATCH 155/236] nixos/services.chisel-server: remove `with lib;` --- .../services/networking/chisel-server.nix | 53 +++++++++---------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/nixos/modules/services/networking/chisel-server.nix b/nixos/modules/services/networking/chisel-server.nix index 9c6391701faf..2b585c22f304 100644 --- a/nixos/modules/services/networking/chisel-server.nix +++ b/nixos/modules/services/networking/chisel-server.nix @@ -1,69 +1,66 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.chisel-server; in { options = { services.chisel-server = { - enable = mkEnableOption "Chisel Tunnel Server"; - host = mkOption { + enable = lib.mkEnableOption "Chisel Tunnel Server"; + host = lib.mkOption { description = "Address to listen on, falls back to 0.0.0.0"; - type = with types; nullOr str; + type = with lib.types; nullOr str; default = null; example = "[::1]"; }; - port = mkOption { + port = lib.mkOption { description = "Port to listen on, falls back to 8080"; - type = with types; nullOr port; + type = with lib.types; nullOr port; default = null; }; - authfile = mkOption { + authfile = lib.mkOption { description = "Path to auth.json file"; - type = with types; nullOr path; + type = with lib.types; nullOr path; default = null; }; - keepalive = mkOption { + keepalive = lib.mkOption { description = "Keepalive interval, falls back to 25s"; - type = with types; nullOr str; + type = with lib.types; nullOr str; default = null; example = "5s"; }; - backend = mkOption { + backend = lib.mkOption { description = "HTTP server to proxy normal requests to"; - type = with types; nullOr str; + type = with lib.types; nullOr str; default = null; example = "http://127.0.0.1:8888"; }; - socks5 = mkOption { + socks5 = lib.mkOption { description = "Allow clients access to internal SOCKS5 proxy"; - type = types.bool; + type = lib.types.bool; default = false; }; - reverse = mkOption { + reverse = lib.mkOption { description = "Allow clients reverse port forwarding"; - type = types.bool; + type = lib.types.bool; default = false; }; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.chisel-server = { description = "Chisel Tunnel Server"; wantedBy = [ "network-online.target" ]; serviceConfig = { - ExecStart = "${pkgs.chisel}/bin/chisel server " + concatStringsSep " " ( - optional (cfg.host != null) "--host ${cfg.host}" - ++ optional (cfg.port != null) "--port ${builtins.toString cfg.port}" - ++ optional (cfg.authfile != null) "--authfile ${cfg.authfile}" - ++ optional (cfg.keepalive != null) "--keepalive ${cfg.keepalive}" - ++ optional (cfg.backend != null) "--backend ${cfg.backend}" - ++ optional cfg.socks5 "--socks5" - ++ optional cfg.reverse "--reverse" + ExecStart = "${pkgs.chisel}/bin/chisel server " + lib.concatStringsSep " " ( + lib.optional (cfg.host != null) "--host ${cfg.host}" + ++ lib.optional (cfg.port != null) "--port ${builtins.toString cfg.port}" + ++ lib.optional (cfg.authfile != null) "--authfile ${cfg.authfile}" + ++ lib.optional (cfg.keepalive != null) "--keepalive ${cfg.keepalive}" + ++ lib.optional (cfg.backend != null) "--backend ${cfg.backend}" + ++ lib.optional cfg.socks5 "--socks5" + ++ lib.optional cfg.reverse "--reverse" ); # Security Hardening @@ -95,5 +92,5 @@ in { }; }; - meta.maintainers = with maintainers; [ clerie ]; + meta.maintainers = with lib.maintainers; [ clerie ]; } From 742185f18cbafd4dee839eaf25ab8a70437ae000 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:03 +0200 Subject: [PATCH 156/236] nixos/services.cjdns: remove `with lib;` --- nixos/modules/services/networking/cjdns.nix | 85 ++++++++++----------- 1 file changed, 41 insertions(+), 44 deletions(-) diff --git a/nixos/modules/services/networking/cjdns.nix b/nixos/modules/services/networking/cjdns.nix index f50031eb2ec4..a7f39b379181 100644 --- a/nixos/modules/services/networking/cjdns.nix +++ b/nixos/modules/services/networking/cjdns.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let pkg = pkgs.cjdns; @@ -11,28 +8,28 @@ let connectToSubmodule = { ... }: { options = - { password = mkOption { - type = types.str; + { password = lib.mkOption { + type = lib.types.str; description = "Authorized password to the opposite end of the tunnel."; }; - login = mkOption { + login = lib.mkOption { default = ""; - type = types.str; + type = lib.types.str; description = "(optional) name your peer has for you"; }; - peerName = mkOption { + peerName = lib.mkOption { default = ""; - type = types.str; + type = lib.types.str; description = "(optional) human-readable name for peer"; }; - publicKey = mkOption { - type = types.str; + publicKey = lib.mkOption { + type = lib.types.str; description = "Public key at the opposite end of the tunnel."; }; - hostname = mkOption { + hostname = lib.mkOption { default = ""; example = "foobar.hype"; - type = types.str; + type = lib.types.str; description = "Optional hostname to add to /etc/hosts; prevents reverse lookup failures."; }; }; @@ -41,16 +38,16 @@ let # Additional /etc/hosts entries for peers with an associated hostname cjdnsExtraHosts = pkgs.runCommand "cjdns-hosts" {} '' exec >$out - ${concatStringsSep "\n" (mapAttrsToList (k: v: - optionalString (v.hostname != "") + ${lib.concatStringsSep "\n" (lib.mapAttrsToList (k: v: + lib.optionalString (v.hostname != "") "echo $(${pkgs.cjdns}/bin/publictoip6 ${v.publicKey}) ${v.hostname}") (cfg.ETHInterface.connectTo // cfg.UDPInterface.connectTo))} ''; parseModules = x: - x // { connectTo = mapAttrs (name: value: { inherit (value) password publicKey; }) x.connectTo; }; + x // { connectTo = lib.mapAttrs (name: value: { inherit (value) password publicKey; }) x.connectTo; }; - cjdrouteConf = builtins.toJSON ( recursiveUpdate { + cjdrouteConf = builtins.toJSON ( lib.recursiveUpdate { admin = { bind = cfg.admin.bind; password = "@CJDNS_ADMIN_PASSWORD@"; @@ -84,8 +81,8 @@ in services.cjdns = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to enable the cjdns network encryption @@ -95,8 +92,8 @@ in ''; }; - extraConfig = mkOption { - type = types.attrs; + extraConfig = lib.mkOption { + type = lib.types.attrs; default = {}; example = { router.interface.tunDevice = "tun10"; }; description = '' @@ -105,8 +102,8 @@ in ''; }; - confFile = mkOption { - type = types.nullOr types.path; + confFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; default = null; example = "/etc/cjdroute.conf"; description = '' @@ -114,8 +111,8 @@ in ''; }; - authorizedPasswords = mkOption { - type = types.listOf types.str; + authorizedPasswords = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; example = [ "snyrfgkqsc98qh1y4s5hbu0j57xw5s0" @@ -129,8 +126,8 @@ in }; admin = { - bind = mkOption { - type = types.str; + bind = lib.mkOption { + type = lib.types.str; default = "127.0.0.1:11234"; description = '' Bind the administration port to this address and port. @@ -139,18 +136,18 @@ in }; UDPInterface = { - bind = mkOption { - type = types.str; + bind = lib.mkOption { + type = lib.types.str; default = ""; example = "192.168.1.32:43211"; description = '' Address and port to bind UDP tunnels to. ''; }; - connectTo = mkOption { - type = types.attrsOf ( types.submodule ( connectToSubmodule ) ); + connectTo = lib.mkOption { + type = lib.types.attrsOf ( lib.types.submodule ( connectToSubmodule ) ); default = { }; - example = literalExpression '' + example = lib.literalExpression '' { "192.168.1.1:27313" = { hostname = "homer.hype"; @@ -166,8 +163,8 @@ in }; ETHInterface = { - bind = mkOption { - type = types.str; + bind = lib.mkOption { + type = lib.types.str; default = ""; example = "eth0"; description = '' @@ -176,8 +173,8 @@ in ''; }; - beacon = mkOption { - type = types.int; + beacon = lib.mkOption { + type = lib.types.int; default = 2; description = '' Auto-connect to other cjdns nodes on the same network. @@ -193,10 +190,10 @@ in ''; }; - connectTo = mkOption { - type = types.attrsOf ( types.submodule ( connectToSubmodule ) ); + connectTo = lib.mkOption { + type = lib.types.attrsOf ( lib.types.submodule ( connectToSubmodule ) ); default = { }; - example = literalExpression '' + example = lib.literalExpression '' { "01:02:03:04:05:06" = { hostname = "homer.hype"; @@ -212,8 +209,8 @@ in }; }; - addExtraHosts = mkOption { - type = types.bool; + addExtraHosts = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to add cjdns peers with an associated hostname to @@ -226,7 +223,7 @@ in }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { boot.kernelModules = [ "tun" ]; @@ -238,7 +235,7 @@ in after = [ "network-online.target" ]; bindsTo = [ "network-online.target" ]; - preStart = optionalString (cfg.confFile == null) '' + preStart = lib.optionalString (cfg.confFile == null) '' [ -e /etc/cjdns.keys ] && source /etc/cjdns.keys if [ -z "$CJDNS_PRIVATE_KEY" ]; then @@ -283,7 +280,7 @@ in }; }; - networking.hostFiles = mkIf cfg.addExtraHosts [ cjdnsExtraHosts ]; + networking.hostFiles = lib.mkIf cfg.addExtraHosts [ cjdnsExtraHosts ]; assertions = [ { assertion = ( cfg.ETHInterface.bind != "" || cfg.UDPInterface.bind != "" || cfg.confFile != null ); From a3c69c111e63c4694d5ada25b8ce93517265a8d5 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:03 +0200 Subject: [PATCH 157/236] nixos/services.clatd: remove `with lib;` --- nixos/modules/services/networking/clatd.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/networking/clatd.nix b/nixos/modules/services/networking/clatd.nix index de6cde4e979c..09f7fdfb6e9e 100644 --- a/nixos/modules/services/networking/clatd.nix +++ b/nixos/modules/services/networking/clatd.nix @@ -1,6 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; let cfg = config.services.clatd; @@ -11,16 +9,16 @@ in { options = { services.clatd = { - enable = mkEnableOption "clatd"; + enable = lib.mkEnableOption "clatd"; - package = mkPackageOption pkgs "clatd" { }; + package = lib.mkPackageOption pkgs "clatd" { }; - settings = mkOption { - type = types.submodule ({ name, ... }: { + settings = lib.mkOption { + type = lib.types.submodule ({ name, ... }: { freeformType = settingsFormat.type; }); default = { }; - example = literalExpression '' + example = lib.literalExpression '' { plat-prefix = "64:ff9b::/96"; } @@ -32,7 +30,7 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.clatd = { description = "464XLAT CLAT daemon"; documentation = [ "man:clatd(8)" ]; From 14f2d0a94bbd0743ba135cddcb4dd9c64f61526a Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:03 +0200 Subject: [PATCH 158/236] nixos/services.cloudflare-dyndns: remove `with lib;` --- .../services/networking/cloudflare-dyndns.nix | 45 +++++++++---------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/nixos/modules/services/networking/cloudflare-dyndns.nix b/nixos/modules/services/networking/cloudflare-dyndns.nix index 9495c8dcaf81..0f035362742e 100644 --- a/nixos/modules/services/networking/cloudflare-dyndns.nix +++ b/nixos/modules/services/networking/cloudflare-dyndns.nix @@ -1,19 +1,16 @@ { config, pkgs, lib, ... }: - -with lib; - let cfg = config.services.cloudflare-dyndns; in { options = { services.cloudflare-dyndns = { - enable = mkEnableOption "Cloudflare Dynamic DNS Client"; + enable = lib.mkEnableOption "Cloudflare Dynamic DNS Client"; - package = mkPackageOption pkgs "cloudflare-dyndns" { }; + package = lib.mkPackageOption pkgs "cloudflare-dyndns" { }; - apiTokenFile = mkOption { - type = types.nullOr types.str; + apiTokenFile = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; description = '' The path to a file containing the CloudFlare API token. @@ -22,16 +19,16 @@ in ''; }; - domains = mkOption { - type = types.listOf types.str; + domains = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; description = '' List of domain names to update records for. ''; }; - frequency = mkOption { - type = types.nullOr types.str; + frequency = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = "*:0/5"; description = '' Run cloudflare-dyndns with the given frequency (see @@ -40,32 +37,32 @@ in ''; }; - proxied = mkOption { - type = types.bool; + proxied = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether this is a DNS-only record, or also being proxied through CloudFlare. ''; }; - ipv4 = mkOption { - type = types.bool; + ipv4 = lib.mkOption { + type = lib.types.bool; default = true; description = '' Whether to enable setting IPv4 A records. ''; }; - ipv6 = mkOption { - type = types.bool; + ipv6 = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to enable setting IPv6 AAAA records. ''; }; - deleteMissing = mkOption { - type = types.bool; + deleteMissing = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to delete the record when no IP address is found. @@ -74,7 +71,7 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.cloudflare-dyndns = { description = "CloudFlare Dynamic DNS Client"; after = [ "network.target" ]; @@ -94,12 +91,12 @@ in args = [ "--cache-file /var/lib/cloudflare-dyndns/ip.cache" ] ++ (if cfg.ipv4 then [ "-4" ] else [ "-no-4" ]) ++ (if cfg.ipv6 then [ "-6" ] else [ "-no-6" ]) - ++ optional cfg.deleteMissing "--delete-missing" - ++ optional cfg.proxied "--proxied"; + ++ lib.optional cfg.deleteMissing "--delete-missing" + ++ lib.optional cfg.proxied "--proxied"; in - "${getExe cfg.package} ${toString args}"; + "${lib.getExe cfg.package} ${toString args}"; }; - } // optionalAttrs (cfg.frequency != null) { + } // lib.optionalAttrs (cfg.frequency != null) { startAt = cfg.frequency; }; }; From 5506afac27c5cf8c7e5084bdfbcb3ea5def613ed Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:03 +0200 Subject: [PATCH 159/236] nixos/services.cloudflared: remove `with lib;` --- .../services/networking/cloudflared.nix | 133 +++++++++--------- 1 file changed, 65 insertions(+), 68 deletions(-) diff --git a/nixos/modules/services/networking/cloudflared.nix b/nixos/modules/services/networking/cloudflared.nix index c0d1012ffb80..c328d1de43c6 100644 --- a/nixos/modules/services/networking/cloudflared.nix +++ b/nixos/modules/services/networking/cloudflared.nix @@ -1,13 +1,10 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.cloudflared; originRequest = { - connectTimeout = mkOption { - type = with types; nullOr str; + connectTimeout = lib.mkOption { + type = with lib.types; nullOr str; default = null; example = "30s"; description = '' @@ -15,8 +12,8 @@ let ''; }; - tlsTimeout = mkOption { - type = with types; nullOr str; + tlsTimeout = lib.mkOption { + type = with lib.types; nullOr str; default = null; example = "10s"; description = '' @@ -24,8 +21,8 @@ let ''; }; - tcpKeepAlive = mkOption { - type = with types; nullOr str; + tcpKeepAlive = lib.mkOption { + type = with lib.types; nullOr str; default = null; example = "30s"; description = '' @@ -33,8 +30,8 @@ let ''; }; - noHappyEyeballs = mkOption { - type = with types; nullOr bool; + noHappyEyeballs = lib.mkOption { + type = with lib.types; nullOr bool; default = null; example = false; description = '' @@ -42,8 +39,8 @@ let ''; }; - keepAliveConnections = mkOption { - type = with types; nullOr int; + keepAliveConnections = lib.mkOption { + type = with lib.types; nullOr int; default = null; example = 100; description = '' @@ -51,8 +48,8 @@ let ''; }; - keepAliveTimeout = mkOption { - type = with types; nullOr str; + keepAliveTimeout = lib.mkOption { + type = with lib.types; nullOr str; default = null; example = "1m30s"; description = '' @@ -60,8 +57,8 @@ let ''; }; - httpHostHeader = mkOption { - type = with types; nullOr str; + httpHostHeader = lib.mkOption { + type = with lib.types; nullOr str; default = null; example = ""; description = '' @@ -69,8 +66,8 @@ let ''; }; - originServerName = mkOption { - type = with types; nullOr str; + originServerName = lib.mkOption { + type = with lib.types; nullOr str; default = null; example = ""; description = '' @@ -78,8 +75,8 @@ let ''; }; - caPool = mkOption { - type = with types; nullOr (either str path); + caPool = lib.mkOption { + type = with lib.types; nullOr (either str path); default = null; example = ""; description = '' @@ -87,8 +84,8 @@ let ''; }; - noTLSVerify = mkOption { - type = with types; nullOr bool; + noTLSVerify = lib.mkOption { + type = with lib.types; nullOr bool; default = null; example = false; description = '' @@ -96,8 +93,8 @@ let ''; }; - disableChunkedEncoding = mkOption { - type = with types; nullOr bool; + disableChunkedEncoding = lib.mkOption { + type = with lib.types; nullOr bool; default = null; example = false; description = '' @@ -105,8 +102,8 @@ let ''; }; - proxyAddress = mkOption { - type = with types; nullOr str; + proxyAddress = lib.mkOption { + type = with lib.types; nullOr str; default = null; example = "127.0.0.1"; description = '' @@ -114,8 +111,8 @@ let ''; }; - proxyPort = mkOption { - type = with types; nullOr int; + proxyPort = lib.mkOption { + type = with lib.types; nullOr int; default = null; example = 0; description = '' @@ -123,8 +120,8 @@ let ''; }; - proxyType = mkOption { - type = with types; nullOr (enum [ "" "socks" ]); + proxyType = lib.mkOption { + type = with lib.types; nullOr (enum [ "" "socks" ]); default = null; example = ""; description = '' @@ -138,32 +135,32 @@ let in { options.services.cloudflared = { - enable = mkEnableOption "Cloudflare Tunnel client daemon (formerly Argo Tunnel)"; + enable = lib.mkEnableOption "Cloudflare Tunnel client daemon (formerly Argo Tunnel)"; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = "cloudflared"; description = "User account under which Cloudflared runs."; }; - group = mkOption { - type = types.str; + group = lib.mkOption { + type = lib.types.str; default = "cloudflared"; description = "Group under which cloudflared runs."; }; - package = mkPackageOption pkgs "cloudflared" { }; + package = lib.mkPackageOption pkgs "cloudflared" { }; - tunnels = mkOption { + tunnels = lib.mkOption { description = '' Cloudflare tunnels. ''; - type = types.attrsOf (types.submodule ({ name, ... }: { + type = lib.types.attrsOf (lib.types.submodule ({ name, ... }: { options = { inherit originRequest; - credentialsFile = mkOption { - type = types.str; + credentialsFile = lib.mkOption { + type = lib.types.str; description = '' Credential file. @@ -172,8 +169,8 @@ in }; warp-routing = { - enabled = mkOption { - type = with types; nullOr bool; + enabled = lib.mkOption { + type = with lib.types; nullOr bool; default = null; description = '' Enable warp routing. @@ -183,8 +180,8 @@ in }; }; - default = mkOption { - type = types.str; + default = lib.mkOption { + type = lib.types.str; description = '' Catch-all service if no ingress matches. @@ -193,13 +190,13 @@ in example = "http_status:404"; }; - ingress = mkOption { - type = with types; attrsOf (either str (submodule ({ hostname, ... }: { + ingress = lib.mkOption { + type = with lib.types; attrsOf (either str (submodule ({ hostname, ... }: { options = { inherit originRequest; - service = mkOption { - type = with types; nullOr str; + service = lib.mkOption { + type = with lib.types; nullOr str; default = null; description = '' Service to pass the traffic. @@ -209,8 +206,8 @@ in example = "http://localhost:80, tcp://localhost:8000, unix:/home/production/echo.sock, hello_world or http_status:404"; }; - path = mkOption { - type = with types; nullOr str; + path = lib.mkOption { + type = with lib.types; nullOr str; default = null; description = '' Path filter. @@ -251,11 +248,11 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.targets = - mapAttrs' + lib.mapAttrs' (name: tunnel: - nameValuePair "cloudflared-tunnel-${name}" { + lib.nameValuePair "cloudflared-tunnel-${name}" { description = "Cloudflare tunnel '${name}' target"; requires = [ "cloudflared-tunnel-${name}.service" ]; after = [ "cloudflared-tunnel-${name}.service" ]; @@ -265,41 +262,41 @@ in config.services.cloudflared.tunnels; systemd.services = - mapAttrs' + lib.mapAttrs' (name: tunnel: let filterConfig = lib.attrsets.filterAttrsRecursive (_: v: ! builtins.elem v [ null [ ] { } ]); - filterIngressSet = filterAttrs (_: v: builtins.typeOf v == "set"); - filterIngressStr = filterAttrs (_: v: builtins.typeOf v == "string"); + filterIngressSet = lib.filterAttrs (_: v: builtins.typeOf v == "set"); + filterIngressStr = lib.filterAttrs (_: v: builtins.typeOf v == "string"); ingressesSet = filterIngressSet tunnel.ingress; ingressesStr = filterIngressStr tunnel.ingress; - fullConfig = filterConfig { + fullConfig = lib.filterConfig { tunnel = name; "credentials-file" = tunnel.credentialsFile; - warp-routing = filterConfig tunnel.warp-routing; - originRequest = filterConfig tunnel.originRequest; + warp-routing = lib.filterConfig tunnel.warp-routing; + originRequest = lib.filterConfig tunnel.originRequest; ingress = (map (key: { hostname = key; - } // getAttr key (filterConfig (filterConfig ingressesSet))) - (attrNames ingressesSet)) + } // lib.getAttr key (filterConfig (filterConfig ingressesSet))) + (lib.attrNames ingressesSet)) ++ (map (key: { hostname = key; - service = getAttr key ingressesStr; + service = lib.getAttr key ingressesStr; }) - (attrNames ingressesStr)) + (lib.attrNames ingressesStr)) ++ [{ service = tunnel.default; }]; }; mkConfigFile = pkgs.writeText "cloudflared.yml" (builtins.toJSON fullConfig); in - nameValuePair "cloudflared-tunnel-${name}" ({ + lib.nameValuePair "cloudflared-tunnel-${name}" ({ after = [ "network.target" "network-online.target" ]; wants = [ "network.target" "network-online.target" ]; wantedBy = [ "multi-user.target" ]; @@ -313,17 +310,17 @@ in ) config.services.cloudflared.tunnels; - users.users = mkIf (cfg.user == "cloudflared") { + users.users = lib.mkIf (cfg.user == "cloudflared") { cloudflared = { group = cfg.group; isSystemUser = true; }; }; - users.groups = mkIf (cfg.group == "cloudflared") { + users.groups = lib.mkIf (cfg.group == "cloudflared") { cloudflared = { }; }; }; - meta.maintainers = with maintainers; [ bbigras anpin ]; + meta.maintainers = with lib.maintainers; [ bbigras anpin ]; } From 543833269065e1971fe5214c090caebdc405b779 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:04 +0200 Subject: [PATCH 160/236] nixos/services.cntlm: remove `with lib;` --- nixos/modules/services/networking/cntlm.nix | 51 ++++++++++----------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/nixos/modules/services/networking/cntlm.nix b/nixos/modules/services/networking/cntlm.nix index 16e9c3bb87b5..4615380c41eb 100644 --- a/nixos/modules/services/networking/cntlm.nix +++ b/nixos/modules/services/networking/cntlm.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.cntlm; @@ -16,11 +13,11 @@ let Username ${cfg.username} Domain ${cfg.domain} Password ${cfg.password} - ${optionalString (cfg.netbios_hostname != "") "Workstation ${cfg.netbios_hostname}"} - ${concatMapStrings (entry: "Proxy ${entry}\n") cfg.proxy} - ${optionalString (cfg.noproxy != []) "NoProxy ${concatStringsSep ", " cfg.noproxy}"} + ${lib.optionalString (cfg.netbios_hostname != "") "Workstation ${cfg.netbios_hostname}"} + ${lib.concatMapStrings (entry: "Proxy ${entry}\n") cfg.proxy} + ${lib.optionalString (cfg.noproxy != []) "NoProxy ${lib.concatStringsSep ", " cfg.noproxy}"} - ${concatMapStrings (port: '' + ${lib.concatMapStrings (port: '' Listen ${toString port} '') cfg.port} @@ -33,36 +30,36 @@ in options.services.cntlm = { - enable = mkEnableOption "cntlm, which starts a local proxy"; + enable = lib.mkEnableOption "cntlm, which starts a local proxy"; - username = mkOption { - type = types.str; + username = lib.mkOption { + type = lib.types.str; description = '' Proxy account name, without the possibility to include domain name ('at' sign is interpreted literally). ''; }; - domain = mkOption { - type = types.str; + domain = lib.mkOption { + type = lib.types.str; description = "Proxy account domain/workgroup name."; }; - password = mkOption { + password = lib.mkOption { default = "/etc/cntlm.password"; - type = types.str; + type = lib.types.str; description = "Proxy account password. Note: use chmod 0600 on /etc/cntlm.password for security."; }; - netbios_hostname = mkOption { - type = types.str; + netbios_hostname = lib.mkOption { + type = lib.types.str; default = ""; description = '' The hostname of your machine. ''; }; - proxy = mkOption { - type = types.listOf types.str; + proxy = lib.mkOption { + type = lib.types.listOf lib.types.str; description = '' A list of NTLM/NTLMv2 authenticating HTTP proxies. @@ -73,29 +70,29 @@ in example = [ "proxy.example.com:81" ]; }; - noproxy = mkOption { + noproxy = lib.mkOption { description = '' A list of domains where the proxy is skipped. ''; default = []; - type = types.listOf types.str; + type = lib.types.listOf lib.types.str; example = [ "*.example.com" "example.com" ]; }; - port = mkOption { + port = lib.mkOption { default = [3128]; - type = types.listOf types.port; + type = lib.types.listOf lib.types.port; description = "Specifies on which ports the cntlm daemon listens."; }; - extraConfig = mkOption { - type = types.lines; + extraConfig = lib.mkOption { + type = lib.types.lines; default = ""; description = "Additional config appended to the end of the generated {file}`cntlm.conf`."; }; - configText = mkOption { - type = types.lines; + configText = lib.mkOption { + type = lib.types.lines; default = ""; description = "Verbatim contents of {file}`cntlm.conf`."; }; @@ -104,7 +101,7 @@ in ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.cntlm = { description = "CNTLM is an NTLM / NTLM Session Response / NTLMv2 authenticating HTTP proxy"; after = [ "network.target" ]; From 6c6b5e7f8067725b2fab0326990b110d12a0dc1d Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:04 +0200 Subject: [PATCH 161/236] nixos/services.consul: remove `with lib;` --- nixos/modules/services/networking/consul.nix | 92 ++++++++++---------- 1 file changed, 45 insertions(+), 47 deletions(-) diff --git a/nixos/modules/services/networking/consul.nix b/nixos/modules/services/networking/consul.nix index 2d9b10514a72..855d3872aa62 100644 --- a/nixos/modules/services/networking/consul.nix +++ b/nixos/modules/services/networking/consul.nix @@ -1,6 +1,4 @@ { config, lib, pkgs, utils, ... }: - -with lib; let dataDir = "/var/lib/consul"; @@ -16,8 +14,8 @@ let configFiles = [ "/etc/consul.json" "/etc/consul-addrs.json" ] ++ cfg.extraConfigFiles; - devices = attrValues (filterAttrs (_: i: i != null) cfg.interface); - systemdDevices = forEach devices + devices = lib.attrValues (lib.filterAttrs (_: i: i != null) cfg.interface); + systemdDevices = lib.forEach devices (i: "sys-subsystem-net-devices-${utils.escapeSystemdPath i}.device"); in { @@ -25,26 +23,26 @@ in services.consul = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Enables the consul daemon. ''; }; - package = mkPackageOption pkgs "consul" { }; + package = lib.mkPackageOption pkgs "consul" { }; - webUi = mkOption { - type = types.bool; + webUi = lib.mkOption { + type = lib.types.bool; default = false; description = '' Enables the web interface on the consul http port. ''; }; - leaveOnStop = mkOption { - type = types.bool; + leaveOnStop = lib.mkOption { + type = lib.types.bool; default = false; description = '' If enabled, causes a leave action to be sent when closing consul. @@ -57,16 +55,16 @@ in interface = { - advertise = mkOption { - type = types.nullOr types.str; + advertise = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; description = '' The name of the interface to pull the advertise_addr from. ''; }; - bind = mkOption { - type = types.nullOr types.str; + bind = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; description = '' The name of the interface to pull the bind_addr from. @@ -74,16 +72,16 @@ in }; }; - forceAddrFamily = mkOption { - type = types.enum [ "any" "ipv4" "ipv6" ]; + forceAddrFamily = lib.mkOption { + type = lib.types.enum [ "any" "ipv4" "ipv6" ]; default = "any"; description = '' Whether to bind ipv4/ipv6 or both kind of addresses. ''; }; - forceIpv4 = mkOption { - type = types.nullOr types.bool; + forceIpv4 = lib.mkOption { + type = lib.types.nullOr lib.types.bool; default = null; description = '' Deprecated: Use consul.forceAddrFamily instead. @@ -91,26 +89,26 @@ in ''; }; - dropPrivileges = mkOption { - type = types.bool; + dropPrivileges = lib.mkOption { + type = lib.types.bool; default = true; description = '' Whether the consul agent should be run as a non-root consul user. ''; }; - extraConfig = mkOption { + extraConfig = lib.mkOption { default = { }; - type = types.attrsOf types.anything; + type = lib.types.attrsOf lib.types.anything; description = '' Extra configuration options which are serialized to json and added to the config.json file. ''; }; - extraConfigFiles = mkOption { + extraConfigFiles = lib.mkOption { default = [ ]; - type = types.listOf types.str; + type = lib.types.listOf lib.types.str; description = '' Additional configuration files to pass to consul NOTE: These will not trigger the service to be restarted when altered. @@ -118,32 +116,32 @@ in }; alerts = { - enable = mkEnableOption "consul-alerts"; + enable = lib.mkEnableOption "consul-alerts"; - package = mkPackageOption pkgs "consul-alerts" { }; + package = lib.mkPackageOption pkgs "consul-alerts" { }; - listenAddr = mkOption { + listenAddr = lib.mkOption { description = "Api listening address."; default = "localhost:9000"; - type = types.str; + type = lib.types.str; }; - consulAddr = mkOption { + consulAddr = lib.mkOption { description = "Consul api listening address"; default = "localhost:8500"; - type = types.str; + type = lib.types.str; }; - watchChecks = mkOption { + watchChecks = lib.mkOption { description = "Whether to enable check watcher."; default = true; - type = types.bool; + type = lib.types.bool; }; - watchEvents = mkOption { + watchEvents = lib.mkOption { description = "Whether to enable event watcher."; default = true; - type = types.bool; + type = lib.types.bool; }; }; @@ -151,8 +149,8 @@ in }; - config = mkIf cfg.enable ( - mkMerge [{ + config = lib.mkIf cfg.enable ( + lib.mkMerge [{ users.users.consul = { description = "Consul agent daemon user"; @@ -182,18 +180,18 @@ in after = [ "network.target" ] ++ systemdDevices; bindsTo = systemdDevices; restartTriggers = [ config.environment.etc."consul.json".source ] - ++ mapAttrsToList (_: d: d.source) - (filterAttrs (n: _: hasPrefix "consul.d/" n) config.environment.etc); + ++ lib.mapAttrsToList (_: d: d.source) + (lib.filterAttrs (n: _: lib.hasPrefix "consul.d/" n) config.environment.etc); serviceConfig = { ExecStart = "@${lib.getExe cfg.package} consul agent -config-dir /etc/consul.d" - + concatMapStrings (n: " -config-file ${n}") configFiles; + + lib.concatMapStrings (n: " -config-file ${n}") configFiles; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; PermissionsStartOnly = true; User = if cfg.dropPrivileges then "consul" else null; Restart = "on-failure"; TimeoutStartSec = "infinity"; - } // (optionalAttrs (cfg.leaveOnStop) { + } // (lib.optionalAttrs (cfg.leaveOnStop) { ExecStop = "${lib.getExe cfg.package} leave"; }); @@ -231,8 +229,8 @@ in echo "{" > /etc/consul-addrs.json delim=" " '' - + concatStrings (flip mapAttrsToList cfg.interface (name: i: - optionalString (i != null) '' + + lib.concatStrings (lib.flip lib.mapAttrsToList cfg.interface (name: i: + lib.optionalString (i != null) '' echo "$delim \"${name}_addr\": \"$(getAddr "${i}")\"" >> /etc/consul-addrs.json delim="," '')) @@ -243,11 +241,11 @@ in } # deprecated - (mkIf (cfg.forceIpv4 != null && cfg.forceIpv4) { + (lib.mkIf (cfg.forceIpv4 != null && cfg.forceIpv4) { services.consul.forceAddrFamily = "ipv4"; }) - (mkIf (cfg.alerts.enable) { + (lib.mkIf (cfg.alerts.enable) { systemd.services.consul-alerts = { wantedBy = [ "multi-user.target" ]; after = [ "consul.service" ]; @@ -259,8 +257,8 @@ in ${lib.getExe cfg.alerts.package} start \ --alert-addr=${cfg.alerts.listenAddr} \ --consul-addr=${cfg.alerts.consulAddr} \ - ${optionalString cfg.alerts.watchChecks "--watch-checks"} \ - ${optionalString cfg.alerts.watchEvents "--watch-events"} + ${lib.optionalString cfg.alerts.watchChecks "--watch-checks"} \ + ${lib.optionalString cfg.alerts.watchEvents "--watch-events"} ''; User = if cfg.dropPrivileges then "consul" else null; Restart = "on-failure"; From c4bbbbbb10438bb650cab7ca2ac1b262091d9369 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:04 +0200 Subject: [PATCH 162/236] nixos/services.coredns: remove `with lib;` --- nixos/modules/services/networking/coredns.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/nixos/modules/services/networking/coredns.nix b/nixos/modules/services/networking/coredns.nix index 370b9e6e8043..14602e06fe82 100644 --- a/nixos/modules/services/networking/coredns.nix +++ b/nixos/modules/services/networking/coredns.nix @@ -1,39 +1,36 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.coredns; configFile = pkgs.writeText "Corefile" cfg.config; in { options.services.coredns = { - enable = mkEnableOption "Coredns dns server"; + enable = lib.mkEnableOption "Coredns dns server"; - config = mkOption { + config = lib.mkOption { default = ""; example = '' . { whoami } ''; - type = types.lines; + type = lib.types.lines; description = '' Verbatim Corefile to use. See for details. ''; }; - package = mkPackageOption pkgs "coredns" { }; + package = lib.mkPackageOption pkgs "coredns" { }; - extraArgs = mkOption { + extraArgs = lib.mkOption { default = []; example = [ "-dns.port=53" ]; - type = types.listOf types.str; + type = lib.types.listOf lib.types.str; description = "Extra arguments to pass to coredns."; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.coredns = { description = "Coredns dns server"; after = [ "network.target" ]; @@ -46,7 +43,7 @@ in { AmbientCapabilities = "cap_net_bind_service"; NoNewPrivileges = true; DynamicUser = true; - ExecStart = "${getBin cfg.package}/bin/coredns -conf=${configFile} ${lib.escapeShellArgs cfg.extraArgs}"; + ExecStart = "${lib.getBin cfg.package}/bin/coredns -conf=${configFile} ${lib.escapeShellArgs cfg.extraArgs}"; ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR1 $MAINPID"; Restart = "on-failure"; }; From bd2d5c89ce54bc7e385222028b00faf21c6523f8 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:04 +0200 Subject: [PATCH 163/236] nixos/services.corerad: remove `with lib;` --- nixos/modules/services/networking/corerad.nix | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/nixos/modules/services/networking/corerad.nix b/nixos/modules/services/networking/corerad.nix index 2203aa30c161..edeee881008f 100644 --- a/nixos/modules/services/networking/corerad.nix +++ b/nixos/modules/services/networking/corerad.nix @@ -1,20 +1,17 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.corerad; settingsFormat = pkgs.formats.toml {}; in { - meta.maintainers = with maintainers; [ mdlayher ]; + meta.maintainers = with lib.maintainers; [ mdlayher ]; options.services.corerad = { - enable = mkEnableOption "CoreRAD IPv6 NDP RA daemon"; + enable = lib.mkEnableOption "CoreRAD IPv6 NDP RA daemon"; - settings = mkOption { + settings = lib.mkOption { type = settingsFormat.type; - example = literalExpression '' + example = lib.literalExpression '' { interfaces = [ # eth0 is an upstream interface monitoring for IPv6 router advertisements. @@ -42,18 +39,18 @@ in { ''; }; - configFile = mkOption { - type = types.path; - example = literalExpression ''"''${pkgs.corerad}/etc/corerad/corerad.toml"''; + configFile = lib.mkOption { + type = lib.types.path; + example = lib.literalExpression ''"''${pkgs.corerad}/etc/corerad/corerad.toml"''; description = "Path to CoreRAD TOML configuration file."; }; - package = mkPackageOption pkgs "corerad" { }; + package = lib.mkPackageOption pkgs "corerad" { }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { # Prefer the config file over settings if both are set. - services.corerad.configFile = mkDefault (settingsFormat.generate "corerad.toml" cfg.settings); + services.corerad.configFile = lib.mkDefault (settingsFormat.generate "corerad.toml" cfg.settings); systemd.services.corerad = { description = "CoreRAD IPv6 NDP RA daemon"; @@ -68,7 +65,7 @@ in { DynamicUser = true; Type = "notify"; NotifyAccess = "main"; - ExecStart = "${getBin cfg.package}/bin/corerad -c=${cfg.configFile}"; + ExecStart = "${lib.getBin cfg.package}/bin/corerad -c=${cfg.configFile}"; Restart = "on-failure"; RestartKillSignal = "SIGHUP"; }; From 7fcd972c941c6200afdd1b364d02eb0961f8fe9e Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:04 +0200 Subject: [PATCH 164/236] nixos/services.coturn: remove `with lib;` --- nixos/modules/services/networking/coturn.nix | 135 +++++++++---------- 1 file changed, 67 insertions(+), 68 deletions(-) diff --git a/nixos/modules/services/networking/coturn.nix b/nixos/modules/services/networking/coturn.nix index 3166c0dfb578..40c157d1006e 100644 --- a/nixos/modules/services/networking/coturn.nix +++ b/nixos/modules/services/networking/coturn.nix @@ -1,5 +1,4 @@ { config, lib, pkgs, ... }: -with lib; let cfg = config.services.coturn; pidfile = "/run/turnserver/turnserver.pid"; @@ -8,8 +7,8 @@ listening-port=${toString cfg.listening-port} tls-listening-port=${toString cfg.tls-listening-port} alt-listening-port=${toString cfg.alt-listening-port} alt-tls-listening-port=${toString cfg.alt-tls-listening-port} -${concatStringsSep "\n" (map (x: "listening-ip=${x}") cfg.listening-ips)} -${concatStringsSep "\n" (map (x: "relay-ip=${x}") cfg.relay-ips)} +${lib.concatStringsSep "\n" (map (x: "listening-ip=${x}") cfg.listening-ips)} +${lib.concatStringsSep "\n" (map (x: "relay-ip=${x}") cfg.relay-ips)} min-port=${toString cfg.min-port} max-port=${toString cfg.max-port} ${lib.optionalString cfg.lt-cred-mech "lt-cred-mech"} @@ -40,9 +39,9 @@ ${cfg.extraConfig} in { options = { services.coturn = { - enable = mkEnableOption "coturn TURN server"; - listening-port = mkOption { - type = types.int; + enable = lib.mkEnableOption "coturn TURN server"; + listening-port = lib.mkOption { + type = lib.types.int; default = 3478; description = '' TURN listener port for UDP and TCP. @@ -50,8 +49,8 @@ in { "plain" TCP and UDP port(s), too - if allowed by configuration. ''; }; - tls-listening-port = mkOption { - type = types.int; + tls-listening-port = lib.mkOption { + type = lib.types.int; default = 5349; description = '' TURN listener port for TLS. @@ -65,10 +64,10 @@ in { For secure UDP connections, we support DTLS version 1. ''; }; - alt-listening-port = mkOption { - type = types.int; + alt-listening-port = lib.mkOption { + type = lib.types.int; default = cfg.listening-port + 1; - defaultText = literalExpression "listening-port + 1"; + defaultText = lib.literalExpression "listening-port + 1"; description = '' Alternative listening port for UDP and TCP listeners; default (or zero) value means "listening port plus one". @@ -80,16 +79,16 @@ in { are listening to that endpoint only for "symmetry". ''; }; - alt-tls-listening-port = mkOption { - type = types.int; + alt-tls-listening-port = lib.mkOption { + type = lib.types.int; default = cfg.tls-listening-port + 1; - defaultText = literalExpression "tls-listening-port + 1"; + defaultText = lib.literalExpression "tls-listening-port + 1"; description = '' Alternative listening port for TLS and DTLS protocols. ''; }; - listening-ips = mkOption { - type = types.listOf types.str; + listening-ips = lib.mkOption { + type = lib.types.listOf lib.types.str; default = []; example = [ "203.0.113.42" "2001:DB8::42" ]; description = '' @@ -98,8 +97,8 @@ in { then all IPv4 and IPv6 system IPs will be used for listening. ''; }; - relay-ips = mkOption { - type = types.listOf types.str; + relay-ips = lib.mkOption { + type = lib.types.listOf lib.types.str; default = []; example = [ "203.0.113.42" "2001:DB8::42" ]; description = '' @@ -115,29 +114,29 @@ in { as the family of the client socket). ''; }; - min-port = mkOption { - type = types.int; + min-port = lib.mkOption { + type = lib.types.int; default = 49152; description = '' Lower bound of UDP relay endpoints ''; }; - max-port = mkOption { - type = types.int; + max-port = lib.mkOption { + type = lib.types.int; default = 65535; description = '' Upper bound of UDP relay endpoints ''; }; - lt-cred-mech = mkOption { - type = types.bool; + lt-cred-mech = lib.mkOption { + type = lib.types.bool; default = false; description = '' Use long-term credential mechanism. ''; }; - no-auth = mkOption { - type = types.bool; + no-auth = lib.mkOption { + type = lib.types.bool; default = false; description = '' This option is opposite to lt-cred-mech. @@ -148,8 +147,8 @@ in { lt-cred-mech is default. ''; }; - use-auth-secret = mkOption { - type = types.bool; + use-auth-secret = lib.mkOption { + type = lib.types.bool; default = false; description = '' TURN REST API flag. @@ -172,8 +171,8 @@ in { or can be found in the turn_secret table in the database. ''; }; - static-auth-secret = mkOption { - type = types.nullOr types.str; + static-auth-secret = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; description = '' 'Static' authentication secret value (a string) for TURN REST API only. @@ -183,17 +182,17 @@ in { by a separate program, so this is why that other mode is 'dynamic'. ''; }; - static-auth-secret-file = mkOption { - type = types.nullOr types.str; + static-auth-secret-file = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; description = '' Path to the file containing the static authentication secret. ''; }; - realm = mkOption { - type = types.str; + realm = lib.mkOption { + type = lib.types.str; default = config.networking.hostName; - defaultText = literalExpression "config.networking.hostName"; + defaultText = lib.literalExpression "config.networking.hostName"; example = "example.com"; description = '' The default realm to be used for the users when no explicit @@ -203,60 +202,60 @@ in { mechanism or with TURN REST API. ''; }; - cert = mkOption { - type = types.nullOr types.str; + cert = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; example = "/var/lib/acme/example.com/fullchain.pem"; description = '' Certificate file in PEM format. ''; }; - pkey = mkOption { - type = types.nullOr types.str; + pkey = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; example = "/var/lib/acme/example.com/key.pem"; description = '' Private key file in PEM format. ''; }; - dh-file = mkOption { - type = types.nullOr types.str; + dh-file = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; description = '' Use custom DH TLS key, stored in PEM format in the file. ''; }; - secure-stun = mkOption { - type = types.bool; + secure-stun = lib.mkOption { + type = lib.types.bool; default = false; description = '' Require authentication of the STUN Binding request. By default, the clients are allowed anonymous access to the STUN Binding functionality. ''; }; - no-cli = mkOption { - type = types.bool; + no-cli = lib.mkOption { + type = lib.types.bool; default = false; description = '' Turn OFF the CLI support. ''; }; - cli-ip = mkOption { - type = types.str; + cli-ip = lib.mkOption { + type = lib.types.str; default = "127.0.0.1"; description = '' Local system IP address to be used for CLI server endpoint. ''; }; - cli-port = mkOption { - type = types.int; + cli-port = lib.mkOption { + type = lib.types.int; default = 5766; description = '' CLI server port. ''; }; - cli-password = mkOption { - type = types.nullOr types.str; + cli-password = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; description = '' CLI access password. @@ -264,45 +263,45 @@ in { for of the password (see the -P command in the turnadmin utility). ''; }; - no-udp = mkOption { - type = types.bool; + no-udp = lib.mkOption { + type = lib.types.bool; default = false; description = "Disable UDP client listener"; }; - no-tcp = mkOption { - type = types.bool; + no-tcp = lib.mkOption { + type = lib.types.bool; default = false; description = "Disable TCP client listener"; }; - no-tls = mkOption { - type = types.bool; + no-tls = lib.mkOption { + type = lib.types.bool; default = false; description = "Disable TLS client listener"; }; - no-dtls = mkOption { - type = types.bool; + no-dtls = lib.mkOption { + type = lib.types.bool; default = false; description = "Disable DTLS client listener"; }; - no-udp-relay = mkOption { - type = types.bool; + no-udp-relay = lib.mkOption { + type = lib.types.bool; default = false; description = "Disable UDP relay endpoints"; }; - no-tcp-relay = mkOption { - type = types.bool; + no-tcp-relay = lib.mkOption { + type = lib.types.bool; default = false; description = "Disable TCP relay endpoints"; }; - extraConfig = mkOption { - type = types.lines; + extraConfig = lib.mkOption { + type = lib.types.lines; default = ""; description = "Additional configuration options"; }; }; }; - config = mkIf cfg.enable (mkMerge ([ + config = lib.mkIf cfg.enable (lib.mkMerge ([ { assertions = [ { assertion = cfg.static-auth-secret != null -> cfg.static-auth-secret-file == null ; message = "static-auth-secret and static-auth-secret-file cannot be set at the same time"; @@ -334,7 +333,7 @@ in { preStart = '' cat ${configFile} > ${runConfig} - ${optionalString (cfg.static-auth-secret-file != null) '' + ${lib.optionalString (cfg.static-auth-secret-file != null) '' ${pkgs.replace-secret}/bin/replace-secret \ "#static-auth-secret#" \ ${cfg.static-auth-secret-file} \ @@ -349,7 +348,7 @@ in { User = "turnserver"; Group = "turnserver"; AmbientCapabilities = - mkIf ( + lib.mkIf ( cfg.listening-port < 1024 || cfg.alt-listening-port < 1024 || cfg.tls-listening-port < 1024 || From 458914929978a8deb6d87a1457c7d446e1c1a2b0 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:04 +0200 Subject: [PATCH 165/236] nixos/services.create_ap: remove `with lib;` --- nixos/modules/services/networking/create_ap.nix | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/networking/create_ap.nix b/nixos/modules/services/networking/create_ap.nix index 9bdbcee018ed..cebea3c9059c 100644 --- a/nixos/modules/services/networking/create_ap.nix +++ b/nixos/modules/services/networking/create_ap.nix @@ -1,16 +1,13 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.create_ap; - configFile = pkgs.writeText "create_ap.conf" (generators.toKeyValue { } cfg.settings); + configFile = pkgs.writeText "create_ap.conf" (lib.generators.toKeyValue { } cfg.settings); in { options = { services.create_ap = { - enable = mkEnableOption "setting up wifi hotspots using create_ap"; - settings = mkOption { - type = with types; attrsOf (oneOf [ int bool str ]); + enable = lib.mkEnableOption "setting up wifi hotspots using create_ap"; + settings = lib.mkOption { + type = with lib.types; attrsOf (oneOf [ int bool str ]); default = {}; description = '' Configuration for `create_ap`. @@ -27,7 +24,7 @@ in { }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd = { services.create_ap = { From 657cd334e634a1bcd3b5a984dde35f7f5a059766 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:04 +0200 Subject: [PATCH 166/236] nixos/services.dante: remove `with lib;` --- nixos/modules/services/networking/dante.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/nixos/modules/services/networking/dante.nix b/nixos/modules/services/networking/dante.nix index d5e76b83986b..aef518ddbfd9 100644 --- a/nixos/modules/services/networking/dante.nix +++ b/nixos/modules/services/networking/dante.nix @@ -1,6 +1,4 @@ { config, lib, pkgs, ... }: -with lib; - let cfg = config.services.dante; confFile = pkgs.writeText "dante-sockd.conf" '' @@ -14,15 +12,15 @@ in { meta = { - maintainers = with maintainers; [ arobyn ]; + maintainers = with lib.maintainers; [ arobyn ]; }; options = { services.dante = { - enable = mkEnableOption "Dante SOCKS proxy"; + enable = lib.mkEnableOption "Dante SOCKS proxy"; - config = mkOption { - type = types.lines; + config = lib.mkOption { + type = lib.types.lines; description = '' Contents of Dante's configuration file. NOTE: user.privileged, user.unprivileged and logoutput are set by the service. @@ -31,7 +29,7 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { assertions = [ { assertion = cfg.config != ""; message = "please provide Dante configuration file contents"; From 8681b42c62186f8aff19a8b36ed56537decbc8c0 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:05 +0200 Subject: [PATCH 167/236] nixos/services.ddclient: remove `with lib;` --- .../modules/services/networking/ddclient.nix | 57 +++++++++---------- 1 file changed, 26 insertions(+), 31 deletions(-) diff --git a/nixos/modules/services/networking/ddclient.nix b/nixos/modules/services/networking/ddclient.nix index 272a50eb92de..da76ff5153d6 100644 --- a/nixos/modules/services/networking/ddclient.nix +++ b/nixos/modules/services/networking/ddclient.nix @@ -1,5 +1,4 @@ { config, pkgs, lib, ... }: - let cfg = config.services.ddclient; boolToStr = bool: if bool then "yes" else "no"; @@ -39,21 +38,17 @@ let sed -i '/^password=@password_placeholder@$/d' /run/${RuntimeDirectory}/ddclient.conf '')} ''; - in - -with lib; - { imports = [ - (mkChangedOptionModule [ "services" "ddclient" "domain" ] [ "services" "ddclient" "domains" ] + (lib.mkChangedOptionModule [ "services" "ddclient" "domain" ] [ "services" "ddclient" "domains" ] (config: - let value = getAttrFromPath [ "services" "ddclient" "domain" ] config; - in optional (value != "") value)) - (mkRemovedOptionModule [ "services" "ddclient" "homeDir" ] "") - (mkRemovedOptionModule [ "services" "ddclient" "password" ] "Use services.ddclient.passwordFile instead.") - (mkRemovedOptionModule [ "services" "ddclient" "ipv6" ] "") + let value = lib.getAttrFromPath [ "services" "ddclient" "domain" ] config; + in lib.optional (value != "") value)) + (lib.mkRemovedOptionModule [ "services" "ddclient" "homeDir" ] "") + (lib.mkRemovedOptionModule [ "services" "ddclient" "password" ] "Use services.ddclient.passwordFile instead.") + (lib.mkRemovedOptionModule [ "services" "ddclient" "ipv6" ] "") ]; ###### interface @@ -62,7 +57,7 @@ with lib; services.ddclient = with lib.types; { - enable = mkOption { + enable = lib.mkOption { default = false; type = bool; description = '' @@ -70,7 +65,7 @@ with lib; ''; }; - package = mkOption { + package = lib.mkOption { type = package; default = pkgs.ddclient; defaultText = lib.literalExpression "pkgs.ddclient"; @@ -79,7 +74,7 @@ with lib; ''; }; - domains = mkOption { + domains = lib.mkOption { default = [ "" ]; type = listOf str; description = '' @@ -87,7 +82,7 @@ with lib; ''; }; - username = mkOption { + username = lib.mkOption { # For `nsupdate` username contains the path to the nsupdate executable default = lib.optionalString (config.services.ddclient.protocol == "nsupdate") "${pkgs.bind.dnsutils}/bin/nsupdate"; defaultText = ""; @@ -97,7 +92,7 @@ with lib; ''; }; - passwordFile = mkOption { + passwordFile = lib.mkOption { default = null; type = nullOr str; description = '' @@ -105,7 +100,7 @@ with lib; ''; }; - interval = mkOption { + interval = lib.mkOption { default = "10min"; type = str; description = '' @@ -114,7 +109,7 @@ with lib; ''; }; - configFile = mkOption { + configFile = lib.mkOption { default = null; type = nullOr path; description = '' @@ -124,7 +119,7 @@ with lib; example = "/root/nixos/secrets/ddclient.conf"; }; - protocol = mkOption { + protocol = lib.mkOption { default = "dyndns2"; type = str; description = '' @@ -132,7 +127,7 @@ with lib; ''; }; - server = mkOption { + server = lib.mkOption { default = ""; type = str; description = '' @@ -140,7 +135,7 @@ with lib; ''; }; - ssl = mkOption { + ssl = lib.mkOption { default = true; type = bool; description = '' @@ -148,7 +143,7 @@ with lib; ''; }; - quiet = mkOption { + quiet = lib.mkOption { default = false; type = bool; description = '' @@ -156,7 +151,7 @@ with lib; ''; }; - script = mkOption { + script = lib.mkOption { default = ""; type = str; description = '' @@ -164,21 +159,21 @@ with lib; ''; }; - use = mkOption { + use = lib.mkOption { default = ""; type = str; description = '' Method to determine the IP address to send to the dynamic DNS provider. ''; }; - usev4 = mkOption { + usev4 = lib.mkOption { default = "webv4, webv4=checkip.dyndns.com/, webv4-skip='Current IP Address: '"; type = str; description = '' Method to determine the IPv4 address to send to the dynamic DNS provider. Only used if `use` is not set. ''; }; - usev6 = mkOption { + usev6 = lib.mkOption { default = "webv6, webv6=checkipv6.dyndns.com/, webv6-skip='Current IP Address: '"; type = str; description = '' @@ -186,7 +181,7 @@ with lib; ''; }; - verbose = mkOption { + verbose = lib.mkOption { default = false; type = bool; description = '' @@ -194,7 +189,7 @@ with lib; ''; }; - zone = mkOption { + zone = lib.mkOption { default = ""; type = str; description = '' @@ -202,7 +197,7 @@ with lib; ''; }; - extraConfig = mkOption { + extraConfig = lib.mkOption { default = ""; type = lines; description = '' @@ -219,14 +214,14 @@ with lib; ###### implementation - config = mkIf config.services.ddclient.enable { + config = lib.mkIf config.services.ddclient.enable { warnings = lib.optional (cfg.use != "") "Setting `use` is deprecated, ddclient now supports `usev4` and `usev6` for separate IPv4/IPv6 configuration."; systemd.services.ddclient = { description = "Dynamic DNS Client"; wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; - restartTriggers = optional (cfg.configFile != null) cfg.configFile; + restartTriggers = lib.optional (cfg.configFile != null) cfg.configFile; path = lib.optional (lib.hasPrefix "if," cfg.use) pkgs.iproute2; serviceConfig = { From 630754ae201efe4ea340b546bb6b108b35ab27c9 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:05 +0200 Subject: [PATCH 168/236] nixos/networking.dhcpcd: remove `with lib;` --- nixos/modules/services/networking/dhcpcd.nix | 87 ++++++++++---------- 1 file changed, 42 insertions(+), 45 deletions(-) diff --git a/nixos/modules/services/networking/dhcpcd.nix b/nixos/modules/services/networking/dhcpcd.nix index a88ce0f1b5a5..9b3269e965f5 100644 --- a/nixos/modules/services/networking/dhcpcd.nix +++ b/nixos/modules/services/networking/dhcpcd.nix @@ -1,28 +1,25 @@ { config, lib, pkgs, ... }: - -with lib; - let dhcpcd = if !config.boot.isContainer then pkgs.dhcpcd else pkgs.dhcpcd.override { udev = null; }; cfg = config.networking.dhcpcd; - interfaces = attrValues config.networking.interfaces; + interfaces = lib.attrValues config.networking.interfaces; enableDHCP = config.networking.dhcpcd.enable && - (config.networking.useDHCP || any (i: i.useDHCP == true) interfaces); + (config.networking.useDHCP || lib.any (i: i.useDHCP == true) interfaces); enableNTPService = (config.services.ntp.enable || config.services.ntpd-rs.enable || config.services.openntpd.enable || config.services.chrony.enable); # Don't start dhcpcd on explicitly configured interfaces or on # interfaces that are part of a bridge, bond or sit device. ignoredInterfaces = - map (i: i.name) (filter (i: if i.useDHCP != null then !i.useDHCP else i.ipv4.addresses != [ ]) interfaces) - ++ mapAttrsToList (i: _: i) config.networking.sits - ++ concatLists (attrValues (mapAttrs (n: v: v.interfaces) config.networking.bridges)) - ++ flatten (concatMap (i: attrNames (filterAttrs (_: config: config.type != "internal") i.interfaces)) (attrValues config.networking.vswitches)) - ++ concatLists (attrValues (mapAttrs (n: v: v.interfaces) config.networking.bonds)) + map (i: i.name) (lib.filter (i: if i.useDHCP != null then !i.useDHCP else i.ipv4.addresses != [ ]) interfaces) + ++ lib.mapAttrsToList (i: _: i) config.networking.sits + ++ lib.concatLists (lib.attrValues (lib.mapAttrs (n: v: v.interfaces) config.networking.bridges)) + ++ lib.flatten (lib.concatMap (i: lib.attrNames (lib.filterAttrs (_: config: config.type != "internal") i.interfaces)) (lib.attrValues config.networking.vswitches)) + ++ lib.concatLists (lib.attrValues (lib.mapAttrs (n: v: v.interfaces) config.networking.bonds)) ++ config.networking.dhcpcd.denyInterfaces; arrayAppendOrNull = a1: a2: if a1 == null && a2 == null then null @@ -33,11 +30,11 @@ let # we need to provide dhcp just for those interfaces. allowInterfaces = arrayAppendOrNull cfg.allowInterfaces (if !config.networking.useDHCP && enableDHCP then - map (i: i.name) (filter (i: i.useDHCP == true) interfaces) else null); + map (i: i.name) (lib.filter (i: i.useDHCP == true) interfaces) else null); - staticIPv6Addresses = map (i: i.name) (filter (i: i.ipv6.addresses != [ ]) interfaces); + staticIPv6Addresses = map (i: i.name) (lib.filter (i: i.ipv6.addresses != [ ]) interfaces); - noIPv6rs = concatStringsSep "\n" (map (name: '' + noIPv6rs = lib.concatStringsSep "\n" (map (name: '' interface ${name} noipv6rs '') staticIPv6Addresses); @@ -66,7 +63,7 @@ let denyinterfaces ${toString ignoredInterfaces} lo peth* vif* tap* tun* virbr* vnet* vboxnet* sit* # Use the list of allowed interfaces if specified - ${optionalString (allowInterfaces != null) "allowinterfaces ${toString allowInterfaces}"} + ${lib.optionalString (allowInterfaces != null) "allowinterfaces ${toString allowInterfaces}"} # Immediately fork to background if specified, otherwise wait for IP address to be assigned ${{ @@ -78,13 +75,13 @@ let if-carrier-up = ""; }.${cfg.wait}} - ${optionalString (config.networking.enableIPv6 == false) '' + ${lib.optionalString (config.networking.enableIPv6 == false) '' # Don't solicit or accept IPv6 Router Advertisements and DHCPv6 if disabled IPv6 noipv6 ''} - ${optionalString (config.networking.enableIPv6 && cfg.IPv6rs == null && staticIPv6Addresses != [ ]) noIPv6rs} - ${optionalString (config.networking.enableIPv6 && cfg.IPv6rs == false) '' + ${lib.optionalString (config.networking.enableIPv6 && cfg.IPv6rs == null && staticIPv6Addresses != [ ]) noIPv6rs} + ${lib.optionalString (config.networking.enableIPv6 && cfg.IPv6rs == false) '' noipv6rs ''} @@ -92,16 +89,16 @@ let ''; exitHook = pkgs.writeText "dhcpcd.exit-hook" '' - ${optionalString enableNTPService '' + ${lib.optionalString enableNTPService '' if [ "$reason" = BOUND -o "$reason" = REBOOT ]; then # Restart ntpd. We need to restart it to make sure that it will actually do something: # if ntpd cannot resolve the server hostnames in its config file, then it will never do # anything ever again ("couldn't resolve ..., giving up on it"), so we silently lose # time synchronisation. This also applies to openntpd. - ${optionalString config.services.ntp.enable "/run/current-system/systemd/bin/systemctl try-reload-or-restart ntpd.service || true"} - ${optionalString config.services.ntpd-rs.enable "/run/current-system/systemd/bin/systemctl try-reload-or-restart ntpd-rs.service || true"} - ${optionalString config.services.openntpd.enable "/run/current-system/systemd/bin/systemctl try-reload-or-restart openntpd.service || true"} - ${optionalString config.services.chrony.enable "/run/current-system/systemd/bin/systemctl try-reload-or-restart chronyd.service || true"} + ${lib.optionalString config.services.ntp.enable "/run/current-system/systemd/bin/systemctl try-reload-or-restart ntpd.service || true"} + ${lib.optionalString config.services.ntpd-rs.enable "/run/current-system/systemd/bin/systemctl try-reload-or-restart ntpd-rs.service || true"} + ${lib.optionalString config.services.openntpd.enable "/run/current-system/systemd/bin/systemctl try-reload-or-restart openntpd.service || true"} + ${lib.optionalString config.services.chrony.enable "/run/current-system/systemd/bin/systemctl try-reload-or-restart chronyd.service || true"} fi ''} @@ -116,8 +113,8 @@ in options = { - networking.dhcpcd.enable = mkOption { - type = types.bool; + networking.dhcpcd.enable = lib.mkOption { + type = lib.types.bool; default = true; description = '' Whether to enable dhcpcd for device configuration. This is mainly to @@ -125,8 +122,8 @@ in ''; }; - networking.dhcpcd.persistent = mkOption { - type = types.bool; + networking.dhcpcd.persistent = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whenever to leave interfaces configured on dhcpcd daemon @@ -137,8 +134,8 @@ in ''; }; - networking.dhcpcd.denyInterfaces = mkOption { - type = types.listOf types.str; + networking.dhcpcd.denyInterfaces = lib.mkOption { + type = lib.types.listOf lib.types.str; default = []; description = '' Disable the DHCP client for any interface whose name matches @@ -148,8 +145,8 @@ in ''; }; - networking.dhcpcd.allowInterfaces = mkOption { - type = types.nullOr (types.listOf types.str); + networking.dhcpcd.allowInterfaces = lib.mkOption { + type = lib.types.nullOr (lib.types.listOf lib.types.str); default = null; description = '' Enable the DHCP client for any interface whose name matches @@ -159,16 +156,16 @@ in ''; }; - networking.dhcpcd.extraConfig = mkOption { - type = types.lines; + networking.dhcpcd.extraConfig = lib.mkOption { + type = lib.types.lines; default = ""; description = '' Literal string to append to the config file generated for dhcpcd. ''; }; - networking.dhcpcd.IPv6rs = mkOption { - type = types.nullOr types.bool; + networking.dhcpcd.IPv6rs = lib.mkOption { + type = lib.types.nullOr lib.types.bool; default = null; description = '' Force enable or disable solicitation and receipt of IPv6 Router Advertisements. @@ -177,8 +174,8 @@ in ''; }; - networking.dhcpcd.runHook = mkOption { - type = types.lines; + networking.dhcpcd.runHook = lib.mkOption { + type = lib.types.lines; default = ""; example = "if [[ $reason =~ BOUND ]]; then echo $interface: Routers are $new_routers - were $old_routers; fi"; description = '' @@ -187,8 +184,8 @@ in ''; }; - networking.dhcpcd.wait = mkOption { - type = types.enum [ "background" "any" "ipv4" "ipv6" "both" "if-carrier-up" ]; + networking.dhcpcd.wait = lib.mkOption { + type = lib.types.enum [ "background" "any" "ipv4" "ipv6" "both" "if-carrier-up" ]; default = "any"; description = '' This option specifies when the dhcpcd service will fork to background. @@ -207,14 +204,14 @@ in ###### implementation - config = mkIf enableDHCP { + config = lib.mkIf enableDHCP { assertions = [ { # dhcpcd doesn't start properly with malloc ∉ [ libc scudo ] # see https://github.com/NixOS/nixpkgs/issues/151696 assertion = dhcpcd.enablePrivSep - -> elem config.environment.memoryAllocator.provider [ "libc" "scudo" ]; + -> lib.elem config.environment.memoryAllocator.provider [ "libc" "scudo" ]; message = '' dhcpcd with privilege separation is incompatible with chosen system malloc. Currently only the `libc` and `scudo` allocators are known to work. @@ -232,11 +229,11 @@ in in { description = "DHCP Client"; - wantedBy = [ "multi-user.target" ] ++ optional (!hasDefaultGatewaySet) "network-online.target"; + wantedBy = [ "multi-user.target" ] ++ lib.optional (!hasDefaultGatewaySet) "network-online.target"; wants = [ "network.target" ]; before = [ "network-online.target" ]; - restartTriggers = optional (enableNTPService || cfg.runHook != "") [ exitHook ]; + restartTriggers = lib.optional (enableNTPService || cfg.runHook != "") [ exitHook ]; # Stopping dhcpcd during a reconfiguration is undesirable # because it brings down the network interfaces configured by @@ -251,7 +248,7 @@ in { Type = "forking"; PIDFile = "/run/dhcpcd/pid"; RuntimeDirectory = "dhcpcd"; - ExecStart = "@${dhcpcd}/sbin/dhcpcd dhcpcd --quiet ${optionalString cfg.persistent "--persistent"} --config ${dhcpcdConf}"; + ExecStart = "@${dhcpcd}/sbin/dhcpcd dhcpcd --quiet ${lib.optionalString cfg.persistent "--persistent"} --config ${dhcpcdConf}"; ExecReload = "${dhcpcd}/sbin/dhcpcd --rebind"; Restart = "always"; }; @@ -265,11 +262,11 @@ in environment.systemPackages = [ dhcpcd ]; - environment.etc."dhcpcd.exit-hook" = mkIf (enableNTPService || cfg.runHook != "") { + environment.etc."dhcpcd.exit-hook" = lib.mkIf (enableNTPService || cfg.runHook != "") { source = exitHook; }; - powerManagement.resumeCommands = mkIf config.systemd.services.dhcpcd.enable + powerManagement.resumeCommands = lib.mkIf config.systemd.services.dhcpcd.enable '' # Tell dhcpcd to rebind its interfaces if it's running. /run/current-system/systemd/bin/systemctl reload dhcpcd.service From 56576f90e3ec6d5d831d2b721bd832960252b162 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:05 +0200 Subject: [PATCH 169/236] nixos/services.dnscache: remove `with lib;` --- .../modules/services/networking/dnscache.nix | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/nixos/modules/services/networking/dnscache.nix b/nixos/modules/services/networking/dnscache.nix index 160c7611c6b8..e743d1c54323 100644 --- a/nixos/modules/services/networking/dnscache.nix +++ b/nixos/modules/services/networking/dnscache.nix @@ -1,19 +1,16 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.dnscache; dnscache-root = pkgs.runCommand "dnscache-root" { preferLocalBuild = true; } '' mkdir -p $out/{servers,ip} - ${concatMapStrings (ip: '' + ${lib.concatMapStrings (ip: '' touch "$out/ip/"${lib.escapeShellArg ip} '') cfg.clientIps} - ${concatStrings (mapAttrsToList (host: ips: '' - ${concatMapStrings (ip: '' + ${lib.concatStrings (lib.mapAttrsToList (host: ips: '' + ${lib.concatMapStrings (ip: '' echo ${lib.escapeShellArg ip} >> "$out/servers/"${lib.escapeShellArg host} '') ips} '') cfg.domainServers)} @@ -35,33 +32,33 @@ in { options = { services.dnscache = { - enable = mkOption { + enable = lib.mkOption { default = false; - type = types.bool; + type = lib.types.bool; description = "Whether to run the dnscache caching dns server."; }; - ip = mkOption { + ip = lib.mkOption { default = "0.0.0.0"; - type = types.str; + type = lib.types.str; description = "IP address on which to listen for connections."; }; - clientIps = mkOption { + clientIps = lib.mkOption { default = [ "127.0.0.1" ]; - type = types.listOf types.str; + type = lib.types.listOf lib.types.str; description = "Client IP addresses (or prefixes) from which to accept connections."; example = ["192.168" "172.23.75.82"]; }; - domainServers = mkOption { + domainServers = lib.mkOption { default = { }; - type = types.attrsOf (types.listOf types.str); + type = lib.types.attrsOf (lib.types.listOf lib.types.str); description = '' Table of {hostname: server} pairs to use as authoritative servers for hosts (and subhosts). If entry for @ is not specified predefined list of root servers is used. ''; - example = literalExpression '' + example = lib.literalExpression '' { "@" = ["8.8.8.8" "8.8.4.4"]; "example.com" = ["192.168.100.100"]; @@ -69,9 +66,9 @@ in { ''; }; - forwardOnly = mkOption { + forwardOnly = lib.mkOption { default = false; - type = types.bool; + type = lib.types.bool; description = '' Whether to treat root servers (for @) as caching servers, requesting addresses the same way a client does. This is @@ -84,7 +81,7 @@ in { ###### implementation - config = mkIf config.services.dnscache.enable { + config = lib.mkIf config.services.dnscache.enable { environment.systemPackages = [ pkgs.djbdns ]; users.users.dnscache = { isSystemUser = true; @@ -104,7 +101,7 @@ in { ''; script = '' cd /var/lib/dnscache/ - ${optionalString cfg.forwardOnly "export FORWARDONLY=1"} + ${lib.optionalString cfg.forwardOnly "export FORWARDONLY=1"} exec ./run ''; }; From 3a05a07ef70cdc807d7a4acbf8c116628f48883f Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:05 +0200 Subject: [PATCH 170/236] nixos/services.dnsdist: remove `with lib;` --- nixos/modules/services/networking/dnsdist.nix | 43 +++++++++---------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/nixos/modules/services/networking/dnsdist.nix b/nixos/modules/services/networking/dnsdist.nix index cf17a87f649f..cd87abb3d072 100644 --- a/nixos/modules/services/networking/dnsdist.nix +++ b/nixos/modules/services/networking/dnsdist.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.dnsdist; @@ -80,38 +77,38 @@ let in { options = { services.dnsdist = { - enable = mkEnableOption "dnsdist domain name server"; + enable = lib.mkEnableOption "dnsdist domain name server"; - listenAddress = mkOption { - type = types.str; + listenAddress = lib.mkOption { + type = lib.types.str; description = "Listen IP address"; default = "0.0.0.0"; }; - listenPort = mkOption { - type = types.port; + listenPort = lib.mkOption { + type = lib.types.port; description = "Listen port"; default = 53; }; dnscrypt = { - enable = mkEnableOption "a DNSCrypt endpoint to dnsdist"; + enable = lib.mkEnableOption "a DNSCrypt endpoint to dnsdist"; - listenAddress = mkOption { - type = types.str; + listenAddress = lib.mkOption { + type = lib.types.str; description = "Listen IP address of the endpoint"; default = "0.0.0.0"; }; - listenPort = mkOption { - type = types.port; + listenPort = lib.mkOption { + type = lib.types.port; description = "Listen port of the endpoint"; default = 443; }; - providerName = mkOption { - type = types.str; + providerName = lib.mkOption { + type = lib.types.str; default = "2.dnscrypt-cert.${config.networking.hostName}"; - defaultText = literalExpression "2.dnscrypt-cert.\${config.networking.hostName}"; + defaultText = lib.literalExpression "2.dnscrypt-cert.\${config.networking.hostName}"; example = "2.dnscrypt-cert.myresolver"; description = '' The name that will be given to this DNSCrypt resolver. @@ -122,8 +119,8 @@ in { ''; }; - providerKey = mkOption { - type = types.nullOr types.path; + providerKey = lib.mkOption { + type = lib.types.nullOr lib.types.path; default = null; description = '' The filepath to the provider secret key. @@ -136,8 +133,8 @@ in { ''; }; - certLifetime = mkOption { - type = types.ints.positive; + certLifetime = lib.mkOption { + type = lib.types.ints.positive; default = 15; description = '' The lifetime (in minutes) of the resolver certificate. @@ -147,8 +144,8 @@ in { }; - extraConfig = mkOption { - type = types.lines; + extraConfig = lib.mkOption { + type = lib.types.lines; default = ""; description = '' Extra lines to be added verbatim to dnsdist.conf. @@ -157,7 +154,7 @@ in { }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.dnsdist = { description = "dnsdist daemons user"; isSystemUser = true; From 504abe12d16457d70a863a2050a07a84ffee6c51 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:05 +0200 Subject: [PATCH 171/236] nixos/services.dnsmasq: remove `with lib;` --- nixos/modules/services/networking/dnsmasq.nix | 51 +++++++++---------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/nixos/modules/services/networking/dnsmasq.nix b/nixos/modules/services/networking/dnsmasq.nix index e9052cdd3fae..20986f8d93ef 100644 --- a/nixos/modules/services/networking/dnsmasq.nix +++ b/nixos/modules/services/networking/dnsmasq.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.dnsmasq; dnsmasq = cfg.package; @@ -9,14 +6,14 @@ let # True values are just put as `name` instead of `name=true`, and false values # are turned to comments (false values are expected to be overrides e.g. - # mkForce) + # lib.mkForce) formatKeyValue = name: value: if value == true then name else if value == false then "# setting `${name}` explicitly set to false" - else generators.mkKeyValueDefault { } "=" name value; + else lib.generators.mkKeyValueDefault { } "=" name value; settingsFormat = pkgs.formats.keyValue { mkKeyValue = formatKeyValue; @@ -36,7 +33,7 @@ in { imports = [ - (mkRenamedOptionModule [ "services" "dnsmasq" "servers" ] [ "services" "dnsmasq" "settings" "server" ]) + (lib.mkRenamedOptionModule [ "services" "dnsmasq" "servers" ] [ "services" "dnsmasq" "settings" "server" ]) ]; ###### interface @@ -45,18 +42,18 @@ in services.dnsmasq = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to run dnsmasq. ''; }; - package = mkPackageOption pkgs "dnsmasq" {}; + package = lib.mkPackageOption pkgs "dnsmasq" {}; - resolveLocalQueries = mkOption { - type = types.bool; + resolveLocalQueries = lib.mkOption { + type = lib.types.bool; default = true; description = '' Whether dnsmasq should resolve local queries (i.e. add 127.0.0.1 to @@ -64,21 +61,21 @@ in ''; }; - alwaysKeepRunning = mkOption { - type = types.bool; + alwaysKeepRunning = lib.mkOption { + type = lib.types.bool; default = false; description = '' If enabled, systemd will always respawn dnsmasq even if shut down manually. The default, disabled, will only restart it on error. ''; }; - settings = mkOption { - type = types.submodule { + settings = lib.mkOption { + type = lib.types.submodule { freeformType = settingsFormat.type; - options.server = mkOption { - type = types.listOf types.str; + options.server = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; example = [ "8.8.8.8" "8.8.4.4" ]; description = '' @@ -99,7 +96,7 @@ in resolv-file = optional cfg.resolveLocalQueries "/etc/dnsmasq-resolv.conf"; } ''; - example = literalExpression '' + example = lib.literalExpression '' { domain-needed = true; dhcp-range = [ "192.168.0.2,192.168.0.254" ]; @@ -107,8 +104,8 @@ in ''; }; - extraConfig = mkOption { - type = types.lines; + extraConfig = lib.mkOption { + type = lib.types.lines; default = ""; description = '' Extra configuration directives that should be added to @@ -125,18 +122,18 @@ in ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { warnings = lib.optional (cfg.extraConfig != "") "Text based config is deprecated, dnsmasq now supports `services.dnsmasq.settings` for an attribute-set based config"; services.dnsmasq.settings = { - dhcp-leasefile = mkDefault "${stateDir}/dnsmasq.leases"; - conf-file = mkDefault (optional cfg.resolveLocalQueries "/etc/dnsmasq-conf.conf"); - resolv-file = mkDefault (optional cfg.resolveLocalQueries "/etc/dnsmasq-resolv.conf"); + dhcp-leasefile = lib.mkDefault "${stateDir}/dnsmasq.leases"; + conf-file = lib.mkDefault (lib.optional cfg.resolveLocalQueries "/etc/dnsmasq-conf.conf"); + resolv-file = lib.mkDefault (lib.optional cfg.resolveLocalQueries "/etc/dnsmasq-resolv.conf"); }; networking.nameservers = - optional cfg.resolveLocalQueries "127.0.0.1"; + lib.optional cfg.resolveLocalQueries "127.0.0.1"; services.dbus.packages = [ dnsmasq ]; @@ -147,8 +144,8 @@ in }; users.groups.dnsmasq = {}; - networking.resolvconf = mkIf cfg.resolveLocalQueries { - useLocalResolver = mkDefault true; + networking.resolvconf = lib.mkIf cfg.resolveLocalQueries { + useLocalResolver = lib.mkDefault true; extraConfig = '' dnsmasq_conf=/etc/dnsmasq-conf.conf From e59cdc8e997447a346f751ad157eab9ed105ba95 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:06 +0200 Subject: [PATCH 172/236] nixos/services.doh-proxy-rust: remove `with lib;` --- .../services/networking/doh-proxy-rust.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/nixos/modules/services/networking/doh-proxy-rust.nix b/nixos/modules/services/networking/doh-proxy-rust.nix index 1f3850a77bf1..32b7a3750480 100644 --- a/nixos/modules/services/networking/doh-proxy-rust.nix +++ b/nixos/modules/services/networking/doh-proxy-rust.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.doh-proxy-rust; @@ -10,10 +7,10 @@ in { options.services.doh-proxy-rust = { - enable = mkEnableOption "doh-proxy-rust"; + enable = lib.mkEnableOption "doh-proxy-rust"; - flags = mkOption { - type = types.listOf types.str; + flags = lib.mkOption { + type = lib.types.listOf lib.types.str; default = []; example = [ "--server-address=9.9.9.9:53" ]; description = '' @@ -24,13 +21,13 @@ in { }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.doh-proxy-rust = { description = "doh-proxy-rust"; after = [ "network.target" "nss-lookup.target" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { - ExecStart = "${pkgs.doh-proxy-rust}/bin/doh-proxy ${escapeShellArgs cfg.flags}"; + ExecStart = "${pkgs.doh-proxy-rust}/bin/doh-proxy ${lib.escapeShellArgs cfg.flags}"; Restart = "always"; RestartSec = 10; DynamicUser = true; @@ -55,6 +52,6 @@ in { }; }; - meta.maintainers = with maintainers; [ stephank ]; + meta.maintainers = with lib.maintainers; [ stephank ]; } From aa2c039ab0d832e395a38ef0dd202255d878b856 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:06 +0200 Subject: [PATCH 173/236] nixos/services.ejabberd: remove `with lib;` --- .../modules/services/networking/ejabberd.nix | 51 +++++++++---------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/nixos/modules/services/networking/ejabberd.nix b/nixos/modules/services/networking/ejabberd.nix index 3e92a2d3f7eb..d2ada99cc921 100644 --- a/nixos/modules/services/networking/ejabberd.nix +++ b/nixos/modules/services/networking/ejabberd.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.ejabberd; @@ -11,7 +8,7 @@ let ${cfg.ctlConfig} ''; - ectl = ''${cfg.package}/bin/ejabberdctl ${optionalString (cfg.configFile != null) "--config ${cfg.configFile}"} --ctl-config "${ctlcfg}" --spool "${cfg.spoolDir}" --logs "${cfg.logsDir}"''; + ectl = ''${cfg.package}/bin/ejabberdctl ${lib.optionalString (cfg.configFile != null) "--config ${cfg.configFile}"} --ctl-config "${ctlcfg}" --spool "${cfg.spoolDir}" --logs "${cfg.logsDir}"''; dumps = lib.escapeShellArgs cfg.loadDumps; @@ -23,59 +20,59 @@ in { services.ejabberd = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = "Whether to enable ejabberd server"; }; - package = mkPackageOption pkgs "ejabberd" { }; + package = lib.mkPackageOption pkgs "ejabberd" { }; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = "ejabberd"; description = "User under which ejabberd is ran"; }; - group = mkOption { - type = types.str; + group = lib.mkOption { + type = lib.types.str; default = "ejabberd"; description = "Group under which ejabberd is ran"; }; - spoolDir = mkOption { - type = types.path; + spoolDir = lib.mkOption { + type = lib.types.path; default = "/var/lib/ejabberd"; description = "Location of the spooldir of ejabberd"; }; - logsDir = mkOption { - type = types.path; + logsDir = lib.mkOption { + type = lib.types.path; default = "/var/log/ejabberd"; description = "Location of the logfile directory of ejabberd"; }; - configFile = mkOption { - type = types.nullOr types.path; + configFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; description = "Configuration file for ejabberd in YAML format"; default = null; }; - ctlConfig = mkOption { - type = types.lines; + ctlConfig = lib.mkOption { + type = lib.types.lines; default = ""; description = "Configuration of ejabberdctl"; }; - loadDumps = mkOption { - type = types.listOf types.path; + loadDumps = lib.mkOption { + type = lib.types.listOf lib.types.path; default = []; description = "Configuration dumps that should be loaded on the first startup"; - example = literalExpression "[ ./myejabberd.dump ]"; + example = lib.literalExpression "[ ./myejabberd.dump ]"; }; - imagemagick = mkOption { - type = types.bool; + imagemagick = lib.mkOption { + type = lib.types.bool; default = false; description = "Add ImageMagick to server's path; allows for image thumbnailing"; }; @@ -86,10 +83,10 @@ in { ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.systemPackages = [ cfg.package ]; - users.users = optionalAttrs (cfg.user == "ejabberd") { + users.users = lib.optionalAttrs (cfg.user == "ejabberd") { ejabberd = { group = cfg.group; home = cfg.spoolDir; @@ -98,7 +95,7 @@ in { }; }; - users.groups = optionalAttrs (cfg.group == "ejabberd") { + users.groups = lib.optionalAttrs (cfg.group == "ejabberd") { ejabberd.gid = config.ids.gids.ejabberd; }; From a09250d8abedfa0e6af942802c0acaa4dcfbf9d5 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:06 +0200 Subject: [PATCH 174/236] nixos/services.envoy: remove `with lib;` --- nixos/modules/services/networking/envoy.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/networking/envoy.nix b/nixos/modules/services/networking/envoy.nix index b36c184fe8d5..876c05755936 100644 --- a/nixos/modules/services/networking/envoy.nix +++ b/nixos/modules/services/networking/envoy.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.envoy; format = pkgs.formats.json { }; @@ -15,12 +12,12 @@ in { options.services.envoy = { - enable = mkEnableOption "Envoy reverse proxy"; + enable = lib.mkEnableOption "Envoy reverse proxy"; - package = mkPackageOption pkgs "envoy" { }; + package = lib.mkPackageOption pkgs "envoy" { }; - requireValidConfig = mkOption { - type = types.bool; + requireValidConfig = lib.mkOption { + type = lib.types.bool; default = true; description = '' Whether a failure during config validation at build time is fatal. @@ -29,10 +26,10 @@ in ''; }; - settings = mkOption { + settings = lib.mkOption { type = format.type; default = { }; - example = literalExpression '' + example = lib.literalExpression '' { admin = { access_log_path = "/dev/null"; @@ -56,7 +53,7 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.systemPackages = [ cfg.package ]; systemd.services.envoy = { description = "Envoy reverse proxy"; From 6233a59db3c17278ca11f7e02e37b6d0bdd4d24e Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:06 +0200 Subject: [PATCH 175/236] nixos/services.epmd: remove `with lib;` --- nixos/modules/services/networking/epmd.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/networking/epmd.nix b/nixos/modules/services/networking/epmd.nix index b450aa1b62c7..90876a67f74d 100644 --- a/nixos/modules/services/networking/epmd.nix +++ b/nixos/modules/services/networking/epmd.nix @@ -1,15 +1,12 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.epmd; in { ###### interface options.services.epmd = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to enable socket activation for Erlang Port Mapper Daemon (epmd), @@ -17,10 +14,10 @@ in Erlang computations. ''; }; - package = mkPackageOption pkgs "erlang" { }; - listenStream = mkOption + package = lib.mkPackageOption pkgs "erlang" { }; + listenStream = lib.mkOption { - type = types.str; + type = lib.types.str; default = "[::]:4369"; description = '' the listenStream used by the systemd socket. @@ -32,7 +29,7 @@ in }; ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { assertions = [{ assertion = cfg.listenStream == "[::]:4369" -> config.networking.enableIPv6; message = "epmd listens by default on ipv6, enable ipv6 or change config.services.epmd.listenStream"; @@ -60,5 +57,5 @@ in }; }; - meta.maintainers = teams.beam.members; + meta.maintainers = lib.teams.beam.members; } From 19e88959ef5464e7495ae7cd8977f1e7585908d2 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:06 +0200 Subject: [PATCH 176/236] nixos/services.eternal-terminal: remove `with lib;` --- .../services/networking/eternal-terminal.nix | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/nixos/modules/services/networking/eternal-terminal.nix b/nixos/modules/services/networking/eternal-terminal.nix index d26e26d0c195..584eafd2962c 100644 --- a/nixos/modules/services/networking/eternal-terminal.nix +++ b/nixos/modules/services/networking/eternal-terminal.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.eternal-terminal; @@ -16,11 +13,11 @@ in services.eternal-terminal = { - enable = mkEnableOption "Eternal Terminal server"; + enable = lib.mkEnableOption "Eternal Terminal server"; - port = mkOption { + port = lib.mkOption { default = 2022; - type = types.port; + type = lib.types.port; description = '' The port the server should listen on. Will use the server's default (2022) if not specified. @@ -28,25 +25,25 @@ in ''; }; - verbosity = mkOption { + verbosity = lib.mkOption { default = 0; - type = types.enum (lib.range 0 9); + type = lib.types.enum (lib.range 0 9); description = '' The verbosity level (0-9). ''; }; - silent = mkOption { + silent = lib.mkOption { default = false; - type = types.bool; + type = lib.types.bool; description = '' If enabled, disables all logging. ''; }; - logSize = mkOption { + logSize = lib.mkOption { default = 20971520; - type = types.int; + type = lib.types.int; description = '' The maximum log size. ''; @@ -56,7 +53,7 @@ in ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { # We need to ensure the et package is fully installed because # the (remote) et client runs the `etterminal` binary when it From abc0a6e035dc844c2afb663a543d30082967397a Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:06 +0200 Subject: [PATCH 177/236] nixos/services.expressvpn: remove `with lib;` --- nixos/modules/services/networking/expressvpn.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/nixos/modules/services/networking/expressvpn.nix b/nixos/modules/services/networking/expressvpn.nix index c1d287f57bc2..431a1da70b95 100644 --- a/nixos/modules/services/networking/expressvpn.nix +++ b/nixos/modules/services/networking/expressvpn.nix @@ -1,16 +1,14 @@ { config, lib, pkgs, ... }: - -with lib; { - options.services.expressvpn.enable = mkOption { - type = types.bool; + options.services.expressvpn.enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Enable the ExpressVPN daemon. ''; }; - config = mkIf config.services.expressvpn.enable { + config = lib.mkIf config.services.expressvpn.enable { boot.kernelModules = [ "tun" ]; systemd.services.expressvpn = { @@ -26,5 +24,5 @@ with lib; }; }; - meta.maintainers = with maintainers; [ yureien ]; + meta.maintainers = with lib.maintainers; [ yureien ]; } From 17f8650ace89fb48f3c15a6406ebbd893b6c6f74 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:06 +0200 Subject: [PATCH 178/236] nixos/services.ferm: remove `with lib;` --- nixos/modules/services/networking/ferm.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/networking/ferm.nix b/nixos/modules/services/networking/ferm.nix index 91412f53009c..1fc982d8e9c8 100644 --- a/nixos/modules/services/networking/ferm.nix +++ b/nixos/modules/services/networking/ferm.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.ferm; @@ -17,9 +14,9 @@ let in { options = { services.ferm = { - enable = mkOption { + enable = lib.mkOption { default = false; - type = types.bool; + type = lib.types.bool; description = '' Whether to enable Ferm Firewall. *Warning*: Enabling this service WILL disable the existing NixOS @@ -27,17 +24,17 @@ in { considered at the moment. ''; }; - config = mkOption { + config = lib.mkOption { description = "Verbatim ferm.conf configuration."; default = ""; - defaultText = literalMD "empty firewall, allows any traffic"; - type = types.lines; + defaultText = lib.literalMD "empty firewall, allows any traffic"; + type = lib.types.lines; }; - package = mkPackageOption pkgs "ferm" { }; + package = lib.mkPackageOption pkgs "ferm" { }; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.firewall.enable = false; systemd.services.ferm = { description = "Ferm Firewall"; From f12d3df878ef31bfd71829e550ce7bfb3de79103 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:07 +0200 Subject: [PATCH 179/236] nixos/services.fireqos: remove `with lib;` --- nixos/modules/services/networking/fireqos.nix | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/networking/fireqos.nix b/nixos/modules/services/networking/fireqos.nix index 0b34f0b6b8b4..aa7d8c2c03ef 100644 --- a/nixos/modules/services/networking/fireqos.nix +++ b/nixos/modules/services/networking/fireqos.nix @@ -1,14 +1,11 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.fireqos; fireqosConfig = pkgs.writeText "fireqos.conf" "${cfg.config}"; in { options.services.fireqos = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' If enabled, FireQOS will be launched with the specified @@ -16,8 +13,8 @@ in { ''; }; - config = mkOption { - type = types.str; + config = lib.mkOption { + type = lib.types.str; default = ""; example = '' interface wlp3s0 world-in input rate 10mbit ethernet @@ -34,7 +31,7 @@ in { }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.fireqos = { description = "FireQOS"; after = [ "network.target" ]; From 15edaa6e16be90a34bd0f549ae0dc6564e56cce0 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:07 +0200 Subject: [PATCH 180/236] nixos/networking.firewall.iptables: remove `with lib;` --- .../services/networking/firewall-iptables.nix | 62 +++++++++---------- 1 file changed, 29 insertions(+), 33 deletions(-) diff --git a/nixos/modules/services/networking/firewall-iptables.nix b/nixos/modules/services/networking/firewall-iptables.nix index 91756f826fe8..e4fa7676fd07 100644 --- a/nixos/modules/services/networking/firewall-iptables.nix +++ b/nixos/modules/services/networking/firewall-iptables.nix @@ -29,11 +29,7 @@ complete firewall (in the default configuration). */ - { config, lib, pkgs, ... }: - -with lib; - let cfg = config.networking.firewall; @@ -89,17 +85,17 @@ let # jumps to the "nixos-fw-refuse" chain. ip46tables -N nixos-fw-log-refuse - ${optionalString cfg.logRefusedConnections '' + ${lib.optionalString cfg.logRefusedConnections '' ip46tables -A nixos-fw-log-refuse -p tcp --syn -j LOG --log-level info --log-prefix "refused connection: " ''} - ${optionalString (cfg.logRefusedPackets && !cfg.logRefusedUnicastsOnly) '' + ${lib.optionalString (cfg.logRefusedPackets && !cfg.logRefusedUnicastsOnly) '' ip46tables -A nixos-fw-log-refuse -m pkttype --pkt-type broadcast \ -j LOG --log-level info --log-prefix "refused broadcast: " ip46tables -A nixos-fw-log-refuse -m pkttype --pkt-type multicast \ -j LOG --log-level info --log-prefix "refused multicast: " ''} ip46tables -A nixos-fw-log-refuse -m pkttype ! --pkt-type unicast -j nixos-fw-refuse - ${optionalString cfg.logRefusedPackets '' + ${lib.optionalString cfg.logRefusedPackets '' ip46tables -A nixos-fw-log-refuse \ -j LOG --log-level info --log-prefix "refused packet: " ''} @@ -114,11 +110,11 @@ let ip46tables -t mangle -F nixos-fw-rpfilter 2> /dev/null || true ip46tables -t mangle -X nixos-fw-rpfilter 2> /dev/null || true - ${optionalString (kernelHasRPFilter && (cfg.checkReversePath != false)) '' + ${lib.optionalString (kernelHasRPFilter && (cfg.checkReversePath != false)) '' # Perform a reverse-path test to refuse spoofers # For now, we just drop, as the mangle table doesn't have a log-refuse yet ip46tables -t mangle -N nixos-fw-rpfilter 2> /dev/null || true - ip46tables -t mangle -A nixos-fw-rpfilter -m rpfilter --validmark ${optionalString (cfg.checkReversePath == "loose") "--loose"} -j RETURN + ip46tables -t mangle -A nixos-fw-rpfilter -m rpfilter --validmark ${lib.optionalString (cfg.checkReversePath == "loose") "--loose"} -j RETURN # Allows this host to act as a DHCP4 client without first having to use APIPA iptables -t mangle -A nixos-fw-rpfilter -p udp --sport 67 --dport 68 -j RETURN @@ -126,7 +122,7 @@ let # Allows this host to act as a DHCPv4 server iptables -t mangle -A nixos-fw-rpfilter -s 0.0.0.0 -d 255.255.255.255 -p udp --sport 68 --dport 67 -j RETURN - ${optionalString cfg.logReversePathDrops '' + ${lib.optionalString cfg.logReversePathDrops '' ip46tables -t mangle -A nixos-fw-rpfilter -j LOG --log-level info --log-prefix "rpfilter drop: " ''} ip46tables -t mangle -A nixos-fw-rpfilter -j DROP @@ -135,7 +131,7 @@ let ''} # Accept all traffic on the trusted interfaces. - ${flip concatMapStrings cfg.trustedInterfaces (iface: '' + ${lib.flip lib.concatMapStrings cfg.trustedInterfaces (iface: '' ip46tables -A nixos-fw -i ${iface} -j nixos-fw-accept '')} @@ -143,51 +139,51 @@ let ip46tables -A nixos-fw -m conntrack --ctstate ESTABLISHED,RELATED -j nixos-fw-accept # Accept connections to the allowed TCP ports. - ${concatStrings (mapAttrsToList (iface: cfg: - concatMapStrings (port: + ${lib.concatStrings (lib.mapAttrsToList (iface: cfg: + lib.concatMapStrings (port: '' - ip46tables -A nixos-fw -p tcp --dport ${toString port} -j nixos-fw-accept ${optionalString (iface != "default") "-i ${iface}"} + ip46tables -A nixos-fw -p tcp --dport ${toString port} -j nixos-fw-accept ${lib.optionalString (iface != "default") "-i ${iface}"} '' ) cfg.allowedTCPPorts ) cfg.allInterfaces)} # Accept connections to the allowed TCP port ranges. - ${concatStrings (mapAttrsToList (iface: cfg: - concatMapStrings (rangeAttr: + ${lib.concatStrings (lib.mapAttrsToList (iface: cfg: + lib.concatMapStrings (rangeAttr: let range = toString rangeAttr.from + ":" + toString rangeAttr.to; in '' - ip46tables -A nixos-fw -p tcp --dport ${range} -j nixos-fw-accept ${optionalString (iface != "default") "-i ${iface}"} + ip46tables -A nixos-fw -p tcp --dport ${range} -j nixos-fw-accept ${lib.optionalString (iface != "default") "-i ${iface}"} '' ) cfg.allowedTCPPortRanges ) cfg.allInterfaces)} # Accept packets on the allowed UDP ports. - ${concatStrings (mapAttrsToList (iface: cfg: - concatMapStrings (port: + ${lib.concatStrings (lib.mapAttrsToList (iface: cfg: + lib.concatMapStrings (port: '' - ip46tables -A nixos-fw -p udp --dport ${toString port} -j nixos-fw-accept ${optionalString (iface != "default") "-i ${iface}"} + ip46tables -A nixos-fw -p udp --dport ${toString port} -j nixos-fw-accept ${lib.optionalString (iface != "default") "-i ${iface}"} '' ) cfg.allowedUDPPorts ) cfg.allInterfaces)} # Accept packets on the allowed UDP port ranges. - ${concatStrings (mapAttrsToList (iface: cfg: - concatMapStrings (rangeAttr: + ${lib.concatStrings (lib.mapAttrsToList (iface: cfg: + lib.concatMapStrings (rangeAttr: let range = toString rangeAttr.from + ":" + toString rangeAttr.to; in '' - ip46tables -A nixos-fw -p udp --dport ${range} -j nixos-fw-accept ${optionalString (iface != "default") "-i ${iface}"} + ip46tables -A nixos-fw -p udp --dport ${range} -j nixos-fw-accept ${lib.optionalString (iface != "default") "-i ${iface}"} '' ) cfg.allowedUDPPortRanges ) cfg.allInterfaces)} # Optionally respond to ICMPv4 pings. - ${optionalString cfg.allowPing '' - iptables -w -A nixos-fw -p icmp --icmp-type echo-request ${optionalString (cfg.pingLimit != null) + ${lib.optionalString cfg.allowPing '' + iptables -w -A nixos-fw -p icmp --icmp-type echo-request ${lib.optionalString (cfg.pingLimit != null) "-m limit ${cfg.pingLimit} " }-j nixos-fw-accept ''} - ${optionalString config.networking.enableIPv6 '' + ${lib.optionalString config.networking.enableIPv6 '' # Accept all ICMPv6 messages except redirects and node # information queries (type 139). See RFC 4890, section # 4.4. @@ -218,7 +214,7 @@ let # Clean up after added ruleset ip46tables -D INPUT -j nixos-fw 2>/dev/null || true - ${optionalString (kernelHasRPFilter && (cfg.checkReversePath != false)) '' + ${lib.optionalString (kernelHasRPFilter && (cfg.checkReversePath != false)) '' ip46tables -t mangle -D PREROUTING -j nixos-fw-rpfilter 2>/dev/null || true ''} @@ -256,8 +252,8 @@ in options = { networking.firewall = { - extraCommands = mkOption { - type = types.lines; + extraCommands = lib.mkOption { + type = lib.types.lines; default = ""; example = "iptables -A INPUT -p icmp -j ACCEPT"; description = '' @@ -270,8 +266,8 @@ in ''; }; - extraStopCommands = mkOption { - type = types.lines; + extraStopCommands = lib.mkOption { + type = lib.types.lines; default = ""; example = "iptables -P INPUT ACCEPT"; description = '' @@ -289,7 +285,7 @@ in # FIXME: Maybe if `enable' is false, the firewall should still be # built but not started by default? - config = mkIf (cfg.enable && config.networking.nftables.enable == false) { + config = lib.mkIf (cfg.enable && config.networking.nftables.enable == false) { assertions = [ # This is approximately "checkReversePath -> kernelHasRPFilter", @@ -302,7 +298,7 @@ in ]; environment.systemPackages = [ pkgs.nixos-firewall-tool ]; - networking.firewall.checkReversePath = mkIf (!kernelHasRPFilter) (mkDefault false); + networking.firewall.checkReversePath = lib.mkIf (!kernelHasRPFilter) (lib.mkDefault false); systemd.services.firewall = { description = "Firewall"; From e915ced8040d48eafd8f0365a787f935f2ca990c Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:07 +0200 Subject: [PATCH 181/236] nixos/networking.firewall.nftables: remove `with lib;` --- .../services/networking/firewall-nftables.nix | 53 +++++++++---------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/nixos/modules/services/networking/firewall-nftables.nix b/nixos/modules/services/networking/firewall-nftables.nix index a5ee7efc3c32..f954a5284103 100644 --- a/nixos/modules/services/networking/firewall-nftables.nix +++ b/nixos/modules/services/networking/firewall-nftables.nix @@ -1,16 +1,13 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.networking.firewall; - ifaceSet = concatStringsSep ", " ( + ifaceSet = lib.concatStringsSep ", " ( map (x: ''"${x}"'') cfg.trustedInterfaces ); - portsToNftSet = ports: portRanges: concatStringsSep ", " ( + portsToNftSet = ports: portRanges: lib.concatStringsSep ", " ( map (x: toString x) ports ++ map (x: "${toString x.from}-${toString x.to}") portRanges ); @@ -22,8 +19,8 @@ in options = { networking.firewall = { - extraInputRules = mkOption { - type = types.lines; + extraInputRules = lib.mkOption { + type = lib.types.lines; default = ""; example = "ip6 saddr { fc00::/7, fe80::/10 } tcp dport 24800 accept"; description = '' @@ -34,8 +31,8 @@ in ''; }; - extraForwardRules = mkOption { - type = types.lines; + extraForwardRules = lib.mkOption { + type = lib.types.lines; default = ""; example = "iifname wg0 accept"; description = '' @@ -46,8 +43,8 @@ in ''; }; - extraReversePathFilterRules = mkOption { - type = types.lines; + extraReversePathFilterRules = lib.mkOption { + type = lib.types.lines; default = ""; example = "fib daddr . mark . iif type local accept"; description = '' @@ -61,7 +58,7 @@ in }; - config = mkIf (cfg.enable && config.networking.nftables.enable) { + config = lib.mkIf (cfg.enable && config.networking.nftables.enable) { assertions = [ { @@ -73,7 +70,7 @@ in message = "extraStopCommands is incompatible with the nftables based firewall: ${cfg.extraStopCommands}"; } { - assertion = cfg.pingLimit == null || !(hasPrefix "--" cfg.pingLimit); + assertion = cfg.pingLimit == null || !(lib.hasPrefix "--" cfg.pingLimit); message = "nftables syntax like \"2/second\" should be used in networking.firewall.pingLimit"; } { @@ -84,16 +81,16 @@ in networking.nftables.tables."nixos-fw".family = "inet"; networking.nftables.tables."nixos-fw".content = '' - ${optionalString (cfg.checkReversePath != false) '' + ${lib.optionalString (cfg.checkReversePath != false) '' chain rpfilter { type filter hook prerouting priority mangle + 10; policy drop; meta nfproto ipv4 udp sport . udp dport { 67 . 68, 68 . 67 } accept comment "DHCPv4 client/server" - fib saddr . mark ${optionalString (cfg.checkReversePath != "loose") ". iif"} oif exists accept + fib saddr . mark ${lib.optionalString (cfg.checkReversePath != "loose") ". iif"} oif exists accept jump rpfilter-allow - ${optionalString cfg.logReversePathDrops '' + ${lib.optionalString cfg.logReversePathDrops '' log level info prefix "rpfilter drop: " ''} @@ -107,7 +104,7 @@ in chain input { type filter hook input priority filter; policy drop; - ${optionalString (ifaceSet != "") ''iifname { ${ifaceSet} } accept comment "trusted interfaces"''} + ${lib.optionalString (ifaceSet != "") ''iifname { ${ifaceSet} } accept comment "trusted interfaces"''} # Some ICMPv6 types like NDP is untracked ct state vmap { @@ -118,18 +115,18 @@ in untracked: jump input-allow, } - ${optionalString cfg.logRefusedConnections '' + ${lib.optionalString cfg.logRefusedConnections '' tcp flags syn / fin,syn,rst,ack log level info prefix "refused connection: " ''} - ${optionalString (cfg.logRefusedPackets && !cfg.logRefusedUnicastsOnly) '' + ${lib.optionalString (cfg.logRefusedPackets && !cfg.logRefusedUnicastsOnly) '' pkttype broadcast log level info prefix "refused broadcast: " pkttype multicast log level info prefix "refused multicast: " ''} - ${optionalString cfg.logRefusedPackets '' + ${lib.optionalString cfg.logRefusedPackets '' pkttype host log level info prefix "refused packet: " ''} - ${optionalString cfg.rejectPackets '' + ${lib.optionalString cfg.rejectPackets '' meta l4proto tcp reject with tcp reset reject ''} @@ -138,20 +135,20 @@ in chain input-allow { - ${concatStrings (mapAttrsToList (iface: cfg: + ${lib.concatStrings (lib.mapAttrsToList (iface: cfg: let - ifaceExpr = optionalString (iface != "default") "iifname ${iface}"; + ifaceExpr = lib.optionalString (iface != "default") "iifname ${iface}"; tcpSet = portsToNftSet cfg.allowedTCPPorts cfg.allowedTCPPortRanges; udpSet = portsToNftSet cfg.allowedUDPPorts cfg.allowedUDPPortRanges; in '' - ${optionalString (tcpSet != "") "${ifaceExpr} tcp dport { ${tcpSet} } accept"} - ${optionalString (udpSet != "") "${ifaceExpr} udp dport { ${udpSet} } accept"} + ${lib.optionalString (tcpSet != "") "${ifaceExpr} tcp dport { ${tcpSet} } accept"} + ${lib.optionalString (udpSet != "") "${ifaceExpr} udp dport { ${udpSet} } accept"} '' ) cfg.allInterfaces)} - ${optionalString cfg.allowPing '' - icmp type echo-request ${optionalString (cfg.pingLimit != null) "limit rate ${cfg.pingLimit}"} accept comment "allow ping" + ${lib.optionalString cfg.allowPing '' + icmp type echo-request ${lib.optionalString (cfg.pingLimit != null) "limit rate ${cfg.pingLimit}"} accept comment "allow ping" ''} icmpv6 type != { nd-redirect, 139 } accept comment "Accept all ICMPv6 messages except redirects and node information queries (type 139). See RFC 4890, section 4.4." @@ -161,7 +158,7 @@ in } - ${optionalString cfg.filterForward '' + ${lib.optionalString cfg.filterForward '' chain forward { type filter hook forward priority filter; policy drop; From 00d0e3ba987cd82fa823843ad53f2e80a32a8555 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:07 +0200 Subject: [PATCH 182/236] nixos/networking.firewall: remove `with lib;` --- .../modules/services/networking/firewall.nix | 105 +++++++++--------- 1 file changed, 51 insertions(+), 54 deletions(-) diff --git a/nixos/modules/services/networking/firewall.nix b/nixos/modules/services/networking/firewall.nix index a35cc51a3870..5021ef6f502a 100644 --- a/nixos/modules/services/networking/firewall.nix +++ b/nixos/modules/services/networking/firewall.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.networking.firewall; @@ -10,8 +7,8 @@ let ports: lib.unique (builtins.sort builtins.lessThan ports); commonOptions = { - allowedTCPPorts = mkOption { - type = types.listOf types.port; + allowedTCPPorts = lib.mkOption { + type = lib.types.listOf lib.types.port; default = [ ]; apply = canonicalizePortList; example = [ 22 80 ]; @@ -21,8 +18,8 @@ let ''; }; - allowedTCPPortRanges = mkOption { - type = types.listOf (types.attrsOf types.port); + allowedTCPPortRanges = lib.mkOption { + type = lib.types.listOf (lib.types.attrsOf lib.types.port); default = [ ]; example = [{ from = 8999; to = 9003; }]; description = '' @@ -31,8 +28,8 @@ let ''; }; - allowedUDPPorts = mkOption { - type = types.listOf types.port; + allowedUDPPorts = lib.mkOption { + type = lib.types.listOf lib.types.port; default = [ ]; apply = canonicalizePortList; example = [ 53 ]; @@ -41,8 +38,8 @@ let ''; }; - allowedUDPPortRanges = mkOption { - type = types.listOf (types.attrsOf types.port); + allowedUDPPortRanges = lib.mkOption { + type = lib.types.listOf (lib.types.attrsOf lib.types.port); default = [ ]; example = [{ from = 60000; to = 61000; }]; description = '' @@ -58,8 +55,8 @@ in options = { networking.firewall = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = true; description = '' Whether to enable the firewall. This is a simple stateful @@ -68,18 +65,18 @@ in ''; }; - package = mkOption { - type = types.package; + package = lib.mkOption { + type = lib.types.package; default = if config.networking.nftables.enable then pkgs.nftables else pkgs.iptables; - defaultText = literalExpression ''if config.networking.nftables.enable then "pkgs.nftables" else "pkgs.iptables"''; - example = literalExpression "pkgs.iptables-legacy"; + defaultText = lib.literalExpression ''if config.networking.nftables.enable then "pkgs.nftables" else "pkgs.iptables"''; + example = lib.literalExpression "pkgs.iptables-legacy"; description = '' The package to use for running the firewall service. ''; }; - logRefusedConnections = mkOption { - type = types.bool; + logRefusedConnections = lib.mkOption { + type = lib.types.bool; default = true; description = '' Whether to log rejected or dropped incoming connections. @@ -88,8 +85,8 @@ in ''; }; - logRefusedPackets = mkOption { - type = types.bool; + logRefusedPackets = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to log all rejected or dropped incoming packets. @@ -100,8 +97,8 @@ in ''; }; - logRefusedUnicastsOnly = mkOption { - type = types.bool; + logRefusedUnicastsOnly = lib.mkOption { + type = lib.types.bool; default = true; description = '' If {option}`networking.firewall.logRefusedPackets` @@ -111,8 +108,8 @@ in ''; }; - rejectPackets = mkOption { - type = types.bool; + rejectPackets = lib.mkOption { + type = lib.types.bool; default = false; description = '' If set, refused packets are rejected rather than dropped @@ -123,8 +120,8 @@ in ''; }; - trustedInterfaces = mkOption { - type = types.listOf types.str; + trustedInterfaces = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; example = [ "enp0s2" ]; description = '' @@ -134,8 +131,8 @@ in ''; }; - allowPing = mkOption { - type = types.bool; + allowPing = lib.mkOption { + type = lib.types.bool; default = true; description = '' Whether to respond to incoming ICMPv4 echo requests @@ -145,8 +142,8 @@ in ''; }; - pingLimit = mkOption { - type = types.nullOr (types.separatedString " "); + pingLimit = lib.mkOption { + type = lib.types.nullOr (lib.types.separatedString " "); default = null; example = "--limit 1/minute --limit-burst 5"; description = '' @@ -160,10 +157,10 @@ in ''; }; - checkReversePath = mkOption { - type = types.either types.bool (types.enum [ "strict" "loose" ]); + checkReversePath = lib.mkOption { + type = lib.types.either lib.types.bool (lib.types.enum [ "strict" "loose" ]); default = true; - defaultText = literalMD "`true` except if the iptables based firewall is in use and the kernel lacks rpfilter support"; + defaultText = lib.literalMD "`true` except if the iptables based firewall is in use and the kernel lacks rpfilter support"; example = "loose"; description = '' Performs a reverse path filter test on a packet. If a reply @@ -180,8 +177,8 @@ in ''; }; - logReversePathDrops = mkOption { - type = types.bool; + logReversePathDrops = lib.mkOption { + type = lib.types.bool; default = false; description = '' Logs dropped packets failing the reverse path filter test if @@ -189,8 +186,8 @@ in ''; }; - filterForward = mkOption { - type = types.bool; + lib.filterForward = lib.mkOption { + type = lib.types.bool; default = false; description = '' Enable filtering in IP forwarding. @@ -199,8 +196,8 @@ in ''; }; - connectionTrackingModules = mkOption { - type = types.listOf types.str; + connectionTrackingModules = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; example = [ "ftp" "irc" "sane" "sip" "tftp" "amanda" "h323" "netbios_sn" "pptp" "snmp" ]; description = '' @@ -219,8 +216,8 @@ in ''; }; - autoLoadConntrackHelpers = mkOption { - type = types.bool; + autoLoadConntrackHelpers = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to auto-load connection-tracking helpers. @@ -230,29 +227,29 @@ in ''; }; - extraPackages = mkOption { - type = types.listOf types.package; + extraPackages = lib.mkOption { + type = lib.types.listOf lib.types.package; default = [ ]; - example = literalExpression "[ pkgs.ipset ]"; + example = lib.literalExpression "[ pkgs.ipset ]"; description = '' Additional packages to be included in the environment of the system as well as the path of networking.firewall.extraCommands. ''; }; - interfaces = mkOption { + interfaces = lib.mkOption { default = { }; - type = with types; attrsOf (submodule [{ options = commonOptions; }]); + type = with lib.types; attrsOf (submodule [{ options = commonOptions; }]); description = '' Interface-specific open ports. ''; }; - allInterfaces = mkOption { + allInterfaces = lib.mkOption { internal = true; visible = false; - default = { default = mapAttrs (name: value: cfg.${name}) commonOptions; } // cfg.interfaces; - type = with types; attrsOf (submodule [{ options = commonOptions; }]); + default = { default = lib.mapAttrs (name: value: cfg.${name}) commonOptions; } // cfg.interfaces; + type = with lib.types; attrsOf (submodule [{ options = commonOptions; }]); description = '' All open ports. ''; @@ -262,11 +259,11 @@ in }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { assertions = [ { - assertion = cfg.filterForward -> config.networking.nftables.enable; + assertion = cfg.lib.filterForward -> config.networking.nftables.enable; message = "filterForward only works with the nftables based firewall"; } { @@ -279,9 +276,9 @@ in environment.systemPackages = [ cfg.package ] ++ cfg.extraPackages; - boot.kernelModules = (optional cfg.autoLoadConntrackHelpers "nf_conntrack") + boot.kernelModules = (lib.optional cfg.autoLoadConntrackHelpers "nf_conntrack") ++ map (x: "nf_conntrack_${x}") cfg.connectionTrackingModules; - boot.extraModprobeConfig = optionalString cfg.autoLoadConntrackHelpers '' + boot.extraModprobeConfig = lib.optionalString cfg.autoLoadConntrackHelpers '' options nf_conntrack nf_conntrack_helper=1 ''; From 688b08939c5460b73eae1a9f73bc53ca31e157ea Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:07 +0200 Subject: [PATCH 183/236] nixos/services.flannel: remove `with lib;` --- nixos/modules/services/networking/flannel.nix | 87 +++++++++---------- 1 file changed, 42 insertions(+), 45 deletions(-) diff --git a/nixos/modules/services/networking/flannel.nix b/nixos/modules/services/networking/flannel.nix index c55557b668b8..05987df88c18 100644 --- a/nixos/modules/services/networking/flannel.nix +++ b/nixos/modules/services/networking/flannel.nix @@ -1,11 +1,8 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.flannel; - networkConfig = filterAttrs (n: v: v != null) { + networkConfig = lib.filterAttrs (n: v: v != null) { Network = cfg.network; SubnetLen = cfg.subnetLen; SubnetMin = cfg.subnetMin; @@ -14,128 +11,128 @@ let }; in { options.services.flannel = { - enable = mkEnableOption "flannel"; + enable = lib.mkEnableOption "flannel"; - package = mkPackageOption pkgs "flannel" { }; + package = lib.mkPackageOption pkgs "flannel" { }; - publicIp = mkOption { + publicIp = lib.mkOption { description = '' IP accessible by other nodes for inter-host communication. Defaults to the IP of the interface being used for communication. ''; - type = types.nullOr types.str; + type = lib.types.nullOr lib.types.str; default = null; }; - iface = mkOption { + iface = lib.mkOption { description = '' Interface to use (IP or name) for inter-host communication. Defaults to the interface for the default route on the machine. ''; - type = types.nullOr types.str; + type = lib.types.nullOr lib.types.str; default = null; }; etcd = { - endpoints = mkOption { + endpoints = lib.mkOption { description = "Etcd endpoints"; - type = types.listOf types.str; + type = lib.types.listOf lib.types.str; default = ["http://127.0.0.1:2379"]; }; - prefix = mkOption { + prefix = lib.mkOption { description = "Etcd key prefix"; - type = types.str; + type = lib.types.str; default = "/coreos.com/network"; }; - caFile = mkOption { + caFile = lib.mkOption { description = "Etcd certificate authority file"; - type = types.nullOr types.path; + type = lib.types.nullOr lib.types.path; default = null; }; - certFile = mkOption { + certFile = lib.mkOption { description = "Etcd cert file"; - type = types.nullOr types.path; + type = lib.types.nullOr lib.types.path; default = null; }; - keyFile = mkOption { + keyFile = lib.mkOption { description = "Etcd key file"; - type = types.nullOr types.path; + type = lib.types.nullOr lib.types.path; default = null; }; }; - kubeconfig = mkOption { + kubeconfig = lib.mkOption { description = '' Path to kubeconfig to use for storing flannel config using the Kubernetes API ''; - type = types.nullOr types.path; + type = lib.types.nullOr lib.types.path; default = null; }; - network = mkOption { + network = lib.mkOption { description = " IPv4 network in CIDR format to use for the entire flannel network."; - type = types.str; + type = lib.types.str; }; - nodeName = mkOption { + nodeName = lib.mkOption { description = '' Needed when running with Kubernetes as backend as this cannot be auto-detected"; ''; - type = types.nullOr types.str; + type = lib.types.nullOr lib.types.str; default = config.networking.fqdnOrHostName; - defaultText = literalExpression "config.networking.fqdnOrHostName"; + defaultText = lib.literalExpression "config.networking.fqdnOrHostName"; example = "node1.example.com"; }; - storageBackend = mkOption { + storageBackend = lib.mkOption { description = "Determines where flannel stores its configuration at runtime"; - type = types.enum ["etcd" "kubernetes"]; + type = lib.types.enum ["etcd" "kubernetes"]; default = "etcd"; }; - subnetLen = mkOption { + subnetLen = lib.mkOption { description = '' The size of the subnet allocated to each host. Defaults to 24 (i.e. /24) unless the Network was configured to be smaller than a /24 in which case it is one less than the network. ''; - type = types.int; + type = lib.types.int; default = 24; }; - subnetMin = mkOption { + subnetMin = lib.mkOption { description = '' The beginning of IP range which the subnet allocation should start with. Defaults to the first subnet of Network. ''; - type = types.nullOr types.str; + type = lib.types.nullOr lib.types.str; default = null; }; - subnetMax = mkOption { + subnetMax = lib.mkOption { description = '' The end of IP range which the subnet allocation should start with. Defaults to the last subnet of Network. ''; - type = types.nullOr types.str; + type = lib.types.nullOr lib.types.str; default = null; }; - backend = mkOption { + backend = lib.mkOption { description = "Type of backend to use and specific configurations for that backend."; - type = types.attrs; + type = lib.types.attrs; default = { Type = "vxlan"; }; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.flannel = { description = "Flannel Service"; wantedBy = [ "multi-user.target" ]; @@ -143,23 +140,23 @@ in { environment = { FLANNELD_PUBLIC_IP = cfg.publicIp; FLANNELD_IFACE = cfg.iface; - } // optionalAttrs (cfg.storageBackend == "etcd") { - FLANNELD_ETCD_ENDPOINTS = concatStringsSep "," cfg.etcd.endpoints; + } // lib.optionalAttrs (cfg.storageBackend == "etcd") { + FLANNELD_ETCD_ENDPOINTS = lib.concatStringsSep "," cfg.etcd.endpoints; FLANNELD_ETCD_KEYFILE = cfg.etcd.keyFile; FLANNELD_ETCD_CERTFILE = cfg.etcd.certFile; FLANNELD_ETCD_CAFILE = cfg.etcd.caFile; ETCDCTL_CERT = cfg.etcd.certFile; ETCDCTL_KEY = cfg.etcd.keyFile; ETCDCTL_CACERT = cfg.etcd.caFile; - ETCDCTL_ENDPOINTS = concatStringsSep "," cfg.etcd.endpoints; + ETCDCTL_ENDPOINTS = lib.concatStringsSep "," cfg.etcd.endpoints; ETCDCTL_API = "3"; - } // optionalAttrs (cfg.storageBackend == "kubernetes") { + } // lib.optionalAttrs (cfg.storageBackend == "kubernetes") { FLANNELD_KUBE_SUBNET_MGR = "true"; FLANNELD_KUBECONFIG_FILE = cfg.kubeconfig; NODE_NAME = cfg.nodeName; }; path = [ pkgs.iptables ]; - preStart = optionalString (cfg.storageBackend == "etcd") '' + preStart = lib.optionalString (cfg.storageBackend == "etcd") '' echo "setting network configuration" until ${pkgs.etcd}/bin/etcdctl put /coreos.com/network/config '${builtins.toJSON networkConfig}' do @@ -175,11 +172,11 @@ in { }; }; - services.etcd.enable = mkDefault (cfg.storageBackend == "etcd" && cfg.etcd.endpoints == ["http://127.0.0.1:2379"]); + services.etcd.enable = lib.mkDefault (cfg.storageBackend == "etcd" && cfg.etcd.endpoints == ["http://127.0.0.1:2379"]); # for some reason, flannel doesn't let you configure this path # see: https://github.com/coreos/flannel/blob/master/Documentation/configuration.md#configuration - environment.etc."kube-flannel/net-conf.json" = mkIf (cfg.storageBackend == "kubernetes") { + environment.etc."kube-flannel/net-conf.json" = lib.mkIf (cfg.storageBackend == "kubernetes") { source = pkgs.writeText "net-conf.json" (builtins.toJSON networkConfig); }; }; From a49fa6ee3bf1b16f5a796098eb8a4e6fe4312431 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:07 +0200 Subject: [PATCH 184/236] nixos/services.freenet: remove `with lib;` --- nixos/modules/services/networking/freenet.nix | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/nixos/modules/services/networking/freenet.nix b/nixos/modules/services/networking/freenet.nix index 3da3ab0c7df4..4323b98d6707 100644 --- a/nixos/modules/services/networking/freenet.nix +++ b/nixos/modules/services/networking/freenet.nix @@ -1,9 +1,5 @@ # NixOS module for Freenet daemon - { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.freenet; @@ -19,14 +15,14 @@ in services.freenet = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = "Enable the Freenet daemon"; }; - nice = mkOption { - type = types.int; + nice = lib.mkOption { + type = lib.types.int; default = 10; description = "Set the nice level for the Freenet daemon"; }; @@ -37,7 +33,7 @@ in ### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.freenet = { description = "Freenet daemon"; From 7cc95389d125c405e4215bf798618e56a30b8d3c Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:07 +0200 Subject: [PATCH 185/236] nixos/services.freeradius: remove `with lib;` --- .../services/networking/freeradius.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/nixos/modules/services/networking/freeradius.nix b/nixos/modules/services/networking/freeradius.nix index 7fa3a8fa17fa..39a137aa541c 100644 --- a/nixos/modules/services/networking/freeradius.nix +++ b/nixos/modules/services/networking/freeradius.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.freeradius; @@ -18,7 +15,7 @@ let serviceConfig = { ExecStart = "${pkgs.freeradius}/bin/radiusd -f -d ${cfg.configDir} -l stdout" + - optionalString cfg.debug " -xx"; + lib.optionalString cfg.debug " -xx"; ExecReload = [ "${pkgs.freeradius}/bin/radiusd -C -d ${cfg.configDir} -l stdout" "${pkgs.coreutils}/bin/kill -HUP $MAINPID" @@ -33,18 +30,18 @@ let }; freeradiusConfig = { - enable = mkEnableOption "the freeradius server"; + enable = lib.mkEnableOption "the freeradius server"; - configDir = mkOption { - type = types.path; + configDir = lib.mkOption { + type = lib.types.path; default = "/etc/raddb"; description = '' The path of the freeradius server configuration directory. ''; }; - debug = mkOption { - type = types.bool; + debug = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to enable debug logging for freeradius (-xx @@ -68,7 +65,7 @@ in ###### implementation - config = mkIf (cfg.enable) { + config = lib.mkIf (cfg.enable) { users = { users.radius = { @@ -79,7 +76,7 @@ in }; systemd.services.freeradius = freeradiusService cfg; - warnings = optional cfg.debug "Freeradius debug logging is enabled. This will log passwords in plaintext to the journal!"; + warnings = lib.optional cfg.debug "Freeradius debug logging is enabled. This will log passwords in plaintext to the journal!"; }; From fdcec053e6394a406be84daa65ae5cabc1201b87 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:08 +0200 Subject: [PATCH 186/236] nixos/services.frp: remove `with lib;` --- nixos/modules/services/networking/frp.nix | 27 ++++++++++------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/nixos/modules/services/networking/frp.nix b/nixos/modules/services/networking/frp.nix index fc15efe5642d..56af543b845b 100644 --- a/nixos/modules/services/networking/frp.nix +++ b/nixos/modules/services/networking/frp.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.frp; settingsFormat = pkgs.formats.toml { }; @@ -12,12 +9,12 @@ in { options = { services.frp = { - enable = mkEnableOption "frp"; + enable = lib.mkEnableOption "frp"; - package = mkPackageOption pkgs "frp" { }; + package = lib.mkPackageOption pkgs "frp" { }; - role = mkOption { - type = types.enum [ "server" "client" ]; + role = lib.mkOption { + type = lib.types.enum [ "server" "client" ]; description = '' The frp consists of `client` and `server`. The server is usually deployed on the machine with a public IP address, and @@ -26,7 +23,7 @@ in ''; }; - settings = mkOption { + settings = lib.mkOption { type = settingsFormat.type; default = { }; description = '' @@ -44,13 +41,13 @@ in config = let - serviceCapability = optionals isServer [ "CAP_NET_BIND_SERVICE" ]; + serviceCapability = lib.optionals isServer [ "CAP_NET_BIND_SERVICE" ]; executableFile = if isClient then "frpc" else "frps"; in - mkIf cfg.enable { + lib.mkIf cfg.enable { systemd.services = { frp = { - wants = optionals isClient [ "network-online.target" ]; + wants = lib.optionals isClient [ "network-online.target" ]; after = if isClient then [ "network-online.target" ] else [ "network.target" ]; wantedBy = [ "multi-user.target" ]; description = "A fast reverse proxy frp ${cfg.role}"; @@ -59,10 +56,10 @@ in Restart = "on-failure"; RestartSec = 15; ExecStart = "${cfg.package}/bin/${executableFile} --strict_config -c ${configFile}"; - StateDirectoryMode = optionalString isServer "0700"; + StateDirectoryMode = lib.optionalString isServer "0700"; DynamicUser = true; # Hardening - UMask = optionalString isServer "0007"; + UMask = lib.optionalString isServer "0007"; CapabilityBoundingSet = serviceCapability; AmbientCapabilities = serviceCapability; PrivateDevices = true; @@ -72,7 +69,7 @@ in ProtectKernelModules = true; ProtectKernelLogs = true; ProtectControlGroups = true; - RestrictAddressFamilies = [ "AF_INET" "AF_INET6" ] ++ optionals isClient [ "AF_UNIX" ]; + RestrictAddressFamilies = [ "AF_INET" "AF_INET6" ] ++ lib.optionals isClient [ "AF_UNIX" ]; LockPersonality = true; MemoryDenyWriteExecute = true; RestrictRealtime = true; @@ -85,5 +82,5 @@ in }; }; - meta.maintainers = with maintainers; [ zaldnoay ]; + meta.maintainers = with lib.maintainers; [ zaldnoay ]; } From 191b68cd26542cfebd561d678ca06b7958c977db Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:08 +0200 Subject: [PATCH 187/236] nixos/services.frr: remove `with lib;` --- nixos/modules/services/networking/frr.nix | 57 +++++++++++------------ 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/nixos/modules/services/networking/frr.nix b/nixos/modules/services/networking/frr.nix index df2b4035d2f0..fd5673651f36 100644 --- a/nixos/modules/services/networking/frr.nix +++ b/nixos/modules/services/networking/frr.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.frr; @@ -51,10 +48,10 @@ let serviceOptions = service: { - enable = mkEnableOption "the FRR ${toUpper service} routing protocol"; + enable = lib.mkEnableOption "the FRR ${lib.toUpper service} routing protocol"; - configFile = mkOption { - type = types.nullOr types.path; + configFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; default = null; example = "/etc/frr/${daemonName service}.conf"; description = '' @@ -63,8 +60,8 @@ let ''; }; - config = mkOption { - type = types.lines; + config = lib.mkOption { + type = lib.types.lines; default = ""; example = let @@ -91,24 +88,24 @@ let ''; }; - vtyListenAddress = mkOption { - type = types.str; + vtyListenAddress = lib.mkOption { + type = lib.types.str; default = "localhost"; description = '' Address to bind to for the VTY interface. ''; }; - vtyListenPort = mkOption { - type = types.nullOr types.int; + vtyListenPort = lib.mkOption { + type = lib.types.nullOr lib.types.int; default = null; description = '' TCP Port to bind to for the VTY interface. ''; }; - extraOptions = mkOption { - type = types.listOf types.str; + extraOptions = lib.mkOption { + type = lib.types.listOf lib.types.str; default = []; description = '' Extra options for the daemon. @@ -125,9 +122,9 @@ in { options.services.frr = { zebra = (serviceOptions "zebra") // { - enable = mkOption { - type = types.bool; - default = any isEnabled services; + enable = lib.mkOption { + type = lib.types.bool; + default = lib.any isEnabled services; description = '' Whether to enable the Zebra routing manager. @@ -137,8 +134,8 @@ in }; }; mgmt = (serviceOptions "mgmt") // { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = isEnabled "static"; defaultText = lib.literalExpression "config.services.frr.static.enable"; description = '' @@ -152,12 +149,12 @@ in }; }; } - { options.services.frr = (genAttrs services serviceOptions); } + { options.services.frr = (lib.genAttrs services serviceOptions); } ]; ###### implementation - config = mkIf (any isEnabled allServices) { + config = lib.mkIf (lib.any isEnabled allServices) { environment.systemPackages = [ pkgs.frr # for the vtysh tool @@ -182,7 +179,7 @@ in }; in (builtins.listToAttrs - (map mkEtcLink (filter isEnabled allServices))) // { + (map mkEtcLink (lib.filter isEnabled allServices))) // { "frr/vtysh.conf".text = ""; }; @@ -197,19 +194,19 @@ in scfg = cfg.${service}; daemon = daemonName service; in - nameValuePair daemon ({ + lib.nameValuePair daemon ({ wantedBy = [ "multi-user.target" ]; after = [ "network-pre.target" "systemd-sysctl.service" ] ++ lib.optionals (service != "zebra") [ "zebra.service" ]; bindsTo = lib.optionals (service != "zebra") [ "zebra.service" ]; wants = [ "network.target" ]; description = if service == "zebra" then "FRR Zebra routing manager" - else "FRR ${toUpper service} routing daemon"; + else "FRR ${lib.toUpper service} routing daemon"; unitConfig.Documentation = if service == "zebra" then "man:zebra(8)" else "man:${daemon}(8) man:zebra(8)"; - restartTriggers = mkIf (service != "mgmt") [ + restartTriggers = lib.mkIf (service != "mgmt") [ (configFile service) ]; reloadIfChanged = (service != "mgmt"); @@ -217,15 +214,15 @@ in serviceConfig = { PIDFile = "frr/${daemon}.pid"; ExecStart = "${pkgs.frr}/libexec/frr/${daemon}" - + optionalString (scfg.vtyListenAddress != "") " -A ${scfg.vtyListenAddress}" - + optionalString (scfg.vtyListenPort != null) " -P ${toString scfg.vtyListenPort}" - + " " + (concatStringsSep " " scfg.extraOptions); - ExecReload = mkIf (service != "mgmt") "${pkgs.python3.interpreter} ${pkgs.frr}/libexec/frr/frr-reload.py --reload --daemon ${daemon} --bindir ${pkgs.frr}/bin --rundir /run/frr /etc/frr/${daemon}.conf"; + + lib.optionalString (scfg.vtyListenAddress != "") " -A ${scfg.vtyListenAddress}" + + lib.optionalString (scfg.vtyListenPort != null) " -P ${toString scfg.vtyListenPort}" + + " " + (lib.concatStringsSep " " scfg.extraOptions); + ExecReload = lib.mkIf (service != "mgmt") "${pkgs.python3.interpreter} ${pkgs.frr}/libexec/frr/frr-reload.py --reload --daemon ${daemon} --bindir ${pkgs.frr}/bin --rundir /run/frr /etc/frr/${daemon}.conf"; Restart = "on-abnormal"; }; }); in - listToAttrs (map frrService (filter isEnabled allServices)); + lib.listToAttrs (map frrService (lib.filter isEnabled allServices)); }; From d0901224e12bd83d959a51b2cd3cec19c7100885 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:08 +0200 Subject: [PATCH 188/236] nixos/services.gateone: remove `with lib;` --- nixos/modules/services/networking/gateone.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/nixos/modules/services/networking/gateone.nix b/nixos/modules/services/networking/gateone.nix index e68f8a47d5c0..83a7ea248594 100644 --- a/nixos/modules/services/networking/gateone.nix +++ b/nixos/modules/services/networking/gateone.nix @@ -1,25 +1,24 @@ { config, lib, pkgs, ...}: -with lib; let cfg = config.services.gateone; in { options = { services.gateone = { - enable = mkEnableOption "GateOne server"; - pidDir = mkOption { + enable = lib.mkEnableOption "GateOne server"; + pidDir = lib.mkOption { default = "/run/gateone"; - type = types.path; + type = lib.types.path; description = "Path of pid files for GateOne."; }; - settingsDir = mkOption { + settingsDir = lib.mkOption { default = "/var/lib/gateone"; - type = types.path; + type = lib.types.path; description = "Path of configuration files for GateOne."; }; }; }; -config = mkIf cfg.enable { +config = lib.mkIf cfg.enable { environment.systemPackages = with pkgs.pythonPackages; [ gateone pkgs.openssh pkgs.procps pkgs.coreutils pkgs.cacert]; From 0b865525e8484167f8471bb4531e0f14c67281e2 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:08 +0200 Subject: [PATCH 189/236] nixos/services.gdomap: remove `with lib;` --- nixos/modules/services/networking/gdomap.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/networking/gdomap.nix b/nixos/modules/services/networking/gdomap.nix index 3d829cb69135..b7d6e2a2b690 100644 --- a/nixos/modules/services/networking/gdomap.nix +++ b/nixos/modules/services/networking/gdomap.nix @@ -1,21 +1,18 @@ { config, lib, pkgs, ... }: - -with lib; - { # # interface # options = { services.gdomap = { - enable = mkEnableOption "GNUstep Distributed Objects name server"; + enable = lib.mkEnableOption "GNUstep Distributed Objects name server"; }; }; # # implementation # - config = mkIf config.services.gdomap.enable { + config = lib.mkIf config.services.gdomap.enable { # NOTE: gdomap runs as root # TODO: extra user for gdomap? systemd.services.gdomap = { From 878c5dc6eb318111e856e7b1b70d5984cfd42816 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:08 +0200 Subject: [PATCH 190/236] nixos/services.gitDaemon: remove `with lib;` --- .../services/networking/git-daemon.nix | 53 +++++++++---------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/nixos/modules/services/networking/git-daemon.nix b/nixos/modules/services/networking/git-daemon.nix index 522e6b14f868..215d7f79a52c 100644 --- a/nixos/modules/services/networking/git-daemon.nix +++ b/nixos/modules/services/networking/git-daemon.nix @@ -1,5 +1,4 @@ { config, lib, pkgs, ... }: -with lib; let cfg = config.services.gitDaemon; @@ -12,8 +11,8 @@ in options = { services.gitDaemon = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Enable Git daemon, which allows public hosting of git repositories @@ -27,10 +26,10 @@ in ''; }; - package = mkPackageOption pkgs "git" { }; + package = lib.mkPackageOption pkgs "git" { }; - basePath = mkOption { - type = types.str; + basePath = lib.mkOption { + type = lib.types.str; default = ""; example = "/srv/git/"; description = '' @@ -40,8 +39,8 @@ in ''; }; - exportAll = mkOption { - type = types.bool; + exportAll = lib.mkOption { + type = lib.types.bool; default = false; description = '' Publish all directories that look like Git repositories (have the objects @@ -55,8 +54,8 @@ in ''; }; - repositories = mkOption { - type = types.listOf types.str; + repositories = lib.mkOption { + type = lib.types.listOf lib.types.str; default = []; example = [ "/srv/git" "/home/user/git/repo2" ]; description = '' @@ -68,33 +67,33 @@ in ''; }; - listenAddress = mkOption { - type = types.str; + listenAddress = lib.mkOption { + type = lib.types.str; default = ""; example = "example.com"; description = "Listen on a specific IP address or hostname."; }; - port = mkOption { - type = types.port; + port = lib.mkOption { + type = lib.types.port; default = 9418; description = "Port to listen on."; }; - options = mkOption { - type = types.str; + options = lib.mkOption { + type = lib.types.str; default = ""; description = "Extra configuration options to be passed to Git daemon."; }; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = "git"; description = "User under which Git daemon would be running."; }; - group = mkOption { - type = types.str; + group = lib.mkOption { + type = lib.types.str; default = "git"; description = "Group under which Git daemon would be running."; }; @@ -104,9 +103,9 @@ in ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { - users.users = optionalAttrs (cfg.user == "git") { + users.users = lib.optionalAttrs (cfg.user == "git") { git = { uid = config.ids.uids.git; group = "git"; @@ -114,18 +113,18 @@ in }; }; - users.groups = optionalAttrs (cfg.group == "git") { + users.groups = lib.optionalAttrs (cfg.group == "git") { git.gid = config.ids.gids.git; }; systemd.services.git-daemon = { after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; - script = "${getExe cfg.package} daemon --reuseaddr " - + (optionalString (cfg.basePath != "") "--base-path=${cfg.basePath} ") - + (optionalString (cfg.listenAddress != "") "--listen=${cfg.listenAddress} ") + script = "${lib.getExe cfg.package} daemon --reuseaddr " + + (lib.optionalString (cfg.basePath != "") "--base-path=${cfg.basePath} ") + + (lib.optionalString (cfg.listenAddress != "") "--listen=${cfg.listenAddress} ") + "--port=${toString cfg.port} --user=${cfg.user} --group=${cfg.group} ${cfg.options} " - + "--verbose " + (optionalString cfg.exportAll "--export-all ") + concatStringsSep " " cfg.repositories; + + "--verbose " + (lib.optionalString cfg.exportAll "--export-all ") + lib.concatStringsSep " " cfg.repositories; }; }; From 7a65f586985d06875aaa075a98944dcd51a3c91f Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:08 +0200 Subject: [PATCH 191/236] nixos/services.globalprotect: remove `with lib;` --- .../services/networking/globalprotect-vpn.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/networking/globalprotect-vpn.nix b/nixos/modules/services/networking/globalprotect-vpn.nix index 4292bba78f76..87ce8a5e142f 100644 --- a/nixos/modules/services/networking/globalprotect-vpn.nix +++ b/nixos/modules/services/networking/globalprotect-vpn.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.globalprotect; @@ -14,9 +11,9 @@ in { options.services.globalprotect = { - enable = mkEnableOption "globalprotect"; + enable = lib.mkEnableOption "globalprotect"; - settings = mkOption { + settings = lib.mkOption { description = '' GlobalProtect-openconnect configuration. For more information, visit . @@ -27,21 +24,21 @@ in openconnect-args = "--script=/path/to/vpnc-script"; }; }; - type = types.attrs; + type = lib.types.attrs; }; - csdWrapper = mkOption { + csdWrapper = lib.mkOption { description = '' A script that will produce a Host Integrity Protection (HIP) report, as described at ''; default = null; - example = literalExpression ''"''${pkgs.openconnect}/libexec/openconnect/hipreport.sh"''; - type = types.nullOr types.path; + example = lib.literalExpression ''"''${pkgs.openconnect}/libexec/openconnect/hipreport.sh"''; + type = lib.types.nullOr lib.types.path; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { services.dbus.packages = [ pkgs.globalprotect-openconnect ]; environment.etc."gpservice/gp.conf".text = lib.generators.toINI { } cfg.settings; From 3e72e14a6dd84429fdde7e24899bca10942d07c0 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:08 +0200 Subject: [PATCH 192/236] nixos/services.gnunet: remove `with lib;` --- nixos/modules/services/networking/gnunet.nix | 39 +++++++++----------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/nixos/modules/services/networking/gnunet.nix b/nixos/modules/services/networking/gnunet.nix index cfe1e1709142..7380f22c13f2 100644 --- a/nixos/modules/services/networking/gnunet.nix +++ b/nixos/modules/services/networking/gnunet.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.gnunet; @@ -44,8 +41,8 @@ in services.gnunet = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to run the GNUnet daemon. GNUnet is GNU's anonymous @@ -54,8 +51,8 @@ in }; fileSharing = { - quota = mkOption { - type = types.int; + quota = lib.mkOption { + type = lib.types.int; default = 1024; description = '' Maximum file system usage (in MiB) for file sharing. @@ -64,8 +61,8 @@ in }; udp = { - port = mkOption { - type = types.port; + port = lib.mkOption { + type = lib.types.port; default = 2086; # assigned by IANA description = '' The UDP port for use by GNUnet. @@ -74,8 +71,8 @@ in }; tcp = { - port = mkOption { - type = types.port; + port = lib.mkOption { + type = lib.types.port; default = 2086; # assigned by IANA description = '' The TCP port for use by GNUnet. @@ -84,8 +81,8 @@ in }; load = { - maxNetDownBandwidth = mkOption { - type = types.int; + maxNetDownBandwidth = lib.mkOption { + type = lib.types.int; default = 50000; description = '' Maximum bandwidth usage (in bits per second) for GNUnet @@ -93,8 +90,8 @@ in ''; }; - maxNetUpBandwidth = mkOption { - type = types.int; + maxNetUpBandwidth = lib.mkOption { + type = lib.types.int; default = 50000; description = '' Maximum bandwidth usage (in bits per second) for GNUnet @@ -102,8 +99,8 @@ in ''; }; - hardNetUpBandwidth = mkOption { - type = types.int; + hardNetUpBandwidth = lib.mkOption { + type = lib.types.int; default = 0; description = '' Hard bandwidth limit (in bits per second) when uploading @@ -112,12 +109,12 @@ in }; }; - package = mkPackageOption pkgs "gnunet" { + package = lib.mkPackageOption pkgs "gnunet" { example = "gnunet_git"; }; - extraOptions = mkOption { - type = types.lines; + extraOptions = lib.mkOption { + type = lib.types.lines; default = ""; description = '' Additional options that will be copied verbatim in `gnunet.conf`. @@ -131,7 +128,7 @@ in ###### implementation - config = mkIf config.services.gnunet.enable { + config = lib.mkIf config.services.gnunet.enable { users.users.gnunet = { group = "gnunet"; From 9ca9ac0b5165d4c37addbb390f61997068c0442b Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:09 +0200 Subject: [PATCH 193/236] nixos/services.go-autoconfig: remove `with lib;` --- nixos/modules/services/networking/go-autoconfig.nix | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/networking/go-autoconfig.nix b/nixos/modules/services/networking/go-autoconfig.nix index 2fc7c53218ca..b31ef227c587 100644 --- a/nixos/modules/services/networking/go-autoconfig.nix +++ b/nixos/modules/services/networking/go-autoconfig.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.go-autoconfig; @@ -12,19 +9,19 @@ in { options = { services.go-autoconfig = { - enable = mkEnableOption "IMAP/SMTP autodiscover feature for mail clients"; + enable = lib.mkEnableOption "IMAP/SMTP autodiscover feature for mail clients"; - settings = mkOption { + settings = lib.mkOption { default = { }; description = '' Configuration for go-autoconfig. See for more information. ''; - type = types.submodule { + type = lib.types.submodule { freeformType = format.type; }; - example = literalExpression '' + example = lib.literalExpression '' { service_addr = ":1323"; domain = "autoconfig.example.org"; @@ -43,7 +40,7 @@ in { }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd = { services.go-autoconfig = { From 2ec70782ab5b6883167a3e5334e1fdc1d7140077 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:09 +0200 Subject: [PATCH 194/236] nixos/services.go-neb: remove `with lib;` --- nixos/modules/services/networking/go-neb.nix | 23 +++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/nixos/modules/services/networking/go-neb.nix b/nixos/modules/services/networking/go-neb.nix index ae414509162b..4a43c574ff53 100644 --- a/nixos/modules/services/networking/go-neb.nix +++ b/nixos/modules/services/networking/go-neb.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.go-neb; @@ -9,16 +6,16 @@ let configFile = settingsFormat.generate "config.yaml" cfg.config; in { options.services.go-neb = { - enable = mkEnableOption "an extensible matrix bot written in Go"; + enable = lib.mkEnableOption "an extensible matrix bot written in Go"; - bindAddress = mkOption { - type = types.str; + bindAddress = lib.mkOption { + type = lib.types.str; description = "Port (and optionally address) to listen on."; default = ":4050"; }; - secretFile = mkOption { - type = types.nullOr types.path; + secretFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; default = null; example = "/run/keys/go-neb.env"; description = '' @@ -30,12 +27,12 @@ in { ''; }; - baseUrl = mkOption { - type = types.str; + baseUrl = lib.mkOption { + type = lib.types.str; description = "Public-facing endpoint that can receive webhooks."; }; - config = mkOption { + config = lib.mkOption { inherit (settingsFormat) type; description = '' Your {file}`config.yaml` as a Nix attribute set. @@ -45,7 +42,7 @@ in { }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.go-neb = let finalConfigFile = if cfg.secretFile == null then configFile else "/var/run/go-neb/config.yaml"; in { @@ -74,5 +71,5 @@ in { }; }; - meta.maintainers = with maintainers; [ hexa maralorn ]; + meta.maintainers = with lib.maintainers; [ hexa maralorn ]; } From 90a98fc1035dd7dc9b49d088a84528bc05a18456 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:09 +0200 Subject: [PATCH 195/236] nixos/services.go-shadowsocks2: remove `with lib;` --- nixos/modules/services/networking/go-shadowsocks2.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/nixos/modules/services/networking/go-shadowsocks2.nix b/nixos/modules/services/networking/go-shadowsocks2.nix index afbd7ea27c65..438d3fb1c0a6 100644 --- a/nixos/modules/services/networking/go-shadowsocks2.nix +++ b/nixos/modules/services/networking/go-shadowsocks2.nix @@ -1,20 +1,18 @@ { config, lib, pkgs, ... }: - -with lib; let cfg = config.services.go-shadowsocks2.server; in { options.services.go-shadowsocks2.server = { - enable = mkEnableOption "go-shadowsocks2 server"; + enable = lib.mkEnableOption "go-shadowsocks2 server"; - listenAddress = mkOption { - type = types.str; + listenAddress = lib.mkOption { + type = lib.types.str; description = "Server listen address or URL"; example = "ss://AEAD_CHACHA20_POLY1305:your-password@:8488"; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.go-shadowsocks2-server = { description = "go-shadowsocks2 server"; From a811ef8255b5b585309eac8e883cd6bdfef38a2b Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:09 +0200 Subject: [PATCH 196/236] nixos/services.gobgpd: remove `with lib;` --- nixos/modules/services/networking/gobgpd.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/nixos/modules/services/networking/gobgpd.nix b/nixos/modules/services/networking/gobgpd.nix index e5d8c190b911..79f1adf4e314 100644 --- a/nixos/modules/services/networking/gobgpd.nix +++ b/nixos/modules/services/networking/gobgpd.nix @@ -1,16 +1,13 @@ { config, pkgs, lib, ... }: - -with lib; - let cfg = config.services.gobgpd; format = pkgs.formats.toml { }; confFile = format.generate "gobgpd.conf" cfg.settings; in { options.services.gobgpd = { - enable = mkEnableOption "GoBGP Routing Daemon"; + enable = lib.mkEnableOption "GoBGP Routing Daemon"; - settings = mkOption { + settings = lib.mkOption { type = format.type; default = { }; description = '' @@ -18,7 +15,7 @@ in { for details on supported values. ''; - example = literalExpression '' + example = lib.literalExpression '' { global = { config = { @@ -45,7 +42,7 @@ in { }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.systemPackages = [ pkgs.gobgpd ]; systemd.services.gobgpd = { wantedBy = [ "multi-user.target" ]; From f30e72ffbb3f906943a6c696ae429754abf758a8 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:09 +0200 Subject: [PATCH 197/236] nixos/services.hans: remove `with lib;` --- nixos/modules/services/networking/hans.nix | 58 ++++++++++------------ 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/nixos/modules/services/networking/hans.nix b/nixos/modules/services/networking/hans.nix index 0d0e2c340ebf..b1cb37158a04 100644 --- a/nixos/modules/services/networking/hans.nix +++ b/nixos/modules/services/networking/hans.nix @@ -1,9 +1,5 @@ # NixOS module for hans, ip over icmp daemon - { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.hans; @@ -17,7 +13,7 @@ in options = { services.hans = { - clients = mkOption { + clients = lib.mkOption { default = {}; description = '' Each attribute of this option defines a systemd service that @@ -27,7 +23,7 @@ in where «name» is the name of the corresponding attribute name. ''; - example = literalExpression '' + example = lib.literalExpression '' { foo = { server = "192.0.2.1"; @@ -35,25 +31,25 @@ in } } ''; - type = types.attrsOf (types.submodule ( + type = lib.types.attrsOf (lib.types.submodule ( { options = { - server = mkOption { - type = types.str; + server = lib.mkOption { + type = lib.types.str; default = ""; description = "IP address of server running hans"; example = "192.0.2.1"; }; - extraConfig = mkOption { - type = types.str; + extraConfig = lib.mkOption { + type = lib.types.str; default = ""; description = "Additional command line parameters"; example = "-v"; }; - passwordFile = mkOption { - type = types.str; + passwordFile = lib.mkOption { + type = lib.types.str; default = ""; description = "File that contains password"; }; @@ -63,34 +59,34 @@ in }; server = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = "enable hans server"; }; - ip = mkOption { - type = types.str; + ip = lib.mkOption { + type = lib.types.str; default = ""; description = "The assigned ip range"; example = "198.51.100.0"; }; - respondToSystemPings = mkOption { - type = types.bool; + respondToSystemPings = lib.mkOption { + type = lib.types.bool; default = false; description = "Force hans respond to ordinary pings"; }; - extraConfig = mkOption { - type = types.str; + extraConfig = lib.mkOption { + type = lib.types.str; default = ""; description = "Additional command line parameters"; example = "-v"; }; - passwordFile = mkOption { - type = types.str; + passwordFile = lib.mkOption { + type = lib.types.str; default = ""; description = "File that contains password"; }; @@ -101,8 +97,8 @@ in ### implementation - config = mkIf (cfg.server.enable || cfg.clients != {}) { - boot.kernel.sysctl = optionalAttrs cfg.server.respondToSystemPings { + config = lib.mkIf (cfg.server.enable || cfg.clients != {}) { + boot.kernel.sysctl = lib.optionalAttrs cfg.server.respondToSystemPings { "net.ipv4.icmp_echo_ignore_all" = 1; }; @@ -115,23 +111,23 @@ in description = "hans client - ${name}"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; - script = "${pkgs.hans}/bin/hans -f -u ${hansUser} ${cfg.extraConfig} -c ${cfg.server} ${optionalString (cfg.passwordFile != "") "-p $(cat \"${cfg.passwordFile}\")"}"; + script = "${pkgs.hans}/bin/hans -f -u ${hansUser} ${cfg.extraConfig} -c ${cfg.server} ${lib.optionalString (cfg.passwordFile != "") "-p $(cat \"${cfg.passwordFile}\")"}"; serviceConfig = { RestartSec = "30s"; Restart = "always"; }; }; in - listToAttrs ( - mapAttrsToList - (name: value: nameValuePair "hans-${name}" (createHansClientService name value)) + lib.listToAttrs ( + lib.mapAttrsToList + (name: value: lib.nameValuePair "hans-${name}" (createHansClientService name value)) cfg.clients ) // { - hans = mkIf (cfg.server.enable) { + hans = lib.mkIf (cfg.server.enable) { description = "hans, ip over icmp server daemon"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; - script = "${pkgs.hans}/bin/hans -f -u ${hansUser} ${cfg.server.extraConfig} -s ${cfg.server.ip} ${optionalString cfg.server.respondToSystemPings "-r"} ${optionalString (cfg.server.passwordFile != "") "-p $(cat \"${cfg.server.passwordFile}\")"}"; + script = "${pkgs.hans}/bin/hans -f -u ${hansUser} ${cfg.server.extraConfig} -s ${cfg.server.ip} ${lib.optionalString cfg.server.respondToSystemPings "-r"} ${lib.optionalString (cfg.server.passwordFile != "") "-p $(cat \"${cfg.server.passwordFile}\")"}"; }; }; From 9ceab680a6c0d721d503c8339582be8cb1d36442 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:09 +0200 Subject: [PATCH 198/236] nixos/services.haproxy: remove `with lib;` --- nixos/modules/services/networking/haproxy.nix | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/nixos/modules/services/networking/haproxy.nix b/nixos/modules/services/networking/haproxy.nix index 19b096bf4906..23c06f294980 100644 --- a/nixos/modules/services/networking/haproxy.nix +++ b/nixos/modules/services/networking/haproxy.nix @@ -1,40 +1,35 @@ { config, lib, pkgs, ... }: - let cfg = config.services.haproxy; - haproxyCfg = pkgs.writeText "haproxy.conf" '' global # needed for hot-reload to work without dropping packets in multi-worker mode stats socket /run/haproxy/haproxy.sock mode 600 expose-fd listeners level user - ${cfg.config} ''; - in -with lib; { options = { services.haproxy = { - enable = mkEnableOption "HAProxy, the reliable, high performance TCP/HTTP load balancer"; + enable = lib.mkEnableOption "HAProxy, the reliable, high performance TCP/HTTP load balancer"; - package = mkPackageOption pkgs "haproxy" { }; + package = lib.mkPackageOption pkgs "haproxy" { }; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = "haproxy"; description = "User account under which haproxy runs."; }; - group = mkOption { - type = types.str; + group = lib.mkOption { + type = lib.types.str; default = "haproxy"; description = "Group account under which haproxy runs."; }; - config = mkOption { - type = types.nullOr types.lines; + config = lib.mkOption { + type = lib.types.nullOr lib.types.lines; default = null; description = '' Contents of the HAProxy configuration file, @@ -44,7 +39,7 @@ with lib; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { assertions = [{ assertion = cfg.config != null; @@ -93,14 +88,14 @@ with lib; }; }; - users.users = optionalAttrs (cfg.user == "haproxy") { + users.users = lib.optionalAttrs (cfg.user == "haproxy") { haproxy = { group = cfg.group; isSystemUser = true; }; }; - users.groups = optionalAttrs (cfg.group == "haproxy") { + users.groups = lib.optionalAttrs (cfg.group == "haproxy") { haproxy = {}; }; }; From 49224ecc3b41c31b8a566752b87e362a4825c0ce Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:09 +0200 Subject: [PATCH 199/236] nixos/services.htpdate: remove `with lib;` --- nixos/modules/services/networking/htpdate.nix | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/nixos/modules/services/networking/htpdate.nix b/nixos/modules/services/networking/htpdate.nix index 6954e5b060c4..fa422854872c 100644 --- a/nixos/modules/services/networking/htpdate.nix +++ b/nixos/modules/services/networking/htpdate.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let inherit (pkgs) htpdate; @@ -16,32 +13,32 @@ in services.htpdate = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Enable htpdate daemon. ''; }; - extraOptions = mkOption { - type = types.str; + extraOptions = lib.mkOption { + type = lib.types.str; default = ""; description = '' Additional command line arguments to pass to htpdate. ''; }; - servers = mkOption { - type = types.listOf types.str; + servers = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ "www.google.com" ]; description = '' HTTP servers to use for time synchronization. ''; }; - proxy = mkOption { - type = types.str; + proxy = lib.mkOption { + type = lib.types.str; default = ""; example = "127.0.0.1:8118"; description = '' @@ -55,7 +52,7 @@ in ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.htpdate = { description = "htpdate daemon"; @@ -63,14 +60,14 @@ in serviceConfig = { Type = "forking"; PIDFile = "/run/htpdate.pid"; - ExecStart = concatStringsSep " " [ + ExecStart = lib.concatStringsSep " " [ "${htpdate}/bin/htpdate" "-D -u nobody" "-a -s" "-l" - "${optionalString (cfg.proxy != "") "-P ${cfg.proxy}"}" + "${lib.optionalString (cfg.proxy != "") "-P ${cfg.proxy}"}" "${cfg.extraOptions}" - "${concatStringsSep " " cfg.servers}" + "${lib.concatStringsSep " " cfg.servers}" ]; }; }; From f69dd2df9af8cabf7e54fb2b2b2e9a495712c13b Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:10 +0200 Subject: [PATCH 200/236] nixos/services.i2p: remove `with lib;` --- nixos/modules/services/networking/i2p.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/networking/i2p.nix b/nixos/modules/services/networking/i2p.nix index 2b38697b1f47..5d7b339dc01b 100644 --- a/nixos/modules/services/networking/i2p.nix +++ b/nixos/modules/services/networking/i2p.nix @@ -1,17 +1,14 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.i2p; homeDir = "/var/lib/i2p"; in { ###### interface - options.services.i2p.enable = mkEnableOption "I2P router"; + options.services.i2p.enable = lib.mkEnableOption "I2P router"; ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.i2p = { group = "i2p"; description = "i2p User"; From b610b3cac2c390ceaff6106272b107320940d66a Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:10 +0200 Subject: [PATCH 201/236] nixos/services.inadyn: remove `with lib;` --- nixos/modules/services/networking/inadyn.nix | 55 +++++++++----------- 1 file changed, 26 insertions(+), 29 deletions(-) diff --git a/nixos/modules/services/networking/inadyn.nix b/nixos/modules/services/networking/inadyn.nix index 7022673538c8..c98d6a231506 100644 --- a/nixos/modules/services/networking/inadyn.nix +++ b/nixos/modules/services/networking/inadyn.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.inadyn; @@ -11,10 +8,10 @@ let renderOption = k: v: if builtins.elem k [ "provider" "custom" ] then lib.concatStringsSep "\n" - (mapAttrsToList + (lib.mapAttrsToList (name: config: '' ${k} ${name} { - ${lib.concatStringsSep "\n " (mapAttrsToList renderOption (filterAttrs nonEmptyValue config))} + ${lib.concatStringsSep "\n " (lib.mapAttrsToList renderOption (lib.filterAttrs nonEmptyValue config))} }'') v) else if k == "include" then @@ -22,7 +19,7 @@ let else if k == "hostname" && builtins.isList v then "${k} = { ${builtins.concatStringsSep ", " (map (s: "\"${s}\"") v)} }" else if builtins.isBool v then - "${k} = ${boolToString v}" + "${k} = ${lib.boolToString v}" else if builtins.isString v then "${k} = \"${v}\"" else @@ -33,32 +30,32 @@ let # This file was generated by nix # do not edit - ${(lib.concatStringsSep "\n" (mapAttrsToList renderOption (filterAttrs nonEmptyValue cfg.settings)))} + ${(lib.concatStringsSep "\n" (lib.mapAttrsToList renderOption (lib.filterAttrs nonEmptyValue cfg.settings)))} ''; configFile = if (cfg.configFile != null) then cfg.configFile else configFile'; in { - options.services.inadyn = with types; + options.services.inadyn = with lib.types; let providerOptions = { - include = mkOption { + include = lib.mkOption { default = null; description = "File to include additional settings for this provider from."; type = nullOr path; }; - ssl = mkOption { + ssl = lib.mkOption { default = true; description = "Whether to use HTTPS for this DDNS provider."; type = bool; }; - username = mkOption { + username = lib.mkOption { default = null; description = "Username for this DDNS provider."; type = nullOr str; }; - password = mkOption { + password = lib.mkOption { default = null; description = '' Password for this DDNS provider. @@ -68,7 +65,7 @@ in ''; type = nullOr str; }; - hostname = mkOption { + hostname = lib.mkOption { default = "*"; example = "your.cool-domain.com"; description = "Hostname alias(es)."; @@ -77,12 +74,12 @@ in }; in { - enable = mkEnableOption ('' + enable = lib.mkEnableOption ('' synchronise your machine's IP address with a dynamic DNS provider using inadyn ''); - user = mkOption { + user = lib.mkOption { default = "inadyn"; - type = types.str; + type = lib.types.str; description = '' User account under which inadyn runs. @@ -93,9 +90,9 @@ in ::: ''; }; - group = mkOption { + group = lib.mkOption { default = "inadyn"; - type = types.str; + type = lib.types.str; description = '' Group account under which inadyn runs. @@ -106,7 +103,7 @@ in ::: ''; }; - interval = mkOption { + interval = lib.mkOption { default = "*-*-* *:*:00"; description = '' How often to check the current IP. @@ -119,24 +116,24 @@ in default = "notice"; description = "Set inadyn's log level."; }; - settings = mkOption { + settings = lib.mkOption { default = { }; description = "See `inadyn.conf (5)`"; type = submodule { freeformType = attrs; options = { - allow-ipv6 = mkOption { + allow-ipv6 = lib.mkOption { default = config.networking.enableIPv6; defaultText = "`config.networking.enableIPv6`"; description = "Whether to get IPv6 addresses from interfaces."; type = bool; }; - forced-update = mkOption { + forced-update = lib.mkOption { default = 2592000; description = "Duration (in seconds) after which an update is forced."; type = ints.positive; }; - provider = mkOption { + provider = lib.mkOption { default = { }; description = '' Settings for DDNS providers built-in to inadyn. @@ -148,7 +145,7 @@ in options = providerOptions; }); }; - custom = mkOption { + custom = lib.mkOption { default = { }; description = '' Settings for custom DNS providers. @@ -156,11 +153,11 @@ in type = attrsOf (submodule { freeformType = attrs; options = providerOptions // { - ddns-server = mkOption { + ddns-server = lib.mkOption { description = "DDNS server name."; type = str; }; - ddns-path = mkOption { + ddns-path = lib.mkOption { description = '' DDNS server path. @@ -175,7 +172,7 @@ in }; }; }; - configFile = mkOption { + configFile = lib.mkOption { default = null; description = '' Configuration file for inadyn. @@ -238,12 +235,12 @@ in timers.inadyn.timerConfig.Persistent = true; }; - users.users.inadyn = mkIf (cfg.user == "inadyn") { + users.users.inadyn = lib.mkIf (cfg.user == "inadyn") { group = cfg.group; isSystemUser = true; }; - users.groups = mkIf (cfg.group == "inadyn") { + users.groups = lib.mkIf (cfg.group == "inadyn") { inadyn = { }; }; }; From aa27551b009d69ef08ec973aa0ba164cfba1ef07 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:10 +0200 Subject: [PATCH 202/236] nixos/services.iodine: remove `with lib;` --- nixos/modules/services/networking/iodine.nix | 74 +++++++++----------- 1 file changed, 35 insertions(+), 39 deletions(-) diff --git a/nixos/modules/services/networking/iodine.nix b/nixos/modules/services/networking/iodine.nix index c474f5f278bf..2bdfa6f1b844 100644 --- a/nixos/modules/services/networking/iodine.nix +++ b/nixos/modules/services/networking/iodine.nix @@ -1,24 +1,20 @@ # NixOS module for iodine, ip over dns daemon - { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.iodine; iodinedUser = "iodined"; /* is this path made unreadable by ProtectHome = true ? */ - isProtected = x: hasPrefix "/root" x || hasPrefix "/home" x; + isProtected = x: lib.hasPrefix "/root" x || lib.hasPrefix "/home" x; in { imports = [ - (mkRenamedOptionModule [ "services" "iodined" "enable" ] [ "services" "iodine" "server" "enable" ]) - (mkRenamedOptionModule [ "services" "iodined" "domain" ] [ "services" "iodine" "server" "domain" ]) - (mkRenamedOptionModule [ "services" "iodined" "ip" ] [ "services" "iodine" "server" "ip" ]) - (mkRenamedOptionModule [ "services" "iodined" "extraConfig" ] [ "services" "iodine" "server" "extraConfig" ]) - (mkRemovedOptionModule [ "services" "iodined" "client" ] "") + (lib.mkRenamedOptionModule [ "services" "iodined" "enable" ] [ "services" "iodine" "server" "enable" ]) + (lib.mkRenamedOptionModule [ "services" "iodined" "domain" ] [ "services" "iodine" "server" "domain" ]) + (lib.mkRenamedOptionModule [ "services" "iodined" "ip" ] [ "services" "iodine" "server" "ip" ]) + (lib.mkRenamedOptionModule [ "services" "iodined" "extraConfig" ] [ "services" "iodine" "server" "extraConfig" ]) + (lib.mkRemovedOptionModule [ "services" "iodined" "client" ] "") ]; ### configuration @@ -26,7 +22,7 @@ in options = { services.iodine = { - clients = mkOption { + clients = lib.mkOption { default = {}; description = '' Each attribute of this option defines a systemd service that @@ -36,7 +32,7 @@ in where «name» is the name of the corresponding attribute name. ''; - example = literalExpression '' + example = lib.literalExpression '' { foo = { server = "tunnel.mdomain.com"; @@ -45,33 +41,33 @@ in } } ''; - type = types.attrsOf ( - types.submodule ( + type = lib.types.attrsOf ( + lib.types.submodule ( { options = { - server = mkOption { - type = types.str; + server = lib.mkOption { + type = lib.types.str; default = ""; description = "Hostname of server running iodined"; example = "tunnel.mydomain.com"; }; - relay = mkOption { - type = types.str; + relay = lib.mkOption { + type = lib.types.str; default = ""; description = "DNS server to use as an intermediate relay to the iodined server"; example = "8.8.8.8"; }; - extraConfig = mkOption { - type = types.str; + extraConfig = lib.mkOption { + type = lib.types.str; default = ""; description = "Additional command line parameters"; example = "-l 192.168.1.10 -p 23"; }; - passwordFile = mkOption { - type = types.str; + passwordFile = lib.mkOption { + type = lib.types.str; default = ""; description = "Path to a file containing the password."; }; @@ -82,35 +78,35 @@ in }; server = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = "enable iodined server"; }; - ip = mkOption { - type = types.str; + ip = lib.mkOption { + type = lib.types.str; default = ""; description = "The assigned ip address or ip range"; example = "172.16.10.1/24"; }; - domain = mkOption { - type = types.str; + domain = lib.mkOption { + type = lib.types.str; default = ""; description = "Domain or subdomain of which nameservers point to us"; example = "tunnel.mydomain.com"; }; - extraConfig = mkOption { - type = types.str; + extraConfig = lib.mkOption { + type = lib.types.str; default = ""; description = "Additional command line parameters"; example = "-l 192.168.1.10 -p 23"; }; - passwordFile = mkOption { - type = types.str; + passwordFile = lib.mkOption { + type = lib.types.str; default = ""; description = "File that contains password"; }; @@ -121,7 +117,7 @@ in ### implementation - config = mkIf (cfg.server.enable || cfg.clients != {}) { + config = lib.mkIf (cfg.server.enable || cfg.clients != {}) { environment.systemPackages = [ pkgs.iodine ]; boot.kernelModules = [ "tun" ]; @@ -132,7 +128,7 @@ in description = "iodine client - ${name}"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; - script = "exec ${pkgs.iodine}/bin/iodine -f -u ${iodinedUser} ${cfg.extraConfig} ${optionalString (cfg.passwordFile != "") "< \"${builtins.toString cfg.passwordFile}\""} ${cfg.relay} ${cfg.server}"; + script = "exec ${pkgs.iodine}/bin/iodine -f -u ${iodinedUser} ${cfg.extraConfig} ${lib.optionalString (cfg.passwordFile != "") "< \"${builtins.toString cfg.passwordFile}\""} ${cfg.relay} ${cfg.server}"; serviceConfig = { RestartSec = "30s"; Restart = "always"; @@ -157,16 +153,16 @@ in }; }; in - listToAttrs ( - mapAttrsToList - (name: value: nameValuePair "iodine-${name}" (createIodineClientService name value)) + lib.listToAttrs ( + lib.mapAttrsToList + (name: value: lib.nameValuePair "iodine-${name}" (createIodineClientService name value)) cfg.clients ) // { - iodined = mkIf (cfg.server.enable) { + iodined = lib.mkIf (cfg.server.enable) { description = "iodine, ip over dns server daemon"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; - script = "exec ${pkgs.iodine}/bin/iodined -f -u ${iodinedUser} ${cfg.server.extraConfig} ${optionalString (cfg.server.passwordFile != "") "< \"${builtins.toString cfg.server.passwordFile}\""} ${cfg.server.ip} ${cfg.server.domain}"; + script = "exec ${pkgs.iodine}/bin/iodined -f -u ${iodinedUser} ${cfg.server.extraConfig} ${lib.optionalString (cfg.server.passwordFile != "") "< \"${builtins.toString cfg.server.passwordFile}\""} ${cfg.server.ip} ${cfg.server.domain}"; serviceConfig = { # Filesystem access ProtectSystem = "strict"; From 050c81941d1f982d7c800efb28f8e73ca66fa7ba Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:10 +0200 Subject: [PATCH 203/236] nixos/services.ivpn: remove `with lib;` --- nixos/modules/services/networking/ivpn.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/networking/ivpn.nix b/nixos/modules/services/networking/ivpn.nix index 535510f4e813..6482bbadaeb2 100644 --- a/nixos/modules/services/networking/ivpn.nix +++ b/nixos/modules/services/networking/ivpn.nix @@ -2,11 +2,10 @@ let cfg = config.services.ivpn; in -with lib; { options.services.ivpn = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' This option enables iVPN daemon. @@ -15,7 +14,7 @@ with lib; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { boot.kernelModules = [ "tun" ]; environment.systemPackages = with pkgs; [ ivpn ivpn-service ]; @@ -47,5 +46,5 @@ with lib; }; }; - meta.maintainers = with maintainers; [ ataraxiasjel ]; + meta.maintainers = with lib.maintainers; [ ataraxiasjel ]; } From 0cca8e97562e44d6ca0923fda53058465b43cf54 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:10 +0200 Subject: [PATCH 204/236] nixos/services.jicofo: remove `with lib;` --- nixos/modules/services/networking/jicofo.nix | 31 +++++++++----------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/nixos/modules/services/networking/jicofo.nix b/nixos/modules/services/networking/jicofo.nix index d4199c10fa2e..91906e417361 100644 --- a/nixos/modules/services/networking/jicofo.nix +++ b/nixos/modules/services/networking/jicofo.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.jicofo; @@ -10,10 +7,10 @@ let configFile = format.generate "jicofo.conf" cfg.config; in { - options.services.jicofo = with types; { - enable = mkEnableOption "Jitsi Conference Focus - component of Jitsi Meet"; + options.services.jicofo = with lib.types; { + enable = lib.mkEnableOption "Jitsi Conference Focus - component of Jitsi Meet"; - xmppHost = mkOption { + xmppHost = lib.mkOption { type = str; example = "localhost"; description = '' @@ -21,7 +18,7 @@ in ''; }; - xmppDomain = mkOption { + xmppDomain = lib.mkOption { type = nullOr str; example = "meet.example.org"; description = '' @@ -31,7 +28,7 @@ in ''; }; - componentPasswordFile = mkOption { + componentPasswordFile = lib.mkOption { type = str; example = "/run/keys/jicofo-component"; description = '' @@ -39,7 +36,7 @@ in ''; }; - userName = mkOption { + userName = lib.mkOption { type = str; default = "focus"; description = '' @@ -47,7 +44,7 @@ in ''; }; - userDomain = mkOption { + userDomain = lib.mkOption { type = str; example = "auth.meet.example.org"; description = '' @@ -55,7 +52,7 @@ in ''; }; - userPasswordFile = mkOption { + userPasswordFile = lib.mkOption { type = str; example = "/run/keys/jicofo-user"; description = '' @@ -63,7 +60,7 @@ in ''; }; - bridgeMuc = mkOption { + bridgeMuc = lib.mkOption { type = str; example = "jvbbrewery@internal.meet.example.org"; description = '' @@ -71,10 +68,10 @@ in ''; }; - config = mkOption { + config = lib.mkOption { type = format.type; default = { }; - example = literalExpression '' + example = lib.literalExpression '' { jicofo.bridge.max-bridge-participants = 42; } @@ -85,7 +82,7 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { services.jicofo.config = { jicofo = { bridge.brewery-jid = cfg.bridgeMuc; @@ -120,7 +117,7 @@ in restartTriggers = [ configFile ]; - environment.JAVA_SYS_PROPS = concatStringsSep " " (mapAttrsToList (k: v: "${k}=${toString v}") jicofoProps); + environment.JAVA_SYS_PROPS = lib.concatStringsSep " " (lib.mapAttrsToList (k: v: "${k}=${toString v}") jicofoProps); script = '' export JICOFO_AUTH_PASS="$(<${cfg.userPasswordFile})" @@ -154,7 +151,7 @@ in environment.etc."jitsi/jicofo/sip-communicator.properties".text = ""; environment.etc."jitsi/jicofo/logging.properties".source = - mkDefault "${pkgs.jicofo}/etc/jitsi/jicofo/logging.properties-journal"; + lib.mkDefault "${pkgs.jicofo}/etc/jitsi/jicofo/logging.properties-journal"; }; meta.maintainers = lib.teams.jitsi.members; From fee0a07c2865e6e9b2bd66e65dbda268f9da50cd Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:10 +0200 Subject: [PATCH 205/236] nixos/services.jigasi: remove `with lib;` --- nixos/modules/services/networking/jigasi.nix | 41 +++++++++----------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/nixos/modules/services/networking/jigasi.nix b/nixos/modules/services/networking/jigasi.nix index e701689031b1..d69d905788f4 100644 --- a/nixos/modules/services/networking/jigasi.nix +++ b/nixos/modules/services/networking/jigasi.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.jigasi; homeDirName = "jigasi-home"; @@ -10,10 +7,10 @@ let sipCommunicatorPropertiesFileUnsubstituted = "${pkgs.jigasi}/etc/jitsi/jigasi/sip-communicator.properties"; in { - options.services.jigasi = with types; { - enable = mkEnableOption "Jitsi Gateway to SIP - component of Jitsi Meet"; + options.services.jigasi = with lib.types; { + enable = lib.mkEnableOption "Jitsi Gateway to SIP - component of Jitsi Meet"; - xmppHost = mkOption { + xmppHost = lib.mkOption { type = str; example = "localhost"; description = '' @@ -21,7 +18,7 @@ in ''; }; - xmppDomain = mkOption { + xmppDomain = lib.mkOption { type = nullOr str; example = "meet.example.org"; description = '' @@ -31,7 +28,7 @@ in ''; }; - componentPasswordFile = mkOption { + componentPasswordFile = lib.mkOption { type = str; example = "/run/keys/jigasi-component"; description = '' @@ -39,7 +36,7 @@ in ''; }; - userName = mkOption { + userName = lib.mkOption { type = str; default = "callcontrol"; description = '' @@ -47,7 +44,7 @@ in ''; }; - userDomain = mkOption { + userDomain = lib.mkOption { type = str; example = "internal.meet.example.org"; description = '' @@ -55,7 +52,7 @@ in ''; }; - userPasswordFile = mkOption { + userPasswordFile = lib.mkOption { type = str; example = "/run/keys/jigasi-user"; description = '' @@ -63,7 +60,7 @@ in ''; }; - bridgeMuc = mkOption { + bridgeMuc = lib.mkOption { type = str; example = "jigasibrewery@internal.meet.example.org"; description = '' @@ -71,7 +68,7 @@ in ''; }; - defaultJvbRoomName = mkOption { + defaultJvbRoomName = lib.mkOption { type = str; default = ""; example = "siptest"; @@ -80,8 +77,8 @@ in ''; }; - environmentFile = mkOption { - type = types.nullOr types.path; + environmentFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; default = null; description = '' File containing environment variables to be passed to the jigasi service, @@ -93,10 +90,10 @@ in ''; }; - config = mkOption { + config = lib.mkOption { type = attrsOf str; default = { }; - example = literalExpression '' + example = lib.literalExpression '' { "org.jitsi.jigasi.auth.URL" = "XMPP:jitsi-meet.example.com"; } @@ -107,12 +104,12 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { services.jicofo.config = { "org.jitsi.jicofo.jigasi.BREWERY" = "${cfg.bridgeMuc}"; }; - services.jigasi.config = mapAttrs (_: v: mkDefault v) { + services.jigasi.config = lib.mapAttrs (_: v: lib.mkDefault v) { "org.jitsi.jigasi.BRIDGE_MUC" = cfg.bridgeMuc; }; @@ -186,7 +183,7 @@ in restartTriggers = [ config.environment.etc."jitsi/jigasi/sip-communicator.properties".source ]; - environment.JAVA_SYS_PROPS = concatStringsSep " " (mapAttrsToList (k: v: "${k}=${toString v}") jigasiProps); + environment.JAVA_SYS_PROPS = lib.concatStringsSep " " (lib.mapAttrsToList (k: v: "${k}=${toString v}") jigasiProps); script = '' ${pkgs.jigasi}/bin/jigasi \ @@ -228,9 +225,9 @@ in }; environment.etc."jitsi/jigasi/sip-communicator.properties".source = - mkDefault "${sipCommunicatorPropertiesFile}"; + lib.mkDefault "${sipCommunicatorPropertiesFile}"; environment.etc."jitsi/jigasi/logging.properties".source = - mkDefault "${stateDir}/logging.properties-journal"; + lib.mkDefault "${stateDir}/logging.properties-journal"; }; meta.maintainers = lib.teams.jitsi.members; From 6c50168c7c5ba31a73e27c7b3528b117923ae25a Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:10 +0200 Subject: [PATCH 206/236] nixos/services.jitsi-videobridge: remove `with lib;` --- .../services/networking/jitsi-videobridge.nix | 71 +++++++++---------- 1 file changed, 34 insertions(+), 37 deletions(-) diff --git a/nixos/modules/services/networking/jitsi-videobridge.nix b/nixos/modules/services/networking/jitsi-videobridge.nix index d73a9f256dfb..8c468e121299 100644 --- a/nixos/modules/services/networking/jitsi-videobridge.nix +++ b/nixos/modules/services/networking/jitsi-videobridge.nix @@ -1,16 +1,13 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.jitsi-videobridge; - attrsToArgs = a: concatStringsSep " " (mapAttrsToList (k: v: "${k}=${toString v}") a); + attrsToArgs = a: lib.concatStringsSep " " (lib.mapAttrsToList (k: v: "${k}=${toString v}") a); format = pkgs.formats.hocon { }; # We're passing passwords in environment variables that have names generated # from an attribute name, which may not be a valid bash identifier. - toVarName = s: "XMPP_PASSWORD_" + stringAsChars (c: if builtins.match "[A-Za-z0-9]" c != null then c else "_") s; + toVarName = s: "XMPP_PASSWORD_" + lib.stringAsChars (c: if builtins.match "[A-Za-z0-9]" c != null then c else "_") s; defaultJvbConfig = { videobridge = { @@ -25,7 +22,7 @@ let enabled = true; transports = [ { type = "muc"; } ]; }; - apis.xmpp-client.configs = flip mapAttrs cfg.xmppConfigs (name: xmppConfig: { + apis.xmpp-client.configs = lib.flip lib.mapAttrs cfg.xmppConfigs (name: xmppConfig: { hostname = xmppConfig.hostName; domain = xmppConfig.domain; username = xmppConfig.userName; @@ -39,21 +36,21 @@ let }; # Allow overriding leaves of the default config despite types.attrs not doing any merging. - jvbConfig = recursiveUpdate defaultJvbConfig cfg.config; + jvbConfig = lib.recursiveUpdate defaultJvbConfig cfg.config; in { imports = [ - (mkRemovedOptionModule [ "services" "jitsi-videobridge" "apis" ] + (lib.mkRemovedOptionModule [ "services" "jitsi-videobridge" "apis" ] "services.jitsi-videobridge.apis was broken and has been migrated into the boolean option services.jitsi-videobridge.colibriRestApi. It is set to false by default, setting it to true will correctly enable the private /colibri rest API." ) ]; - options.services.jitsi-videobridge = with types; { - enable = mkEnableOption "Jitsi Videobridge, a WebRTC compatible video router"; + options.services.jitsi-videobridge = with lib.types; { + enable = lib.mkEnableOption "Jitsi Videobridge, a WebRTC compatible video router"; - config = mkOption { + config = lib.mkOption { type = attrs; default = { }; - example = literalExpression '' + example = lib.literalExpression '' { videobridge = { ice.udp.port = 5000; @@ -72,14 +69,14 @@ in ''; }; - xmppConfigs = mkOption { + xmppConfigs = lib.mkOption { description = '' XMPP servers to connect to. See for more information. ''; default = { }; - example = literalExpression '' + example = lib.literalExpression '' { "localhost" = { hostName = "localhost"; @@ -92,14 +89,14 @@ in ''; type = attrsOf (submodule ({ name, ... }: { options = { - hostName = mkOption { + hostName = lib.mkOption { type = str; example = "xmpp.example.org"; description = '' Hostname of the XMPP server to connect to. Name of the attribute set is used by default. ''; }; - domain = mkOption { + domain = lib.mkOption { type = nullOr str; default = null; example = "auth.xmpp.example.org"; @@ -107,28 +104,28 @@ in Domain part of JID of the XMPP user, if it is different from hostName. ''; }; - userName = mkOption { + userName = lib.mkOption { type = str; default = "jvb"; description = '' User part of the JID. ''; }; - passwordFile = mkOption { + passwordFile = lib.mkOption { type = str; example = "/run/keys/jitsi-videobridge-xmpp1"; description = '' File containing the password for the user. ''; }; - mucJids = mkOption { + mucJids = lib.mkOption { type = str; example = "jvbbrewery@internal.xmpp.example.org"; description = '' JID of the MUC to join. JiCoFo needs to be configured to join the same MUC. ''; }; - mucNickname = mkOption { + mucNickname = lib.mkOption { # Upstream DEBs use UUID, let's use hostname instead. type = str; description = '' @@ -136,7 +133,7 @@ in nickname (aka resource part of the JID). By default, system hostname is used. ''; }; - disableCertificateVerification = mkOption { + disableCertificateVerification = lib.mkOption { type = bool; default = false; description = '' @@ -145,8 +142,8 @@ in }; }; config = { - hostName = mkDefault name; - mucNickname = mkDefault (builtins.replaceStrings [ "." ] [ "-" ] ( + hostName = lib.mkDefault name; + mucNickname = lib.mkDefault (builtins.replaceStrings [ "." ] [ "-" ] ( config.networking.fqdnOrHostName )); }; @@ -154,7 +151,7 @@ in }; nat = { - localAddress = mkOption { + localAddress = lib.mkOption { type = nullOr str; default = null; example = "192.168.1.42"; @@ -163,7 +160,7 @@ in ''; }; - publicAddress = mkOption { + publicAddress = lib.mkOption { type = nullOr str; default = null; example = "1.2.3.4"; @@ -173,7 +170,7 @@ in }; }; - extraProperties = mkOption { + extraProperties = lib.mkOption { type = attrsOf str; default = { }; description = '' @@ -181,7 +178,7 @@ in ''; }; - openFirewall = mkOption { + openFirewall = lib.mkOption { type = bool; default = false; description = '' @@ -189,7 +186,7 @@ in ''; }; - colibriRestApi = mkOption { + colibriRestApi = lib.mkOption { type = bool; description = '' Whether to enable the private rest API for the COLIBRI control interface. @@ -199,10 +196,10 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.groups.jitsi-meet = {}; - services.jitsi-videobridge.extraProperties = optionalAttrs (cfg.nat.localAddress != null) { + services.jitsi-videobridge.extraProperties = lib.optionalAttrs (cfg.nat.localAddress != null) { "org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS" = cfg.nat.localAddress; "org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS" = cfg.nat.publicAddress; }; @@ -215,7 +212,7 @@ in "-Dconfig.file" = format.generate "jvb.conf" jvbConfig; # Mitigate CVE-2021-44228 "-Dlog4j2.formatMsgNoLookups" = true; - } // (mapAttrs' (k: v: nameValuePair "-D${k}" v) cfg.extraProperties); + } // (lib.mapAttrs' (k: v: lib.nameValuePair "-D${k}" v) cfg.extraProperties); in { aliases = [ "jitsi-videobridge.service" ]; @@ -225,7 +222,7 @@ in environment.JAVA_SYS_PROPS = attrsToArgs jvbProps; - script = (concatStrings (mapAttrsToList (name: xmppConfig: + script = (lib.concatStrings (lib.mapAttrsToList (name: xmppConfig: "export ${toVarName name}=$(cat ${xmppConfig.passwordFile})\n" ) cfg.xmppConfigs)) + '' @@ -262,16 +259,16 @@ in }; environment.etc."jitsi/videobridge/logging.properties".source = - mkDefault "${pkgs.jitsi-videobridge}/etc/jitsi/videobridge/logging.properties-journal"; + lib.mkDefault "${pkgs.jitsi-videobridge}/etc/jitsi/videobridge/logging.properties-journal"; # (from videobridge2 .deb) # this sets the max, so that we can bump the JVB UDP single port buffer size. - boot.kernel.sysctl."net.core.rmem_max" = mkDefault 10485760; - boot.kernel.sysctl."net.core.netdev_max_backlog" = mkDefault 100000; + boot.kernel.sysctl."net.core.rmem_max" = lib.mkDefault 10485760; + boot.kernel.sysctl."net.core.netdev_max_backlog" = lib.mkDefault 100000; - networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall + networking.firewall.allowedTCPPorts = lib.mkIf cfg.openFirewall [ jvbConfig.videobridge.ice.tcp.port ]; - networking.firewall.allowedUDPPorts = mkIf cfg.openFirewall + networking.firewall.allowedUDPPorts = lib.mkIf cfg.openFirewall [ jvbConfig.videobridge.ice.udp.port ]; assertions = [{ From f3bb24eb64b3ee68f3c3ada08aed084264537133 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:11 +0200 Subject: [PATCH 207/236] nixos/services.jotta-cli: remove `with lib;` --- nixos/modules/services/networking/jotta-cli.nix | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/networking/jotta-cli.nix b/nixos/modules/services/networking/jotta-cli.nix index e0fa1ef332fe..566e7fc503a6 100644 --- a/nixos/modules/services/networking/jotta-cli.nix +++ b/nixos/modules/services/networking/jotta-cli.nix @@ -1,25 +1,22 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.jotta-cli; in { options = { services.jotta-cli = { - enable = mkEnableOption "Jottacloud Command-line Tool"; + enable = lib.mkEnableOption "Jottacloud Command-line Tool"; - options = mkOption { + options = lib.mkOption { default = [ "stdoutlog" "datadir" "%h/.jottad/" ]; example = [ ]; - type = with types; listOf str; + type = with lib.types; listOf str; description = "Command-line options passed to jottad."; }; package = lib.mkPackageOption pkgs "jotta-cli" { }; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.user.services.jottad = { description = "Jottacloud Command-line Tool daemon"; @@ -27,7 +24,7 @@ in { serviceConfig = { Type = "notify"; EnvironmentFile = "-%h/.config/jotta-cli/jotta-cli.env"; - ExecStart = "${lib.getExe' cfg.package "jottad"} ${concatStringsSep " " cfg.options}"; + ExecStart = "${lib.getExe' cfg.package "jottad"} ${lib.concatStringsSep " " cfg.options}"; Restart = "on-failure"; }; From 081c71df4bb5cd5c3cafc811fb20a7ed5f17c8e7 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:11 +0200 Subject: [PATCH 208/236] nixos/services.keybase: remove `with lib;` --- nixos/modules/services/networking/keybase.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/networking/keybase.nix b/nixos/modules/services/networking/keybase.nix index 495102cb7eee..9bb7ad3844a0 100644 --- a/nixos/modules/services/networking/keybase.nix +++ b/nixos/modules/services/networking/keybase.nix @@ -1,8 +1,6 @@ { config, lib, pkgs, ... }: -with lib; let cfg = config.services.keybase; - in { ###### interface @@ -11,8 +9,8 @@ in { services.keybase = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = "Whether to start the Keybase service."; }; @@ -22,7 +20,7 @@ in { ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { # Upstream: https://github.com/keybase/client/blob/master/packaging/linux/systemd/keybase.service systemd.user.services.keybase = { From 0d57426bae16ff62a96338f80a00f869139b5cbc Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:11 +0200 Subject: [PATCH 209/236] nixos/services.lambdabot: remove `with lib;` --- nixos/modules/services/networking/lambdabot.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/nixos/modules/services/networking/lambdabot.nix b/nixos/modules/services/networking/lambdabot.nix index a141962f512f..8c8e5648450c 100644 --- a/nixos/modules/services/networking/lambdabot.nix +++ b/nixos/modules/services/networking/lambdabot.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.lambdabot; @@ -18,16 +15,16 @@ in services.lambdabot = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = "Enable the Lambdabot IRC bot"; }; - package = mkPackageOption pkgs "lambdabot" { }; + package = lib.mkPackageOption pkgs "lambdabot" { }; - script = mkOption { - type = types.str; + script = lib.mkOption { + type = lib.types.str; default = ""; description = "Lambdabot script"; }; @@ -38,7 +35,7 @@ in ### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.lambdabot = { description = "Lambdabot daemon"; From 196a14a174ac6966e8996e03fa89a02bbcd1dd1c Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:11 +0200 Subject: [PATCH 210/236] nixos/services.lldpd: remove `with lib;` --- nixos/modules/services/networking/lldpd.nix | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/networking/lldpd.nix b/nixos/modules/services/networking/lldpd.nix index d5de9c45d84b..98a4cff265f1 100644 --- a/nixos/modules/services/networking/lldpd.nix +++ b/nixos/modules/services/networking/lldpd.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.lldpd; @@ -9,17 +6,17 @@ in { options.services.lldpd = { - enable = mkEnableOption "Link Layer Discovery Protocol Daemon"; + enable = lib.mkEnableOption "Link Layer Discovery Protocol Daemon"; - extraArgs = mkOption { - type = types.listOf types.str; + extraArgs = lib.mkOption { + type = lib.types.listOf lib.types.str; default = []; example = [ "-c" "-k" "-I eth0" ]; description = "List of command line parameters for lldpd"; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users._lldpd = { description = "lldpd user"; group = "_lldpd"; @@ -33,7 +30,7 @@ in systemd.services.lldpd = { wantedBy = [ "multi-user.target" ]; - environment.LLDPD_OPTIONS = concatStringsSep " " cfg.extraArgs; + environment.LLDPD_OPTIONS = lib.concatStringsSep " " cfg.extraArgs; }; }; } From 2e30f07cc0594f52b4622f773dc8cee264636ecc Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:11 +0200 Subject: [PATCH 211/236] nixos/services.logmein-hamachi: remove `with lib;` --- nixos/modules/services/networking/logmein-hamachi.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/nixos/modules/services/networking/logmein-hamachi.nix b/nixos/modules/services/networking/logmein-hamachi.nix index b7d960264d21..852101f09dff 100644 --- a/nixos/modules/services/networking/logmein-hamachi.nix +++ b/nixos/modules/services/networking/logmein-hamachi.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.logmein-hamachi; @@ -14,8 +11,8 @@ in options = { - services.logmein-hamachi.enable = mkOption { - type = types.bool; + services.logmein-hamachi.enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to enable LogMeIn Hamachi, a proprietary @@ -28,7 +25,7 @@ in ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.logmein-hamachi = { description = "LogMeIn Hamachi Daemon"; From 252e9bb1e753186d427d94d85aaa1caa3b93551a Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:11 +0200 Subject: [PATCH 212/236] nixos/services.lxd-image-server: remove `with lib;` --- .../services/networking/lxd-image-server.nix | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/nixos/modules/services/networking/lxd-image-server.nix b/nixos/modules/services/networking/lxd-image-server.nix index 93374a385a90..4712a3c1b3db 100644 --- a/nixos/modules/services/networking/lxd-image-server.nix +++ b/nixos/modules/services/networking/lxd-image-server.nix @@ -1,7 +1,4 @@ { config, pkgs, lib, ... }: - -with lib; - let cfg = config.services.lxd-image-server; format = pkgs.formats.toml {}; @@ -11,16 +8,16 @@ in { options = { services.lxd-image-server = { - enable = mkEnableOption "lxd-image-server"; + enable = lib.mkEnableOption "lxd-image-server"; - group = mkOption { - type = types.str; + group = lib.mkOption { + type = lib.types.str; description = "Group assigned to the user and the webroot directory."; default = "nginx"; example = "www-data"; }; - settings = mkOption { + settings = lib.mkOption { type = format.type; description = '' Configuration for lxd-image-server. @@ -31,9 +28,9 @@ in }; nginx = { - enable = mkEnableOption "nginx"; - domain = mkOption { - type = types.str; + enable = lib.mkEnableOption "nginx"; + domain = lib.mkOption { + type = lib.types.str; description = "Domain to use for nginx virtual host."; example = "images.example.org"; }; @@ -41,8 +38,8 @@ in }; }; - config = mkMerge [ - (mkIf (cfg.enable) { + config = lib.mkMerge [ + (lib.mkIf (cfg.enable) { users.users.lxd-image-server = { isSystemUser = true; group = cfg.group; @@ -88,12 +85,12 @@ in }; }) # this is separate so it can be enabled on mirrored hosts - (mkIf (cfg.nginx.enable) { + (lib.mkIf (cfg.nginx.enable) { # https://github.com/Avature/lxd-image-server/blob/master/resources/nginx/includes/lxd-image-server.pkg.conf services.nginx.virtualHosts = { "${cfg.nginx.domain}" = { forceSSL = true; - enableACME = mkDefault true; + enableACME = lib.mkDefault true; root = location; From 1cd7970bb8d97ba2f2b81ab11f724024174713ef Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:11 +0200 Subject: [PATCH 213/236] nixos/services.matterbridge: remove `with lib;` --- .../services/networking/matterbridge.nix | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/nixos/modules/services/networking/matterbridge.nix b/nixos/modules/services/networking/matterbridge.nix index 6ba15ba950fb..74b388d68408 100644 --- a/nixos/modules/services/networking/matterbridge.nix +++ b/nixos/modules/services/networking/matterbridge.nix @@ -1,7 +1,4 @@ { options, config, pkgs, lib, ... }: - -with lib; - let cfg = config.services.matterbridge; @@ -17,12 +14,12 @@ in { options = { services.matterbridge = { - enable = mkEnableOption "Matterbridge chat platform bridge"; + enable = lib.mkEnableOption "Matterbridge chat platform bridge"; - package = mkPackageOption pkgs "matterbridge" { }; + package = lib.mkPackageOption pkgs "matterbridge" { }; - configPath = mkOption { - type = with types; nullOr str; + configPath = lib.mkOption { + type = with lib.types; nullOr str; default = null; example = "/etc/nixos/matterbridge.toml"; description = '' @@ -30,8 +27,8 @@ in ''; }; - configFile = mkOption { - type = types.str; + configFile = lib.mkOption { + type = lib.types.str; example = '' # WARNING: as this file contains credentials, do not use this option! # It is kept only for backwards compatibility, and would cause your @@ -72,16 +69,16 @@ in The matterbridge configuration file in the TOML file format. ''; }; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = "matterbridge"; description = '' User which runs the matterbridge service. ''; }; - group = mkOption { - type = types.str; + group = lib.mkOption { + type = lib.types.str; default = "matterbridge"; description = '' Group which runs the matterbridge service. @@ -90,18 +87,18 @@ in }; }; - config = mkIf cfg.enable { - warnings = optional options.services.matterbridge.configFile.isDefined + config = lib.mkIf cfg.enable { + warnings = lib.optional options.services.matterbridge.configFile.isDefined "The option services.matterbridge.configFile is insecure and should be replaced with services.matterbridge.configPath"; - users.users = optionalAttrs (cfg.user == "matterbridge") + users.users = lib.optionalAttrs (cfg.user == "matterbridge") { matterbridge = { group = "matterbridge"; isSystemUser = true; }; }; - users.groups = optionalAttrs (cfg.group == "matterbridge") + users.groups = lib.optionalAttrs (cfg.group == "matterbridge") { matterbridge = { }; }; From 91cb7594d018e787b06d504e7ef60eee0cbed138 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:12 +0200 Subject: [PATCH 214/236] nixos/boot.initrd.clevis: remove `with lib;` --- nixos/modules/system/boot/clevis.nix | 37 +++++++++++++--------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/nixos/modules/system/boot/clevis.nix b/nixos/modules/system/boot/clevis.nix index ac881e953576..36328f19e7c6 100644 --- a/nixos/modules/system/boot/clevis.nix +++ b/nixos/modules/system/boot/clevis.nix @@ -1,54 +1,51 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.boot.initrd.clevis; systemd = config.boot.initrd.systemd; supportedFs = [ "zfs" "bcachefs" ]; in { - meta.maintainers = with maintainers; [ julienmalka camillemndn ]; + meta.maintainers = with lib.maintainers; [ julienmalka camillemndn ]; meta.doc = ./clevis.md; options = { - boot.initrd.clevis.enable = mkEnableOption "Clevis in initrd"; + boot.initrd.clevis.enable = lib.mkEnableOption "Clevis in initrd"; - boot.initrd.clevis.package = mkOption { - type = types.package; + boot.initrd.clevis.package = lib.mkOption { + type = lib.types.package; default = pkgs.clevis; defaultText = "pkgs.clevis"; description = "Clevis package"; }; - boot.initrd.clevis.devices = mkOption { + boot.initrd.clevis.devices = lib.mkOption { description = "Encrypted devices that need to be unlocked at boot using Clevis"; default = { }; - type = types.attrsOf (types.submodule ({ - options.secretFile = mkOption { + type = lib.types.attrsOf (lib.types.submodule ({ + options.secretFile = lib.mkOption { description = "Clevis JWE file used to decrypt the device at boot, in concert with the chosen pin (one of TPM2, Tang server, or SSS)."; - type = types.path; + type = lib.types.path; }; })); }; - boot.initrd.clevis.useTang = mkOption { + boot.initrd.clevis.useTang = lib.mkOption { description = "Whether the Clevis JWE file used to decrypt the devices uses a Tang server as a pin."; default = false; - type = types.bool; + type = lib.types.bool; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { # Implementation of clevis unlocking for the supported filesystems are located directly in the respective modules. - assertions = (attrValues (mapAttrs + assertions = (lib.attrValues (lib.mapAttrs (device: _: { - assertion = (any (fs: fs.device == device && (elem fs.fsType supportedFs) || (fs.fsType == "zfs" && hasPrefix "${device}/" fs.device)) config.system.build.fileSystems) || (hasAttr device config.boot.initrd.luks.devices); + assertion = (lib.any (fs: fs.device == device && (lib.elem fs.fsType supportedFs) || (fs.fsType == "zfs" && lib.hasPrefix "${device}/" fs.device)) config.system.build.fileSystems) || (lib.hasAttr device config.boot.initrd.luks.devices); message = '' No filesystem or LUKS device with the name ${device} is declared in your configuration.''; }) @@ -61,7 +58,7 @@ in else [ ]; boot.initrd = { - extraUtilsCommands = mkIf (!systemd.enable) '' + extraUtilsCommands = lib.mkIf (!systemd.enable) '' copy_bin_and_libs ${pkgs.jose}/bin/jose copy_bin_and_libs ${pkgs.curl}/bin/curl copy_bin_and_libs ${pkgs.bash}/bin/bash @@ -84,15 +81,15 @@ in sed -i $out/bin/clevis-decrypt-tpm2 -e 's,tpm2_,tpm2 ,' ''; - secrets = lib.mapAttrs' (name: value: nameValuePair "/etc/clevis/${name}.jwe" value.secretFile) cfg.devices; + secrets = lib.mapAttrs' (name: value: lib.nameValuePair "/etc/clevis/${name}.jwe" value.secretFile) cfg.devices; systemd = { - extraBin = mkIf systemd.enable { + extraBin = lib.mkIf systemd.enable { clevis = "${cfg.package}/bin/clevis"; curl = "${pkgs.curl}/bin/curl"; }; - storePaths = mkIf systemd.enable [ + storePaths = lib.mkIf systemd.enable [ cfg.package "${pkgs.jose}/bin/jose" "${pkgs.curl}/bin/curl" From 0a51fdb520065d897bf72d0ec798a7b80f8e287b Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:12 +0200 Subject: [PATCH 215/236] nixos/systemd.enableEmergencyMode: remove `with lib;` --- nixos/modules/system/boot/emergency-mode.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/nixos/modules/system/boot/emergency-mode.nix b/nixos/modules/system/boot/emergency-mode.nix index 717ab08f2534..11195dc13d10 100644 --- a/nixos/modules/system/boot/emergency-mode.nix +++ b/nixos/modules/system/boot/emergency-mode.nix @@ -1,16 +1,13 @@ { config, lib, ... }: - -with lib; - { ###### interface options = { - systemd.enableEmergencyMode = mkOption { + systemd.enableEmergencyMode = lib.mkOption { default = true; - type = types.bool; + type = lib.types.bool; description = '' Whether to enable emergency mode, which is an {command}`sulogin` shell started on the console if @@ -27,7 +24,7 @@ with lib; config = { - systemd.additionalUpstreamSystemUnits = optionals + systemd.additionalUpstreamSystemUnits = lib.optionals config.systemd.enableEmergencyMode [ "emergency.target" "emergency.service" ]; From 2f7c0a170f741ef3fe320fd83124ed5530e549d9 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:12 +0200 Subject: [PATCH 216/236] nixos/boot.loader.efi: remove `with lib;` --- nixos/modules/system/boot/loader/efi.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/nixos/modules/system/boot/loader/efi.nix b/nixos/modules/system/boot/loader/efi.nix index 6043c904c450..2725d3678d52 100644 --- a/nixos/modules/system/boot/loader/efi.nix +++ b/nixos/modules/system/boot/loader/efi.nix @@ -1,19 +1,16 @@ { lib, ... }: - -with lib; - { options.boot.loader.efi = { - canTouchEfiVariables = mkOption { + canTouchEfiVariables = lib.mkOption { default = false; - type = types.bool; + type = lib.types.bool; description = "Whether the installation process is allowed to modify EFI boot variables."; }; - efiSysMountPoint = mkOption { + efiSysMountPoint = lib.mkOption { default = "/boot"; - type = types.str; + type = lib.types.str; description = "Where the EFI System Partition is mounted."; }; }; From a83ffb43de504535df0f97b9d504b2c120529396 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:12 +0200 Subject: [PATCH 217/236] nixos/boot.tmp: remove `with lib;` --- nixos/modules/system/boot/tmp.nix | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/nixos/modules/system/boot/tmp.nix b/nixos/modules/system/boot/tmp.nix index 150f4adaf3ee..8287fa5f872f 100644 --- a/nixos/modules/system/boot/tmp.nix +++ b/nixos/modules/system/boot/tmp.nix @@ -1,29 +1,26 @@ { config, lib, ... }: - -with lib; - let cfg = config.boot.tmp; in { imports = [ - (mkRenamedOptionModule [ "boot" "cleanTmpDir" ] [ "boot" "tmp" "cleanOnBoot" ]) - (mkRenamedOptionModule [ "boot" "tmpOnTmpfs" ] [ "boot" "tmp" "useTmpfs" ]) - (mkRenamedOptionModule [ "boot" "tmpOnTmpfsSize" ] [ "boot" "tmp" "tmpfsSize" ]) + (lib.mkRenamedOptionModule [ "boot" "cleanTmpDir" ] [ "boot" "tmp" "cleanOnBoot" ]) + (lib.mkRenamedOptionModule [ "boot" "tmpOnTmpfs" ] [ "boot" "tmp" "useTmpfs" ]) + (lib.mkRenamedOptionModule [ "boot" "tmpOnTmpfsSize" ] [ "boot" "tmp" "tmpfsSize" ]) ]; options = { boot.tmp = { - cleanOnBoot = mkOption { - type = types.bool; + cleanOnBoot = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to delete all files in {file}`/tmp` during boot. ''; }; - tmpfsSize = mkOption { - type = types.oneOf [ types.str types.types.ints.positive ]; + tmpfsSize = lib.mkOption { + type = lib.types.oneOf [ lib.types.str lib.types.ints.positive ]; default = "50%"; description = '' Size of tmpfs in percentage. @@ -31,8 +28,8 @@ in ''; }; - useTmpfs = mkOption { - type = types.bool; + useTmpfs = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to mount a tmpfs on {file}`/tmp` during boot. @@ -48,12 +45,12 @@ in config = { # When changing remember to update /tmp mount in virtualisation/qemu-vm.nix - systemd.mounts = mkIf cfg.useTmpfs [ + systemd.mounts = lib.mkIf cfg.useTmpfs [ { what = "tmpfs"; where = "/tmp"; type = "tmpfs"; - mountConfig.Options = concatStringsSep "," [ + mountConfig.Options = lib.concatStringsSep "," [ "mode=1777" "strictatime" "rw" @@ -64,6 +61,6 @@ in } ]; - systemd.tmpfiles.rules = optional cfg.cleanOnBoot "D! /tmp 1777 root root"; + systemd.tmpfiles.rules = lib.optional cfg.cleanOnBoot "D! /tmp 1777 root root"; }; } From dd7ab59690f5f7f6a13eb49d1cb61fbf63a2b413 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:12 +0200 Subject: [PATCH 218/236] nixos/services.nfs: remove `with lib;` --- nixos/modules/tasks/filesystems/nfs.nix | 51 ++++++++++++------------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/nixos/modules/tasks/filesystems/nfs.nix b/nixos/modules/tasks/filesystems/nfs.nix index 765f10d33bfe..a81bec27bce2 100644 --- a/nixos/modules/tasks/filesystems/nfs.nix +++ b/nixos/modules/tasks/filesystems/nfs.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let inInitrd = config.boot.initrd.supportedFilesystems.nfs or false; @@ -16,15 +13,15 @@ let # merge parameters from services.nfs.server nfsConfSettings = - optionalAttrs (cfg.server.nproc != null) { + lib.optionalAttrs (cfg.server.nproc != null) { nfsd.threads = cfg.server.nproc; - } // optionalAttrs (cfg.server.hostName != null) { + } // lib.optionalAttrs (cfg.server.hostName != null) { nfsd.host= cfg.hostName; - } // optionalAttrs (cfg.server.mountdPort != null) { + } // lib.optionalAttrs (cfg.server.mountdPort != null) { mountd.port = cfg.server.mountdPort; - } // optionalAttrs (cfg.server.statdPort != null) { + } // lib.optionalAttrs (cfg.server.statdPort != null) { statd.port = cfg.server.statdPort; - } // optionalAttrs (cfg.server.lockdPort != null) { + } // lib.optionalAttrs (cfg.server.lockdPort != null) { lockd.port = cfg.server.lockdPort; lockd.udp-port = cfg.server.lockdPort; }; @@ -32,17 +29,17 @@ let nfsConfDeprecated = cfg.extraConfig + '' [nfsd] threads=${toString cfg.server.nproc} - ${optionalString (cfg.server.hostName != null) "host=${cfg.server.hostName}"} + ${lib.optionalString (cfg.server.hostName != null) "host=${cfg.server.hostName}"} ${cfg.server.extraNfsdConfig} [mountd] - ${optionalString (cfg.server.mountdPort != null) "port=${toString cfg.server.mountdPort}"} + ${lib.optionalString (cfg.server.mountdPort != null) "port=${toString cfg.server.mountdPort}"} [statd] - ${optionalString (cfg.server.statdPort != null) "port=${toString cfg.server.statdPort}"} + ${lib.optionalString (cfg.server.statdPort != null) "port=${toString cfg.server.statdPort}"} [lockd] - ${optionalString (cfg.server.lockdPort != null) '' + ${lib.optionalString (cfg.server.lockdPort != null) '' port=${toString cfg.server.lockdPort} udp-port=${toString cfg.server.lockdPort} ''} @@ -50,7 +47,7 @@ let nfsConfFile = if cfg.settings != {} - then format.generate "nfs.conf" (recursiveUpdate nfsConfSettings cfg.settings) + then format.generate "nfs.conf" (lib.recursiveUpdate nfsConfSettings cfg.settings) else pkgs.writeText "nfs.conf" nfsConfDeprecated; requestKeyConfFile = pkgs.writeText "request-key.conf" '' @@ -66,7 +63,7 @@ in options = { services.nfs = { - idmapd.settings = mkOption { + idmapd.settings = lib.mkOption { type = format.type; default = {}; description = '' @@ -74,7 +71,7 @@ in for details. ''; - example = literalExpression '' + example = lib.literalExpression '' { Translation = { GSS-Methods = "static,nsswitch"; @@ -85,21 +82,21 @@ in } ''; }; - settings = mkOption { + settings = lib.mkOption { type = format.type; default = {}; description = '' General configuration for NFS daemons and tools. See nfs.conf(5) and related man pages for details. ''; - example = literalExpression '' + example = lib.literalExpression '' { mountd.manage-gids = true; } ''; }; - extraConfig = mkOption { - type = types.lines; + extraConfig = lib.mkOption { + type = lib.types.lines; default = ""; description = '' Extra nfs-utils configuration. @@ -110,12 +107,12 @@ in ###### implementation - config = mkIf (config.boot.supportedFilesystems.nfs or config.boot.supportedFilesystems.nfs4 or false) { + config = lib.mkIf (config.boot.supportedFilesystems.nfs or config.boot.supportedFilesystems.nfs4 or false) { warnings = - (optional (cfg.extraConfig != "") '' + (lib.optional (cfg.extraConfig != "") '' `services.nfs.extraConfig` is deprecated. Use `services.nfs.settings` instead. - '') ++ (optional (cfg.server.extraNfsdConfig != "") '' + '') ++ (lib.optional (cfg.server.extraNfsdConfig != "") '' `services.nfs.server.extraNfsdConfig` is deprecated. Use `services.nfs.settings` instead. ''); assertions = [{ @@ -126,9 +123,9 @@ in services.rpcbind.enable = true; services.nfs.idmapd.settings = { - General = mkMerge [ + General = lib.mkMerge [ { Pipefs-Directory = rpcMountpoint; } - (mkIf (config.networking.domain != null) { Domain = config.networking.domain; }) + (lib.mkIf (config.networking.domain != null) { Domain = config.networking.domain; }) ]; Mapping = { Nobody-User = "nobody"; @@ -141,7 +138,7 @@ in system.fsPackages = [ pkgs.nfs-utils ]; - boot.initrd.kernelModules = mkIf inInitrd [ "nfs" ]; + boot.initrd.kernelModules = lib.mkIf inInitrd [ "nfs" ]; systemd.packages = [ pkgs.nfs-utils ]; @@ -167,12 +164,12 @@ in systemd.services.nfs-mountd = { restartTriggers = [ nfsConfFile ]; - enable = mkDefault false; + enable = lib.mkDefault false; }; systemd.services.nfs-server = { restartTriggers = [ nfsConfFile ]; - enable = mkDefault false; + enable = lib.mkDefault false; }; systemd.services.auth-rpcgss-module = From 3cd35f78308fc2276873aad28f1c1f63f7a2ed9a Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:12 +0200 Subject: [PATCH 219/236] nixos/virtualisation.docker.rootless: remove `with lib;` --- .../virtualisation/docker-rootless.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/nixos/modules/virtualisation/docker-rootless.nix b/nixos/modules/virtualisation/docker-rootless.nix index bad9136afd29..15b9f16eefef 100644 --- a/nixos/modules/virtualisation/docker-rootless.nix +++ b/nixos/modules/virtualisation/docker-rootless.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.virtualisation.docker.rootless; @@ -15,8 +12,8 @@ in ###### interface options.virtualisation.docker.rootless = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' This option enables docker in a rootless mode, a daemon that manages @@ -25,8 +22,8 @@ in ''; }; - setSocketVariable = mkOption { - type = types.bool; + setSocketVariable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Point {command}`DOCKER_HOST` to rootless Docker instance for @@ -34,7 +31,7 @@ in ''; }; - daemon.settings = mkOption { + daemon.settings = lib.mkOption { type = settingsFormat.type; default = { }; example = { @@ -47,15 +44,15 @@ in ''; }; - package = mkPackageOption pkgs "docker" { }; + package = lib.mkPackageOption pkgs "docker" { }; }; ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.systemPackages = [ cfg.package ]; - environment.extraInit = optionalString cfg.setSocketVariable '' + environment.extraInit = lib.optionalString cfg.setSocketVariable '' if [ -z "$DOCKER_HOST" -a -n "$XDG_RUNTIME_DIR" ]; then export DOCKER_HOST="unix://$XDG_RUNTIME_DIR/docker.sock" fi From 49fe5ca12cf77e40959a898772a4a9275e47263c Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:12 +0200 Subject: [PATCH 220/236] nixos/virtualisation.virtualbox.guest: remove `with lib;` --- .../virtualisation/virtualbox-guest.nix | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/nixos/modules/virtualisation/virtualbox-guest.nix b/nixos/modules/virtualisation/virtualbox-guest.nix index b4933cffa2c0..31222d553a34 100644 --- a/nixos/modules/virtualisation/virtualbox-guest.nix +++ b/nixos/modules/virtualisation/virtualbox-guest.nix @@ -1,9 +1,5 @@ # Module for VirtualBox guests. - { config, lib, pkgs, ... }: - -with lib; - let cfg = config.virtualisation.virtualbox.guest; kernel = config.boot.kernelPackages; @@ -32,38 +28,38 @@ let in { imports = [ - (mkRenamedOptionModule [ "virtualisation" "virtualbox" "guest" "draganddrop" ] [ "virtualisation" "virtualbox" "guest" "dragAndDrop" ]) + (lib.mkRenamedOptionModule [ "virtualisation" "virtualbox" "guest" "draganddrop" ] [ "virtualisation" "virtualbox" "guest" "dragAndDrop" ]) ]; options.virtualisation.virtualbox.guest = { - enable = mkOption { + enable = lib.mkOption { default = false; - type = types.bool; + type = lib.types.bool; description = "Whether to enable the VirtualBox service and other guest additions."; }; - clipboard = mkOption { + clipboard = lib.mkOption { default = true; - type = types.bool; + type = lib.types.bool; description = "Whether to enable clipboard support."; }; - seamless = mkOption { + seamless = lib.mkOption { default = true; - type = types.bool; + type = lib.types.bool; description = "Whether to enable seamless mode. When activated windows from the guest appear next to the windows of the host."; }; - dragAndDrop = mkOption { + dragAndDrop = lib.mkOption { default = true; - type = types.bool; + type = lib.types.bool; description = "Whether to enable drag and drop support."; }; }; ###### implementation - config = mkIf cfg.enable (mkMerge [ + config = lib.mkIf cfg.enable (lib.mkMerge [ { assertions = [{ assertion = pkgs.stdenv.hostPlatform.isx86; @@ -104,17 +100,17 @@ in systemd.user.services.virtualboxClientVmsvga = mkVirtualBoxUserService "--vmsvga-session"; } ( - mkIf cfg.clipboard { + lib.mkIf cfg.clipboard { systemd.user.services.virtualboxClientClipboard = mkVirtualBoxUserService "--clipboard"; } ) ( - mkIf cfg.seamless { + lib.mkIf cfg.seamless { systemd.user.services.virtualboxClientSeamless = mkVirtualBoxUserService "--seamless"; } ) ( - mkIf cfg.dragAndDrop { + lib.mkIf cfg.dragAndDrop { systemd.user.services.virtualboxClientDragAndDrop = mkVirtualBoxUserService "--draganddrop"; } ) From 217557441c37a026d23bbf4466bdd30d52d1b5d1 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:13 +0200 Subject: [PATCH 221/236] nixos/virtualisation.virtualbox.host: remove `with lib;` --- .../virtualisation/virtualbox-host.nix | 43 +++++++++---------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/nixos/modules/virtualisation/virtualbox-host.nix b/nixos/modules/virtualisation/virtualbox-host.nix index 4808652a542a..8820b4ff5a83 100644 --- a/nixos/modules/virtualisation/virtualbox-host.nix +++ b/nixos/modules/virtualisation/virtualbox-host.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.virtualisation.virtualbox.host; @@ -18,7 +15,7 @@ in { options.virtualisation.virtualbox.host = { - enable = mkEnableOption "VirtualBox" // { + enable = lib.mkEnableOption "VirtualBox" // { description = '' Whether to enable VirtualBox. @@ -29,7 +26,7 @@ in ''; }; - enableExtensionPack = mkEnableOption "VirtualBox extension pack" // { + enableExtensionPack = lib.mkEnableOption "VirtualBox extension pack" // { description = '' Whether to install the Oracle Extension Pack for VirtualBox. @@ -40,18 +37,18 @@ in ''; }; - package = mkPackageOption pkgs "virtualbox" { }; + package = lib.mkPackageOption pkgs "virtualbox" { }; - addNetworkInterface = mkOption { - type = types.bool; + addNetworkInterface = lib.mkOption { + type = lib.types.bool; default = true; description = '' Automatically set up a vboxnet0 host-only network interface. ''; }; - enableHardening = mkOption { - type = types.bool; + enableHardening = lib.mkOption { + type = lib.types.bool; default = true; description = '' Enable hardened VirtualBox, which ensures that only the binaries in the @@ -65,8 +62,8 @@ in ''; }; - headless = mkOption { - type = types.bool; + headless = lib.mkOption { + type = lib.types.bool; default = false; description = '' Use VirtualBox installation without GUI and Qt dependency. Useful to enable on servers @@ -74,16 +71,16 @@ in ''; }; - enableWebService = mkOption { - type = types.bool; + enableWebService = lib.mkOption { + type = lib.types.bool; default = false; description = '' Build VirtualBox web service tool (vboxwebsrv) to allow managing VMs via other webpage frontend tools. Useful for headless servers. ''; }; - enableKvm = mkOption { - type = types.bool; + enableKvm = lib.mkOption { + type = lib.types.bool; default = false; description = '' Enable KVM support for VirtualBox. This increases compatibility with Linux kernel versions, because the VirtualBox kernel modules @@ -96,8 +93,8 @@ in }; }; - config = mkIf cfg.enable (mkMerge [{ - warnings = mkIf (pkgs.config.virtualbox.enableExtensionPack or false) + config = lib.mkIf cfg.enable (lib.mkMerge [{ + warnings = lib.mkIf (pkgs.config.virtualbox.enableExtensionPack or false) ["'nixpkgs.virtualbox.enableExtensionPack' has no effect, please use 'virtualisation.virtualbox.host.enableExtensionPack'"]; environment.systemPackages = [ virtualbox ]; @@ -118,7 +115,7 @@ in "VBoxSDL" "VirtualBoxVM" ]); - in mkIf cfg.enableHardening + in lib.mkIf cfg.enableHardening (builtins.listToAttrs (map (x: { name = x; value = mkSuid x; }) executables)); users.groups.vboxusers.gid = config.ids.gids.vboxusers; @@ -130,14 +127,14 @@ in SUBSYSTEM=="usb_device", ACTION=="remove", RUN+="${virtualbox}/libexec/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor" SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN+="${virtualbox}/libexec/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor" ''; - } (mkIf cfg.enableKvm { + } (lib.mkIf cfg.enableKvm { assertions = [ { assertion = !cfg.addNetworkInterface; message = "VirtualBox KVM only supports standard NAT networking for VMs. Please turn off virtualisation.virtualbox.host.addNetworkInterface."; } ]; - }) (mkIf (!cfg.enableKvm) { + }) (lib.mkIf (!cfg.enableKvm) { boot.kernelModules = [ "vboxdrv" "vboxnetadp" "vboxnetflt" ]; boot.extraModulePackages = [ kernelModules ]; @@ -149,7 +146,7 @@ in ''; # Since we lack the right setuid/setcap binaries, set up a host-only network by default. - }) (mkIf cfg.addNetworkInterface { + }) (lib.mkIf cfg.addNetworkInterface { systemd.services.vboxnet0 = { description = "VirtualBox vboxnet0 Interface"; requires = [ "dev-vboxnetctl.device" ]; @@ -177,7 +174,7 @@ in # Make sure NetworkManager won't assume this interface being up # means we have internet access. networking.networkmanager.unmanaged = ["vboxnet0"]; - }) (mkIf config.networking.useNetworkd { + }) (lib.mkIf config.networking.useNetworkd { systemd.network.networks."40-vboxnet0".extraConfig = '' [Link] RequiredForOnline=no From 7d7e294262b585b33737d6565aa4a08bf4c093a8 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:13 +0200 Subject: [PATCH 222/236] nixos/virtualbox-image: remove `with lib;` --- .../virtualisation/virtualbox-image.nix | 71 +++++++++---------- 1 file changed, 34 insertions(+), 37 deletions(-) diff --git a/nixos/modules/virtualisation/virtualbox-image.nix b/nixos/modules/virtualisation/virtualbox-image.nix index 1c8b9b99c01c..4ab5d17ecd49 100644 --- a/nixos/modules/virtualisation/virtualbox-image.nix +++ b/nixos/modules/virtualisation/virtualbox-image.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.virtualbox; @@ -10,51 +7,51 @@ in { options = { virtualbox = { - baseImageSize = mkOption { - type = with types; either (enum [ "auto" ]) int; + baseImageSize = lib.mkOption { + type = with lib.types; either (enum [ "auto" ]) int; default = "auto"; example = 50 * 1024; description = '' The size of the VirtualBox base image in MiB. ''; }; - baseImageFreeSpace = mkOption { - type = with types; int; + baseImageFreeSpace = lib.mkOption { + type = with lib.types; int; default = 30 * 1024; description = '' Free space in the VirtualBox base image in MiB. ''; }; - memorySize = mkOption { - type = types.int; + memorySize = lib.mkOption { + type = lib.types.int; default = 1536; description = '' The amount of RAM the VirtualBox appliance can use in MiB. ''; }; - vmDerivationName = mkOption { - type = types.str; + vmDerivationName = lib.mkOption { + type = lib.types.str; default = "nixos-ova-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}"; description = '' The name of the derivation for the VirtualBox appliance. ''; }; - vmName = mkOption { - type = types.str; + vmName = lib.mkOption { + type = lib.types.str; default = "${config.system.nixos.distroName} ${config.system.nixos.label} (${pkgs.stdenv.hostPlatform.system})"; description = '' The name of the VirtualBox appliance. ''; }; - vmFileName = mkOption { - type = types.str; + vmFileName = lib.mkOption { + type = lib.types.str; default = "nixos-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.ova"; description = '' The file name of the VirtualBox appliance. ''; }; - params = mkOption { - type = with types; attrsOf (oneOf [ str int bool (listOf str) ]); + params = lib.mkOption { + type = with lib.types; attrsOf (oneOf [ str int bool (listOf str) ]); example = { audio = "alsa"; rtcuseutc = "on"; @@ -66,8 +63,8 @@ in { Run `VBoxManage modifyvm --help` to see more options. ''; }; - exportParams = mkOption { - type = with types; listOf (oneOf [ str int bool (listOf str) ]); + exportParams = lib.mkOption { + type = with lib.types; listOf (oneOf [ str int bool (listOf str) ]); example = [ "--vsys" "0" "--vendor" "ACME Inc." ]; @@ -78,7 +75,7 @@ in { Run `VBoxManage export --help` to see more options. ''; }; - extraDisk = mkOption { + extraDisk = lib.mkOption { description = '' Optional extra disk/hdd configuration. The disk will be an 'ext4' partition on a separate file. @@ -89,26 +86,26 @@ in { mountPoint = "/home/demo/storage"; size = 100 * 1024; }; - type = types.nullOr (types.submodule { + type = lib.types.nullOr (lib.types.submodule { options = { - size = mkOption { - type = types.int; + size = lib.mkOption { + type = lib.types.int; description = "Size in MiB"; }; - label = mkOption { - type = types.str; + label = lib.mkOption { + type = lib.types.str; default = "vm-extra-storage"; description = "Label for the disk partition"; }; - mountPoint = mkOption { - type = types.str; + mountPoint = lib.mkOption { + type = lib.types.str; description = "Path where to mount this disk."; }; }; }); }; - postExportCommands = mkOption { - type = types.lines; + postExportCommands = lib.mkOption { + type = lib.types.lines; default = ""; example = '' ${pkgs.cot}/bin/cot edit-hardware "$fn" \ @@ -124,8 +121,8 @@ in { Extra commands to run after exporting the OVA to `$fn`. ''; }; - storageController = mkOption { - type = with types; attrsOf (oneOf [ str int bool (listOf str) ]); + storageController = lib.mkOption { + type = with lib.types; attrsOf (oneOf [ str int bool (listOf str) ]); example = { name = "SCSI"; add = "scsi"; @@ -152,8 +149,8 @@ in { config = { - virtualbox.params = mkMerge [ - (mapAttrs (name: mkDefault) { + virtualbox.params = lib.mkMerge [ + (lib.mapAttrs (name: lib.mkDefault) { acpi = "on"; vram = 32; nictype1 = "virtio"; @@ -167,7 +164,7 @@ in { usbehci = "on"; mouse = "usbtablet"; }) - (mkIf (pkgs.stdenv.hostPlatform.system == "i686-linux") { pae = "on"; }) + (lib.mkIf (pkgs.stdenv.hostPlatform.system == "i686-linux") { pae = "on"; }) ]; system.build.virtualBoxOVA = import ../../lib/make-disk-image.nix { @@ -186,7 +183,7 @@ in { echo "converting image to VirtualBox format..." VBoxManage convertfromraw $diskImage disk.vdi - ${optionalString (cfg.extraDisk != null) '' + ${lib.optionalString (cfg.extraDisk != null) '' echo "creating extra disk: data-disk.raw" dataDiskImage=data-disk.raw truncate -s ${toString cfg.extraDisk.size}M $dataDiskImage @@ -210,7 +207,7 @@ in { VBoxManage storagectl "$vmName" ${lib.cli.toGNUCommandLineShell { } cfg.storageController} VBoxManage storageattach "$vmName" --storagectl ${cfg.storageController.name} --port 0 --device 0 --type hdd \ --medium disk.vdi - ${optionalString (cfg.extraDisk != null) '' + ${lib.optionalString (cfg.extraDisk != null) '' VBoxManage storageattach "$vmName" --storagectl ${cfg.storageController.name} --port 1 --device 0 --type hdd \ --medium data-disk.vdi ''} @@ -218,7 +215,7 @@ in { echo "exporting VirtualBox VM..." mkdir -p $out fn="$out/${cfg.vmFileName}" - VBoxManage export "$vmName" --output "$fn" --options manifest ${escapeShellArgs cfg.exportParams} + VBoxManage export "$vmName" --output "$fn" --options manifest ${lib.escapeShellArgs cfg.exportParams} ${cfg.postExportCommands} rm -v $diskImage From f1dfc8d3636dfbde5b54a4c729eb41f221171cc7 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:13 +0200 Subject: [PATCH 223/236] nixos/virtualisation.vmware.guest: remove `with lib;` --- nixos/modules/virtualisation/vmware-guest.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/nixos/modules/virtualisation/vmware-guest.nix b/nixos/modules/virtualisation/vmware-guest.nix index be706efcea3a..c80181f287b3 100644 --- a/nixos/modules/virtualisation/vmware-guest.nix +++ b/nixos/modules/virtualisation/vmware-guest.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.virtualisation.vmware.guest; open-vm-tools = if cfg.headless then pkgs.open-vm-tools-headless else pkgs.open-vm-tools; @@ -9,20 +6,20 @@ let in { imports = [ - (mkRenamedOptionModule [ "services" "vmwareGuest" ] [ "virtualisation" "vmware" "guest" ]) + (lib.mkRenamedOptionModule [ "services" "vmwareGuest" ] [ "virtualisation" "vmware" "guest" ]) ]; options.virtualisation.vmware.guest = { - enable = mkEnableOption "VMWare Guest Support"; - headless = mkOption { - type = types.bool; + enable = lib.mkEnableOption "VMWare Guest Support"; + headless = lib.mkOption { + type = lib.types.bool; default = !config.services.xserver.enable; defaultText = "!config.services.xserver.enable"; description = "Whether to disable X11-related features."; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { assertions = [ { assertion = pkgs.stdenv.hostPlatform.isx86 || pkgs.stdenv.hostPlatform.isAarch64; message = "VMWare guest is not currently supported on ${pkgs.stdenv.hostPlatform.system}"; @@ -42,7 +39,7 @@ in }; # Mount the vmblock for drag-and-drop and copy-and-paste. - systemd.mounts = mkIf (!cfg.headless) [ + systemd.mounts = lib.mkIf (!cfg.headless) [ { description = "VMware vmblock fuse mount"; documentation = [ "https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/vmblock-fuse/design.txt" ]; @@ -55,7 +52,7 @@ in } ]; - security.wrappers.vmware-user-suid-wrapper = mkIf (!cfg.headless) { + security.wrappers.vmware-user-suid-wrapper = lib.mkIf (!cfg.headless) { setuid = true; owner = "root"; group = "root"; @@ -64,7 +61,7 @@ in environment.etc.vmware-tools.source = "${open-vm-tools}/etc/vmware-tools/*"; - services.xserver = mkIf (!cfg.headless) { + services.xserver = lib.mkIf (!cfg.headless) { modules = lib.optionals pkgs.stdenv.hostPlatform.isx86 [ xf86inputvmmouse ]; config = lib.optionalString (pkgs.stdenv.hostPlatform.isx86) '' From e91370caa57e0d1a7d6c544f020341d1de794c36 Mon Sep 17 00:00:00 2001 From: Bruno Rodrigues Date: Sun, 15 Sep 2024 10:59:21 +0200 Subject: [PATCH 224/236] python312Packages.great-tables: add python312Packages.shiny for tests --- pkgs/development/python-modules/great-tables/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/great-tables/default.nix b/pkgs/development/python-modules/great-tables/default.nix index 6283a429f8b3..14f242ed0683 100644 --- a/pkgs/development/python-modules/great-tables/default.nix +++ b/pkgs/development/python-modules/great-tables/default.nix @@ -25,6 +25,7 @@ pytestCheckHook, pytest-cov-stub, requests, + shiny, syrupy, }: @@ -66,13 +67,10 @@ buildPythonPackage rec { pytestCheckHook pytest-cov-stub requests + shiny syrupy ]; - disabledTestPaths = [ - "tests/test_shiny.py" # requires `shiny` python package, not in Nixpkgs - ]; - disabledTests = [ # require selenium with chrome driver: "test_save_image_file" From b4b8ef5bb6f1d8b31aedf33b0962fd31fc2e09a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 15 Sep 2024 11:02:11 +0200 Subject: [PATCH 225/236] nixos/network-filesystems/samba: fix eval --- nixos/modules/services/network-filesystems/samba.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/network-filesystems/samba.nix b/nixos/modules/services/network-filesystems/samba.nix index 457a68d32973..8df25e6373ca 100644 --- a/nixos/modules/services/network-filesystems/samba.nix +++ b/nixos/modules/services/network-filesystems/samba.nix @@ -3,7 +3,7 @@ let cfg = config.services.samba; settingsFormat = pkgs.formats.ini { - listToValue = lib.concatMapStringsSep " " (generators.mkValueStringDefault { }); + listToValue = lib.concatMapStringsSep " " (lib.generators.mkValueStringDefault { }); }; # Ensure the global section is always first globalConfigFile = settingsFormat.generate "smb-global.conf" { global = cfg.settings.global; }; From 4ebe4a2089977ff5ab3bdc024adc37878cd8e424 Mon Sep 17 00:00:00 2001 From: nicoo Date: Sat, 14 Sep 2024 22:03:55 +0000 Subject: [PATCH 226/236] maintainers/scripts/sha-to-sri: ignore `gemset.nix` files --- maintainers/scripts/sha-to-sri.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/maintainers/scripts/sha-to-sri.py b/maintainers/scripts/sha-to-sri.py index 971c24fe1fff..bb02a84e7cac 100755 --- a/maintainers/scripts/sha-to-sri.py +++ b/maintainers/scripts/sha-to-sri.py @@ -201,6 +201,10 @@ def fileToSRI(p: Path): _SKIP_RE = re.compile("(generated by)|(do not edit)", re.IGNORECASE) +_IGNORE = frozenset({ + "gemset.nix", + "yarn.nix", +}) if __name__ == "__main__": from sys import argv @@ -239,7 +243,7 @@ if __name__ == "__main__": logger.info("Recursing into directory") for q in p.glob("**/*.nix"): if q.is_file(): - if q.name == "yarn.nix" or q.name.find("generated") != -1: + if q.name in _IGNORE or q.name.find("generated") != -1: logger.info("File looks autogenerated, skipping!") continue From 2641d97cbf96e0b4caf1733edc47cf1298de0960 Mon Sep 17 00:00:00 2001 From: nicoo Date: Sat, 14 Sep 2024 21:47:11 +0000 Subject: [PATCH 227/236] pkgs/by-name: Convert hashes to SRI format Reproduction script: # Bulk rewrite ./maintainers/scripts/sha-to-sri.py pkgs/by-name # Revert some packages which will need manual intervention for n in amdvlk azure-cli cargo-profiler corefonts flatito fluxcd gist perf_data_converter protoc-gen-js solana-cli swt verible; do git checkout -- "pkgs/by-name/${n:0:2}/${n}" done --- pkgs/by-name/_4/_4d-minesweeper/package.nix | 2 +- pkgs/by-name/ac/accerciser/package.nix | 2 +- pkgs/by-name/ad/adafruit-nrfutil/package.nix | 4 +- pkgs/by-name/ai/aisleriot/package.nix | 2 +- .../al/alephone-apotheosis-x/package.nix | 2 +- pkgs/by-name/al/alephone-durandal/package.nix | 2 +- pkgs/by-name/al/alephone-eternal/package.nix | 2 +- pkgs/by-name/al/alephone-evil/package.nix | 2 +- pkgs/by-name/al/alephone-infinity/package.nix | 2 +- pkgs/by-name/al/alephone-marathon/package.nix | 2 +- .../package.nix | 2 +- pkgs/by-name/al/alephone-pheonix/package.nix | 2 +- pkgs/by-name/al/alephone-red/package.nix | 2 +- .../by-name/al/alephone-rubicon-x/package.nix | 2 +- pkgs/by-name/al/alephone-yuge/package.nix | 2 +- pkgs/by-name/al/alsa-firmware/package.nix | 4 +- pkgs/by-name/al/alsa-oss/package.nix | 2 +- .../by-name/al/alsa-topology-conf/package.nix | 2 +- pkgs/by-name/al/alsa-utils/package.nix | 2 +- pkgs/by-name/am/am2rlauncher/package.nix | 2 +- pkgs/by-name/am/amfora/package.nix | 2 +- pkgs/by-name/an/anyk/package.nix | 6 +- pkgs/by-name/ap/apostrophe/package.nix | 2 +- pkgs/by-name/ap/aprx/package.nix | 2 +- .../ar/arma3-unix-launcher/package.nix | 6 +- .../as/asc-key-to-qr-code-gif/package.nix | 2 +- pkgs/by-name/as/assemblyscript/package.nix | 2 +- pkgs/by-name/at/atomix/package.nix | 2 +- pkgs/by-name/au/autopsy/package.nix | 2 +- pkgs/by-name/av/avr-sim/package.nix | 2 +- pkgs/by-name/aw/aws-vault/package.nix | 2 +- pkgs/by-name/ba/babeltrace/package.nix | 2 +- pkgs/by-name/ba/banana-cursor/package.nix | 2 +- pkgs/by-name/be/bee/package.nix | 2 +- pkgs/by-name/be/betterdiscordctl/package.nix | 2 +- pkgs/by-name/bl/blendfarm/deps.nix | 366 +++++++++--------- pkgs/by-name/bl/bluetuith/package.nix | 2 +- pkgs/by-name/bm/bmaptool/package.nix | 2 +- pkgs/by-name/bo/boogie/package.nix | 2 +- pkgs/by-name/bs/bsc/package.nix | 2 +- pkgs/by-name/bu/buckle/package.nix | 2 +- pkgs/by-name/bu/buildkite-agent/package.nix | 2 +- pkgs/by-name/bu/bundix/package.nix | 2 +- pkgs/by-name/bu/bupc/package.nix | 2 +- pkgs/by-name/c2/c2patool/package.nix | 2 +- pkgs/by-name/ca/cardboard/package.nix | 4 +- pkgs/by-name/ca/caribou/package.nix | 10 +- pkgs/by-name/ca/catppuccin/package.nix | 2 +- pkgs/by-name/ce/cemu/package.nix | 2 +- pkgs/by-name/ch/cheese/package.nix | 2 +- pkgs/by-name/ch/chow-centaur/package.nix | 2 +- pkgs/by-name/ci/cidr-merger/package.nix | 2 +- .../by-name/ci/ciscoPacketTracer7/package.nix | 2 +- pkgs/by-name/ci/civo/package.nix | 2 +- .../by-name/cl/clangbuildanalyzer/package.nix | 2 +- pkgs/by-name/cl/cli11/package.nix | 2 +- pkgs/by-name/cl/clipper2/package.nix | 2 +- pkgs/by-name/cl/cljfmt/package.nix | 2 +- pkgs/by-name/cl/cloudflare-utils/package.nix | 2 +- pkgs/by-name/co/codux/package.nix | 2 +- pkgs/by-name/co/coinmp/package.nix | 2 +- pkgs/by-name/co/connman-gtk/package.nix | 2 +- pkgs/by-name/co/connman-ncurses/package.nix | 4 +- pkgs/by-name/co/connman-notify/package.nix | 2 +- pkgs/by-name/co/connman_dmenu/package.nix | 2 +- pkgs/by-name/co/cosmic-greeter/package.nix | 2 +- pkgs/by-name/co/cosmic-icons/package.nix | 2 +- pkgs/by-name/co/cosmic-launcher/package.nix | 2 +- pkgs/by-name/co/cosmic-panel/package.nix | 2 +- pkgs/by-name/co/cosmic-session/package.nix | 2 +- pkgs/by-name/co/coyim/package.nix | 2 +- pkgs/by-name/co/coz/package.nix | 2 +- pkgs/by-name/cs/csvq/package.nix | 2 +- pkgs/by-name/da/dapr-cli/package.nix | 2 +- pkgs/by-name/da/darktable/package.nix | 2 +- pkgs/by-name/db/dbqn/package.nix | 2 +- pkgs/by-name/dc/dconf-editor/package.nix | 2 +- pkgs/by-name/de/dep-tree/package.nix | 8 +- pkgs/by-name/de/devhelp/package.nix | 2 +- pkgs/by-name/di/direnv/package.nix | 2 +- pkgs/by-name/di/discord-gamesdk/package.nix | 2 +- pkgs/by-name/di/dispad/package.nix | 2 +- .../do/docker-credential-gcr/package.nix | 2 +- pkgs/by-name/do/docopts/package.nix | 4 +- pkgs/by-name/do/doppler/package.nix | 2 +- pkgs/by-name/do/dovecot_exporter/package.nix | 4 +- pkgs/by-name/ds/dssat/package.nix | 2 +- pkgs/by-name/eb/ebtks/package.nix | 2 +- pkgs/by-name/el/elektroid/package.nix | 2 +- pkgs/by-name/el/elf2nucleus/package.nix | 2 +- pkgs/by-name/en/encled/package.nix | 2 +- pkgs/by-name/eo/eog/package.nix | 2 +- .../ev/everforest-gtk-theme/package.nix | 2 +- pkgs/by-name/f2/f2fs-tools/package.nix | 2 +- pkgs/by-name/fg/fgqcanvas/package.nix | 2 +- pkgs/by-name/fi/fido2luks/package.nix | 2 +- pkgs/by-name/fi/five-or-more/package.nix | 2 +- pkgs/by-name/fm/fm-tune/package.nix | 2 +- .../fo/folder-color-switcher/package.nix | 2 +- pkgs/by-name/fo/footswitch/package.nix | 2 +- pkgs/by-name/fo/fork-cleaner/package.nix | 2 +- pkgs/by-name/fo/four-in-a-row/package.nix | 2 +- pkgs/by-name/fr/freenet/package.nix | 4 +- pkgs/by-name/fs/fsnotifier/package.nix | 2 +- pkgs/by-name/g3/g3kb-switch/package.nix | 2 +- pkgs/by-name/ge/geary/package.nix | 2 +- pkgs/by-name/ge/geoserver/package.nix | 2 +- pkgs/by-name/gh/gh-gei/package.nix | 2 +- pkgs/by-name/gi/gifsicle/package.nix | 2 +- pkgs/by-name/gi/git-codeowners/package.nix | 2 +- pkgs/by-name/gi/git-fixup/package.nix | 2 +- pkgs/by-name/gi/git-my/package.nix | 2 +- pkgs/by-name/gi/git-standup/package.nix | 2 +- pkgs/by-name/gl/glas/package.nix | 2 +- pkgs/by-name/gl/glfw3/package.nix | 2 +- pkgs/by-name/gl/glrnvim/package.nix | 2 +- pkgs/by-name/gn/gnome-2048/package.nix | 4 +- pkgs/by-name/gn/gnome-autoar/package.nix | 2 +- .../gn/gnome-bluetooth/1.0/default.nix | 4 +- .../gn/gnome-color-manager/package.nix | 2 +- pkgs/by-name/gn/gnome-common/package.nix | 2 +- pkgs/by-name/gn/gnome-dictionary/package.nix | 6 +- pkgs/by-name/gn/gnome-klotski/package.nix | 2 +- pkgs/by-name/gn/gnome-mines/package.nix | 2 +- pkgs/by-name/gn/gnome-nettool/package.nix | 4 +- pkgs/by-name/gn/gnome-notes/package.nix | 4 +- pkgs/by-name/gn/gnome-packagekit/package.nix | 2 +- .../gn/gnome-power-manager/package.nix | 2 +- pkgs/by-name/gn/gnome-robots/package.nix | 2 +- pkgs/by-name/gn/gnome-screenshot/package.nix | 4 +- .../gn/gnome-settings-daemon/43/default.nix | 4 +- .../gn/gnome-sound-recorder/package.nix | 2 +- pkgs/by-name/gn/gnome-taquin/package.nix | 6 +- pkgs/by-name/gn/gnome-tetravex/package.nix | 4 +- .../by-name/gn/gnome-themes-extra/package.nix | 2 +- pkgs/by-name/gn/gnome-user-share/package.nix | 2 +- pkgs/by-name/gn/gnuastro/package.nix | 2 +- pkgs/by-name/go/go-camo/package.nix | 2 +- pkgs/by-name/go/go-ethereum/package.nix | 2 +- pkgs/by-name/go/go-symbols/package.nix | 2 +- pkgs/by-name/go/goatcounter/package.nix | 2 +- pkgs/by-name/go/goreman/package.nix | 2 +- pkgs/by-name/go/gosmee/package.nix | 2 +- pkgs/by-name/go/govers/package.nix | 2 +- pkgs/by-name/gp/gpscorrelate/package.nix | 2 +- pkgs/by-name/gp/gpsprune/package.nix | 2 +- pkgs/by-name/gp/gpt4all/package.nix | 2 +- pkgs/by-name/gp/gpustat/package.nix | 2 +- pkgs/by-name/gr/grafana-reporter/package.nix | 2 +- .../gr/graphene-hardened-malloc/package.nix | 2 +- .../by-name/gr/gruvbox-plus-icons/package.nix | 2 +- pkgs/by-name/gt/gtkhtml/package.nix | 4 +- pkgs/by-name/gu/gucharmap/package.nix | 2 +- pkgs/by-name/ha/handbrake/package.nix | 2 +- pkgs/by-name/ha/hap-py/package.nix | 2 +- pkgs/by-name/ha/harvid/package.nix | 2 +- pkgs/by-name/he/hello/package.nix | 2 +- pkgs/by-name/hi/hidviz/package.nix | 2 +- pkgs/by-name/hi/highs/package.nix | 2 +- pkgs/by-name/hi/hitori/package.nix | 2 +- pkgs/by-name/ht/httpdirfs/package.nix | 2 +- pkgs/by-name/ht/httpie-desktop/package.nix | 2 +- pkgs/by-name/i3/i3pystatus/package.nix | 2 +- pkgs/by-name/ia/iagno/package.nix | 6 +- pkgs/by-name/id/ida-free/package.nix | 2 +- pkgs/by-name/id/ideamaker/package.nix | 6 +- pkgs/by-name/ig/igvm-tooling/package.nix | 2 +- pkgs/by-name/in/inflow/package.nix | 2 +- pkgs/by-name/io/iotools/package.nix | 2 +- .../isabelle/components/isabelle-linter.nix | 2 +- pkgs/by-name/iu/iucode-tool/package.nix | 2 +- pkgs/by-name/ja/jailer/package.nix | 2 +- pkgs/by-name/je/jellyfin/package.nix | 2 +- pkgs/by-name/jo/josm/package.nix | 2 +- pkgs/by-name/ju/justbuild/package.nix | 6 +- pkgs/by-name/ka/kakoune-lsp/package.nix | 2 +- pkgs/by-name/ke/keto/package.nix | 2 +- pkgs/by-name/ki/ki/package.nix | 2 +- pkgs/by-name/ki/kittysay/package.nix | 2 +- pkgs/by-name/ku/kubectl-doctor/package.nix | 4 +- pkgs/by-name/la/laszip_2/package.nix | 2 +- pkgs/by-name/la/latte-integrale/package.nix | 4 +- pkgs/by-name/li/libcpuid/package.nix | 2 +- pkgs/by-name/li/libcyaml/package.nix | 2 +- pkgs/by-name/li/libgnome-keyring/package.nix | 2 +- pkgs/by-name/li/libgpiod_1/package.nix | 2 +- pkgs/by-name/li/libhttpserver/package.nix | 2 +- pkgs/by-name/li/libiff/package.nix | 2 +- pkgs/by-name/li/libilbm/package.nix | 2 +- pkgs/by-name/li/libnghttp2_asio/package.nix | 2 +- pkgs/by-name/li/libscfg/package.nix | 2 +- .../li/libtorrent-rasterbar-1_2_x/package.nix | 2 +- pkgs/by-name/li/libtoxcore/package.nix | 2 +- .../li/libxplayer-plparser/package.nix | 2 +- pkgs/by-name/li/limine/package.nix | 2 +- .../by-name/li/linux-wifi-hotspot/package.nix | 2 +- pkgs/by-name/li/listmonk/package.nix | 2 +- pkgs/by-name/li/listmonk/stuffbin.nix | 2 +- pkgs/by-name/ll/llm-ls/package.nix | 2 +- pkgs/by-name/lo/local-ai/tests.nix | 4 +- pkgs/by-name/lo/logiops_0_2_3/package.nix | 2 +- pkgs/by-name/lp/lprint/package.nix | 2 +- pkgs/by-name/lx/lxcfs/package.nix | 2 +- pkgs/by-name/lz/lzlib/package.nix | 2 +- pkgs/by-name/ma/maestro/package.nix | 2 +- pkgs/by-name/ma/mako/package.nix | 2 +- pkgs/by-name/ma/mapserver/package.nix | 2 +- pkgs/by-name/ma/marwaita-x/package.nix | 2 +- pkgs/by-name/ma/masterpdfeditor/package.nix | 2 +- pkgs/by-name/md/mdbook/package.nix | 2 +- pkgs/by-name/me/med/package.nix | 2 +- .../mf/mfcj880dwcupswrapper/package.nix | 2 +- pkgs/by-name/mf/mfcj880dwlpr/package.nix | 2 +- pkgs/by-name/mi/microdnf/package.nix | 2 +- .../mo/modrinth-app-unwrapped/package.nix | 2 +- pkgs/by-name/mo/mos/package.nix | 2 +- pkgs/by-name/mo/mosdepth/package.nix | 2 +- pkgs/by-name/mo/mouse_m908/package.nix | 2 +- pkgs/by-name/mp/mpack/package.nix | 2 +- pkgs/by-name/mu/mutter/43/default.nix | 6 +- pkgs/by-name/ne/nemo-fileroller/package.nix | 2 +- pkgs/by-name/ne/nemo-python/package.nix | 2 +- pkgs/by-name/ne/nemo/package.nix | 2 +- .../ne/neovim-qt-unwrapped/package.nix | 2 +- pkgs/by-name/ne/neovim-remote/package.nix | 2 +- pkgs/by-name/ne/netproc/package.nix | 2 +- pkgs/by-name/ne/nextpnr/package.nix | 2 +- pkgs/by-name/ni/nimlsp/package.nix | 2 +- pkgs/by-name/ni/nitch/package.nix | 2 +- pkgs/by-name/ni/nix-ld/package.nix | 2 +- .../ni/nix-store-gcs-proxy/package.nix | 2 +- pkgs/by-name/ni/nixpkgs-fmt/package.nix | 2 +- pkgs/by-name/nm/nmap/package.nix | 2 +- pkgs/by-name/nm/nmapsi4/package.nix | 2 +- pkgs/by-name/nn/nncp/package.nix | 2 +- pkgs/by-name/no/notary/package.nix | 2 +- pkgs/by-name/nr/nrpl/package.nix | 4 +- pkgs/by-name/nu/nuget/package.nix | 2 +- .../nvidia-docker.nix | 2 +- pkgs/by-name/oc/octosql/package.nix | 2 +- pkgs/by-name/oi/oidc-agent/package.nix | 2 +- pkgs/by-name/ok/okolors/package.nix | 2 +- pkgs/by-name/on/onlyoffice-bin/package.nix | 2 +- pkgs/by-name/op/open-fprintd/package.nix | 2 +- .../op/openorienteering-mapper/package.nix | 2 +- pkgs/by-name/op/openvas-smb/package.nix | 2 +- pkgs/by-name/ou/outfox/package.nix | 2 +- pkgs/by-name/ov/ovh-ttyrec/package.nix | 2 +- pkgs/by-name/pd/pdfannots2json/package.nix | 2 +- pkgs/by-name/pi/pigeon/package.nix | 2 +- pkgs/by-name/pi/pix/package.nix | 2 +- pkgs/by-name/pl/plzip/package.nix | 2 +- pkgs/by-name/po/pokemon-cursor/package.nix | 2 +- pkgs/by-name/po/pololu-tic/package.nix | 2 +- pkgs/by-name/po/pop-launcher/package.nix | 2 +- .../po/power-profiles-daemon/package.nix | 2 +- pkgs/by-name/pr/prevo-data/package.nix | 2 +- pkgs/by-name/pr/prevo-tools/package.nix | 2 +- .../pr/prometheus-jmx-javaagent/package.nix | 2 +- .../pr/prometheus-squid-exporter/package.nix | 2 +- .../pr/protoc-go-inject-tag/package.nix | 2 +- pkgs/by-name/pr/prox/package.nix | 2 +- pkgs/by-name/pr/prrte/package.nix | 2 +- pkgs/by-name/py/pybibget/package.nix | 2 +- pkgs/by-name/qr/qrrs/package.nix | 2 +- pkgs/by-name/qr/qrtool/package.nix | 2 +- pkgs/by-name/qu/quadrapassel/package.nix | 2 +- pkgs/by-name/qw/qwerty-fr/package.nix | 2 +- pkgs/by-name/r0/r0vm/package.nix | 4 +- pkgs/by-name/rc/rcu/package.nix | 2 +- pkgs/by-name/re/reaction/package.nix | 2 +- pkgs/by-name/re/revolt-desktop/package.nix | 2 +- pkgs/by-name/rh/rHttp/package.nix | 2 +- pkgs/by-name/rm/rmfakecloud/package.nix | 2 +- pkgs/by-name/rm/rmfakecloud/webui.nix | 2 +- pkgs/by-name/ro/rofi-blezz/package.nix | 2 +- pkgs/by-name/rp/rpi-imager/package.nix | 2 +- pkgs/by-name/rs/rs/package.nix | 2 +- pkgs/by-name/rs/rsgain/package.nix | 2 +- pkgs/by-name/rt/rtg-tools/package.nix | 2 +- pkgs/by-name/rt/rtl_fm_streamer/package.nix | 2 +- pkgs/by-name/ru/rutorrent/package.nix | 2 +- pkgs/by-name/ry/rygel/package.nix | 2 +- pkgs/by-name/ry/ryujinx/package.nix | 2 +- pkgs/by-name/sa/sabnzbd/package.nix | 2 +- pkgs/by-name/sa/saga/package.nix | 2 +- pkgs/by-name/sa/sanjuuni/package.nix | 2 +- pkgs/by-name/sd/SDL1/package.nix | 16 +- pkgs/by-name/sd/SDL2_sound/package.nix | 4 +- pkgs/by-name/sd/SDL2_ttf/package.nix | 2 +- pkgs/by-name/sd/sd-mux-ctrl/package.nix | 2 +- pkgs/by-name/sh/shab/package.nix | 2 +- pkgs/by-name/sh/shapelib/package.nix | 2 +- pkgs/by-name/sk/skypeexport/package.nix | 4 +- pkgs/by-name/sl/slskd/package.nix | 2 +- pkgs/by-name/so/solo5/package.nix | 2 +- pkgs/by-name/sp/spip/package.nix | 6 +- pkgs/by-name/st/status-im/package.nix | 4 +- pkgs/by-name/su/su-exec/package.nix | 2 +- .../sw/sway-assign-cgroups/package.nix | 2 +- .../sw/sway-audio-idle-inhibit/package.nix | 2 +- pkgs/by-name/sw/swaylock-effects/package.nix | 2 +- pkgs/by-name/sy/symphony/package.nix | 2 +- pkgs/by-name/sy/syncthing-tray/package.nix | 2 +- pkgs/by-name/sy/syndicate-server/package.nix | 2 +- pkgs/by-name/ta/tali/package.nix | 2 +- pkgs/by-name/ta/tarlz/package.nix | 2 +- .../ta/taskchampion-sync-server/package.nix | 2 +- pkgs/by-name/te/tegola/package.nix | 2 +- .../te/terraform-compliance/package.nix | 2 +- .../te/terraform-plugin-docs/package.nix | 2 +- pkgs/by-name/te/tetragon/package.nix | 2 +- .../thcrap-steam-proton-wrapper/package.nix | 2 +- pkgs/by-name/ti/tidgi/package.nix | 4 +- pkgs/by-name/ti/tile38/package.nix | 2 +- pkgs/by-name/tk/tkey-ssh-agent/package.nix | 2 +- pkgs/by-name/tm/tmsu/package.nix | 2 +- pkgs/by-name/tm/tmux-cssh/package.nix | 2 +- pkgs/by-name/to/totem/package.nix | 8 +- pkgs/by-name/to/toxic/package.nix | 2 +- pkgs/by-name/tr/tracy/package.nix | 2 +- pkgs/by-name/tr/transmission_3/package.nix | 2 +- pkgs/by-name/tr/tridactyl-native/package.nix | 2 +- pkgs/by-name/un/unsilence/package.nix | 2 +- pkgs/by-name/up/upbound/package.nix | 2 +- pkgs/by-name/up/upower-notify/package.nix | 2 +- pkgs/by-name/up/ups/package.nix | 2 +- pkgs/by-name/ut/ut1999/package.nix | 2 +- pkgs/by-name/va/vapoursynth/editor.nix | 2 +- pkgs/by-name/ve/velero/package.nix | 2 +- pkgs/by-name/vg/vgmstream/package.nix | 2 +- pkgs/by-name/vi/vimcats/package.nix | 2 +- pkgs/by-name/vi/vinagre/package.nix | 4 +- pkgs/by-name/vi/vis/package.nix | 2 +- pkgs/by-name/vn/vndr/package.nix | 2 +- pkgs/by-name/vo/volk_2/package.nix | 4 +- pkgs/by-name/vp/vpl-gpu-rt/package.nix | 2 +- pkgs/by-name/vv/vvvvvv/package.nix | 2 +- pkgs/by-name/wa/waagent/package.nix | 2 +- pkgs/by-name/wa/wapm/package.nix | 2 +- .../wayland-pipewire-idle-inhibit/package.nix | 2 +- pkgs/by-name/we/websploit/package.nix | 2 +- pkgs/by-name/we/wechat-uos/package.nix | 2 +- pkgs/by-name/wi/win2xcur/package.nix | 2 +- pkgs/by-name/wi/wiseunpacker/package.nix | 2 +- .../xd/xdg-desktop-portal-shana/package.nix | 2 +- pkgs/by-name/xe/xed-editor/package.nix | 2 +- pkgs/by-name/xf/xfs-undelete/package.nix | 2 +- pkgs/by-name/xm/xmonad-log/package.nix | 2 +- pkgs/by-name/xp/xplayer/package.nix | 2 +- pkgs/by-name/xp/xplr/package.nix | 2 +- pkgs/by-name/xr/xreader/package.nix | 2 +- pkgs/by-name/xv/xviewer/package.nix | 2 +- pkgs/by-name/ya/yanic/package.nix | 2 +- pkgs/by-name/ye/yelp-xsl/package.nix | 2 +- pkgs/by-name/ye/yelp/package.nix | 2 +- pkgs/by-name/yg/yggdrasil/package.nix | 2 +- pkgs/by-name/yg/yggstack/package.nix | 2 +- pkgs/by-name/yo/youtrack_2022_3/package.nix | 2 +- pkgs/by-name/za/zapret/package.nix | 2 +- pkgs/by-name/ze/zerotierone/package.nix | 2 +- pkgs/by-name/zo/zoraxy/package.nix | 2 +- pkgs/by-name/zs/zsh-wd/package.nix | 2 +- pkgs/by-name/zs/zsh-zhooks/package.nix | 2 +- pkgs/by-name/zs/zsync/package.nix | 2 +- 365 files changed, 608 insertions(+), 608 deletions(-) diff --git a/pkgs/by-name/_4/_4d-minesweeper/package.nix b/pkgs/by-name/_4/_4d-minesweeper/package.nix index 857b11229cd8..4cb7b20bcb45 100644 --- a/pkgs/by-name/_4/_4d-minesweeper/package.nix +++ b/pkgs/by-name/_4/_4d-minesweeper/package.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation { owner = "gapophustu"; repo = "4D-Minesweeper"; rev = "db176d8aa5981a597bbae6a1a74aeebf0f376df4"; - sha256 = "sha256-A5QKqCo9TTdzmK13WRSAfkrkeUqHc4yQCzy4ZZ9uX2M="; + hash = "sha256-A5QKqCo9TTdzmK13WRSAfkrkeUqHc4yQCzy4ZZ9uX2M="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/ac/accerciser/package.nix b/pkgs/by-name/ac/accerciser/package.nix index 7493c6a0bfa4..68666e099c55 100644 --- a/pkgs/by-name/ac/accerciser/package.nix +++ b/pkgs/by-name/ac/accerciser/package.nix @@ -24,7 +24,7 @@ python3.pkgs.buildPythonApplication rec { src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "d2m9T09j3ImhQ+hs3ET+rr1/jJab6lwfWoaskxGQL0g="; + hash = "sha256-d2m9T09j3ImhQ+hs3ET+rr1/jJab6lwfWoaskxGQL0g="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/ad/adafruit-nrfutil/package.nix b/pkgs/by-name/ad/adafruit-nrfutil/package.nix index fda8682a8ca6..09d8aa66377d 100644 --- a/pkgs/by-name/ad/adafruit-nrfutil/package.nix +++ b/pkgs/by-name/ad/adafruit-nrfutil/package.nix @@ -23,12 +23,12 @@ python3Packages.buildPythonApplication rec { (fetchpatch { name = "fix-tests.patch"; url = "https://github.com/adafruit/Adafruit_nRF52_nrfutil/commit/e5fbcc8ee5958041db38c04139ba686bf7d1b845.patch"; - sha256 = "sha256-0tbJldGtYcDdUzA3wZRv0lenXVn6dqV016U9nMpQ6/w="; + hash = "sha256-0tbJldGtYcDdUzA3wZRv0lenXVn6dqV016U9nMpQ6/w="; }) (fetchpatch { name = "fix-test-test_get_vk_pem.patch"; url = "https://github.com/adafruit/Adafruit_nRF52_nrfutil/commit/f42cee3c2d7c8d0911f27ba24d6a140083cb85cf.patch"; - sha256 = "sha256-7WoRqPKc8O5EYK7Fj1WrMJREwhueiVpkEizIfVnEPBU="; + hash = "sha256-7WoRqPKc8O5EYK7Fj1WrMJREwhueiVpkEizIfVnEPBU="; }) ]; diff --git a/pkgs/by-name/ai/aisleriot/package.nix b/pkgs/by-name/ai/aisleriot/package.nix index 8f9d2bee5c92..7b94a2f7f060 100644 --- a/pkgs/by-name/ai/aisleriot/package.nix +++ b/pkgs/by-name/ai/aisleriot/package.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "GNOME"; repo = "aisleriot"; rev = finalAttrs.version; - sha256 = "sha256-HylhDBgkAJrrs/r42v3aDNR8mBJaqnJHyY7T3QW1eWg="; + hash = "sha256-HylhDBgkAJrrs/r42v3aDNR8mBJaqnJHyY7T3QW1eWg="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/al/alephone-apotheosis-x/package.nix b/pkgs/by-name/al/alephone-apotheosis-x/package.nix index 566b98f9e856..7cb7646919f5 100644 --- a/pkgs/by-name/al/alephone-apotheosis-x/package.nix +++ b/pkgs/by-name/al/alephone-apotheosis-x/package.nix @@ -8,7 +8,7 @@ alephone.makeWrapper rec { zip = requireFile { name = "Apotheosis_X_1.1.zip"; url = "https://www.moddb.com/mods/apotheosis-x/downloads"; - sha256 = "sha256-4Y/RQQeN4VTpig8ZyxUpVHwzN8W8ciTBCkSzND8SMbs="; + hash = "sha256-4Y/RQQeN4VTpig8ZyxUpVHwzN8W8ciTBCkSzND8SMbs="; }; sourceRoot = "Apotheosis X 1.1"; diff --git a/pkgs/by-name/al/alephone-durandal/package.nix b/pkgs/by-name/al/alephone-durandal/package.nix index 6f49e76ad43f..25ac05901e5b 100644 --- a/pkgs/by-name/al/alephone-durandal/package.nix +++ b/pkgs/by-name/al/alephone-durandal/package.nix @@ -10,7 +10,7 @@ alephone.makeWrapper rec { zip = fetchurl { url = "https://github.com/Aleph-One-Marathon/alephone/releases/download/release-${version}/Marathon2-${version}-Data.zip"; - sha256 = "sha256-uoBl1/7XlXmMLqpk3tvme9w18q4Yh0WCrmqSzjGxNz0="; + hash = "sha256-uoBl1/7XlXmMLqpk3tvme9w18q4Yh0WCrmqSzjGxNz0="; }; meta = { diff --git a/pkgs/by-name/al/alephone-eternal/package.nix b/pkgs/by-name/al/alephone-eternal/package.nix index 186352db7ec1..83a5cb7a5e48 100644 --- a/pkgs/by-name/al/alephone-eternal/package.nix +++ b/pkgs/by-name/al/alephone-eternal/package.nix @@ -7,7 +7,7 @@ alephone.makeWrapper rec { zip = fetchurl { url = "http://eternal.bungie.org/files/_releases/EternalXv120.zip"; - sha256 = "1qrvx0sp9xc8zbpp5yz8jdz458ajzmyv2si7hrppiyawc8dpcwck"; + hash = "sha256-k3F2G2Jc+XhvhidqsX39UqFCfpPo+3Lv+oj1dDXoO+M="; }; sourceRoot = "Eternal 1.2.0"; diff --git a/pkgs/by-name/al/alephone-evil/package.nix b/pkgs/by-name/al/alephone-evil/package.nix index d6b59557133b..8cc817505ade 100644 --- a/pkgs/by-name/al/alephone-evil/package.nix +++ b/pkgs/by-name/al/alephone-evil/package.nix @@ -7,7 +7,7 @@ alephone.makeWrapper rec { zip = fetchurl { url = "http://files3.bungie.org/trilogy/MarathonEvil.zip"; - sha256 = "08nizbjp2rx10bpqrbhb76as0j2zynmy2c0qa5b482lz1szf9b95"; + hash = "sha256-Ja3kvg6fCkRWURgw4av1X0iglTkLrozvAqFnceX60SI="; }; meta = { diff --git a/pkgs/by-name/al/alephone-infinity/package.nix b/pkgs/by-name/al/alephone-infinity/package.nix index 2b8d0b92ab45..592399a9dda6 100644 --- a/pkgs/by-name/al/alephone-infinity/package.nix +++ b/pkgs/by-name/al/alephone-infinity/package.nix @@ -10,7 +10,7 @@ alephone.makeWrapper rec { zip = fetchurl { url = "https://github.com/Aleph-One-Marathon/alephone/releases/download/release-${version}/MarathonInfinity-${version}-Data.zip"; - sha256 = "sha256-+FPym4Avqzyo4cZtfYPHXCS+q21+g9AIdKOImkd/UjU="; + hash = "sha256-+FPym4Avqzyo4cZtfYPHXCS+q21+g9AIdKOImkd/UjU="; }; meta = { diff --git a/pkgs/by-name/al/alephone-marathon/package.nix b/pkgs/by-name/al/alephone-marathon/package.nix index 928fe4f6ce84..df34ae8f20c3 100644 --- a/pkgs/by-name/al/alephone-marathon/package.nix +++ b/pkgs/by-name/al/alephone-marathon/package.nix @@ -10,7 +10,7 @@ alephone.makeWrapper rec { zip = fetchurl { url = "https://github.com/Aleph-One-Marathon/alephone/releases/download/release-${version}/Marathon-${version}-Data.zip"; - sha256 = "sha256-shZ82e7veaaT/petxDQ8Fd7YtJPmTgxSCStf0kGfrFs="; + hash = "sha256-shZ82e7veaaT/petxDQ8Fd7YtJPmTgxSCStf0kGfrFs="; }; meta = { diff --git a/pkgs/by-name/al/alephone-pathways-into-darkness/package.nix b/pkgs/by-name/al/alephone-pathways-into-darkness/package.nix index 6c6de4b88e8f..10c0fcfc04fb 100644 --- a/pkgs/by-name/al/alephone-pathways-into-darkness/package.nix +++ b/pkgs/by-name/al/alephone-pathways-into-darkness/package.nix @@ -7,7 +7,7 @@ alephone.makeWrapper rec { zip = fetchurl { url = "http://simplici7y.com/version/file/1185/AOPID_v1.1.1.zip"; - sha256 = "0x83xjcw5n5s7sw8z6rb6zzhihjkjgk7x7ynnqq917dcklr7bz4g"; + hash = "sha256-j/x1Mp2snZAwttaffuaTU8II/zcrm4+4PrrYwpnsA3U="; }; meta = { diff --git a/pkgs/by-name/al/alephone-pheonix/package.nix b/pkgs/by-name/al/alephone-pheonix/package.nix index da914e16ee31..052a2d7752df 100644 --- a/pkgs/by-name/al/alephone-pheonix/package.nix +++ b/pkgs/by-name/al/alephone-pheonix/package.nix @@ -7,7 +7,7 @@ alephone.makeWrapper rec { zip = fetchurl { url = "http://simplici7y.com/version/file/998/Marathon_Phoenix_1.3.zip"; - sha256 = "1r06k0z8km7l9d3njinsrci4jhk8hrnjdcmjd8n5z2qxkqvhn9qj"; + hash = "sha256-EicLN54di18sarKyJm2GaEJJIsvaRmlHS/TUiT6YBuQ="; }; meta = { diff --git a/pkgs/by-name/al/alephone-red/package.nix b/pkgs/by-name/al/alephone-red/package.nix index a2f6a0279017..691c474c444c 100644 --- a/pkgs/by-name/al/alephone-red/package.nix +++ b/pkgs/by-name/al/alephone-red/package.nix @@ -7,7 +7,7 @@ alephone.makeWrapper rec { zip = fetchurl { url = "http://files3.bungie.org/trilogy/MarathonRED.zip"; - sha256 = "1p13snlrvn39znvfkxql67crhysn71db2bwsfrkhjkq58wzs6qgw"; + hash = "sha256-/GGjP0cFTwlndpovsVo4VnuY2TEU9+m2/WnYnanVI9w="; }; meta = { diff --git a/pkgs/by-name/al/alephone-rubicon-x/package.nix b/pkgs/by-name/al/alephone-rubicon-x/package.nix index b59fa4cfeb62..384a1473b437 100644 --- a/pkgs/by-name/al/alephone-rubicon-x/package.nix +++ b/pkgs/by-name/al/alephone-rubicon-x/package.nix @@ -7,7 +7,7 @@ alephone.makeWrapper rec { zip = fetchurl { url = "http://files5.bungie.org/marathon/marathonRubiconX.zip"; - sha256 = "095si89wap76pvkvk90zqw7djhrhwb1anjm2s8i503jbcn5n4ipm"; + hash = "sha256-9UZii2VLDlAi0qJKq8LiMEPZDscfpLnnvuZcxROKuiQ="; }; sourceRoot = "Rubicon X ƒ"; diff --git a/pkgs/by-name/al/alephone-yuge/package.nix b/pkgs/by-name/al/alephone-yuge/package.nix index 6ae73f984a4f..c9e2d05a08fa 100644 --- a/pkgs/by-name/al/alephone-yuge/package.nix +++ b/pkgs/by-name/al/alephone-yuge/package.nix @@ -7,7 +7,7 @@ alephone.makeWrapper rec { zip = fetchurl { url = "https://lochnits.com/marathon/yuge/files/Mararthon_Yuge.zip"; - sha256 = "sha256-dZHInYThB/4igpAXbUadXwPvh2Fl3XGZ4ficg7IEnNc="; + hash = "sha256-dZHInYThB/4igpAXbUadXwPvh2Fl3XGZ4ficg7IEnNc="; }; meta = { diff --git a/pkgs/by-name/al/alsa-firmware/package.nix b/pkgs/by-name/al/alsa-firmware/package.nix index 1666cce5646f..8f6316667928 100644 --- a/pkgs/by-name/al/alsa-firmware/package.nix +++ b/pkgs/by-name/al/alsa-firmware/package.nix @@ -13,14 +13,14 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://alsa/firmware/alsa-firmware-${version}.tar.bz2"; - sha256 = "sha256-tnttfQi8/CR+9v8KuIqZwYgwWjz1euLf0LzZpbNs1bs="; + hash = "sha256-tnttfQi8/CR+9v8KuIqZwYgwWjz1euLf0LzZpbNs1bs="; }; patches = [ # fixes some includes / missing types on musl libc; should not make a difference for other platforms (fetchpatch { url = "https://raw.githubusercontent.com/void-linux/void-packages/ae690000017d5fd355ab397c49202426e3a01c11/srcpkgs/alsa-firmware/patches/musl.patch"; - sha256 = "sha256-4A+TBBvpz14NwMNewLc2LQL51hnz4EZlZ44rhnx5dnc="; + hash = "sha256-4A+TBBvpz14NwMNewLc2LQL51hnz4EZlZ44rhnx5dnc="; }) ]; diff --git a/pkgs/by-name/al/alsa-oss/package.nix b/pkgs/by-name/al/alsa-oss/package.nix index 5010c1a3dac6..425c2c499658 100644 --- a/pkgs/by-name/al/alsa-oss/package.nix +++ b/pkgs/by-name/al/alsa-oss/package.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://alsa/oss-lib/alsa-oss-${version}.tar.bz2"; - sha256 = "13nn6n6wpr2sj1hyqx4r9nb9bwxnhnzw8r2f08p8v13yjbswxbb4"; + hash = "sha256-ZK3O9ZJ+hI0uAk5kxL+FtvOVlk2ZdOxhkFrky4011o4="; }; buildInputs = [ alsa-lib ncurses libsamplerate ]; diff --git a/pkgs/by-name/al/alsa-topology-conf/package.nix b/pkgs/by-name/al/alsa-topology-conf/package.nix index e0dfc879fbc9..06d3a63dc468 100644 --- a/pkgs/by-name/al/alsa-topology-conf/package.nix +++ b/pkgs/by-name/al/alsa-topology-conf/package.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://alsa/lib/${name}.tar.bz2"; - sha256 = "sha256-98W64VRavNc4JLyX9OcsNA4Rq+oYi6DxwG9eCtd2sXk="; + hash = "sha256-98W64VRavNc4JLyX9OcsNA4Rq+oYi6DxwG9eCtd2sXk="; }; dontBuild = true; diff --git a/pkgs/by-name/al/alsa-utils/package.nix b/pkgs/by-name/al/alsa-utils/package.nix index cadf42149fbc..cc70a8578d76 100644 --- a/pkgs/by-name/al/alsa-utils/package.nix +++ b/pkgs/by-name/al/alsa-utils/package.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://alsa/utils/alsa-utils-${version}.tar.bz2"; - sha256 = "sha256-EEti7H8Cp84WynefSBVhbfHMIZM1A3g6kQe1lE+DBjo="; + hash = "sha256-EEti7H8Cp84WynefSBVhbfHMIZM1A3g6kQe1lE+DBjo="; }; patches = [ # Backport fixes for musl libc. Remove on next release diff --git a/pkgs/by-name/am/am2rlauncher/package.nix b/pkgs/by-name/am/am2rlauncher/package.nix index 2b47d0fbaafd..33dde993cd8f 100644 --- a/pkgs/by-name/am/am2rlauncher/package.nix +++ b/pkgs/by-name/am/am2rlauncher/package.nix @@ -51,7 +51,7 @@ buildDotnetModule { owner = "AM2R-Community-Developers"; repo = "AM2RLauncher"; rev = "5d8b7d9b3de68e6215c10b9fd223b7f1d5e40dea"; - sha256 = "sha256-/nHqo8jh3sOUngbpqdfiQjUWO/8Uzpc5jtW7Ep4q6Wg="; + hash = "sha256-/nHqo8jh3sOUngbpqdfiQjUWO/8Uzpc5jtW7Ep4q6Wg="; }; projectFile = "AM2RLauncher/AM2RLauncher.Gtk/AM2RLauncher.Gtk.csproj"; diff --git a/pkgs/by-name/am/amfora/package.nix b/pkgs/by-name/am/amfora/package.nix index 7c80504fd95e..8e9f69b0afc4 100644 --- a/pkgs/by-name/am/amfora/package.nix +++ b/pkgs/by-name/am/amfora/package.nix @@ -8,7 +8,7 @@ buildGoModule rec { owner = "makeworld-the-better-one"; repo = "amfora"; rev = "v${version}"; - sha256 = "sha256-KOuKgxH3n4rdF+oj/TwEcRqX1sn4A9e23FNwQMhMVO4="; + hash = "sha256-KOuKgxH3n4rdF+oj/TwEcRqX1sn4A9e23FNwQMhMVO4="; }; vendorHash = "sha256-T/hnlQMDOZV+QGl7xp29sBGfb4VXcXqN6PDoBFdpp4M="; diff --git a/pkgs/by-name/an/anyk/package.nix b/pkgs/by-name/an/anyk/package.nix index 4e9a92081d5d..d0c6321bb669 100644 --- a/pkgs/by-name/an/anyk/package.nix +++ b/pkgs/by-name/an/anyk/package.nix @@ -30,17 +30,17 @@ let extraClasspath = [ (fetchurl { url = "mirror://maven/org/glassfish/metro/webservices-rt/2.4.10/webservices-rt-2.4.10.jar"; - sha256 = "sha256-lHclIZn3HR2B2lMttmmQGIV67qJi5KhL5jT2WNUQpPI="; + hash = "sha256-lHclIZn3HR2B2lMttmmQGIV67qJi5KhL5jT2WNUQpPI="; }) (fetchurl { url = "mirror://maven/org/glassfish/metro/webservices-api/2.4.10/webservices-api-2.4.10.jar"; - sha256 = "sha256-1jiabjPkRnh+l/fmTt8aKE5hpeLreYOiLH9sVIcLUQE="; + hash = "sha256-1jiabjPkRnh+l/fmTt8aKE5hpeLreYOiLH9sVIcLUQE="; }) (fetchurl { url = "mirror://maven/com/sun/activation/jakarta.activation/2.0.1/jakarta.activation-2.0.1.jar"; - sha256 = "sha256-ueJLfdbgdJVWLqllMb4xMMltuk144d/Yitu96/QzKHE="; + hash = "sha256-ueJLfdbgdJVWLqllMb4xMMltuk144d/Yitu96/QzKHE="; }) # Patch one of the classes so it works with the packages above by removing .internal. from the package names. diff --git a/pkgs/by-name/ap/apostrophe/package.nix b/pkgs/by-name/ap/apostrophe/package.nix index 2537f8cfed81..a7b9ee513331 100644 --- a/pkgs/by-name/ap/apostrophe/package.nix +++ b/pkgs/by-name/ap/apostrophe/package.nix @@ -25,7 +25,7 @@ let repo = "apostrophe"; domain = "gitlab.gnome.org"; rev = "v${version}"; - sha256 = "sha256-rXaz0EtLuKOBJLF81K/4qoTZtG6B8Wn+KwSiqYvxAVc="; + hash = "sha256-rXaz0EtLuKOBJLF81K/4qoTZtG6B8Wn+KwSiqYvxAVc="; }; # Patches are required by upstream. Without the patches diff --git a/pkgs/by-name/ap/aprx/package.nix b/pkgs/by-name/ap/aprx/package.nix index fe946ff48366..e6dc23cbef5c 100644 --- a/pkgs/by-name/ap/aprx/package.nix +++ b/pkgs/by-name/ap/aprx/package.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation { owner = "PhirePhly"; repo = "aprx"; rev = "2c84448fe6d897980234961a87ee4c1d4fad69ec"; - sha256 = "sha256-01PB7FaG8GmPm1U15/3g1CfQwdYmf3ThZFdVh2zUAl4="; + hash = "sha256-01PB7FaG8GmPm1U15/3g1CfQwdYmf3ThZFdVh2zUAl4="; }; nativeBuildInputs = [ perl ]; diff --git a/pkgs/by-name/ar/arma3-unix-launcher/package.nix b/pkgs/by-name/ar/arma3-unix-launcher/package.nix index 49c4e98ceb05..104293c9be56 100644 --- a/pkgs/by-name/ar/arma3-unix-launcher/package.nix +++ b/pkgs/by-name/ar/arma3-unix-launcher/package.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "p-ranav"; repo = "argparse"; rev = "45664c4e9f05ff287731a9ff8b724d0c89fb6e77"; - sha256 = "sha256-qLD9zD6hbItDn6ZHHWBXrAWhySvqcs40xA5+C/5Fkhw="; + hash = "sha256-qLD9zD6hbItDn6ZHHWBXrAWhySvqcs40xA5+C/5Fkhw="; }; curlpp_src = curlpp.src; doctest_src = doctest; @@ -44,12 +44,12 @@ stdenv.mkDerivation (finalAttrs: { owner = "muttleyxd"; repo = "pugixml"; rev = "simple-build-for-a3ul"; - sha256 = "sha256-FpREdz6DbhnLDGOuQY9rU17SSd6ngA4WfO0kGHqGJPM="; + hash = "sha256-FpREdz6DbhnLDGOuQY9rU17SSd6ngA4WfO0kGHqGJPM="; }; spdlog_src = spdlog; steamworkssdk_src = fetchurl { url = "https://github.com/julianxhokaxhiu/SteamworksSDKCI/releases/download/1.53/SteamworksSDK-v1.53.0_x64.zip"; - sha256 = "sha256-6PQGaPsaxBg/MHVWw2ynYW6LaNSrE9Rd9Q9ZLKFGPFA="; + hash = "sha256-6PQGaPsaxBg/MHVWw2ynYW6LaNSrE9Rd9Q9ZLKFGPFA="; }; trompeloeil_src = trompeloeil; }) diff --git a/pkgs/by-name/as/asc-key-to-qr-code-gif/package.nix b/pkgs/by-name/as/asc-key-to-qr-code-gif/package.nix index e3f879d293af..f3fe53a3ecfa 100644 --- a/pkgs/by-name/as/asc-key-to-qr-code-gif/package.nix +++ b/pkgs/by-name/as/asc-key-to-qr-code-gif/package.nix @@ -16,7 +16,7 @@ stdenvNoCC.mkDerivation { owner = "yishilin14"; repo = "asc-key-to-qr-code-gif"; rev = "5d36a1bada8646ae0f61b04356e62ba5ef10a1aa"; - sha256 = "sha256-DwxYgBsioL86WM6KBFJ+DuSJo3/1pwD1Fl156XD98RY="; + hash = "sha256-DwxYgBsioL86WM6KBFJ+DuSJo3/1pwD1Fl156XD98RY="; }; dontBuild = true; diff --git a/pkgs/by-name/as/assemblyscript/package.nix b/pkgs/by-name/as/assemblyscript/package.nix index b2fcb5ff6317..e2755c8dee54 100644 --- a/pkgs/by-name/as/assemblyscript/package.nix +++ b/pkgs/by-name/as/assemblyscript/package.nix @@ -11,7 +11,7 @@ buildNpmPackage rec { owner = "AssemblyScript"; repo = "assemblyscript"; rev = "v${version}"; - sha256 = "sha256-Jhjq+kLRzDesTPHHonImCnuzt1Ay04n7+O9aK4knb5g="; + hash = "sha256-Jhjq+kLRzDesTPHHonImCnuzt1Ay04n7+O9aK4knb5g="; }; npmDepsHash = "sha256-mWRQPQVprM+9SCYd8M7NMDtiwDjSH5cr4Xlr5VP9eHo="; diff --git a/pkgs/by-name/at/atomix/package.nix b/pkgs/by-name/at/atomix/package.nix index 341e97d0c9ab..7721030bab3a 100644 --- a/pkgs/by-name/at/atomix/package.nix +++ b/pkgs/by-name/at/atomix/package.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "mirror://gnome/sources/atomix/${lib.versions.major finalAttrs.version}/atomix-${finalAttrs.version}.tar.xz"; - sha256 = "yISTF2iNh9pzTJBjA1YxBSAH8qh5m2xsyRUmWIC1X7Q="; + hash = "sha256-yISTF2iNh9pzTJBjA1YxBSAH8qh5m2xsyRUmWIC1X7Q="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/au/autopsy/package.nix b/pkgs/by-name/au/autopsy/package.nix index 359a7affa3a0..72f5130a5109 100644 --- a/pkgs/by-name/au/autopsy/package.nix +++ b/pkgs/by-name/au/autopsy/package.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { src = fetchzip { url = "https://github.com/sleuthkit/autopsy/releases/download/autopsy-${version}/autopsy-${version}.zip"; - sha256 = "32iOQA3+ykltCYW/MpqCVxyhh3mm6eYzY+t0smAsWRw="; + hash = "sha256-32iOQA3+ykltCYW/MpqCVxyhh3mm6eYzY+t0smAsWRw="; }; nativeBuildInputs = [ makeWrapper findutils ]; diff --git a/pkgs/by-name/av/avr-sim/package.nix b/pkgs/by-name/av/avr-sim/package.nix index 8afb4d902bb8..38f8b246f62a 100644 --- a/pkgs/by-name/av/avr-sim/package.nix +++ b/pkgs/by-name/av/avr-sim/package.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { "http://www.avr-asm-tutorial.net/avr_sim/28/avr_sim_28_lin_src.zip" "https://web.archive.org/web/20231129125754/http://www.avr-asm-tutorial.net/avr_sim/28/avr_sim_28_lin_src.zip" ]; - sha256 = "sha256-7MgUzMs+l+3RVUbORAWyU1OUpgrKIeWhS+ObgRJtOHc="; + hash = "sha256-7MgUzMs+l+3RVUbORAWyU1OUpgrKIeWhS+ObgRJtOHc="; }; nativeBuildInputs = [lazarus fpc]; diff --git a/pkgs/by-name/aw/aws-vault/package.nix b/pkgs/by-name/aw/aws-vault/package.nix index 20d0667b70e2..e503848f10b2 100644 --- a/pkgs/by-name/aw/aws-vault/package.nix +++ b/pkgs/by-name/aw/aws-vault/package.nix @@ -14,7 +14,7 @@ buildGoModule rec { owner = "99designs"; repo = pname; rev = "v${version}"; - sha256 = "sha256-Qs4vxFgehWQYYECBGBSU8YI/BHLwOQUO5wBlNEUzD7c="; + hash = "sha256-Qs4vxFgehWQYYECBGBSU8YI/BHLwOQUO5wBlNEUzD7c="; }; vendorHash = "sha256-4bJKDEZlO0DzEzTQ7m+SQuzhe+wKmL6wLueqgSz/46s="; diff --git a/pkgs/by-name/ba/babeltrace/package.nix b/pkgs/by-name/ba/babeltrace/package.nix index 93673789fb8f..eb36ac7a0753 100644 --- a/pkgs/by-name/ba/babeltrace/package.nix +++ b/pkgs/by-name/ba/babeltrace/package.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "https://www.efficios.com/files/babeltrace/babeltrace-${finalAttrs.version}.tar.bz2"; - sha256 = "Z7Q6qu9clR+nrxpVfPcgGhH+iYdrfCK6CgPLwxbbWpw="; + hash = "sha256-Z7Q6qu9clR+nrxpVfPcgGhH+iYdrfCK6CgPLwxbbWpw="; }; nativeBuildInputs = diff --git a/pkgs/by-name/ba/banana-cursor/package.nix b/pkgs/by-name/ba/banana-cursor/package.nix index 73d26048b7ea..2bb9d1ea4f57 100644 --- a/pkgs/by-name/ba/banana-cursor/package.nix +++ b/pkgs/by-name/ba/banana-cursor/package.nix @@ -15,7 +15,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { owner = "ful1e5"; repo = "banana-cursor"; rev = "v${finalAttrs.version}"; - sha256 = "sha256-PI7381xf/GctQTnfcE0W3M3z2kqbX4VexMf17C61hT8="; + hash = "sha256-PI7381xf/GctQTnfcE0W3M3z2kqbX4VexMf17C61hT8="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/be/bee/package.nix b/pkgs/by-name/be/bee/package.nix index ce4c9b1d0222..281df8e893fa 100644 --- a/pkgs/by-name/be/bee/package.nix +++ b/pkgs/by-name/be/bee/package.nix @@ -11,7 +11,7 @@ buildGoModule rec { owner = "ethersphere"; repo = "bee"; rev = "v${version}"; - sha256 = "sha256-FflPGsHF2kZ5eh0bNFtK5aMLon5m5B/se/5PdIIafzo="; + hash = "sha256-FflPGsHF2kZ5eh0bNFtK5aMLon5m5B/se/5PdIIafzo="; }; vendorHash = "sha256-XbOp0821HeCU5c+es3/UJNF0StDSDKKT+sasBJ+uTLM="; diff --git a/pkgs/by-name/be/betterdiscordctl/package.nix b/pkgs/by-name/be/betterdiscordctl/package.nix index 3ff3bf7db004..9c9f9d7a545f 100644 --- a/pkgs/by-name/be/betterdiscordctl/package.nix +++ b/pkgs/by-name/be/betterdiscordctl/package.nix @@ -12,7 +12,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { owner = "bb010g"; repo = "betterdiscordctl"; rev = "v${finalAttrs.version}"; - sha256 = "0p321rfcihz2779sdd6qfgpxgk5yd53d33vq5pvb50dbdgxww0bc"; + hash = "sha256-bAHO+2urgbL2LXiP0UZpvszX73PYtKbTOeLDyFwOYlw="; }; postPatch = '' diff --git a/pkgs/by-name/bl/blendfarm/deps.nix b/pkgs/by-name/bl/blendfarm/deps.nix index 12bb03d85bdb..f68333b5d09c 100644 --- a/pkgs/by-name/bl/blendfarm/deps.nix +++ b/pkgs/by-name/bl/blendfarm/deps.nix @@ -1,185 +1,185 @@ { fetchNuGet }: [ - (fetchNuGet { pname = "Avalonia"; version = "0.10.15"; sha256 = "02rf96gxpafbk0ilg3nxf0fas9gkpb25kzqc2lnbxp8h366qg431"; }) - (fetchNuGet { pname = "Avalonia.Angle.Windows.Natives"; version = "2.1.0.2020091801"; sha256 = "04jm83cz7vkhhr6n2c9hya2k8i2462xbf6np4bidk55as0jdq43a"; }) - (fetchNuGet { pname = "Avalonia.Desktop"; version = "0.10.15"; sha256 = "0wgc46vg227bv7nsybc9mxkqv9xlz2bj08bdipkigjlf23g0x4p6"; }) - (fetchNuGet { pname = "Avalonia.FreeDesktop"; version = "0.10.15"; sha256 = "1bq2ha1mmgsb9gxmsibr3i6alcg6y3kizxi07qh4wgw38c3fkwzs"; }) - (fetchNuGet { pname = "Avalonia.Native"; version = "0.10.15"; sha256 = "0p0ih6ql5kyvpfhc6ll2mgy23kx0vwn88qji74713id493w2ab02"; }) - (fetchNuGet { pname = "Avalonia.Remote.Protocol"; version = "0.10.15"; sha256 = "1va9zwznfr161w2xjjg4swm5505685mdkxxs747l2s35mahl5072"; }) - (fetchNuGet { pname = "Avalonia.Skia"; version = "0.10.15"; sha256 = "0xlnanssz24rcnybz1x0d3lclzmbzdjb9k0i37rd76dif3rgng0h"; }) - (fetchNuGet { pname = "Avalonia.Win32"; version = "0.10.15"; sha256 = "1lxaj8la8bwc7j4d3cc3q5jklycc647lzpm8610ya241y64gryww"; }) - (fetchNuGet { pname = "Avalonia.X11"; version = "0.10.15"; sha256 = "120d19i8ad3b2m1516v5r1bj4h7fddmad6szrbkbpd711x3sh6ka"; }) - (fetchNuGet { pname = "coverlet.collector"; version = "1.2.0"; sha256 = "0gbhdk9i3xqhay4jbfi0mxdpgk2w5x5m89rfzviv7zp1i7cksbka"; }) - (fetchNuGet { pname = "HarfBuzzSharp"; version = "2.8.2-preview.178"; sha256 = "1p5nwzl7jpypsd6df7hgcf47r977anjlyv21wacmalsj6lvdgnvn"; }) - (fetchNuGet { pname = "HarfBuzzSharp.NativeAssets.Linux"; version = "2.8.2-preview.178"; sha256 = "1402ylkxbgcnagcarqlfvg4gppy2pqs3bmin4n5mphva1g7bqb2p"; }) - (fetchNuGet { pname = "HarfBuzzSharp.NativeAssets.macOS"; version = "2.8.2-preview.178"; sha256 = "0p8miaclnbfpacc1jaqxwfg0yfx9byagi4j4k91d9621vd19i8b2"; }) - (fetchNuGet { pname = "HarfBuzzSharp.NativeAssets.WebAssembly"; version = "2.8.2-preview.178"; sha256 = "1n9jay9sji04xly6n8bzz4591fgy8i65p21a8mv5ip9lsyj1c320"; }) - (fetchNuGet { pname = "HarfBuzzSharp.NativeAssets.Win32"; version = "2.8.2-preview.178"; sha256 = "1r5syii96wv8q558cvsqw3lr10cdw6677lyiy82p6i3if51v3mr7"; }) - (fetchNuGet { pname = "JetBrains.Annotations"; version = "10.3.0"; sha256 = "1grdx28ga9fp4hwwpwv354rizm8anfq4lp045q4ss41gvhggr3z8"; }) - (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "6.0.29"; sha256 = "0z359wbz3014rwz7cdcr60qr6mrcwsbwwh36g59a5hncxb1g73rj"; }) - (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-x64"; version = "6.0.29"; sha256 = "031kalc7mp8w35rwvnb13jbwwi8cgmny7nywsk3717iy6blxldih"; }) - (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x64"; version = "6.0.29"; sha256 = "0byixcrwj7ixz60lvg7c6r3f132br4pfrjv0w0fh99b3iwzrf114"; }) - (fetchNuGet { pname = "Microsoft.Bcl.AsyncInterfaces"; version = "5.0.0"; sha256 = "0cp5jbax2mf6xr3dqiljzlwi05fv6n9a35z337s92jcljiq674kf"; }) - (fetchNuGet { pname = "Microsoft.CodeCoverage"; version = "16.5.0"; sha256 = "0610wzn4qyywf9lb4538vwqhprxc4g0g7gjbmnjzvx97jr5nd5mf"; }) - (fetchNuGet { pname = "Microsoft.CSharp"; version = "4.0.1"; sha256 = "0zxc0apx1gcx361jlq8smc9pfdgmyjh6hpka8dypc9w23nlsh6yj"; }) - (fetchNuGet { pname = "Microsoft.NET.Test.Sdk"; version = "16.5.0"; sha256 = "19f5bvzci5mmfz81jwc4dax4qdf7w4k67n263383mn8mawf22bfq"; }) - (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-x64"; version = "6.0.29"; sha256 = "03rzclkvl2gc7wakh0xqhnj6zl32b91igrnyhd69pzr3mql5kdll"; }) - (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x64"; version = "6.0.29"; sha256 = "0kh3lrzpz7y42iqa4vdhw4mg51vf4y2x8l4lg767mzbx0sd4xllv"; }) - (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "6.0.29"; sha256 = "0gv5dnd44xj1yidzd70b01s5a19khbq757llkfykgwf7wl4a89cf"; }) - (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-x64"; version = "6.0.29"; sha256 = "1bk2n7csgnvqma5yv550037xg4ph4j11gp4m5hn7s4sy23cfc5xp"; }) - (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x64"; version = "6.0.29"; sha256 = "0hhypwr4202n8nvpz10ac1q48ryjr7d4xj34r4c79mw49fvh1n61"; }) - (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.0.1"; sha256 = "01al6cfxp68dscl15z7rxfw9zvhm64dncsw09a1vmdkacsa2v6lr"; }) - (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.1.0"; sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm"; }) - (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "2.0.0"; sha256 = "1fk2fk2639i7nzy58m9dvpdnzql4vb8yl8vr19r2fp8lmj9w2jr0"; }) - (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "3.1.1"; sha256 = "05hmaygd5131rnqi6ipv7agsbpi7ka18779vw45iw6b385l7n987"; }) - (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "5.0.0"; sha256 = "0mwpwdflidzgzfx2dlpkvvnkgkr2ayaf0s80737h4wa35gaj11rc"; }) - (fetchNuGet { pname = "Microsoft.NETCore.Targets"; version = "1.0.1"; sha256 = "0ppdkwy6s9p7x9jix3v4402wb171cdiibq7js7i13nxpdky7074p"; }) - (fetchNuGet { pname = "Microsoft.NETCore.Targets"; version = "1.1.0"; sha256 = "193xwf33fbm0ni3idxzbr5fdq3i2dlfgihsac9jj7whj0gd902nh"; }) - (fetchNuGet { pname = "Microsoft.TestPlatform.ObjectModel"; version = "16.5.0"; sha256 = "02h7j1fr0fwcggn0wgddh59k8b2wmly3snckwhswzqvks5rvfnnw"; }) - (fetchNuGet { pname = "Microsoft.TestPlatform.TestHost"; version = "16.5.0"; sha256 = "08cvss66lqa92h55dxkbrzn796jckhlyj53zz22x3qyr6xi21v5v"; }) - (fetchNuGet { pname = "Microsoft.Win32.Primitives"; version = "4.3.0"; sha256 = "0j0c1wj4ndj21zsgivsc24whiya605603kxrbiw6wkfdync464wq"; }) - (fetchNuGet { pname = "Microsoft.Win32.SystemEvents"; version = "4.5.0"; sha256 = "0fnkv3ky12227zqg4zshx4kw2mvysq2ppxjibfw02cc3iprv4njq"; }) - (fetchNuGet { pname = "Microsoft.Win32.SystemEvents"; version = "5.0.0"; sha256 = "0sja4ba0mrvdamn0r9mhq38b9dxi08yb3c1hzh29n1z6ws1hlrcq"; }) - (fetchNuGet { pname = "MSTest.TestAdapter"; version = "2.1.0"; sha256 = "1g1v8yjnk4nr1c36k3cz116889bnpiw1i1jkmqnpb19wms7sq7cz"; }) - (fetchNuGet { pname = "MSTest.TestFramework"; version = "2.1.0"; sha256 = "0mac4h7ylw953chclhz0lrn19yks3bab9dn9x9fpjqi7309gid0p"; }) - (fetchNuGet { pname = "NETStandard.Library"; version = "1.6.1"; sha256 = "1z70wvsx2d847a2cjfii7b83pjfs34q05gb037fdjikv5kbagml8"; }) - (fetchNuGet { pname = "NETStandard.Library"; version = "2.0.3"; sha256 = "1fn9fxppfcg4jgypp2pmrpr6awl3qz1xmnri0cygpkwvyx27df1y"; }) - (fetchNuGet { pname = "Newtonsoft.Json"; version = "9.0.1"; sha256 = "0mcy0i7pnfpqm4pcaiyzzji4g0c8i3a5gjz28rrr28110np8304r"; }) - (fetchNuGet { pname = "NuGet.Frameworks"; version = "5.0.0"; sha256 = "18ijvmj13cwjdrrm52c8fpq021531zaz4mj4b4zapxaqzzxf2qjr"; }) - (fetchNuGet { pname = "runtime.any.System.Runtime"; version = "4.1.0"; sha256 = "0mjr2bi7wvnkphfjqgkyf8vfyvy15a829jz6mivl6jmksh2bx40m"; }) - (fetchNuGet { pname = "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "16rnxzpk5dpbbl1x354yrlsbvwylrq456xzpsha1n9y3glnhyx9d"; }) - (fetchNuGet { pname = "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0hkg03sgm2wyq8nqk6dbm9jh5vcq57ry42lkqdmfklrw89lsmr59"; }) - (fetchNuGet { pname = "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0c2p354hjx58xhhz7wv6div8xpi90sc6ibdm40qin21bvi7ymcaa"; }) - (fetchNuGet { pname = "runtime.linux-x64.CoreCompat.System.Drawing"; version = "1.0.0-beta009"; sha256 = "1fb0fjxxa8g4f0p9mqnd221iw7qkc7jmm05nwmymjfl5g8b1nin7"; }) - (fetchNuGet { pname = "runtime.native.System"; version = "4.0.0"; sha256 = "1ppk69xk59ggacj9n7g6fyxvzmk1g5p4fkijm0d7xqfkig98qrkf"; }) - (fetchNuGet { pname = "runtime.native.System"; version = "4.3.0"; sha256 = "15hgf6zaq9b8br2wi1i3x0zvmk410nlmsmva9p0bbg73v6hml5k4"; }) - (fetchNuGet { pname = "runtime.native.System.IO.Compression"; version = "4.3.0"; sha256 = "1vvivbqsk6y4hzcid27pqpm5bsi6sc50hvqwbcx8aap5ifrxfs8d"; }) - (fetchNuGet { pname = "runtime.native.System.Net.Http"; version = "4.3.0"; sha256 = "1n6rgz5132lcibbch1qlf0g9jk60r0kqv087hxc0lisy50zpm7kk"; }) - (fetchNuGet { pname = "runtime.native.System.Security.Cryptography.Apple"; version = "4.3.0"; sha256 = "1b61p6gw1m02cc1ry996fl49liiwky6181dzr873g9ds92zl326q"; }) - (fetchNuGet { pname = "runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "18pzfdlwsg2nb1jjjjzyb5qlgy6xjxzmhnfaijq5s2jw3cm3ab97"; }) - (fetchNuGet { pname = "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0qyynf9nz5i7pc26cwhgi8j62ps27sqmf78ijcfgzab50z9g8ay3"; }) - (fetchNuGet { pname = "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "1klrs545awhayryma6l7g2pvnp9xy4z0r1i40r80zb45q3i9nbyf"; }) - (fetchNuGet { pname = "runtime.osx.10.10-x64.CoreCompat.System.Drawing"; version = "5.8.64"; sha256 = "1m5b58ifqkdci5281hjfx2ci1fzrnff1isddxinyg566w40arfhp"; }) - (fetchNuGet { pname = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple"; version = "4.3.0"; sha256 = "10yc8jdrwgcl44b4g93f1ds76b176bajd3zqi2faf5rvh1vy9smi"; }) - (fetchNuGet { pname = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0zcxjv5pckplvkg0r6mw3asggm7aqzbdjimhvsasb0cgm59x09l3"; }) - (fetchNuGet { pname = "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0vhynn79ih7hw7cwjazn87rm9z9fj0rvxgzlab36jybgcpcgphsn"; }) - (fetchNuGet { pname = "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "160p68l2c7cqmyqjwxydcvgw7lvl1cr0znkw8fp24d1by9mqc8p3"; }) - (fetchNuGet { pname = "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "15zrc8fgd8zx28hdghcj5f5i34wf3l6bq5177075m2bc2j34jrqy"; }) - (fetchNuGet { pname = "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "1p4dgxax6p7rlgj4q73k73rslcnz4wdcv8q2flg1s8ygwcm58ld5"; }) - (fetchNuGet { pname = "runtime.unix.System.Private.Uri"; version = "4.0.1"; sha256 = "0ic5dgc45jkhcr1g9xmmzjm7ffiw4cymm0fprczlx4fnww4783nm"; }) - (fetchNuGet { pname = "SharpCompress"; version = "0.26.0"; sha256 = "03cygf8p44j1bfn6z9cn2xrw6zhvhq17xac1sph5rgq7vq2m5iq5"; }) - (fetchNuGet { pname = "SkiaSharp"; version = "2.88.0"; sha256 = "0wqfgzyp2m4myqrni9rgchiqi95axbf279hlqjflrj4c9z2412ni"; }) - (fetchNuGet { pname = "SkiaSharp"; version = "2.88.1-preview.1"; sha256 = "1i1px67hcr9kygmbfq4b9nqzlwm7v2gapsp4isg9i19ax5g8dlhm"; }) - (fetchNuGet { pname = "SkiaSharp.NativeAssets.Linux"; version = "2.88.1-preview.1"; sha256 = "1r9qr3civk0ws1z7hg322qyr8yjm10853zfgs03szr2lvdqiy7d1"; }) - (fetchNuGet { pname = "SkiaSharp.NativeAssets.Linux.NoDependencies"; version = "2.88.0"; sha256 = "1hxn1gqq8qmds65zb5jhq7r1l94lyg52qks61zmh5fqfvcmkfc17"; }) - (fetchNuGet { pname = "SkiaSharp.NativeAssets.macOS"; version = "2.88.0"; sha256 = "0d0pdcm61jfy3fvgkxmm3hj9cijrwbmp6ky2af776m1l63ryii3q"; }) - (fetchNuGet { pname = "SkiaSharp.NativeAssets.macOS"; version = "2.88.1-preview.1"; sha256 = "1w55nrwpl42psn6klia5a9aw2j1n25hpw2fdhchypm9f0v2iz24h"; }) - (fetchNuGet { pname = "SkiaSharp.NativeAssets.WebAssembly"; version = "2.88.1-preview.1"; sha256 = "0mwj2yl4gn40lry03yqkj7sbi1drmm672dv88481sgah4c21lzrq"; }) - (fetchNuGet { pname = "SkiaSharp.NativeAssets.Win32"; version = "2.88.0"; sha256 = "135ni4rba4wy4wyzy9ip11f3dwb1ipn38z9ps1p9xhw8jc06y5vp"; }) - (fetchNuGet { pname = "SkiaSharp.NativeAssets.Win32"; version = "2.88.1-preview.1"; sha256 = "1k50abd147pif9z9lkckbbk91ga1vv6k4skjz2n7wpll6fn0fvlv"; }) - (fetchNuGet { pname = "System.AppContext"; version = "4.3.0"; sha256 = "1649qvy3dar900z3g817h17nl8jp4ka5vcfmsr05kh0fshn7j3ya"; }) - (fetchNuGet { pname = "System.Buffers"; version = "4.3.0"; sha256 = "0fgns20ispwrfqll4q1zc1waqcmylb3zc50ys9x8zlwxh9pmd9jy"; }) - (fetchNuGet { pname = "System.Buffers"; version = "4.5.1"; sha256 = "04kb1mdrlcixj9zh1xdi5as0k0qi8byr5mi3p3jcxx72qz93s2y3"; }) - (fetchNuGet { pname = "System.Collections"; version = "4.0.11"; sha256 = "1ga40f5lrwldiyw6vy67d0sg7jd7ww6kgwbksm19wrvq9hr0bsm6"; }) - (fetchNuGet { pname = "System.Collections"; version = "4.3.0"; sha256 = "19r4y64dqyrq6k4706dnyhhw7fs24kpp3awak7whzss39dakpxk9"; }) - (fetchNuGet { pname = "System.Collections.Concurrent"; version = "4.3.0"; sha256 = "0wi10md9aq33jrkh2c24wr2n9hrpyamsdhsxdcnf43b7y86kkii8"; }) - (fetchNuGet { pname = "System.ComponentModel.Annotations"; version = "4.5.0"; sha256 = "1jj6f6g87k0iwsgmg3xmnn67a14mq88np0l1ys5zkxhkvbc8976p"; }) - (fetchNuGet { pname = "System.Console"; version = "4.3.0"; sha256 = "1flr7a9x920mr5cjsqmsy9wgnv3lvd0h1g521pdr1lkb2qycy7ay"; }) - (fetchNuGet { pname = "System.Diagnostics.Debug"; version = "4.0.11"; sha256 = "0gmjghrqmlgzxivd2xl50ncbglb7ljzb66rlx8ws6dv8jm0d5siz"; }) - (fetchNuGet { pname = "System.Diagnostics.Debug"; version = "4.3.0"; sha256 = "00yjlf19wjydyr6cfviaph3vsjzg3d5nvnya26i2fvfg53sknh3y"; }) - (fetchNuGet { pname = "System.Diagnostics.DiagnosticSource"; version = "4.3.0"; sha256 = "0z6m3pbiy0qw6rn3n209rrzf9x1k4002zh90vwcrsym09ipm2liq"; }) - (fetchNuGet { pname = "System.Diagnostics.TextWriterTraceListener"; version = "4.3.0"; sha256 = "09db74f36wkwg30f7v7zhz1yhkyrnl5v6bdwljq1jdfgzcfch7c3"; }) - (fetchNuGet { pname = "System.Diagnostics.Tools"; version = "4.0.1"; sha256 = "19cknvg07yhakcvpxg3cxa0bwadplin6kyxd8mpjjpwnp56nl85x"; }) - (fetchNuGet { pname = "System.Diagnostics.Tools"; version = "4.3.0"; sha256 = "0in3pic3s2ddyibi8cvgl102zmvp9r9mchh82ns9f0ms4basylw1"; }) - (fetchNuGet { pname = "System.Diagnostics.TraceSource"; version = "4.3.0"; sha256 = "1kyw4d7dpjczhw6634nrmg7yyyzq72k75x38y0l0nwhigdlp1766"; }) - (fetchNuGet { pname = "System.Diagnostics.Tracing"; version = "4.3.0"; sha256 = "1m3bx6c2s958qligl67q7grkwfz3w53hpy7nc97mh6f7j5k168c4"; }) - (fetchNuGet { pname = "System.Drawing.Common"; version = "4.5.0"; sha256 = "0knqa0zsm91nfr34br8gx5kjqq4v81zdhqkacvs2hzc8nqk0ddhc"; }) - (fetchNuGet { pname = "System.Drawing.Common"; version = "5.0.0"; sha256 = "0fag8hr2v9bswrsjka311lhbr1a43yzcc36j4fadz0f0kl2hby7h"; }) - (fetchNuGet { pname = "System.Dynamic.Runtime"; version = "4.0.11"; sha256 = "1pla2dx8gkidf7xkciig6nifdsb494axjvzvann8g2lp3dbqasm9"; }) - (fetchNuGet { pname = "System.Globalization"; version = "4.0.11"; sha256 = "070c5jbas2v7smm660zaf1gh0489xanjqymkvafcs4f8cdrs1d5d"; }) - (fetchNuGet { pname = "System.Globalization"; version = "4.3.0"; sha256 = "1cp68vv683n6ic2zqh2s1fn4c2sd87g5hpp6l4d4nj4536jz98ki"; }) - (fetchNuGet { pname = "System.Globalization.Calendars"; version = "4.3.0"; sha256 = "1xwl230bkakzzkrggy1l1lxmm3xlhk4bq2pkv790j5lm8g887lxq"; }) - (fetchNuGet { pname = "System.Globalization.Extensions"; version = "4.3.0"; sha256 = "02a5zfxavhv3jd437bsncbhd2fp1zv4gxzakp1an9l6kdq1mcqls"; }) - (fetchNuGet { pname = "System.IO"; version = "4.1.0"; sha256 = "1g0yb8p11vfd0kbkyzlfsbsp5z44lwsvyc0h3dpw6vqnbi035ajp"; }) - (fetchNuGet { pname = "System.IO"; version = "4.3.0"; sha256 = "05l9qdrzhm4s5dixmx68kxwif4l99ll5gqmh7rqgw554fx0agv5f"; }) - (fetchNuGet { pname = "System.IO.Compression"; version = "4.3.0"; sha256 = "084zc82yi6yllgda0zkgl2ys48sypiswbiwrv7irb3r0ai1fp4vz"; }) - (fetchNuGet { pname = "System.IO.Compression.ZipFile"; version = "4.3.0"; sha256 = "1yxy5pq4dnsm9hlkg9ysh5f6bf3fahqqb6p8668ndy5c0lk7w2ar"; }) - (fetchNuGet { pname = "System.IO.FileSystem"; version = "4.0.1"; sha256 = "0kgfpw6w4djqra3w5crrg8xivbanh1w9dh3qapb28q060wb9flp1"; }) - (fetchNuGet { pname = "System.IO.FileSystem"; version = "4.3.0"; sha256 = "0z2dfrbra9i6y16mm9v1v6k47f0fm617vlb7s5iybjjsz6g1ilmw"; }) - (fetchNuGet { pname = "System.IO.FileSystem.Primitives"; version = "4.0.1"; sha256 = "1s0mniajj3lvbyf7vfb5shp4ink5yibsx945k6lvxa96r8la1612"; }) - (fetchNuGet { pname = "System.IO.FileSystem.Primitives"; version = "4.3.0"; sha256 = "0j6ndgglcf4brg2lz4wzsh1av1gh8xrzdsn9f0yznskhqn1xzj9c"; }) - (fetchNuGet { pname = "System.Linq"; version = "4.1.0"; sha256 = "1ppg83svb39hj4hpp5k7kcryzrf3sfnm08vxd5sm2drrijsla2k5"; }) - (fetchNuGet { pname = "System.Linq"; version = "4.3.0"; sha256 = "1w0gmba695rbr80l1k2h4mrwzbzsyfl2z4klmpbsvsg5pm4a56s7"; }) - (fetchNuGet { pname = "System.Linq.Expressions"; version = "4.1.0"; sha256 = "1gpdxl6ip06cnab7n3zlcg6mqp7kknf73s8wjinzi4p0apw82fpg"; }) - (fetchNuGet { pname = "System.Linq.Expressions"; version = "4.3.0"; sha256 = "0ky2nrcvh70rqq88m9a5yqabsl4fyd17bpr63iy2mbivjs2nyypv"; }) - (fetchNuGet { pname = "System.Memory"; version = "4.5.3"; sha256 = "0naqahm3wljxb5a911d37mwjqjdxv9l0b49p5dmfyijvni2ppy8a"; }) - (fetchNuGet { pname = "System.Memory"; version = "4.5.4"; sha256 = "14gbbs22mcxwggn0fcfs1b062521azb9fbb7c113x0mq6dzq9h6y"; }) - (fetchNuGet { pname = "System.Net.Http"; version = "4.3.0"; sha256 = "1i4gc757xqrzflbk7kc5ksn20kwwfjhw9w7pgdkn19y3cgnl302j"; }) - (fetchNuGet { pname = "System.Net.Primitives"; version = "4.3.0"; sha256 = "0c87k50rmdgmxx7df2khd9qj7q35j9rzdmm2572cc55dygmdk3ii"; }) - (fetchNuGet { pname = "System.Net.Sockets"; version = "4.3.0"; sha256 = "1ssa65k6chcgi6mfmzrznvqaxk8jp0gvl77xhf1hbzakjnpxspla"; }) - (fetchNuGet { pname = "System.Numerics.Vectors"; version = "4.5.0"; sha256 = "1kzrj37yzawf1b19jq0253rcs8hsq1l2q8g69d7ipnhzb0h97m59"; }) - (fetchNuGet { pname = "System.ObjectModel"; version = "4.0.12"; sha256 = "1sybkfi60a4588xn34nd9a58png36i0xr4y4v4kqpg8wlvy5krrj"; }) - (fetchNuGet { pname = "System.ObjectModel"; version = "4.3.0"; sha256 = "191p63zy5rpqx7dnrb3h7prvgixmk168fhvvkkvhlazncf8r3nc2"; }) - (fetchNuGet { pname = "System.Private.Uri"; version = "4.0.1"; sha256 = "0k57qhawjysm4cpbfpc49kl4av7lji310kjcamkl23bwgij5ld9j"; }) - (fetchNuGet { pname = "System.Reactive"; version = "5.0.0"; sha256 = "1lafmpnadhiwxyd543kraxa3jfdpm6ipblxrjlibym9b1ykpr5ik"; }) - (fetchNuGet { pname = "System.Reflection"; version = "4.1.0"; sha256 = "1js89429pfw79mxvbzp8p3q93il6rdff332hddhzi5wqglc4gml9"; }) - (fetchNuGet { pname = "System.Reflection"; version = "4.3.0"; sha256 = "0xl55k0mw8cd8ra6dxzh974nxif58s3k1rjv1vbd7gjbjr39j11m"; }) - (fetchNuGet { pname = "System.Reflection.Emit"; version = "4.0.1"; sha256 = "0ydqcsvh6smi41gyaakglnv252625hf29f7kywy2c70nhii2ylqp"; }) - (fetchNuGet { pname = "System.Reflection.Emit"; version = "4.3.0"; sha256 = "11f8y3qfysfcrscjpjym9msk7lsfxkk4fmz9qq95kn3jd0769f74"; }) - (fetchNuGet { pname = "System.Reflection.Emit"; version = "4.7.0"; sha256 = "121l1z2ypwg02yz84dy6gr82phpys0njk7yask3sihgy214w43qp"; }) - (fetchNuGet { pname = "System.Reflection.Emit.ILGeneration"; version = "4.0.1"; sha256 = "1pcd2ig6bg144y10w7yxgc9d22r7c7ww7qn1frdfwgxr24j9wvv0"; }) - (fetchNuGet { pname = "System.Reflection.Emit.ILGeneration"; version = "4.3.0"; sha256 = "0w1n67glpv8241vnpz1kl14sy7zlnw414aqwj4hcx5nd86f6994q"; }) - (fetchNuGet { pname = "System.Reflection.Emit.Lightweight"; version = "4.0.1"; sha256 = "1s4b043zdbx9k39lfhvsk68msv1nxbidhkq6nbm27q7sf8xcsnxr"; }) - (fetchNuGet { pname = "System.Reflection.Emit.Lightweight"; version = "4.3.0"; sha256 = "0ql7lcakycrvzgi9kxz1b3lljd990az1x6c4jsiwcacrvimpib5c"; }) - (fetchNuGet { pname = "System.Reflection.Extensions"; version = "4.0.1"; sha256 = "0m7wqwq0zqq9gbpiqvgk3sr92cbrw7cp3xn53xvw7zj6rz6fdirn"; }) - (fetchNuGet { pname = "System.Reflection.Extensions"; version = "4.3.0"; sha256 = "02bly8bdc98gs22lqsfx9xicblszr2yan7v2mmw3g7hy6miq5hwq"; }) - (fetchNuGet { pname = "System.Reflection.Primitives"; version = "4.0.1"; sha256 = "1bangaabhsl4k9fg8khn83wm6yial8ik1sza7401621jc6jrym28"; }) - (fetchNuGet { pname = "System.Reflection.Primitives"; version = "4.3.0"; sha256 = "04xqa33bld78yv5r93a8n76shvc8wwcdgr1qvvjh959g3rc31276"; }) - (fetchNuGet { pname = "System.Reflection.TypeExtensions"; version = "4.1.0"; sha256 = "1bjli8a7sc7jlxqgcagl9nh8axzfl11f4ld3rjqsyxc516iijij7"; }) - (fetchNuGet { pname = "System.Reflection.TypeExtensions"; version = "4.3.0"; sha256 = "0y2ssg08d817p0vdag98vn238gyrrynjdj4181hdg780sif3ykp1"; }) - (fetchNuGet { pname = "System.Resources.ResourceManager"; version = "4.0.1"; sha256 = "0b4i7mncaf8cnai85jv3wnw6hps140cxz8vylv2bik6wyzgvz7bi"; }) - (fetchNuGet { pname = "System.Resources.ResourceManager"; version = "4.3.0"; sha256 = "0sjqlzsryb0mg4y4xzf35xi523s4is4hz9q4qgdvlvgivl7qxn49"; }) - (fetchNuGet { pname = "System.Runtime"; version = "4.1.0"; sha256 = "02hdkgk13rvsd6r9yafbwzss8kr55wnj8d5c7xjnp8gqrwc8sn0m"; }) - (fetchNuGet { pname = "System.Runtime"; version = "4.3.0"; sha256 = "066ixvgbf2c929kgknshcxqj6539ax7b9m570cp8n179cpfkapz7"; }) - (fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "4.6.0"; sha256 = "0xmzi2gpbmgyfr75p24rqqsba3cmrqgmcv45lsqp5amgrdwd0f0m"; }) - (fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "5.0.0"; sha256 = "02k25ivn50dmqx5jn8hawwmz24yf0454fjd823qk6lygj9513q4x"; }) - (fetchNuGet { pname = "System.Runtime.Extensions"; version = "4.1.0"; sha256 = "0rw4rm4vsm3h3szxp9iijc3ksyviwsv6f63dng3vhqyg4vjdkc2z"; }) - (fetchNuGet { pname = "System.Runtime.Extensions"; version = "4.3.0"; sha256 = "1ykp3dnhwvm48nap8q23893hagf665k0kn3cbgsqpwzbijdcgc60"; }) - (fetchNuGet { pname = "System.Runtime.Handles"; version = "4.0.1"; sha256 = "1g0zrdi5508v49pfm3iii2hn6nm00bgvfpjq1zxknfjrxxa20r4g"; }) - (fetchNuGet { pname = "System.Runtime.Handles"; version = "4.3.0"; sha256 = "0sw2gfj2xr7sw9qjn0j3l9yw07x73lcs97p8xfc9w1x9h5g5m7i8"; }) - (fetchNuGet { pname = "System.Runtime.InteropServices"; version = "4.1.0"; sha256 = "01kxqppx3dr3b6b286xafqilv4s2n0gqvfgzfd4z943ga9i81is1"; }) - (fetchNuGet { pname = "System.Runtime.InteropServices"; version = "4.3.0"; sha256 = "00hywrn4g7hva1b2qri2s6rabzwgxnbpw9zfxmz28z09cpwwgh7j"; }) - (fetchNuGet { pname = "System.Runtime.InteropServices.RuntimeInformation"; version = "4.3.0"; sha256 = "0q18r1sh4vn7bvqgd6dmqlw5v28flbpj349mkdish2vjyvmnb2ii"; }) - (fetchNuGet { pname = "System.Runtime.Numerics"; version = "4.3.0"; sha256 = "19rav39sr5dky7afygh309qamqqmi9kcwvz3i0c5700v0c5cg61z"; }) - (fetchNuGet { pname = "System.Runtime.Serialization.Primitives"; version = "4.1.1"; sha256 = "042rfjixknlr6r10vx2pgf56yming8lkjikamg3g4v29ikk78h7k"; }) - (fetchNuGet { pname = "System.Security.Cryptography.Algorithms"; version = "4.3.0"; sha256 = "03sq183pfl5kp7gkvq77myv7kbpdnq3y0xj7vi4q1kaw54sny0ml"; }) - (fetchNuGet { pname = "System.Security.Cryptography.Cng"; version = "4.3.0"; sha256 = "1k468aswafdgf56ab6yrn7649kfqx2wm9aslywjam1hdmk5yypmv"; }) - (fetchNuGet { pname = "System.Security.Cryptography.Csp"; version = "4.3.0"; sha256 = "1x5wcrddf2s3hb8j78cry7yalca4lb5vfnkrysagbn6r9x6xvrx1"; }) - (fetchNuGet { pname = "System.Security.Cryptography.Encoding"; version = "4.3.0"; sha256 = "1jr6w70igqn07k5zs1ph6xja97hxnb3mqbspdrff6cvssgrixs32"; }) - (fetchNuGet { pname = "System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0givpvvj8yc7gv4lhb6s1prq6p2c4147204a0wib89inqzd87gqc"; }) - (fetchNuGet { pname = "System.Security.Cryptography.Primitives"; version = "4.3.0"; sha256 = "0pyzncsv48zwly3lw4f2dayqswcfvdwq2nz0dgwmi7fj3pn64wby"; }) - (fetchNuGet { pname = "System.Security.Cryptography.X509Certificates"; version = "4.3.0"; sha256 = "0valjcz5wksbvijylxijjxb1mp38mdhv03r533vnx1q3ikzdav9h"; }) - (fetchNuGet { pname = "System.Security.Principal.Windows"; version = "4.7.0"; sha256 = "1a56ls5a9sr3ya0nr086sdpa9qv0abv31dd6fp27maqa9zclqq5d"; }) - (fetchNuGet { pname = "System.Text.Encoding"; version = "4.0.11"; sha256 = "1dyqv0hijg265dwxg6l7aiv74102d6xjiwplh2ar1ly6xfaa4iiw"; }) - (fetchNuGet { pname = "System.Text.Encoding"; version = "4.3.0"; sha256 = "1f04lkir4iladpp51sdgmis9dj4y8v08cka0mbmsy0frc9a4gjqr"; }) - (fetchNuGet { pname = "System.Text.Encoding.CodePages"; version = "4.7.1"; sha256 = "1y1hdap9qbl7vp74j8s9zcbh3v1rnrrvcc55wj1hl6has2v3qh1r"; }) - (fetchNuGet { pname = "System.Text.Encoding.Extensions"; version = "4.0.11"; sha256 = "08nsfrpiwsg9x5ml4xyl3zyvjfdi4mvbqf93kjdh11j4fwkznizs"; }) - (fetchNuGet { pname = "System.Text.Encoding.Extensions"; version = "4.3.0"; sha256 = "11q1y8hh5hrp5a3kw25cb6l00v5l5dvirkz8jr3sq00h1xgcgrxy"; }) - (fetchNuGet { pname = "System.Text.Encodings.Web"; version = "5.0.0"; sha256 = "144pgy65jc3bkar7d4fg1c0rq6qmkx68gj9k1ldk97558w22v1r1"; }) - (fetchNuGet { pname = "System.Text.Json"; version = "5.0.0"; sha256 = "1gpgl18z6qrgmqrikgh99xkjwzb1didrjp77bch7nrlra21gr4ks"; }) - (fetchNuGet { pname = "System.Text.RegularExpressions"; version = "4.1.0"; sha256 = "1mw7vfkkyd04yn2fbhm38msk7dz2xwvib14ygjsb8dq2lcvr18y7"; }) - (fetchNuGet { pname = "System.Text.RegularExpressions"; version = "4.3.0"; sha256 = "1bgq51k7fwld0njylfn7qc5fmwrk2137gdq7djqdsw347paa9c2l"; }) - (fetchNuGet { pname = "System.Threading"; version = "4.0.11"; sha256 = "19x946h926bzvbsgj28csn46gak2crv2skpwsx80hbgazmkgb1ls"; }) - (fetchNuGet { pname = "System.Threading"; version = "4.3.0"; sha256 = "0rw9wfamvhayp5zh3j7p1yfmx9b5khbf4q50d8k5rk993rskfd34"; }) - (fetchNuGet { pname = "System.Threading.Tasks"; version = "4.0.11"; sha256 = "0nr1r41rak82qfa5m0lhk9mp0k93bvfd7bbd9sdzwx9mb36g28p5"; }) - (fetchNuGet { pname = "System.Threading.Tasks"; version = "4.3.0"; sha256 = "134z3v9abw3a6jsw17xl3f6hqjpak5l682k2vz39spj4kmydg6k7"; }) - (fetchNuGet { pname = "System.Threading.Tasks.Extensions"; version = "4.0.0"; sha256 = "1cb51z062mvc2i8blpzmpn9d9mm4y307xrwi65di8ri18cz5r1zr"; }) - (fetchNuGet { pname = "System.Threading.Tasks.Extensions"; version = "4.3.0"; sha256 = "1xxcx2xh8jin360yjwm4x4cf5y3a2bwpn2ygkfkwkicz7zk50s2z"; }) - (fetchNuGet { pname = "System.Threading.Tasks.Extensions"; version = "4.5.4"; sha256 = "0y6ncasgfcgnjrhynaf0lwpkpkmv4a07sswwkwbwb5h7riisj153"; }) - (fetchNuGet { pname = "System.Threading.Timer"; version = "4.3.0"; sha256 = "1nx773nsx6z5whv8kaa1wjh037id2f1cxhb69pvgv12hd2b6qs56"; }) - (fetchNuGet { pname = "System.ValueTuple"; version = "4.5.0"; sha256 = "00k8ja51d0f9wrq4vv5z2jhq8hy31kac2rg0rv06prylcybzl8cy"; }) - (fetchNuGet { pname = "System.Xml.ReaderWriter"; version = "4.0.11"; sha256 = "0c6ky1jk5ada9m94wcadih98l6k1fvf6vi7vhn1msjixaha419l5"; }) - (fetchNuGet { pname = "System.Xml.ReaderWriter"; version = "4.3.0"; sha256 = "0c47yllxifzmh8gq6rq6l36zzvw4kjvlszkqa9wq3fr59n0hl3s1"; }) - (fetchNuGet { pname = "System.Xml.XDocument"; version = "4.0.11"; sha256 = "0n4lvpqzy9kc7qy1a4acwwd7b7pnvygv895az5640idl2y9zbz18"; }) - (fetchNuGet { pname = "System.Xml.XDocument"; version = "4.3.0"; sha256 = "08h8fm4l77n0nd4i4fk2386y809bfbwqb7ih9d7564ifcxr5ssxd"; }) - (fetchNuGet { pname = "Tmds.DBus"; version = "0.9.0"; sha256 = "0vvx6sg8lxm23g5jvm5wh2gfs95mv85vd52lkq7d1b89bdczczf3"; }) + (fetchNuGet { pname = "Avalonia"; version = "0.10.15"; hash = "sha256-YZCHjRkQ3b4sFQz/WcS68yWtHHDdjkcjmMup259JLgs="; }) + (fetchNuGet { pname = "Avalonia.Angle.Windows.Natives"; version = "2.1.0.2020091801"; hash = "sha256-ahDcJNCqlNniItcat7owREQ0hfIwMWFNhnDu89lAVRI="; }) + (fetchNuGet { pname = "Avalonia.Desktop"; version = "0.10.15"; hash = "sha256-5pIO3hCOyhfnjW0hIJf4tKeNZ6+JLa/t2esI8bYh7HE="; }) + (fetchNuGet { pname = "Avalonia.FreeDesktop"; version = "0.10.15"; hash = "sha256-+vPpBkODP04gPiD2H+fw5jGqTBx5RV37S0u/WoOCAq8="; }) + (fetchNuGet { pname = "Avalonia.Native"; version = "0.10.15"; hash = "sha256-Aiwl+EikxREOOVFihCzfoM8h/KuCUsOgu9vPQrGBEVw="; }) + (fetchNuGet { pname = "Avalonia.Remote.Protocol"; version = "0.10.15"; hash = "sha256-4oBCoaplaEEPObr32WpBpoBSKtfkSdkFDyZkZz//Se0="; }) + (fetchNuGet { pname = "Avalonia.Skia"; version = "0.10.15"; hash = "sha256-EDz78nCxmdPyGRHMtGT7q37K6Gigh7+8ZZmIr7VVlnY="; }) + (fetchNuGet { pname = "Avalonia.Win32"; version = "0.10.15"; hash = "sha256-nPv8iPGBCOVBMKjeTw8xjHk6ZcGDsdGIPIwvpCiSqtM="; }) + (fetchNuGet { pname = "Avalonia.X11"; version = "0.10.15"; hash = "sha256-ahqoRw/htLvmyl+bpmpr7kAiV8hlm1BCFWs0hWIKDYg="; }) + (fetchNuGet { pname = "coverlet.collector"; version = "1.2.0"; hash = "sha256-ai492Ynh/rPj/i4nVEsvXMx3W68guiWJVxD3EdNscD0="; }) + (fetchNuGet { pname = "HarfBuzzSharp"; version = "2.8.2-preview.178"; hash = "sha256-dtvXNjVSU1WZ4kFsT6VV56R8iGMPHtdM09dfeejnttw="; }) + (fetchNuGet { pname = "HarfBuzzSharp.NativeAssets.Linux"; version = "2.8.2-preview.178"; hash = "sha256-Vyy8zgtqw1uLJTbWNTS+wt/7yNuO4qzYU5a91Sf1ApA="; }) + (fetchNuGet { pname = "HarfBuzzSharp.NativeAssets.macOS"; version = "2.8.2-preview.178"; hash = "sha256-YqGYQttBmNRCmkSS+JRfqTsPnuMdKxkYU9ctS5mKFV0="; }) + (fetchNuGet { pname = "HarfBuzzSharp.NativeAssets.WebAssembly"; version = "2.8.2-preview.178"; hash = "sha256-QAwWpNc03Vh2RSqIW0xE/rmQCvl/IWs87QREqZNXMtk="; }) + (fetchNuGet { pname = "HarfBuzzSharp.NativeAssets.Win32"; version = "2.8.2-preview.178"; hash = "sha256-J9exQ3FxRHMF8tHTc4zhjYGQ6eBYb4ZKwWhzk2L0uuQ="; }) + (fetchNuGet { pname = "JetBrains.Annotations"; version = "10.3.0"; hash = "sha256-6I/8HtwvEK0JLgRcSrCzCtUfMylj88s5JNcl9ZDoLb8="; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "6.0.29"; hash = "sha256-Mo/zwurMwqJSeWZAzpfmLFeTMTCZNXY+zySA8RdPZXw="; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-x64"; version = "6.0.29"; hash = "sha256-MDba6TI+nnDG1Nzb4219DEXOlxxh2c1zGRzdehhVMww="; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x64"; version = "6.0.29"; hash = "sha256-JASXP49jpQQd4GDL7C7JS4zgRjbsvE2B+T0eyTPr0S8="; }) + (fetchNuGet { pname = "Microsoft.Bcl.AsyncInterfaces"; version = "5.0.0"; hash = "sha256-bpJjcJSUSZH0GeOXoZI12xUQOf2SRtxG7sZV0dWS5TI="; }) + (fetchNuGet { pname = "Microsoft.CodeCoverage"; version = "16.5.0"; hash = "sha256-rpZmS5Yn9f2lrUu+88AjrOcLMd9oFLJoctx7TOznIBg="; }) + (fetchNuGet { pname = "Microsoft.CSharp"; version = "4.0.1"; hash = "sha256-0huoqR2CJ3Z9Q2peaKD09TV3E6saYSqDGZ290K8CrH8="; }) + (fetchNuGet { pname = "Microsoft.NET.Test.Sdk"; version = "16.5.0"; hash = "sha256-2C0hHFcV2TrQGEbYYybhxzVMumqEcRnQd7WWyP5exaU="; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-x64"; version = "6.0.29"; hash = "sha256-lLZZKK4j/5tMg97mF0NaYtBvpIW4AzgVP+wJuidlPw8="; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x64"; version = "6.0.29"; hash = "sha256-m9JOmgZ9/XrMeZRQ1IUnbofyKuGwbaJwFMSff3+mA04="; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "6.0.29"; hash = "sha256-jiWkCOXH8Te9m5SecvCCMwVVdAALnPZb9EF2QpptZT8="; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-x64"; version = "6.0.29"; hash = "sha256-txfm2BBeE30sLJXcF4Ik8JLXzwCglO2Lqnjbp9mxYq4="; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x64"; version = "6.0.29"; hash = "sha256-wdgAt0uE13QYyWTITtrJ0mdEcGAKhH+3RVYAQTK/HkI="; }) + (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.0.1"; hash = "sha256-mZotlGZqtrqDSoBrZhsxFe6fuOv5/BIo0w2Z2x0zVAU="; }) + (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.1.0"; hash = "sha256-FeM40ktcObQJk4nMYShB61H/E8B7tIKfl9ObJ0IOcCM="; }) + (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "2.0.0"; hash = "sha256-IEvBk6wUXSdyCnkj6tHahOJv290tVVT8tyemYcR0Yro="; }) + (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "3.1.1"; hash = "sha256-ByV7aEFjGR4L4Tudg4KaJ96lnzr7RhOxzWGE0p5XFRY="; }) + (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "5.0.0"; hash = "sha256-LIcg1StDcQLPOABp4JRXIs837d7z0ia6+++3SF3jl1c="; }) + (fetchNuGet { pname = "Microsoft.NETCore.Targets"; version = "1.0.1"; hash = "sha256-lxxw/Gy32xHi0fLgFWNj4YTFBSBkjx5l6ucmbTyf7V4="; }) + (fetchNuGet { pname = "Microsoft.NETCore.Targets"; version = "1.1.0"; hash = "sha256-0AqQ2gMS8iNlYkrD+BxtIg7cXMnr9xZHtKAuN4bjfaQ="; }) + (fetchNuGet { pname = "Microsoft.TestPlatform.ObjectModel"; version = "16.5.0"; hash = "sha256-3Fq3c9Fz48815JNZPTytXCw0U4GtPQ7se4w7kF2QBwo="; }) + (fetchNuGet { pname = "Microsoft.TestPlatform.TestHost"; version = "16.5.0"; hash = "sha256-u+wgYjfZ49GF+H8U6SmcTJp07M9r9lYKFElhaozWmyE="; }) + (fetchNuGet { pname = "Microsoft.Win32.Primitives"; version = "4.3.0"; hash = "sha256-mBNDmPXNTW54XLnPAUwBRvkIORFM7/j0D0I2SyQPDEg="; }) + (fetchNuGet { pname = "Microsoft.Win32.SystemEvents"; version = "4.5.0"; hash = "sha256-WFqy842DMQG4W1H2ewXWflfBJ+lQf/LwP0KI4OfY0zo="; }) + (fetchNuGet { pname = "Microsoft.Win32.SystemEvents"; version = "5.0.0"; hash = "sha256-mGUKg+bmB5sE/DCwsTwCsbe00MCwpgxsVW3nCtQiSmo="; }) + (fetchNuGet { pname = "MSTest.TestAdapter"; version = "2.1.0"; hash = "sha256-nx2sj648hXUtrlOGGHi8diWETAifjWkGC9mSaaVHO7w="; }) + (fetchNuGet { pname = "MSTest.TestFramework"; version = "2.1.0"; hash = "sha256-F7T4EhgnYnld6sm2tNQaevoUbKbgQ8ogGyVx6g8kTFU="; }) + (fetchNuGet { pname = "NETStandard.Library"; version = "1.6.1"; hash = "sha256-iNan1ix7RtncGWC9AjAZ2sk70DoxOsmEOgQ10fXm4Pw="; }) + (fetchNuGet { pname = "NETStandard.Library"; version = "2.0.3"; hash = "sha256-Prh2RPebz/s8AzHb2sPHg3Jl8s31inv9k+Qxd293ybo="; }) + (fetchNuGet { pname = "Newtonsoft.Json"; version = "9.0.1"; hash = "sha256-mYCBrgUhIJFzRuLLV9SIiIFHovzfR8Uuqfg6e08EnlU="; }) + (fetchNuGet { pname = "NuGet.Frameworks"; version = "5.0.0"; hash = "sha256-WWLh+v9Y9as+WURW8tUPowQB8HWIiVJzbpKzEWTdMqI="; }) + (fetchNuGet { pname = "runtime.any.System.Runtime"; version = "4.1.0"; hash = "sha256-FZC+BNSzSkN3rObLJJAqwW/vNnJ+PiwdvNNufuISWVY="; }) + (fetchNuGet { pname = "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; hash = "sha256-LXUPLX3DJxsU1Pd3UwjO1PO9NM2elNEDXeu2Mu/vNps="; }) + (fetchNuGet { pname = "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; hash = "sha256-qeSqaUI80+lqw5MK4vMpmO0CZaqrmYktwp6L+vQAb0I="; }) + (fetchNuGet { pname = "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; hash = "sha256-SrHqT9wrCBsxILWtaJgGKd6Odmxm8/Mh7Kh0CUkZVzA="; }) + (fetchNuGet { pname = "runtime.linux-x64.CoreCompat.System.Drawing"; version = "1.0.0-beta009"; hash = "sha256-x0YbFnqFOll95baAWuVhEx8egxDN4poucOQh1bt0YLk="; }) + (fetchNuGet { pname = "runtime.native.System"; version = "4.0.0"; hash = "sha256-bmaM0ovT4X4aqDJOR255Yda/u3fmHZskU++lMnsy894="; }) + (fetchNuGet { pname = "runtime.native.System"; version = "4.3.0"; hash = "sha256-ZBZaodnjvLXATWpXXakFgcy6P+gjhshFXmglrL5xD5Y="; }) + (fetchNuGet { pname = "runtime.native.System.IO.Compression"; version = "4.3.0"; hash = "sha256-DWnXs4vlKoU6WxxvCArTJupV6sX3iBbZh8SbqfHace8="; }) + (fetchNuGet { pname = "runtime.native.System.Net.Http"; version = "4.3.0"; hash = "sha256-c556PyheRwpYhweBjSfIwEyZHnAUB8jWioyKEcp/2dg="; }) + (fetchNuGet { pname = "runtime.native.System.Security.Cryptography.Apple"; version = "4.3.0"; hash = "sha256-2IhBv0i6pTcOyr8FFIyfPEaaCHUmJZ8DYwLUwJ+5waw="; }) + (fetchNuGet { pname = "runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; hash = "sha256-Jy01KhtcCl2wjMpZWH+X3fhHcVn+SyllWFY8zWlz/6I="; }) + (fetchNuGet { pname = "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; hash = "sha256-wyv00gdlqf8ckxEdV7E+Ql9hJIoPcmYEuyeWb5Oz3mM="; }) + (fetchNuGet { pname = "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; hash = "sha256-zi+b4sCFrA9QBiSGDD7xPV27r3iHGlV99gpyVUjRmc4="; }) + (fetchNuGet { pname = "runtime.osx.10.10-x64.CoreCompat.System.Drawing"; version = "5.8.64"; hash = "sha256-F7qsAOHGlOdt7K3pGJyz+bsQmehOwoBEiaxN7CIqq9Q="; }) + (fetchNuGet { pname = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple"; version = "4.3.0"; hash = "sha256-serkd4A7F6eciPiPJtUyJyxzdAtupEcWIZQ9nptEzIM="; }) + (fetchNuGet { pname = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; hash = "sha256-gybQU6mPgaWV3rBG2dbH6tT3tBq8mgze3PROdsuWnX0="; }) + (fetchNuGet { pname = "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; hash = "sha256-VsP72GVveWnGUvS/vjOQLv1U80H2K8nZ4fDAmI61Hm4="; }) + (fetchNuGet { pname = "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; hash = "sha256-4yKGa/IrNCKuQ3zaDzILdNPD32bNdy6xr5gdJigyF5g="; }) + (fetchNuGet { pname = "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; hash = "sha256-HmdJhhRsiVoOOCcUvAwdjpMRiyuSwdcgEv2j9hxi+Zc="; }) + (fetchNuGet { pname = "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; hash = "sha256-pVFUKuPPIx0edQKjzRon3zKq8zhzHEzko/lc01V/jdw="; }) + (fetchNuGet { pname = "runtime.unix.System.Private.Uri"; version = "4.0.1"; hash = "sha256-1Q50COfWkU4/y9eBWj0jPDp3qvy19vRCZnDKQthrhUU="; }) + (fetchNuGet { pname = "SharpCompress"; version = "0.26.0"; hash = "sha256-BcdSBd4Hv1zg1YGpfgKGG37DcxeWpW+sW0EScpF7ng0="; }) + (fetchNuGet { pname = "SkiaSharp"; version = "2.88.0"; hash = "sha256-0YpAxE+MyEydxBSmI9zqqqSII2Qvp2gz9pVUcf1/DnM="; }) + (fetchNuGet { pname = "SkiaSharp"; version = "2.88.1-preview.1"; hash = "sha256-FdKGXukqhZiejuTqq57Yp3L6sU2LYLfq8zNlBo/pN8Q="; }) + (fetchNuGet { pname = "SkiaSharp.NativeAssets.Linux"; version = "2.88.1-preview.1"; hash = "sha256-oR0fcdtU5K8H0M/9URAIVXqUPRZiPHh+0BzMHdnIOOU="; }) + (fetchNuGet { pname = "SkiaSharp.NativeAssets.Linux.NoDependencies"; version = "2.88.0"; hash = "sha256-JzA3K9sOuwLrD0ZPLMrzlCQa8sFQlvWL0a1ihPELtsM="; }) + (fetchNuGet { pname = "SkiaSharp.NativeAssets.macOS"; version = "2.88.0"; hash = "sha256-eMTo8zA0VHOOU8JPc+viWUaWJBy19vm2G97JYCprFzQ="; }) + (fetchNuGet { pname = "SkiaSharp.NativeAssets.macOS"; version = "2.88.1-preview.1"; hash = "sha256-kIgfxQYu1eshg80JfmERNkjBVVJFRTqN1VcQenm2pfA="; }) + (fetchNuGet { pname = "SkiaSharp.NativeAssets.WebAssembly"; version = "2.88.1-preview.1"; hash = "sha256-OH8aBCNQPR0QQWg3cUytuYW49JET+wF8poDYR6gXklc="; }) + (fetchNuGet { pname = "SkiaSharp.NativeAssets.Win32"; version = "2.88.0"; hash = "sha256-dxdvAJOIw55u0Dd9NOyNYfE2XAg3Jv89J54TtTKJtow="; }) + (fetchNuGet { pname = "SkiaSharp.NativeAssets.Win32"; version = "2.88.1-preview.1"; hash = "sha256-m24HrDOUXn6s+HJqMs3eQb2Q5lqTTZp+cvEeEtpSoMw="; }) + (fetchNuGet { pname = "System.AppContext"; version = "4.3.0"; hash = "sha256-yg95LNQOwFlA1tWxXdQkVyJqT4AnoDc+ACmrNvzGiZg="; }) + (fetchNuGet { pname = "System.Buffers"; version = "4.3.0"; hash = "sha256-XqZWb4Kd04960h4U9seivjKseGA/YEIpdplfHYHQ9jk="; }) + (fetchNuGet { pname = "System.Buffers"; version = "4.5.1"; hash = "sha256-wws90sfi9M7kuCPWkv1CEYMJtCqx9QB/kj0ymlsNaxI="; }) + (fetchNuGet { pname = "System.Collections"; version = "4.0.11"; hash = "sha256-puoFMkx4Z55C1XPxNw3np8nzNGjH+G24j43yTIsDRL0="; }) + (fetchNuGet { pname = "System.Collections"; version = "4.3.0"; hash = "sha256-afY7VUtD6w/5mYqrce8kQrvDIfS2GXDINDh73IjxJKc="; }) + (fetchNuGet { pname = "System.Collections.Concurrent"; version = "4.3.0"; hash = "sha256-KMY5DfJnDeIsa13DpqvyN8NkReZEMAFnlmNglVoFIXI="; }) + (fetchNuGet { pname = "System.ComponentModel.Annotations"; version = "4.5.0"; hash = "sha256-15yE2NoT9vmL9oGCaxHClQR1jLW1j1ef5hHMg55xRso="; }) + (fetchNuGet { pname = "System.Console"; version = "4.3.0"; hash = "sha256-Xh3PPBZr0pDbDaK8AEHbdGz7ePK6Yi1ZyRWI1JM6mbo="; }) + (fetchNuGet { pname = "System.Diagnostics.Debug"; version = "4.0.11"; hash = "sha256-P+rSQJVoN6M56jQbs76kZ9G3mAWFdtF27P/RijN8sj4="; }) + (fetchNuGet { pname = "System.Diagnostics.Debug"; version = "4.3.0"; hash = "sha256-fkA79SjPbSeiEcrbbUsb70u9B7wqbsdM9s1LnoKj0gM="; }) + (fetchNuGet { pname = "System.Diagnostics.DiagnosticSource"; version = "4.3.0"; hash = "sha256-OFJRb0ygep0Z3yDBLwAgM/Tkfs4JCDtsNhwDH9cd1Xw="; }) + (fetchNuGet { pname = "System.Diagnostics.TextWriterTraceListener"; version = "4.3.0"; hash = "sha256-gx3IHPvPNRmwpLwtswu12U/ow4f/7OPAeHxyMxw5qyU="; }) + (fetchNuGet { pname = "System.Diagnostics.Tools"; version = "4.0.1"; hash = "sha256-vSBqTbmWXylvRa37aWyktym+gOpsvH43mwr6A962k6U="; }) + (fetchNuGet { pname = "System.Diagnostics.Tools"; version = "4.3.0"; hash = "sha256-gVOv1SK6Ape0FQhCVlNOd9cvQKBvMxRX9K0JPVi8w0Y="; }) + (fetchNuGet { pname = "System.Diagnostics.TraceSource"; version = "4.3.0"; hash = "sha256-xpxwaXsRcgso8Gj0cqY4+Hvvz6vZkmEMh5/J204j3M8="; }) + (fetchNuGet { pname = "System.Diagnostics.Tracing"; version = "4.3.0"; hash = "sha256-hCETZpHHGVhPYvb4C0fh4zs+8zv4GPoixagkLZjpa9Q="; }) + (fetchNuGet { pname = "System.Drawing.Common"; version = "4.5.0"; hash = "sha256-DLYGJraIfSj0Zmpi2H5Am2AsZ+kP5UVGdjakqj9Q2E4="; }) + (fetchNuGet { pname = "System.Drawing.Common"; version = "5.0.0"; hash = "sha256-8PgFBZ3Agd+UI9IMxr4fRIW8IA1hqCl15nqlLTJETzk="; }) + (fetchNuGet { pname = "System.Dynamic.Runtime"; version = "4.0.11"; hash = "sha256-qWqFVxuXioesVftv2RVJZOnmojUvRjb7cS3Oh3oTit4="; }) + (fetchNuGet { pname = "System.Globalization"; version = "4.0.11"; hash = "sha256-rbSgc2PIEc2c2rN6LK3qCREAX3DqA2Nq1WcLrZYsDBw="; }) + (fetchNuGet { pname = "System.Globalization"; version = "4.3.0"; hash = "sha256-caL0pRmFSEsaoeZeWN5BTQtGrAtaQPwFi8YOZPZG5rI="; }) + (fetchNuGet { pname = "System.Globalization.Calendars"; version = "4.3.0"; hash = "sha256-uNOD0EOVFgnS2fMKvMiEtI9aOw00+Pfy/H+qucAQlPc="; }) + (fetchNuGet { pname = "System.Globalization.Extensions"; version = "4.3.0"; hash = "sha256-mmJWA27T0GRVuFP9/sj+4TrR4GJWrzNIk2PDrbr7RQk="; }) + (fetchNuGet { pname = "System.IO"; version = "4.1.0"; hash = "sha256-V6oyQFwWb8NvGxAwvzWnhPxy9dKOfj/XBM3tEC5aHrw="; }) + (fetchNuGet { pname = "System.IO"; version = "4.3.0"; hash = "sha256-ruynQHekFP5wPrDiVyhNiRIXeZ/I9NpjK5pU+HPDiRY="; }) + (fetchNuGet { pname = "System.IO.Compression"; version = "4.3.0"; hash = "sha256-f5PrQlQgj5Xj2ZnHxXW8XiOivaBvfqDao9Sb6AVinyA="; }) + (fetchNuGet { pname = "System.IO.Compression.ZipFile"; version = "4.3.0"; hash = "sha256-WQl+JgWs+GaRMeiahTFUbrhlXIHapzcpTFXbRvAtvvs="; }) + (fetchNuGet { pname = "System.IO.FileSystem"; version = "4.0.1"; hash = "sha256-4VKXFgcGYCTWVXjAlniAVq0dO3o5s8KHylg2wg2/7k0="; }) + (fetchNuGet { pname = "System.IO.FileSystem"; version = "4.3.0"; hash = "sha256-vNIYnvlayuVj0WfRfYKpDrhDptlhp1pN8CYmlVd2TXw="; }) + (fetchNuGet { pname = "System.IO.FileSystem.Primitives"; version = "4.0.1"; hash = "sha256-IpigKMomqb6pmYWkrlf0ZdpILtRluX2cX5sOKVW0Feg="; }) + (fetchNuGet { pname = "System.IO.FileSystem.Primitives"; version = "4.3.0"; hash = "sha256-LMnfg8Vwavs9cMnq9nNH8IWtAtSfk0/Fy4s4Rt9r1kg="; }) + (fetchNuGet { pname = "System.Linq"; version = "4.1.0"; hash = "sha256-ZQpFtYw5N1F1aX0jUK3Tw+XvM5tnlnshkTCNtfVA794="; }) + (fetchNuGet { pname = "System.Linq"; version = "4.3.0"; hash = "sha256-R5uiSL3l6a3XrXSSL6jz+q/PcyVQzEAByiuXZNSqD/A="; }) + (fetchNuGet { pname = "System.Linq.Expressions"; version = "4.1.0"; hash = "sha256-7zqB+FXgkvhtlBzpcZyd81xczWP0D3uWssyAGw3t7b4="; }) + (fetchNuGet { pname = "System.Linq.Expressions"; version = "4.3.0"; hash = "sha256-+3pvhZY7rip8HCbfdULzjlC9FPZFpYoQxhkcuFm2wk8="; }) + (fetchNuGet { pname = "System.Memory"; version = "4.5.3"; hash = "sha256-Cvl7RbRbRu9qKzeRBWjavUkseT2jhZBUWV1SPipUWFk="; }) + (fetchNuGet { pname = "System.Memory"; version = "4.5.4"; hash = "sha256-3sCEfzO4gj5CYGctl9ZXQRRhwAraMQfse7yzKoRe65E="; }) + (fetchNuGet { pname = "System.Net.Http"; version = "4.3.0"; hash = "sha256-UoBB7WPDp2Bne/fwxKF0nE8grJ6FzTMXdT/jfsphj8Q="; }) + (fetchNuGet { pname = "System.Net.Primitives"; version = "4.3.0"; hash = "sha256-MY7Z6vOtFMbEKaLW9nOSZeAjcWpwCtdO7/W1mkGZBzE="; }) + (fetchNuGet { pname = "System.Net.Sockets"; version = "4.3.0"; hash = "sha256-il7dr5VT/QWDg/0cuh+4Es2u8LY//+qqiY9BZmYxSus="; }) + (fetchNuGet { pname = "System.Numerics.Vectors"; version = "4.5.0"; hash = "sha256-qdSTIFgf2htPS+YhLGjAGiLN8igCYJnCCo6r78+Q+c8="; }) + (fetchNuGet { pname = "System.ObjectModel"; version = "4.0.12"; hash = "sha256-MudZ/KYcvYsn2cST3EE049mLikrNkmE7QoUoYKKby+s="; }) + (fetchNuGet { pname = "System.ObjectModel"; version = "4.3.0"; hash = "sha256-gtmRkWP2Kwr3nHtDh0yYtce38z1wrGzb6fjm4v8wN6Q="; }) + (fetchNuGet { pname = "System.Private.Uri"; version = "4.0.1"; hash = "sha256-MjVaZHx8DUFnVUxOEEaU9GxF6EyEXbcuI1V7yRXEp0w="; }) + (fetchNuGet { pname = "System.Reactive"; version = "5.0.0"; hash = "sha256-M5Z8pw8rVb8ilbnTdaOptzk5VFd5DlKa7zzCpuytTtE="; }) + (fetchNuGet { pname = "System.Reflection"; version = "4.1.0"; hash = "sha256-idZHGH2Yl/hha1CM4VzLhsaR8Ljo/rV7TYe7mwRJSMs="; }) + (fetchNuGet { pname = "System.Reflection"; version = "4.3.0"; hash = "sha256-NQSZRpZLvtPWDlvmMIdGxcVuyUnw92ZURo0hXsEshXY="; }) + (fetchNuGet { pname = "System.Reflection.Emit"; version = "4.0.1"; hash = "sha256-F1MvYoQWHCY89/O4JBwswogitqVvKuVfILFqA7dmuHk="; }) + (fetchNuGet { pname = "System.Reflection.Emit"; version = "4.3.0"; hash = "sha256-5LhkDmhy2FkSxulXR+bsTtMzdU3VyyuZzsxp7/DwyIU="; }) + (fetchNuGet { pname = "System.Reflection.Emit"; version = "4.7.0"; hash = "sha256-Fw/CSRD+wajH1MqfKS3Q/sIrUH7GN4K+F+Dx68UPNIg="; }) + (fetchNuGet { pname = "System.Reflection.Emit.ILGeneration"; version = "4.0.1"; hash = "sha256-YG+eJBG5P+5adsHiw/lhJwvREnvdHw6CJyS8ZV4Ujd0="; }) + (fetchNuGet { pname = "System.Reflection.Emit.ILGeneration"; version = "4.3.0"; hash = "sha256-mKRknEHNls4gkRwrEgi39B+vSaAz/Gt3IALtS98xNnA="; }) + (fetchNuGet { pname = "System.Reflection.Emit.Lightweight"; version = "4.0.1"; hash = "sha256-uVvNOnL64CPqsgZP2OLqNmxdkZl6Q0fTmKmv9gcBi+g="; }) + (fetchNuGet { pname = "System.Reflection.Emit.Lightweight"; version = "4.3.0"; hash = "sha256-rKx4a9yZKcajloSZHr4CKTVJ6Vjh95ni+zszPxWjh2I="; }) + (fetchNuGet { pname = "System.Reflection.Extensions"; version = "4.0.1"; hash = "sha256-NsfmzM9G/sN3H8X2cdnheTGRsh7zbRzvegnjDzDH/FQ="; }) + (fetchNuGet { pname = "System.Reflection.Extensions"; version = "4.3.0"; hash = "sha256-mMOCYzUenjd4rWIfq7zIX9PFYk/daUyF0A8l1hbydAk="; }) + (fetchNuGet { pname = "System.Reflection.Primitives"; version = "4.0.1"; hash = "sha256-SFSfpWEyCBMAOerrMCOiKnpT+UAWTvRcmoRquJR6Vq0="; }) + (fetchNuGet { pname = "System.Reflection.Primitives"; version = "4.3.0"; hash = "sha256-5ogwWB4vlQTl3jjk1xjniG2ozbFIjZTL9ug0usZQuBM="; }) + (fetchNuGet { pname = "System.Reflection.TypeExtensions"; version = "4.1.0"; hash = "sha256-R0YZowmFda+xzKNR4kKg7neFoE30KfZwp/IwfRSKVK4="; }) + (fetchNuGet { pname = "System.Reflection.TypeExtensions"; version = "4.3.0"; hash = "sha256-4U4/XNQAnddgQIHIJq3P2T80hN0oPdU2uCeghsDTWng="; }) + (fetchNuGet { pname = "System.Resources.ResourceManager"; version = "4.0.1"; hash = "sha256-cZ2/3/fczLjEpn6j3xkgQV9ouOVjy4Kisgw5xWw9kSw="; }) + (fetchNuGet { pname = "System.Resources.ResourceManager"; version = "4.3.0"; hash = "sha256-idiOD93xbbrbwwSnD4mORA9RYi/D/U48eRUsn/WnWGo="; }) + (fetchNuGet { pname = "System.Runtime"; version = "4.1.0"; hash = "sha256-FViNGM/4oWtlP6w0JC0vJU+k9efLKZ+yaXrnEeabDQo="; }) + (fetchNuGet { pname = "System.Runtime"; version = "4.3.0"; hash = "sha256-51813WXpBIsuA6fUtE5XaRQjcWdQ2/lmEokJt97u0Rg="; }) + (fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "4.6.0"; hash = "sha256-FTjQeMuvqnKxpoVsVh/OlQ21NMaZiFtOdv7VdZ+Iv3Y="; }) + (fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "5.0.0"; hash = "sha256-neARSpLPUzPxEKhJRwoBzhPxK+cKIitLx7WBYncsYgo="; }) + (fetchNuGet { pname = "System.Runtime.Extensions"; version = "4.1.0"; hash = "sha256-X7DZ5CbPY7jHs20YZ7bmcXs9B5Mxptu/HnBUvUnNhGc="; }) + (fetchNuGet { pname = "System.Runtime.Extensions"; version = "4.3.0"; hash = "sha256-wLDHmozr84v1W2zYCWYxxj0FR0JDYHSVRaRuDm0bd/o="; }) + (fetchNuGet { pname = "System.Runtime.Handles"; version = "4.0.1"; hash = "sha256-j2QgVO9ZOjv7D1het98CoFpjoYgxjupuIhuBUmLLH7w="; }) + (fetchNuGet { pname = "System.Runtime.Handles"; version = "4.3.0"; hash = "sha256-KJ5aXoGpB56Y6+iepBkdpx/AfaJDAitx4vrkLqR7gms="; }) + (fetchNuGet { pname = "System.Runtime.InteropServices"; version = "4.1.0"; hash = "sha256-QceAYlJvkPRJc/+5jR+wQpNNI3aqGySWWSO30e/FfQY="; }) + (fetchNuGet { pname = "System.Runtime.InteropServices"; version = "4.3.0"; hash = "sha256-8sDH+WUJfCR+7e4nfpftj/+lstEiZixWUBueR2zmHgI="; }) + (fetchNuGet { pname = "System.Runtime.InteropServices.RuntimeInformation"; version = "4.3.0"; hash = "sha256-MYpl6/ZyC6hjmzWRIe+iDoldOMW1mfbwXsduAnXIKGA="; }) + (fetchNuGet { pname = "System.Runtime.Numerics"; version = "4.3.0"; hash = "sha256-P5jHCgMbgFMYiONvzmaKFeOqcAIDPu/U8bOVrNPYKqc="; }) + (fetchNuGet { pname = "System.Runtime.Serialization.Primitives"; version = "4.1.1"; hash = "sha256-80B05oxJbPLGq2pGOSl6NlZvintX9A1CNpna2aN0WRA="; }) + (fetchNuGet { pname = "System.Security.Cryptography.Algorithms"; version = "4.3.0"; hash = "sha256-tAJvNSlczYBJ3Ed24Ae27a55tq/n4D3fubNQdwcKWA8="; }) + (fetchNuGet { pname = "System.Security.Cryptography.Cng"; version = "4.3.0"; hash = "sha256-u17vy6wNhqok91SrVLno2M1EzLHZm6VMca85xbVChsw="; }) + (fetchNuGet { pname = "System.Security.Cryptography.Csp"; version = "4.3.0"; hash = "sha256-oefdTU/Z2PWU9nlat8uiRDGq/PGZoSPRgkML11pmvPQ="; }) + (fetchNuGet { pname = "System.Security.Cryptography.Encoding"; version = "4.3.0"; hash = "sha256-Yuge89N6M+NcblcvXMeyHZ6kZDfwBv3LPMDiF8HhJss="; }) + (fetchNuGet { pname = "System.Security.Cryptography.OpenSsl"; version = "4.3.0"; hash = "sha256-DL+D2sc2JrQiB4oAcUggTFyD8w3aLEjJfod5JPe+Oz4="; }) + (fetchNuGet { pname = "System.Security.Cryptography.Primitives"; version = "4.3.0"; hash = "sha256-fnFi7B3SnVj5a+BbgXnbjnGNvWrCEU6Hp/wjsjWz318="; }) + (fetchNuGet { pname = "System.Security.Cryptography.X509Certificates"; version = "4.3.0"; hash = "sha256-MG3V/owDh273GCUPsGGraNwaVpcydupl3EtPXj6TVG0="; }) + (fetchNuGet { pname = "System.Security.Principal.Windows"; version = "4.7.0"; hash = "sha256-rWBM2U8Kq3rEdaa1MPZSYOOkbtMGgWyB8iPrpIqmpqg="; }) + (fetchNuGet { pname = "System.Text.Encoding"; version = "4.0.11"; hash = "sha256-PEailOvG05CVgPTyKLtpAgRydlSHmtd5K0Y8GSHY2Lc="; }) + (fetchNuGet { pname = "System.Text.Encoding"; version = "4.3.0"; hash = "sha256-GctHVGLZAa/rqkBNhsBGnsiWdKyv6VDubYpGkuOkBLg="; }) + (fetchNuGet { pname = "System.Text.Encoding.CodePages"; version = "4.7.1"; hash = "sha256-OUA8ttAKGgqD5KUwtnO2OewBF/tJI0nO3YcunK5qMPg="; }) + (fetchNuGet { pname = "System.Text.Encoding.Extensions"; version = "4.0.11"; hash = "sha256-+kf7J3dEhgCbnCM5vHYlsTm5/R/Ud0Jr6elpHm922iI="; }) + (fetchNuGet { pname = "System.Text.Encoding.Extensions"; version = "4.3.0"; hash = "sha256-vufHXg8QAKxHlujPHHcrtGwAqFmsCD6HKjfDAiHyAYc="; }) + (fetchNuGet { pname = "System.Text.Encodings.Web"; version = "5.0.0"; hash = "sha256-IYctBEelnDQbDTPJh0yfFRucAQvPkXaymmswWYx/l5A="; }) + (fetchNuGet { pname = "System.Text.Json"; version = "5.0.0"; hash = "sha256-epL8glCZZnsgW+dcmVtsYX0uZ08Jvhkzri9j81Gg774="; }) + (fetchNuGet { pname = "System.Text.RegularExpressions"; version = "4.1.0"; hash = "sha256-x6OQN6MCN7S0fJ6EFTfv4rczdUWjwuWE9QQ0P6fbh9c="; }) + (fetchNuGet { pname = "System.Text.RegularExpressions"; version = "4.3.0"; hash = "sha256-VLCk1D1kcN2wbAe3d0YQM/PqCsPHOuqlBY1yd2Yo+K0="; }) + (fetchNuGet { pname = "System.Threading"; version = "4.0.11"; hash = "sha256-mob1Zv3qLQhQ1/xOLXZmYqpniNUMCfn02n8ZkaAhqac="; }) + (fetchNuGet { pname = "System.Threading"; version = "4.3.0"; hash = "sha256-ZDQ3dR4pzVwmaqBg4hacZaVenQ/3yAF/uV7BXZXjiWc="; }) + (fetchNuGet { pname = "System.Threading.Tasks"; version = "4.0.11"; hash = "sha256-5SLxzFg1df6bTm2t09xeI01wa5qQglqUwwJNlQPJIVs="; }) + (fetchNuGet { pname = "System.Threading.Tasks"; version = "4.3.0"; hash = "sha256-Z5rXfJ1EXp3G32IKZGiZ6koMjRu0n8C1NGrwpdIen4w="; }) + (fetchNuGet { pname = "System.Threading.Tasks.Extensions"; version = "4.0.0"; hash = "sha256-+YdcPkMhZhRbMZHnfsDwpNbUkr31X7pQFGxXYcAPZbE="; }) + (fetchNuGet { pname = "System.Threading.Tasks.Extensions"; version = "4.3.0"; hash = "sha256-X2hQ5j+fxcmnm88Le/kSavjiGOmkcumBGTZKBLvorPc="; }) + (fetchNuGet { pname = "System.Threading.Tasks.Extensions"; version = "4.5.4"; hash = "sha256-owSpY8wHlsUXn5xrfYAiu847L6fAKethlvYx97Ri1ng="; }) + (fetchNuGet { pname = "System.Threading.Timer"; version = "4.3.0"; hash = "sha256-pmhslmhQhP32TWbBzoITLZ4BoORBqYk25OWbru04p9s="; }) + (fetchNuGet { pname = "System.ValueTuple"; version = "4.5.0"; hash = "sha256-niH6l2fU52vAzuBlwdQMw0OEoRS/7E1w5smBFoqSaAI="; }) + (fetchNuGet { pname = "System.Xml.ReaderWriter"; version = "4.0.11"; hash = "sha256-haZAFFQ9Sl2DhfvEbdx2YRqKEoxNMU5STaqpMmXw0zA="; }) + (fetchNuGet { pname = "System.Xml.ReaderWriter"; version = "4.3.0"; hash = "sha256-QQ8KgU0lu4F5Unh+TbechO//zaAGZ4MfgvW72Cn1hzA="; }) + (fetchNuGet { pname = "System.Xml.XDocument"; version = "4.0.11"; hash = "sha256-KPz1kxe0RUBM+aoktJ/f9p51GudMERU8Pmwm//HdlFg="; }) + (fetchNuGet { pname = "System.Xml.XDocument"; version = "4.3.0"; hash = "sha256-rWtdcmcuElNOSzCehflyKwHkDRpiOhJJs8CeQ0l1CCI="; }) + (fetchNuGet { pname = "Tmds.DBus"; version = "0.9.0"; hash = "sha256-w332WVsJrdAOnlSUtgvatSTtnoC81C3LG6J2ip42fW8="; }) ] diff --git a/pkgs/by-name/bl/bluetuith/package.nix b/pkgs/by-name/bl/bluetuith/package.nix index b40e613b33e5..ae8106160d64 100644 --- a/pkgs/by-name/bl/bluetuith/package.nix +++ b/pkgs/by-name/bl/bluetuith/package.nix @@ -12,7 +12,7 @@ buildGoModule rec { owner = "darkhz"; repo = pname; rev = "v${version}"; - sha256 = "sha256-yXH/koNT4ec/SOZhSU01iPNAfD1MdMjM2+wNmjXWsrk="; + hash = "sha256-yXH/koNT4ec/SOZhSU01iPNAfD1MdMjM2+wNmjXWsrk="; }; vendorHash = "sha256-tEVzuhE0Di7edGa5eJHLLqOecCuoj02h91TsZiZU1PM="; diff --git a/pkgs/by-name/bm/bmaptool/package.nix b/pkgs/by-name/bm/bmaptool/package.nix index 163aca8edb3b..dedc16bd23fa 100644 --- a/pkgs/by-name/bm/bmaptool/package.nix +++ b/pkgs/by-name/bm/bmaptool/package.nix @@ -8,7 +8,7 @@ python3Packages.buildPythonApplication rec { owner = "yoctoproject"; repo = "bmaptool"; rev = "v${version}"; - sha256 = "sha256-YPY3sNuZ/TASNBPH94iqG6AuBRq5KjioKiuxAcu94+I="; + hash = "sha256-YPY3sNuZ/TASNBPH94iqG6AuBRq5KjioKiuxAcu94+I="; }; propagatedBuildInputs = with python3Packages; [ six ]; diff --git a/pkgs/by-name/bo/boogie/package.nix b/pkgs/by-name/bo/boogie/package.nix index a833c1639503..7cb676ae742e 100644 --- a/pkgs/by-name/bo/boogie/package.nix +++ b/pkgs/by-name/bo/boogie/package.nix @@ -8,7 +8,7 @@ buildDotnetModule rec { owner = "boogie-org"; repo = "boogie"; rev = "v${version}"; - sha256 = "sha256-wpMENrhfD8+bt66gd29xkfLANcMbPpkzDacj0KPuXT4="; + hash = "sha256-wpMENrhfD8+bt66gd29xkfLANcMbPpkzDacj0KPuXT4="; }; projectFile = [ "Source/Boogie.sln" ]; diff --git a/pkgs/by-name/bs/bsc/package.nix b/pkgs/by-name/bs/bsc/package.nix index 48a1c8f994de..bb0e762e46f4 100644 --- a/pkgs/by-name/bs/bsc/package.nix +++ b/pkgs/by-name/bs/bsc/package.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "IlyaGrebnov"; repo = "libbsc"; rev = "refs/tags/v${finalAttrs.version}"; - sha256 = "sha256-reGg5xvoZBbNFFYPPyT2P1LA7oSCUIm9NIDjXyvkP9Q="; + hash = "sha256-reGg5xvoZBbNFFYPPyT2P1LA7oSCUIm9NIDjXyvkP9Q="; }; enableParallelBuilding = true; diff --git a/pkgs/by-name/bu/buckle/package.nix b/pkgs/by-name/bu/buckle/package.nix index 390c78534b11..c4139ebe5805 100644 --- a/pkgs/by-name/bu/buckle/package.nix +++ b/pkgs/by-name/bu/buckle/package.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { owner = "benbrittain"; repo = "buckle"; rev = "v${version}"; - sha256 = "sha256-eWhcDzw+6I5N0dse5avwhcQ/y6YZ6b3QKyBwWBrA/xo="; + hash = "sha256-eWhcDzw+6I5N0dse5avwhcQ/y6YZ6b3QKyBwWBrA/xo="; }; buildInputs = lib.optionals stdenv.isDarwin [ diff --git a/pkgs/by-name/bu/buildkite-agent/package.nix b/pkgs/by-name/bu/buildkite-agent/package.nix index 8da59b372413..dbb1158b8473 100644 --- a/pkgs/by-name/bu/buildkite-agent/package.nix +++ b/pkgs/by-name/bu/buildkite-agent/package.nix @@ -19,7 +19,7 @@ buildGoModule rec { owner = "buildkite"; repo = "agent"; rev = "v${version}"; - sha256 = "sha256-QsSCIAy0ekkZiqO/cFcPNNkXa3FLL3Z1LJoKsjzB6jw="; + hash = "sha256-QsSCIAy0ekkZiqO/cFcPNNkXa3FLL3Z1LJoKsjzB6jw="; }; vendorHash = "sha256-xp836ZT2x20ZbkTEubhiZlLmK9n2F8mCSWZTHmAuu6A="; diff --git a/pkgs/by-name/bu/bundix/package.nix b/pkgs/by-name/bu/bundix/package.nix index f324ebecda61..a595649cac9b 100644 --- a/pkgs/by-name/bu/bundix/package.nix +++ b/pkgs/by-name/bu/bundix/package.nix @@ -18,7 +18,7 @@ buildRubyGem rec { owner = "nix-community"; repo = "bundix"; rev = version; - sha256 = "sha256-QnNdseCSwQYhO/ybzWsflMEk68TMgPU3HqXJ7av3SHE="; + hash = "sha256-QnNdseCSwQYhO/ybzWsflMEk68TMgPU3HqXJ7av3SHE="; }; buildInputs = [ ruby bundler ]; diff --git a/pkgs/by-name/bu/bupc/package.nix b/pkgs/by-name/bu/bupc/package.nix index ddec40e49cb9..228de48e603a 100644 --- a/pkgs/by-name/bu/bupc/package.nix +++ b/pkgs/by-name/bu/bupc/package.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "http://upc.lbl.gov/download/release/berkeley_upc-${version}.tar.gz"; - sha256 = "sha256-JdpFORlXHpCQE+TivoQQnjQlxQN7C8BNfHvTOSwXbYQ="; + hash = "sha256-JdpFORlXHpCQE+TivoQQnjQlxQN7C8BNfHvTOSwXbYQ="; }; postPatch = '' diff --git a/pkgs/by-name/c2/c2patool/package.nix b/pkgs/by-name/c2/c2patool/package.nix index 43f120fd09a8..3ff340432e8b 100644 --- a/pkgs/by-name/c2/c2patool/package.nix +++ b/pkgs/by-name/c2/c2patool/package.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { owner = "contentauth"; repo = pname; rev = "v${version}"; - sha256 = "sha256-f1Ec2dJGVjk9Jp5nmcVYwTyIlmnZmERj1pV9weVO3lI="; + hash = "sha256-f1Ec2dJGVjk9Jp5nmcVYwTyIlmnZmERj1pV9weVO3lI="; }; cargoHash = "sha256-wUGOabFTKLCEmg4zNPUklK3YddIIM4N3pev2TtlVthM="; diff --git a/pkgs/by-name/ca/cardboard/package.nix b/pkgs/by-name/ca/cardboard/package.nix index 6c859002114a..e8bc82fd1cf0 100644 --- a/pkgs/by-name/ca/cardboard/package.nix +++ b/pkgs/by-name/ca/cardboard/package.nix @@ -46,7 +46,7 @@ let name = "expected"; url = "https://gitlab.com/cardboardwm/expected"; rev = "0ee13cb2b058809aa9708c45ca18d494e72a759e"; - sha256 = "sha256-gYr4/pjuLlr3k6Jcrg2/SzJLtbgyA+ZN2oMHkHXANDo="; + hash = "sha256-gYr4/pjuLlr3k6Jcrg2/SzJLtbgyA+ZN2oMHkHXANDo="; }; # wlroots.wrap @@ -54,7 +54,7 @@ let name = "wlroots"; url = "https://github.com/swaywm/wlroots"; rev = "0.12.0"; - sha256 = "sha256-1rE3D+kQprjcjobc95/mQkUa5y1noY0MdoYJ/SpFQwY="; + hash = "sha256-1rE3D+kQprjcjobc95/mQkUa5y1noY0MdoYJ/SpFQwY="; }; # the source itself diff --git a/pkgs/by-name/ca/caribou/package.nix b/pkgs/by-name/ca/caribou/package.nix index 34621a8d6a0a..463fe2f7e281 100644 --- a/pkgs/by-name/ca/caribou/package.nix +++ b/pkgs/by-name/ca/caribou/package.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/caribou/${lib.versions.majorMinor version}/${name}.tar.xz"; - sha256 = "0mfychh1q3dx0b96pjz9a9y112bm9yqyim40yykzxx1hppsdjhww"; + hash = "sha256-nEPZ9L0w9P6n94DU6LFPdYkQfFLpy2vSAr0NHCBk3lU="; }; patches = [ @@ -40,22 +40,22 @@ stdenv.mkDerivation rec { # https://bugzilla.gnome.org/show_bug.cgi?id=791001 (fetchurl { url = "https://bugzilla.gnome.org/attachment.cgi?id=364774"; - sha256 = "15k1455grf6knlrxqbjnk7sals1730b0whj30451scp46wyvykvd"; + hash = "sha256-bU+/PTfkMh0KAUNCDhYYJ2iq9JlWLtwztdO4/EohYZY="; }) # Stop patching the generated GIR, fixes build with latest vala (fetchurl { url = "https://gitlab.gnome.org/GNOME/caribou/-/commit/c52ce71c49dc8d6109a58d16cc8d491d7bd1d781.patch"; - sha256 = "sha256-jbF1Ygp8Q0ENN/5aEpROuK5zkufIfn6cGW8dncl7ET4="; + hash = "sha256-jbF1Ygp8Q0ENN/5aEpROuK5zkufIfn6cGW8dncl7ET4="; }) (fetchurl { name = "fix-build-modern-vala.patch"; url = "https://gitlab.gnome.org/GNOME/caribou/-/commit/76fbd11575f918fc898cb0f5defe07f67c11ec38.patch"; - sha256 = "0qy27zk7889hg51nx40afgppcx9iaihxbg3aqz9w35d6fmhr2k2y"; + hash = "sha256-XkyRYXWmlcHTx2q81WFUMXV273MKkG5DeTAhdOY/wmM="; }) (fetchurl { name = "CVE-2021-3567.patch"; url = "https://gitlab.gnome.org/GNOME/caribou/-/commit/d41c8e44b12222a290eaca16703406b113a630c6.patch"; - sha256 = "1vd2j3823k2p3msv7fq2437p3jvxzbd7hyh07i80g9754ylh92y8"; + hash = "sha256-yIsEqSflpAdQPAB6eNr6fctxzyACu7N1HVfMIdCQou0="; }) ]; diff --git a/pkgs/by-name/ca/catppuccin/package.nix b/pkgs/by-name/ca/catppuccin/package.nix index 2463b1fde6db..c547de3b3c47 100644 --- a/pkgs/by-name/ca/catppuccin/package.nix +++ b/pkgs/by-name/ca/catppuccin/package.nix @@ -69,7 +69,7 @@ let owner = "catppuccin"; repo = "Kvantum"; rev = "d1e174c85311de9715aefc1eba4b8efd6b2730fc"; - sha256 = "sha256-IrHo8pnR3u90bq12m7FEXucUF79+iub3I9vgH5h86Lk="; + hash = "sha256-IrHo8pnR3u90bq12m7FEXucUF79+iub3I9vgH5h86Lk="; }; lazygit = fetchFromGitHub { diff --git a/pkgs/by-name/ce/cemu/package.nix b/pkgs/by-name/ce/cemu/package.nix index 66f857945e4b..bc99ee2eeb64 100644 --- a/pkgs/by-name/ce/cemu/package.nix +++ b/pkgs/by-name/ce/cemu/package.nix @@ -44,7 +44,7 @@ let owner = "ocornut"; repo = "imgui"; rev = "v${version}"; - sha256 = "sha256-gf47uLeNiXQic43buB5ZnMqiotlUfIyAsP+3H7yJuFg="; + hash = "sha256-gf47uLeNiXQic43buB5ZnMqiotlUfIyAsP+3H7yJuFg="; }; }; in stdenv.mkDerivation (finalAttrs: { diff --git a/pkgs/by-name/ch/cheese/package.nix b/pkgs/by-name/ch/cheese/package.nix index 0024ad994031..17b5e79c0d92 100644 --- a/pkgs/by-name/ch/cheese/package.nix +++ b/pkgs/by-name/ch/cheese/package.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/cheese/${lib.versions.major version}/cheese-${version}.tar.xz"; - sha256 = "XyGFxMmeVN3yuLr2DIKBmVDlSVLhMuhjmHXz7cv49o4="; + hash = "sha256-XyGFxMmeVN3yuLr2DIKBmVDlSVLhMuhjmHXz7cv49o4="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/ch/chow-centaur/package.nix b/pkgs/by-name/ch/chow-centaur/package.nix index 87c8bc35b1b9..3b281aa96078 100644 --- a/pkgs/by-name/ch/chow-centaur/package.nix +++ b/pkgs/by-name/ch/chow-centaur/package.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "jatinchowdhury18"; repo = "KlonCentaur"; rev = "v${finalAttrs.version}"; - sha256 = "0mrzlf4a6f25xd7z9xanpyq7ybb4al01dzpjsgi0jkmlmadyhc4h"; + hash = "sha256-kDDom6q0Tgni0/L+FgBVZC1/sL9W9fRP60U4o4ijP1c="; fetchSubmodules = true; }; diff --git a/pkgs/by-name/ci/cidr-merger/package.nix b/pkgs/by-name/ci/cidr-merger/package.nix index 97d73e93d7cd..d9e7591573fe 100644 --- a/pkgs/by-name/ci/cidr-merger/package.nix +++ b/pkgs/by-name/ci/cidr-merger/package.nix @@ -11,7 +11,7 @@ buildGoModule rec { owner = "zhanhb"; repo = "cidr-merger"; rev = "v${version}"; - sha256 = "sha256-Kb+89VP7JhBrTE4MM3H/dqoIBgDLnVhKqkgHdymYCgk="; + hash = "sha256-Kb+89VP7JhBrTE4MM3H/dqoIBgDLnVhKqkgHdymYCgk="; }; vendorHash = "sha256-cPri384AX/FdfNtzt3xj4bF+/izSa4sZuAohK0R/7H4="; diff --git a/pkgs/by-name/ci/ciscoPacketTracer7/package.nix b/pkgs/by-name/ci/ciscoPacketTracer7/package.nix index 620e7420439b..a378940e5599 100644 --- a/pkgs/by-name/ci/ciscoPacketTracer7/package.nix +++ b/pkgs/by-name/ci/ciscoPacketTracer7/package.nix @@ -19,7 +19,7 @@ let dontUnpack = true; src = requireFile { name = "PacketTracer_${builtins.replaceStrings ["."] [""] version}_amd64.deb"; - sha256 = "c39802d15dd61d00ba27fb8c116da45fd8562ab4b49996555ad66b88deace27f"; + hash = "sha256-w5gC0V3WHQC6J/uMEW2kX9hWKrS0mZZVWtZriN6s4n8="; url = "https://www.netacad.com"; }; diff --git a/pkgs/by-name/ci/civo/package.nix b/pkgs/by-name/ci/civo/package.nix index 9830daa37615..ff363cdba8b4 100644 --- a/pkgs/by-name/ci/civo/package.nix +++ b/pkgs/by-name/ci/civo/package.nix @@ -13,7 +13,7 @@ buildGoModule rec { owner = "civo"; repo = "cli"; rev = "v${version}"; - sha256 = "sha256-2UWEQZRbtPArYK7Kr0eHtF8+XWXl06v86nAb8nka50g="; + hash = "sha256-2UWEQZRbtPArYK7Kr0eHtF8+XWXl06v86nAb8nka50g="; }; vendorHash = "sha256-ZnomzHbsNKWwAsRjOjESKSdR+KgSiMMlG0xq33qpzX0="; diff --git a/pkgs/by-name/cl/clangbuildanalyzer/package.nix b/pkgs/by-name/cl/clangbuildanalyzer/package.nix index c5dc4f1b4064..5fa21806f2d4 100644 --- a/pkgs/by-name/cl/clangbuildanalyzer/package.nix +++ b/pkgs/by-name/cl/clangbuildanalyzer/package.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "aras-p"; repo = "ClangBuildAnalyzer"; rev = "v${finalAttrs.version}"; - sha256 = "sha256-kmgdk634zM0W0OoRoP/RzepArSipa5bNqdVgdZO9gxo="; + hash = "sha256-kmgdk634zM0W0OoRoP/RzepArSipa5bNqdVgdZO9gxo="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/cl/cli11/package.nix b/pkgs/by-name/cl/cli11/package.nix index 0e7146d8d7ce..596178f81dc2 100644 --- a/pkgs/by-name/cl/cli11/package.nix +++ b/pkgs/by-name/cl/cli11/package.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "CLIUtils"; repo = "CLI11"; rev = "v${finalAttrs.version}"; - sha256 = "sha256-x3/kBlf5LdzkTO4NYOKanZBfcU4oK+fJw9L7cf88LsY="; + hash = "sha256-x3/kBlf5LdzkTO4NYOKanZBfcU4oK+fJw9L7cf88LsY="; }; buildInputs = [ catch2 ]; diff --git a/pkgs/by-name/cl/clipper2/package.nix b/pkgs/by-name/cl/clipper2/package.nix index cbcee8a3aa9a..37ec39677939 100644 --- a/pkgs/by-name/cl/clipper2/package.nix +++ b/pkgs/by-name/cl/clipper2/package.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { owner = "AngusJohnson"; repo = "Clipper2"; rev = "Clipper2_${version}"; - sha256 = "sha256-ASL9uKkXsWyIbD1qaKEL7gf/JuCqzZQZSKHwLT5dKJU="; + hash = "sha256-ASL9uKkXsWyIbD1qaKEL7gf/JuCqzZQZSKHwLT5dKJU="; }; sourceRoot = "${src.name}/CPP"; diff --git a/pkgs/by-name/cl/cljfmt/package.nix b/pkgs/by-name/cl/cljfmt/package.nix index 9fe357071439..34ab2180c7d1 100644 --- a/pkgs/by-name/cl/cljfmt/package.nix +++ b/pkgs/by-name/cl/cljfmt/package.nix @@ -12,7 +12,7 @@ buildGraalvmNativeImage rec { src = fetchurl { url = "https://github.com/weavejester/cljfmt/releases/download/${version}/cljfmt-${version}-standalone.jar"; - sha256 = "sha256-JdrMsRmTT8U8RZDI2SnQxM5WGMpo1pL2CQ5BqLxcf5M="; + hash = "sha256-JdrMsRmTT8U8RZDI2SnQxM5WGMpo1pL2CQ5BqLxcf5M="; }; extraNativeImageBuildArgs = [ diff --git a/pkgs/by-name/cl/cloudflare-utils/package.nix b/pkgs/by-name/cl/cloudflare-utils/package.nix index 44e3688e69fa..d57b772b7cb1 100644 --- a/pkgs/by-name/cl/cloudflare-utils/package.nix +++ b/pkgs/by-name/cl/cloudflare-utils/package.nix @@ -11,7 +11,7 @@ buildGoModule rec { owner = "Cyb3r-Jak3"; repo = "cloudflare-utils"; rev = "v${version}"; - sha256 = "sha256-hmMWMV8hJblXn0aW+S/VpFu9xYdh8k1H1Oa2x5DYMY4="; + hash = "sha256-hmMWMV8hJblXn0aW+S/VpFu9xYdh8k1H1Oa2x5DYMY4="; }; vendorHash = "sha256-c1fUMX7pSiElSWSMBIzoNIEGcnCck9eUGPYXzb2Rv3w="; diff --git a/pkgs/by-name/co/codux/package.nix b/pkgs/by-name/co/codux/package.nix index a73dad8a8984..36054e7dc86f 100644 --- a/pkgs/by-name/co/codux/package.nix +++ b/pkgs/by-name/co/codux/package.nix @@ -9,7 +9,7 @@ let src = fetchurl { url = "https://github.com/wixplosives/codux-versions/releases/download/${version}/Codux-${version}.x86_64.AppImage"; - sha256 = "sha256-/e5tz3/XD/aaxLc/SUrTmWWfqI2Gw/xBTTTSmv5uZEQ="; + hash = "sha256-/e5tz3/XD/aaxLc/SUrTmWWfqI2Gw/xBTTTSmv5uZEQ="; }; appimageContents = appimageTools.extractType2 { inherit pname version src; }; diff --git a/pkgs/by-name/co/coinmp/package.nix b/pkgs/by-name/co/coinmp/package.nix index 8c15c5ca62c3..5aff27ceb93d 100644 --- a/pkgs/by-name/co/coinmp/package.nix +++ b/pkgs/by-name/co/coinmp/package.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "https://www.coin-or.org/download/source/CoinMP/CoinMP-${finalAttrs.version}.tgz"; - sha256 = "13d3j1sdcjzpijp4qks3n0zibk649ac3hhv88hkk8ffxrc6gnn9l"; + hash = "sha256-NFn7DMvdOTQnRGhDOJhKxMwVP7BDT0yujPdL1nSQo40="; }; patches = [ diff --git a/pkgs/by-name/co/connman-gtk/package.nix b/pkgs/by-name/co/connman-gtk/package.nix index 181c43bcde20..d721b3551b04 100644 --- a/pkgs/by-name/co/connman-gtk/package.nix +++ b/pkgs/by-name/co/connman-gtk/package.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { owner = "jgke"; repo = "connman-gtk"; rev = "v${version}"; - sha256 = "09k0hx5hxpbykvslv12l2fq9pxdwpd311mxj038hbqzjghcyidyr"; + hash = "sha256-2bfoGXzy4wXRALLXEEa7vPWbsBNUhE31nn7dDkuHYCY="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/co/connman-ncurses/package.nix b/pkgs/by-name/co/connman-ncurses/package.nix index 53b488159823..9b63dcd7b3aa 100644 --- a/pkgs/by-name/co/connman-ncurses/package.nix +++ b/pkgs/by-name/co/connman-ncurses/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation { owner = "eurogiciel-oss"; repo = "connman-json-client"; rev = "3c34b2ee62d2e188090d20e7ed2fd94bab9c47f2"; - sha256 = "1831r0776fv481g8kgy1dkl750pzv47835dw11sslq2k6mm6i9p1"; + hash = "sha256-4aZoajVTYKp1CLyVgQ7Z/4Jy6GzBv4leQGQ7cw7IYaA="; }; patches = [ @@ -16,7 +16,7 @@ stdenv.mkDerivation { (fetchpatch { url = "https://github.com/void-linux/void-packages/raw/5830ce60e922b7dced8157ededda8c995adb3bb9/srcpkgs/connman-ncurses/patches/lowercase-boolean.patch"; extraPrefix = ""; - sha256 = "uK83DeRyXS2Y0ZZpTYvYNh/1ZM2QQ7QpajiBztaEuSM="; + hash = "sha256-uK83DeRyXS2Y0ZZpTYvYNh/1ZM2QQ7QpajiBztaEuSM="; }) ]; diff --git a/pkgs/by-name/co/connman-notify/package.nix b/pkgs/by-name/co/connman-notify/package.nix index 4b9002441a92..fad8e477ada7 100644 --- a/pkgs/by-name/co/connman-notify/package.nix +++ b/pkgs/by-name/co/connman-notify/package.nix @@ -8,7 +8,7 @@ python3Packages.buildPythonApplication { owner = "wavexx"; repo = "connman-notify"; rev = "24b10a51721b54d932f4cd61ef2756423768c015"; - sha256 = "1k5b5y6114yna2cm0cq82xilicran63hrhlklgv7k3p89057xh8j"; + hash = "sha256-EsF+Ckjojnn2o5PCDIexKrNIYxcIM1CZUNaTEIwvq8w="; }; format = "other"; diff --git a/pkgs/by-name/co/connman_dmenu/package.nix b/pkgs/by-name/co/connman_dmenu/package.nix index 6c4d3dd26ec0..9e9bf070a14d 100644 --- a/pkgs/by-name/co/connman_dmenu/package.nix +++ b/pkgs/by-name/co/connman_dmenu/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation { owner = "march-linux"; repo = "connman_dmenu"; rev = "cc89fec40b574b0d234afeb70ea3c94626ca3f5c"; - sha256 = "061fi83pai4n19l9d7wq6wwj2d7cixwkhkh742c5ibmw1wb274yk"; + hash = "sha256-05MjFg+8rliYIAdOOHmP7DQhOTeYn5ZoCpZEdQeKLhg="; }; buildInputs = [ connman dmenu ]; diff --git a/pkgs/by-name/co/cosmic-greeter/package.nix b/pkgs/by-name/co/cosmic-greeter/package.nix index 372bddac3293..ecc9dea6ab70 100644 --- a/pkgs/by-name/co/cosmic-greeter/package.nix +++ b/pkgs/by-name/co/cosmic-greeter/package.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { owner = "pop-os"; repo = "cosmic-greeter"; rev = "epoch-${version}"; - sha256 = "sha256-dc+VV7eIEUKoio/bQieXcDVZCepf4HtQrIKRslym31Y="; + hash = "sha256-dc+VV7eIEUKoio/bQieXcDVZCepf4HtQrIKRslym31Y="; }; cargoLock = { diff --git a/pkgs/by-name/co/cosmic-icons/package.nix b/pkgs/by-name/co/cosmic-icons/package.nix index 2b8ce03cf460..ed8c4d3e64f1 100644 --- a/pkgs/by-name/co/cosmic-icons/package.nix +++ b/pkgs/by-name/co/cosmic-icons/package.nix @@ -14,7 +14,7 @@ stdenvNoCC.mkDerivation rec { owner = "pop-os"; repo = pname; rev = "ea9e3b8cf12bfa7112b8be8390c0185888358504"; - sha256 = "sha256-KvEKFmsh7ljt9JbaqyZfTUiFZHZM2Ha1TwUDljXXLDw="; + hash = "sha256-KvEKFmsh7ljt9JbaqyZfTUiFZHZM2Ha1TwUDljXXLDw="; }; nativeBuildInputs = [ just ]; diff --git a/pkgs/by-name/co/cosmic-launcher/package.nix b/pkgs/by-name/co/cosmic-launcher/package.nix index f23e00125bde..fe11ba04509c 100644 --- a/pkgs/by-name/co/cosmic-launcher/package.nix +++ b/pkgs/by-name/co/cosmic-launcher/package.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { owner = "pop-os"; repo = pname; rev = "epoch-${version}"; - sha256 = "sha256-LzTVtXyNgaVKyARmrmb6YUi4dWa20EwM1SYMlnawtzk="; + hash = "sha256-LzTVtXyNgaVKyARmrmb6YUi4dWa20EwM1SYMlnawtzk="; }; cargoLock = { diff --git a/pkgs/by-name/co/cosmic-panel/package.nix b/pkgs/by-name/co/cosmic-panel/package.nix index 8847307fa41f..46404ed6fde7 100644 --- a/pkgs/by-name/co/cosmic-panel/package.nix +++ b/pkgs/by-name/co/cosmic-panel/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage { owner = "pop-os"; repo = "cosmic-panel"; rev = "f07cccbd2dc15ede5aeb7646c61c6f62cb32db0c"; - sha256 = "sha256-uUq+xElZMcG5SWzha9/8COaenycII5aiXmm7sXGgjXE="; + hash = "sha256-uUq+xElZMcG5SWzha9/8COaenycII5aiXmm7sXGgjXE="; }; cargoLock = { diff --git a/pkgs/by-name/co/cosmic-session/package.nix b/pkgs/by-name/co/cosmic-session/package.nix index ca12e3448332..e7f2e9a474ef 100644 --- a/pkgs/by-name/co/cosmic-session/package.nix +++ b/pkgs/by-name/co/cosmic-session/package.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { owner = "pop-os"; repo = "cosmic-session"; rev = "epoch-${version}"; - sha256 = "sha256-5zfEBNsMxtKPJZcGYZth/SoXrsg0gpug15VR5fPbvt0="; + hash = "sha256-5zfEBNsMxtKPJZcGYZth/SoXrsg0gpug15VR5fPbvt0="; }; cargoLock = { diff --git a/pkgs/by-name/co/coyim/package.nix b/pkgs/by-name/co/coyim/package.nix index 9e8991b5fbe0..458ee764f1df 100644 --- a/pkgs/by-name/co/coyim/package.nix +++ b/pkgs/by-name/co/coyim/package.nix @@ -19,7 +19,7 @@ buildGoModule { owner = "coyim"; repo = "coyim"; rev = "3f84daa8c27277543b1b4ad4536dde5100d9df12"; - sha256 = "sha256-lzhcUSBuAgYwcmdwnqNxKG0P6ZSjWeLS/g/gaF171D4="; + hash = "sha256-lzhcUSBuAgYwcmdwnqNxKG0P6ZSjWeLS/g/gaF171D4="; }; vendorHash = "sha256-zG7r/Db6XiwKoHRduGj3tEh/KT1hsuBoSGLYaZ+qO0Y="; diff --git a/pkgs/by-name/co/coz/package.nix b/pkgs/by-name/co/coz/package.nix index 2938a60b46de..3bf4826b4dad 100644 --- a/pkgs/by-name/co/coz/package.nix +++ b/pkgs/by-name/co/coz/package.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { owner = "plasma-umass"; repo = "coz"; rev = version; - sha256 = "0val36yw987b1558iiyk3nqg0yy5k9y5wh49v91zj3cs58mmfyhc"; + hash = "sha256-DHpXKyqaDflD2olAXnyaxXvwsB3Tx4hKCeugxL0ZVG0="; }; postPatch = '' diff --git a/pkgs/by-name/cs/csvq/package.nix b/pkgs/by-name/cs/csvq/package.nix index 050b25f8da58..aa1816082b39 100644 --- a/pkgs/by-name/cs/csvq/package.nix +++ b/pkgs/by-name/cs/csvq/package.nix @@ -8,7 +8,7 @@ buildGoModule rec { owner = "mithrandie"; repo = "csvq"; rev = "v${version}"; - sha256 = "sha256-1UK+LSMKryoUf2UWbGt8MU3zs5hH2WdpA2v/jBaIHYE="; + hash = "sha256-1UK+LSMKryoUf2UWbGt8MU3zs5hH2WdpA2v/jBaIHYE="; }; vendorHash = "sha256-byBYp+iNnnsAXR+T3XmdwaeeBG8oB1EgNkDabzgUC98="; diff --git a/pkgs/by-name/da/dapr-cli/package.nix b/pkgs/by-name/da/dapr-cli/package.nix index 798e87d2877e..ffdf5b50769e 100644 --- a/pkgs/by-name/da/dapr-cli/package.nix +++ b/pkgs/by-name/da/dapr-cli/package.nix @@ -8,7 +8,7 @@ buildGoModule rec { owner = "dapr"; repo = "cli"; rev = "v${version}"; - sha256 = "sha256-NjGTH9aKupv/32ibqMSmPPaNA0TSq6AXjN8cjVD6r/M="; + hash = "sha256-NjGTH9aKupv/32ibqMSmPPaNA0TSq6AXjN8cjVD6r/M="; }; vendorHash = "sha256-Ec1z8Wvq8gk8dYcm10ujy7zYWR7Mus1nl21Od3SUFrU="; diff --git a/pkgs/by-name/da/darktable/package.nix b/pkgs/by-name/da/darktable/package.nix index 0d19158f4476..5ccb4d1b63dc 100644 --- a/pkgs/by-name/da/darktable/package.nix +++ b/pkgs/by-name/da/darktable/package.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://github.com/darktable-org/darktable/releases/download/release-${version}/darktable-${version}.tar.xz"; - sha256 = "sha256-kBsOLK7Tb7hhn99MYO37jTETS5R9MFS1xm/VXDivWZE="; + hash = "sha256-kBsOLK7Tb7hhn99MYO37jTETS5R9MFS1xm/VXDivWZE="; }; nativeBuildInputs = [ cmake ninja llvmPackages.llvm pkg-config intltool perl desktop-file-utils wrapGAppsHook3 ]; diff --git a/pkgs/by-name/db/dbqn/package.nix b/pkgs/by-name/db/dbqn/package.nix index 0e9d311c4dc7..832148c928b0 100644 --- a/pkgs/by-name/db/dbqn/package.nix +++ b/pkgs/by-name/db/dbqn/package.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { owner = "dzaima"; repo = "BQN"; rev = "v${version}"; - sha256 = "sha256-AUfT7l7zr/pyG63wX8FMej8RUg7tXC1aroCrunjyw/8="; + hash = "sha256-AUfT7l7zr/pyG63wX8FMej8RUg7tXC1aroCrunjyw/8="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/dc/dconf-editor/package.nix b/pkgs/by-name/dc/dconf-editor/package.nix index b40371f51487..c9a1cc13166d 100644 --- a/pkgs/by-name/dc/dconf-editor/package.nix +++ b/pkgs/by-name/dc/dconf-editor/package.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/dconf-editor/${lib.versions.major version}/dconf-editor-${version}.tar.xz"; - sha256 = "sha256-EYApdnju2uYhfMUUomOMGH0vHR7ycgy5B5t0DEKZQd0="; + hash = "sha256-EYApdnju2uYhfMUUomOMGH0vHR7ycgy5B5t0DEKZQd0="; }; patches = [ diff --git a/pkgs/by-name/de/dep-tree/package.nix b/pkgs/by-name/de/dep-tree/package.nix index 224eddd3d156..5c276b5686ff 100644 --- a/pkgs/by-name/de/dep-tree/package.nix +++ b/pkgs/by-name/de/dep-tree/package.nix @@ -10,25 +10,25 @@ let owner = "gabotechs"; repo = "react-stl-viewer"; rev = "2.2.4"; - sha256 = "sha256-0u9q0UgOn43PE1Y6BUhl1l6RnVjpPraFqZWB+HhQ0s8="; + hash = "sha256-0u9q0UgOn43PE1Y6BUhl1l6RnVjpPraFqZWB+HhQ0s8="; }; react-gcode-viewer = fetchFromGitHub { owner = "gabotechs"; repo = "react-gcode-viewer"; rev = "2.2.4"; - sha256 = "sha256-FHBICLdy0k4j3pPKStg+nkIktMpKS1ADa4m1vYHJ+AQ="; + hash = "sha256-FHBICLdy0k4j3pPKStg+nkIktMpKS1ADa4m1vYHJ+AQ="; }; graphql-js = fetchFromGitHub { owner = "graphql"; repo = "graphql-js"; rev = "v17.0.0-alpha.2"; - sha256 = "sha256-y55SNiMivL7bRsjLEIpsKKyaluI4sXhREpiB6A5jfDU="; + hash = "sha256-y55SNiMivL7bRsjLEIpsKKyaluI4sXhREpiB6A5jfDU="; }; warp = fetchFromGitHub { owner = "seanmonstar"; repo = "warp"; rev = "v0.3.3"; - sha256 = "sha256-76ib8KMjTS2iUOwkQYCsoeL3GwBaA/MRQU2eGjJEpOo="; + hash = "sha256-76ib8KMjTS2iUOwkQYCsoeL3GwBaA/MRQU2eGjJEpOo="; }; }; pname = "dep-tree"; diff --git a/pkgs/by-name/de/devhelp/package.nix b/pkgs/by-name/de/devhelp/package.nix index 54991136da64..c72db7c7e161 100644 --- a/pkgs/by-name/de/devhelp/package.nix +++ b/pkgs/by-name/de/devhelp/package.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/devhelp/${lib.versions.major version}/devhelp-${version}.tar.xz"; - sha256 = "Y87u/QU5LgIESIHvHs1yQpNVPaVzW378CCstE/6F3QQ="; + hash = "sha256-Y87u/QU5LgIESIHvHs1yQpNVPaVzW378CCstE/6F3QQ="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/di/direnv/package.nix b/pkgs/by-name/di/direnv/package.nix index 033f73249f0b..c89d0f19650a 100644 --- a/pkgs/by-name/di/direnv/package.nix +++ b/pkgs/by-name/di/direnv/package.nix @@ -8,7 +8,7 @@ buildGoModule rec { owner = "direnv"; repo = "direnv"; rev = "v${version}"; - sha256 = "sha256-EvzqLS/FiWrbIXDkp0L/T8QNKnRGuQkbMWajI3X3BDw="; + hash = "sha256-EvzqLS/FiWrbIXDkp0L/T8QNKnRGuQkbMWajI3X3BDw="; }; vendorHash = "sha256-FfKvLPv+jUT5s2qQ7QlzBMArI+acj7nhpE8FGMPpp5E="; diff --git a/pkgs/by-name/di/discord-gamesdk/package.nix b/pkgs/by-name/di/discord-gamesdk/package.nix index 40756d68e1e5..7f38bfd45760 100644 --- a/pkgs/by-name/di/discord-gamesdk/package.nix +++ b/pkgs/by-name/di/discord-gamesdk/package.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { src = fetchzip { url = "https://dl-game-sdk.discordapp.net/${version}/discord_game_sdk.zip"; - sha256 = "sha256-83DgL9y3lHLLJ8vgL3EOVk2Tjcue64N+iuDj/UpSdLc="; + hash = "sha256-83DgL9y3lHLLJ8vgL3EOVk2Tjcue64N+iuDj/UpSdLc="; stripRoot = false; }; diff --git a/pkgs/by-name/di/dispad/package.nix b/pkgs/by-name/di/dispad/package.nix index bf7007e1eda2..7abea6a785f1 100644 --- a/pkgs/by-name/di/dispad/package.nix +++ b/pkgs/by-name/di/dispad/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { owner = "BlueDragonX"; repo = "dispad"; rev = "v${version}"; - sha256 = "0y0n9mf1hs3s706gkpmg1lh74m6vvkqc9rdbzgc6s2k7vdl2zp1y"; + hash = "sha256-PtwvaNtnCm3Y+6vlxPDc21RyIA2v3vkMOHpoGFxNFng="; }; buildInputs = [ libX11 libXi libconfuse ]; diff --git a/pkgs/by-name/do/docker-credential-gcr/package.nix b/pkgs/by-name/do/docker-credential-gcr/package.nix index 01db37ea58d3..11362c871745 100644 --- a/pkgs/by-name/do/docker-credential-gcr/package.nix +++ b/pkgs/by-name/do/docker-credential-gcr/package.nix @@ -15,7 +15,7 @@ buildGoModule rec { owner = "GoogleCloudPlatform"; repo = "docker-credential-gcr"; rev = "refs/tags/v${version}"; - sha256 = "sha256-BnYh+MFTj76AWf0GfjzjQ/g/ACgCOLOLVfCSPssvfUY="; + hash = "sha256-BnYh+MFTj76AWf0GfjzjQ/g/ACgCOLOLVfCSPssvfUY="; }; postPatch = '' diff --git a/pkgs/by-name/do/docopts/package.nix b/pkgs/by-name/do/docopts/package.nix index f2d0033e035d..cb63a666973e 100644 --- a/pkgs/by-name/do/docopts/package.nix +++ b/pkgs/by-name/do/docopts/package.nix @@ -11,14 +11,14 @@ buildGoModule rec { owner = "docopt"; repo = "docopts"; rev = "refs/tags/v${version}"; - sha256 = "sha256-GIBrJ5qexeJ6ul5ek9LJZC4J3cNExsTrnxdzRCfoqn8="; + hash = "sha256-GIBrJ5qexeJ6ul5ek9LJZC4J3cNExsTrnxdzRCfoqn8="; }; patches = [ # Migrate project to Go modules. (fetchpatch { url = "https://github.com/docopt/docopts/pull/74/commits/2c516165e72b35516a64c4529dbc938c0aaa9442.patch"; - sha256 = "sha256-Tp05B3tmctnSYIQzCxCc/fhcAWWuEz2ifu/CQZt0XPU="; + hash = "sha256-Tp05B3tmctnSYIQzCxCc/fhcAWWuEz2ifu/CQZt0XPU="; }) ]; diff --git a/pkgs/by-name/do/doppler/package.nix b/pkgs/by-name/do/doppler/package.nix index 64438e458000..175909ad20f8 100644 --- a/pkgs/by-name/do/doppler/package.nix +++ b/pkgs/by-name/do/doppler/package.nix @@ -15,7 +15,7 @@ buildGoModule rec { owner = "dopplerhq"; repo = "cli"; rev = version; - sha256 = "sha256-KiSRMF4S+gz8cnRxkO2SVwO3Rl6ImflK/4MEgkQh2UE="; + hash = "sha256-KiSRMF4S+gz8cnRxkO2SVwO3Rl6ImflK/4MEgkQh2UE="; }; vendorHash = "sha256-NUHWKPszQH/pvnA+j65+bJ6t+C0FDRRbTviqkYztpE4="; diff --git a/pkgs/by-name/do/dovecot_exporter/package.nix b/pkgs/by-name/do/dovecot_exporter/package.nix index 88a5eb11c024..2ef6fd97d8db 100644 --- a/pkgs/by-name/do/dovecot_exporter/package.nix +++ b/pkgs/by-name/do/dovecot_exporter/package.nix @@ -12,7 +12,7 @@ buildGoModule rec { owner = "kumina"; repo = "dovecot_exporter"; rev = "7ef79118ba619ff078594837377189477a4d059f"; - sha256 = "sha256-qJbIBSfHYgFztuivuNjleDa+Bx0KC4OklCh3IvK2XFI="; + hash = "sha256-qJbIBSfHYgFztuivuNjleDa+Bx0KC4OklCh3IvK2XFI="; }; vendorHash = "sha256-+B8sROL1h6ElBfAUBT286yJF9m9zoRvMOrf0z2SVCj0="; @@ -22,7 +22,7 @@ buildGoModule rec { # https://github.com/kumina/dovecot_exporter/pull/23 (fetchpatch { url = "https://github.com/kumina/dovecot_exporter/commit/b5184dd99cf8c79facf20cea281828d302327665.patch"; - sha256 = "sha256-OcdI1fJ/wumDI/wk5PQVot9+Gw/PnsiwgJY7dcRyEsc="; + hash = "sha256-OcdI1fJ/wumDI/wk5PQVot9+Gw/PnsiwgJY7dcRyEsc="; }) ]; diff --git a/pkgs/by-name/ds/dssat/package.nix b/pkgs/by-name/ds/dssat/package.nix index 95653e2ebb7c..7d57195dcde4 100644 --- a/pkgs/by-name/ds/dssat/package.nix +++ b/pkgs/by-name/ds/dssat/package.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation (final: { owner = "DSSAT"; repo = "dssat-csm-os"; rev = "refs/tags/v${final.version}"; - sha256 = "sha256-8OaTM7IXFZjlelx5O4O+bVNQj4dIhGzIk2iCfpqI8uA="; + hash = "sha256-8OaTM7IXFZjlelx5O4O+bVNQj4dIhGzIk2iCfpqI8uA="; }; # maintainers are on windows and have CRLF endings in their files diff --git a/pkgs/by-name/eb/ebtks/package.nix b/pkgs/by-name/eb/ebtks/package.nix index b2ffa4bdc20f..664882305a0a 100644 --- a/pkgs/by-name/eb/ebtks/package.nix +++ b/pkgs/by-name/eb/ebtks/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation { owner = "BIC-MNI"; repo = "EBTKS"; rev = "67e4e197d8a32d6462c9bdc7af44d64ebde4fb5c"; - sha256 = "1a1qw6i47fs1izx60l1ysabpmyx9j5sjnbdv8b47wi2xcc9i3hpq"; + hash = "sha256-+MIRE2NdRH7IQrstK3WRqft6l9I+UGD6j0G7Q6LhOKg="; }; # error: use of undeclared identifier 'finite'; did you mean 'isfinite'? diff --git a/pkgs/by-name/el/elektroid/package.nix b/pkgs/by-name/el/elektroid/package.nix index 0500cacd2b14..75b6c83295f5 100644 --- a/pkgs/by-name/el/elektroid/package.nix +++ b/pkgs/by-name/el/elektroid/package.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation { owner = "dagargo"; repo = "elektroid"; rev = version; - sha256 = "sha256-Qv4jvk6N0IMgYGCPWNYGDZJKGA+UPzhHeYfSrkq5hy4="; + hash = "sha256-Qv4jvk6N0IMgYGCPWNYGDZJKGA+UPzhHeYfSrkq5hy4="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/el/elf2nucleus/package.nix b/pkgs/by-name/el/elf2nucleus/package.nix index 1e755c629338..de0b88e98806 100644 --- a/pkgs/by-name/el/elf2nucleus/package.nix +++ b/pkgs/by-name/el/elf2nucleus/package.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { owner = "kpcyrd"; repo = pname; rev = "v${version}"; - sha256 = "sha256-FAIOtGfGow+0DrPPEBEfvaiinNZLQlGWKJ4DkMj63OA="; + hash = "sha256-FAIOtGfGow+0DrPPEBEfvaiinNZLQlGWKJ4DkMj63OA="; }; cargoHash = "sha256-IeQnI6WTzxSI/VzoHtVukZtB1jX98wzLOT01NMLD5wQ="; diff --git a/pkgs/by-name/en/encled/package.nix b/pkgs/by-name/en/encled/package.nix index 8b48f11bc8b0..474b790775cc 100644 --- a/pkgs/by-name/en/encled/package.nix +++ b/pkgs/by-name/en/encled/package.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation { owner = "amarao"; repo = "sdled"; rev = "60fd6c728112f2f1feb317355bdb1faf9d2f76da"; - sha256 = "1qygzjzsv305662317435nsc6r15k7r6qidp48lgspvy9x5xli73"; + hash = "sha256-40TaS09+X/0oIrdFbPKZJWTDtC2DnDCEMQWMrb/8z+M="; }; buildInputs = [ python3 ]; diff --git a/pkgs/by-name/eo/eog/package.nix b/pkgs/by-name/eo/eog/package.nix index 9ef4b303828b..4cd9ee24860a 100644 --- a/pkgs/by-name/eo/eog/package.nix +++ b/pkgs/by-name/eo/eog/package.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/eog/${lib.versions.major version}/eog-${version}.tar.xz"; - sha256 = "sha256-tQ8yHHCsZK97yqW0Rg3GdbPKYP2tOFYW86x7dw4GZv4="; + hash = "sha256-tQ8yHHCsZK97yqW0Rg3GdbPKYP2tOFYW86x7dw4GZv4="; }; patches = [ diff --git a/pkgs/by-name/ev/everforest-gtk-theme/package.nix b/pkgs/by-name/ev/everforest-gtk-theme/package.nix index 943c743f894d..b20e4505a5c6 100644 --- a/pkgs/by-name/ev/everforest-gtk-theme/package.nix +++ b/pkgs/by-name/ev/everforest-gtk-theme/package.nix @@ -13,7 +13,7 @@ stdenvNoCC.mkDerivation { owner = "Fausto-Korpsvart"; repo = "Everforest-GTK-Theme"; rev = "8481714cf9ed5148694f1916ceba8fe21e14937b"; - sha256 = "sha256-NO12ku8wnW/qMHKxi5TL/dqBxH0+cZbe+fU0iicb9JU="; + hash = "sha256-NO12ku8wnW/qMHKxi5TL/dqBxH0+cZbe+fU0iicb9JU="; }; propagatedUserEnvPkgs = [ diff --git a/pkgs/by-name/f2/f2fs-tools/package.nix b/pkgs/by-name/f2/f2fs-tools/package.nix index 0c91e41da45f..f764f7c529aa 100644 --- a/pkgs/by-name/f2/f2fs-tools/package.nix +++ b/pkgs/by-name/f2/f2fs-tools/package.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { src = fetchzip { url = "https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/f2fs-tools-v${version}.tar.gz"; - sha256 = "sha256-zNG1F//+BTBzlEc6qNVixyuCB6PMZD5Kf8pVK0ePYiA="; + hash = "sha256-zNG1F//+BTBzlEc6qNVixyuCB6PMZD5Kf8pVK0ePYiA="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/fg/fgqcanvas/package.nix b/pkgs/by-name/fg/fgqcanvas/package.nix index ec4774023220..e7d0352a0fba 100644 --- a/pkgs/by-name/fg/fgqcanvas/package.nix +++ b/pkgs/by-name/fg/fgqcanvas/package.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { src = fetchgit { url = "https://git.code.sf.net/p/flightgear/flightgear"; rev = "3168828949d6b42959ccee6c202b8895493edb2b"; - sha256 = "sha256-QiIMkrzaB/ljVf6c+RJNFWKLZa84cIjYPO5nxEFDqjg="; + hash = "sha256-QiIMkrzaB/ljVf6c+RJNFWKLZa84cIjYPO5nxEFDqjg="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/fi/fido2luks/package.nix b/pkgs/by-name/fi/fido2luks/package.nix index 0504959697c6..c19f7381a3bd 100644 --- a/pkgs/by-name/fi/fido2luks/package.nix +++ b/pkgs/by-name/fi/fido2luks/package.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { owner = "shimunn"; repo = pname; rev = version; - sha256 = "sha256-bXwaFiRHURvS5KtTqIj+3GlGNbEulDgMDP51ZiO1w9o="; + hash = "sha256-bXwaFiRHURvS5KtTqIj+3GlGNbEulDgMDP51ZiO1w9o="; }; cargoPatches = [ diff --git a/pkgs/by-name/fi/five-or-more/package.nix b/pkgs/by-name/fi/five-or-more/package.nix index 7c66f4da4a61..b78b26894c8b 100644 --- a/pkgs/by-name/fi/five-or-more/package.nix +++ b/pkgs/by-name/fi/five-or-more/package.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/five-or-more/${lib.versions.majorMinor version}/five-or-more-${version}.tar.xz"; - sha256 = "LRDXLu/esyS0R9YyrwwySW4l/BWjwB230vAMm1HQnvQ="; + hash = "sha256-LRDXLu/esyS0R9YyrwwySW4l/BWjwB230vAMm1HQnvQ="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/fm/fm-tune/package.nix b/pkgs/by-name/fm/fm-tune/package.nix index 59c61dc4ed5b..e5711af1a0a8 100644 --- a/pkgs/by-name/fm/fm-tune/package.nix +++ b/pkgs/by-name/fm/fm-tune/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { owner = "viraptor"; repo = "fm_tune"; rev = version; - sha256 = "pwL2G1Ni1Ixw/N0diSoGGIoVrtmF92mWZ5i57OOvkX4="; + hash = "sha256-pwL2G1Ni1Ixw/N0diSoGGIoVrtmF92mWZ5i57OOvkX4="; }; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/by-name/fo/folder-color-switcher/package.nix b/pkgs/by-name/fo/folder-color-switcher/package.nix index b338b84d0771..e6fd9dd0e569 100644 --- a/pkgs/by-name/fo/folder-color-switcher/package.nix +++ b/pkgs/by-name/fo/folder-color-switcher/package.nix @@ -14,7 +14,7 @@ stdenvNoCC.mkDerivation rec { repo = pname; # They don't really do tags, this is just a named commit. rev = "c9d1a2b9c7f40ff7bb77ee74a277988bb8a4adf2"; - sha256 = "sha256-5k0YybA40MefqQixNFyQFMuy7t4aSGsI3BK0RbZDu28="; + hash = "sha256-5k0YybA40MefqQixNFyQFMuy7t4aSGsI3BK0RbZDu28="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/fo/footswitch/package.nix b/pkgs/by-name/fo/footswitch/package.nix index dd7b31f11a27..5df62b1c8aae 100644 --- a/pkgs/by-name/fo/footswitch/package.nix +++ b/pkgs/by-name/fo/footswitch/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation { owner = "rgerganov"; repo = "footswitch"; rev = "b7493170ecc956ac87df2c36183253c945be2dcf"; - sha256 = "sha256-vwjeWjIXQiFJ0o/wgEBrKP3hQi8Xa/azVS1IE/Q/MyY="; + hash = "sha256-vwjeWjIXQiFJ0o/wgEBrKP3hQi8Xa/azVS1IE/Q/MyY="; }; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/by-name/fo/fork-cleaner/package.nix b/pkgs/by-name/fo/fork-cleaner/package.nix index 30a670ab189b..dbeee75f0068 100644 --- a/pkgs/by-name/fo/fork-cleaner/package.nix +++ b/pkgs/by-name/fo/fork-cleaner/package.nix @@ -14,7 +14,7 @@ buildGoModule { owner = "caarlos0"; repo = "fork-cleaner"; rev = "v${version}"; - sha256 = "sha256-JNmpcDwmxR+s4regOWz8FAJllBNRfOCmVwkDs7tlChA="; + hash = "sha256-JNmpcDwmxR+s4regOWz8FAJllBNRfOCmVwkDs7tlChA="; }; vendorHash = "sha256-QuIaXXkch5PCpX8P755X8j7MeNnbewWo7NB+Vue1/Pk="; diff --git a/pkgs/by-name/fo/four-in-a-row/package.nix b/pkgs/by-name/fo/four-in-a-row/package.nix index f2b9b8335abe..6b10bcd9af45 100644 --- a/pkgs/by-name/fo/four-in-a-row/package.nix +++ b/pkgs/by-name/fo/four-in-a-row/package.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/four-in-a-row/${lib.versions.majorMinor version}/four-in-a-row-${version}.tar.xz"; - sha256 = "10ji60bdfdzb6wk5dkwjc3yww7hqi3yjcx1k1z7x2521h2dpdli1"; + hash = "sha256-IdJ2m4BBFNHPDzN0Jv2IGB7O/WCSz1YmN+s31xYwUYI="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/fr/freenet/package.nix b/pkgs/by-name/fr/freenet/package.nix index 3142baf9501b..96aae5ebdbc0 100644 --- a/pkgs/by-name/fr/freenet/package.nix +++ b/pkgs/by-name/fr/freenet/package.nix @@ -34,7 +34,7 @@ let freenet_ext = fetchurl { url = "https://github.com/freenet/fred/releases/download/build01495/freenet-ext.jar"; - sha256 = "sha256-MvKz1r7t9UE36i+aPr72dmbXafCWawjNF/19tZuk158="; + hash = "sha256-MvKz1r7t9UE36i+aPr72dmbXafCWawjNF/19tZuk158="; }; seednodes = fetchFromGitHub { @@ -53,7 +53,7 @@ let # https://github.com/freenet/fred/pull/827 (fetchpatch { url = "https://github.com/freenet/fred/commit/8991303493f2c0d9933f645337f0a7a5a979e70a.patch"; - sha256 = "sha256-T1zymxRTADVhhwp2TyB+BC/J4gZsT/CUuMrT4COlpTY="; + hash = "sha256-T1zymxRTADVhhwp2TyB+BC/J4gZsT/CUuMrT4COlpTY="; }) ]; diff --git a/pkgs/by-name/fs/fsnotifier/package.nix b/pkgs/by-name/fs/fsnotifier/package.nix index 2b48dfe15ed9..3c2147950897 100644 --- a/pkgs/by-name/fs/fsnotifier/package.nix +++ b/pkgs/by-name/fs/fsnotifier/package.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { owner = "JetBrains"; repo = "intellij-community"; rev = "0f6d9ccb67b8fcad0d802cd76209d503c4ed66a6"; - sha256 = "3TAiVvKi50JQRrVG6J7LUJKTiuOTDyKt4DhoA1QmbrM="; + hash = "sha256-3TAiVvKi50JQRrVG6J7LUJKTiuOTDyKt4DhoA1QmbrM="; sparseCheckout = [ "native/fsNotifier/linux" ]; }; diff --git a/pkgs/by-name/g3/g3kb-switch/package.nix b/pkgs/by-name/g3/g3kb-switch/package.nix index 75e8e010503c..49ccd04573da 100644 --- a/pkgs/by-name/g3/g3kb-switch/package.nix +++ b/pkgs/by-name/g3/g3kb-switch/package.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { owner = "lyokha"; repo = "g3kb-switch"; rev = version; - sha256 = "sha256-kTJfV0xQmWuxibUlfC1qJX2J2nrZ4wimdf/nGciQq0Y="; + hash = "sha256-kTJfV0xQmWuxibUlfC1qJX2J2nrZ4wimdf/nGciQq0Y="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/ge/geary/package.nix b/pkgs/by-name/ge/geary/package.nix index 66f7bc222c27..33c77d9995e2 100644 --- a/pkgs/by-name/ge/geary/package.nix +++ b/pkgs/by-name/ge/geary/package.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/geary/${lib.versions.major version}/geary-${version}.tar.xz"; - sha256 = "r60VEwKBfd8Ji15BbnrH8tXupWejuAu5C9PGKv0TuaE="; + hash = "sha256-r60VEwKBfd8Ji15BbnrH8tXupWejuAu5C9PGKv0TuaE="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/ge/geoserver/package.nix b/pkgs/by-name/ge/geoserver/package.nix index e0b1f491aa15..ed1c82f80643 100644 --- a/pkgs/by-name/ge/geoserver/package.nix +++ b/pkgs/by-name/ge/geoserver/package.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation (finalAttrs: rec { src = fetchurl { url = "mirror://sourceforge/geoserver/GeoServer/${version}/geoserver-${version}-bin.zip"; - sha256 = "sha256-EmW3i0qi7P48AftCz7tqI2Wtvdy3cpyR57+s42dYwt8="; + hash = "sha256-EmW3i0qi7P48AftCz7tqI2Wtvdy3cpyR57+s42dYwt8="; }; patches = [ diff --git a/pkgs/by-name/gh/gh-gei/package.nix b/pkgs/by-name/gh/gh-gei/package.nix index 0160d117a12e..a8e11244ae45 100644 --- a/pkgs/by-name/gh/gh-gei/package.nix +++ b/pkgs/by-name/gh/gh-gei/package.nix @@ -11,7 +11,7 @@ buildDotnetModule rec { owner = "github"; repo = pname; rev = "v${version}"; - sha256 = "sha256-F1sxT9wh/K6VP7n1SlmmvmHlcgxDJw6Rht2hPIiRFjE="; + hash = "sha256-F1sxT9wh/K6VP7n1SlmmvmHlcgxDJw6Rht2hPIiRFjE="; }; projectFile = "src/gei/gei.csproj"; diff --git a/pkgs/by-name/gi/gifsicle/package.nix b/pkgs/by-name/gi/gifsicle/package.nix index 7e604d6c536a..974d7f3ed7da 100644 --- a/pkgs/by-name/gi/gifsicle/package.nix +++ b/pkgs/by-name/gi/gifsicle/package.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://www.lcdf.org/gifsicle/gifsicle-${version}.tar.gz"; - sha256 = "sha256-snEWRwCf0qExMPO+FgUy7UZTjnYr/A8CDepQYYp9yVA="; + hash = "sha256-snEWRwCf0qExMPO+FgUy7UZTjnYr/A8CDepQYYp9yVA="; }; buildInputs = lib.optionals gifview [ xorgproto libXt libX11 ]; diff --git a/pkgs/by-name/gi/git-codeowners/package.nix b/pkgs/by-name/gi/git-codeowners/package.nix index 7df57966f89b..aff55a0a8977 100644 --- a/pkgs/by-name/gi/git-codeowners/package.nix +++ b/pkgs/by-name/gi/git-codeowners/package.nix @@ -7,7 +7,7 @@ rustPlatform.buildRustPackage rec { owner = "softprops"; repo = "git-codeowners"; rev = "v${version}"; - sha256 = "0bzq4ridzb4l1zqrj1r0vlzkjpgfaqwky5jf49cwjhz4ybwrfpkq"; + hash = "sha256-eF6X+fLkQ8lZIk4WPzlW7l05P90gB5nxD5Ss32Im+C8="; }; cargoHash = "sha256-TayvqcVNCFHF5UpR1pPVRe076Pa8LS4duhnZLzYxkQM="; diff --git a/pkgs/by-name/gi/git-fixup/package.nix b/pkgs/by-name/gi/git-fixup/package.nix index af975e6e54ae..9a42a529e726 100644 --- a/pkgs/by-name/gi/git-fixup/package.nix +++ b/pkgs/by-name/gi/git-fixup/package.nix @@ -8,7 +8,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { owner = "keis"; repo = "git-fixup"; rev = "v${finalAttrs.version}"; - sha256 = "sha256-Mue2xgYxJSEu0VoDmB7rnoSuzyT038xzETUO1fwptrs="; + hash = "sha256-Mue2xgYxJSEu0VoDmB7rnoSuzyT038xzETUO1fwptrs="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/by-name/gi/git-my/package.nix b/pkgs/by-name/gi/git-my/package.nix index 9af49a536b4f..7ad13dda2f6e 100644 --- a/pkgs/by-name/gi/git-my/package.nix +++ b/pkgs/by-name/gi/git-my/package.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "davidosomething"; repo = "git-my"; rev = finalAttrs.version; - sha256 = "0jji5zw25jygj7g4f6f3k0p0s9g37r8iad8pa0s67cxbq2v4sc0v"; + hash = "sha256-GzBNtsCrs2M0UBc1FVE+4yUNLpjDGUfekc/LIvgvUUo="; }; buildInputs = [ bash ]; diff --git a/pkgs/by-name/gi/git-standup/package.nix b/pkgs/by-name/gi/git-standup/package.nix index ba8af35849f4..bd85ca57229f 100644 --- a/pkgs/by-name/gi/git-standup/package.nix +++ b/pkgs/by-name/gi/git-standup/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "kamranahmedse"; repo = "git-standup"; rev = finalAttrs.version; - sha256 = "1xnn0jjha56v7l2vj45zzxncl6m5x2hq6nkffgc1bcikhp1pidn7"; + hash = "sha256-x7Z4w4UzshXYc25ag6HopRrKbP+/ELkFPdsUBaUE1vY="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/by-name/gl/glas/package.nix b/pkgs/by-name/gl/glas/package.nix index ee3c6a3bb0ba..589d649fa46d 100644 --- a/pkgs/by-name/gl/glas/package.nix +++ b/pkgs/by-name/gl/glas/package.nix @@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec { owner = "maurobalbi"; repo = "glas"; rev = "v${version}"; - sha256 = "sha256-jMpFxzosaCedwsJ8URlR3Gd/mnlgSBEfA3oIymmEPFU="; + hash = "sha256-jMpFxzosaCedwsJ8URlR3Gd/mnlgSBEfA3oIymmEPFU="; }; cargoHash = "sha256-zESRtefoObpUsu4RfTsqJAyBNylouXffpNK3W/X+w9M="; diff --git a/pkgs/by-name/gl/glfw3/package.nix b/pkgs/by-name/gl/glfw3/package.nix index 33b22890387a..ec21c36b6391 100644 --- a/pkgs/by-name/gl/glfw3/package.nix +++ b/pkgs/by-name/gl/glfw3/package.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation { owner = "glfw"; repo = "GLFW"; rev = version; - sha256 = "sha256-FcnQPDeNHgov1Z07gjFze0VMz2diOrpbKZCsI96ngz0="; + hash = "sha256-FcnQPDeNHgov1Z07gjFze0VMz2diOrpbKZCsI96ngz0="; }; # Fix linkage issues on X11 (https://github.com/NixOS/nixpkgs/issues/142583) diff --git a/pkgs/by-name/gl/glrnvim/package.nix b/pkgs/by-name/gl/glrnvim/package.nix index 076eeb295d99..92a606699e3c 100644 --- a/pkgs/by-name/gl/glrnvim/package.nix +++ b/pkgs/by-name/gl/glrnvim/package.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { owner = "beeender"; repo = "glrnvim"; rev = "v${version}"; - sha256 = "sha256-n3t3s3fzmBGXRDydYxNJ13itKul8dyLNW6HP8Di4hY0="; + hash = "sha256-n3t3s3fzmBGXRDydYxNJ13itKul8dyLNW6HP8Di4hY0="; }; cargoHash = "sha256-cHEse+pXwgPTL8GJyY4s1mhWXGTY8Fnn2rFpA5SNerY="; diff --git a/pkgs/by-name/gn/gnome-2048/package.nix b/pkgs/by-name/gn/gnome-2048/package.nix index 88e373497bbe..ac5c04dec0d0 100644 --- a/pkgs/by-name/gn/gnome-2048/package.nix +++ b/pkgs/by-name/gn/gnome-2048/package.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "mirror://gnome/sources/gnome-2048/${lib.versions.majorMinor finalAttrs.version}/gnome-2048-${finalAttrs.version}.tar.xz"; - sha256 = "0s5fg4z5in1h39fcr69j1qc5ynmg7a8mfprk3mc3c0csq3snfwz2"; + hash = "sha256-4nNn9cCaATZYHTNfV5E6r1pfGA4ymcxcGjDYWD55rmg="; }; patches = [ @@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: { # https://gitlab.gnome.org/GNOME/gnome-2048/-/merge_requests/21 (fetchpatch { url = "https://gitlab.gnome.org/GNOME/gnome-2048/-/commit/194e22699f7166a016cd39ba26dd719aeecfc868.patch"; - sha256 = "Qpn/OJJwblRm5Pi453aU2HwbrNjsf+ftmSnns/5qZ9E="; + hash = "sha256-Qpn/OJJwblRm5Pi453aU2HwbrNjsf+ftmSnns/5qZ9E="; }) ]; diff --git a/pkgs/by-name/gn/gnome-autoar/package.nix b/pkgs/by-name/gn/gnome-autoar/package.nix index 75c971559f7b..3fd81f68de46 100644 --- a/pkgs/by-name/gn/gnome-autoar/package.nix +++ b/pkgs/by-name/gn/gnome-autoar/package.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gnome-autoar/${lib.versions.majorMinor version}/gnome-autoar-${version}.tar.xz"; - sha256 = "wK++MzvPPLFEGh9XTMjsexuBl3eRRdTt7uKJb9rPw8I="; + hash = "sha256-wK++MzvPPLFEGh9XTMjsexuBl3eRRdTt7uKJb9rPw8I="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/gn/gnome-bluetooth/1.0/default.nix b/pkgs/by-name/gn/gnome-bluetooth/1.0/default.nix index e72398326bf9..815252650fc7 100644 --- a/pkgs/by-name/gn/gnome-bluetooth/1.0/default.nix +++ b/pkgs/by-name/gn/gnome-bluetooth/1.0/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "mirror://gnome/sources/gnome-bluetooth/${lib.versions.majorMinor finalAttrs.version}/gnome-bluetooth-${finalAttrs.version}.tar.xz"; - sha256 = "bJSeUsi+zCBU2qzWBJAfZs5c9wml+pHEu3ysyTm1Pqk="; + hash = "sha256-bJSeUsi+zCBU2qzWBJAfZs5c9wml+pHEu3ysyTm1Pqk="; }; patches = [ @@ -47,7 +47,7 @@ stdenv.mkDerivation (finalAttrs: { # sendto/meson.build:24:5: ERROR: Function does not take positional arguments. (fetchpatch { url = "https://gitlab.gnome.org/GNOME/gnome-bluetooth/-/commit/755fd758f866d3a3f7ca482942beee749f13a91e.patch"; - sha256 = "sha256-N0MJ0pYO411o2CTNZHWmEoG2m5TGUjR6YW6HSXHTR/A="; + hash = "sha256-N0MJ0pYO411o2CTNZHWmEoG2m5TGUjR6YW6HSXHTR/A="; }) ]; diff --git a/pkgs/by-name/gn/gnome-color-manager/package.nix b/pkgs/by-name/gn/gnome-color-manager/package.nix index eddc4c5d432f..4c9a0eac04ad 100644 --- a/pkgs/by-name/gn/gnome-color-manager/package.nix +++ b/pkgs/by-name/gn/gnome-color-manager/package.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gnome-color-manager/${lib.versions.majorMinor version}/gnome-color-manager-${version}.tar.xz"; - sha256 = "1vpxa2zjz3lkq9ldjg0fl65db9s6b4kcs8nyaqfz3jygma7ifg3w"; + hash = "sha256-fDwXj6rPy/EdVt4izSZZRqfViqEOPNlowpOOL79Q/e4="; }; patches = [ ./0001-Fix-build-with-Exiv2-0.28.patch ]; diff --git a/pkgs/by-name/gn/gnome-common/package.nix b/pkgs/by-name/gn/gnome-common/package.nix index 1954088e6587..df7eede7fa51 100644 --- a/pkgs/by-name/gn/gnome-common/package.nix +++ b/pkgs/by-name/gn/gnome-common/package.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gnome-common/${lib.versions.majorMinor version}/gnome-common-${version}.tar.xz"; - sha256 = "22569e370ae755e04527b76328befc4c73b62bfd4a572499fde116b8318af8cf"; + hash = "sha256-IlaeNwrnVeBFJ7djKL78THO2K/1KVySZ/eEWuDGK+M8="; }; passthru = { diff --git a/pkgs/by-name/gn/gnome-dictionary/package.nix b/pkgs/by-name/gn/gnome-dictionary/package.nix index 7e11d1dec189..f0b600f58dc1 100644 --- a/pkgs/by-name/gn/gnome-dictionary/package.nix +++ b/pkgs/by-name/gn/gnome-dictionary/package.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gnome-dictionary/${lib.versions.major version}/gnome-dictionary-${version}.tar.xz"; - sha256 = "1d8dhcfys788vv27v34i3s3x3jdvdi2kqn2a5p8c937a9hm0qr9f"; + hash = "sha256-LmUMKkzqjMTQLUpYPEVsu8nRhx6RjH3E3ggd7R2DDbU="; }; patches = [ @@ -35,13 +35,13 @@ stdenv.mkDerivation rec { # We need to explicitly depend on the generated files. (fetchpatch { url = "https://gitlab.gnome.org/Archive/gnome-dictionary/-/commit/87c026cfe4acbcfc62d15950f88a71d8d9678c7e.patch"; - sha256 = "tKesWeOK3OqOxrXm4dZvCZHHdTD7AQbYDjtYDCsLd3A="; + hash = "sha256-tKesWeOK3OqOxrXm4dZvCZHHdTD7AQbYDjtYDCsLd3A="; }) # Fix build with meson 0.61, can be removed on next bump # data/appdata/meson.build:3:5: ERROR: Function does not take positional arguments. (fetchpatch { url = "https://gitlab.gnome.org/Archive/gnome-dictionary/-/commit/cf3f8a67cd6f3059c555ed9cf0f5fba10abb7f68.patch"; - sha256 = "cIRM6ACqsnEo2JWYvr6EBye5o0BudugZMShCe1U5hz8="; + hash = "sha256-cIRM6ACqsnEo2JWYvr6EBye5o0BudugZMShCe1U5hz8="; }) ]; diff --git a/pkgs/by-name/gn/gnome-klotski/package.nix b/pkgs/by-name/gn/gnome-klotski/package.nix index 11680d5466b2..6e47d856c64f 100644 --- a/pkgs/by-name/gn/gnome-klotski/package.nix +++ b/pkgs/by-name/gn/gnome-klotski/package.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gnome-klotski/${lib.versions.majorMinor version}/gnome-klotski-${version}.tar.xz"; - sha256 = "1qm01hdd5yp8chig62bj10912vclbdvywwczs84sfg4zci2phqwi"; + hash = "sha256-kWN4RWSfPKcJ0p9x7ndblG0REghyCfMiZOj60hoMoOI="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/gn/gnome-mines/package.nix b/pkgs/by-name/gn/gnome-mines/package.nix index a1b6bc46f32c..bff53731d040 100644 --- a/pkgs/by-name/gn/gnome-mines/package.nix +++ b/pkgs/by-name/gn/gnome-mines/package.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gnome-mines/${lib.versions.major version}/gnome-mines-${version}.tar.xz"; - sha256 = "NQLps/ccs7LnEcDmAZGH/rzCvKh349RW3KtwD3vjEnI="; + hash = "sha256-NQLps/ccs7LnEcDmAZGH/rzCvKh349RW3KtwD3vjEnI="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/gn/gnome-nettool/package.nix b/pkgs/by-name/gn/gnome-nettool/package.nix index 781851e18c89..2860fdefaaea 100644 --- a/pkgs/by-name/gn/gnome-nettool/package.nix +++ b/pkgs/by-name/gn/gnome-nettool/package.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gnome-nettool/${lib.versions.major version}/gnome-nettool-${version}.tar.xz"; - sha256 = "pU8p7vIDiu5pVRyLGcpPdY5eueIJCkvGtWM9/wGIdR8="; + hash = "sha256-pU8p7vIDiu5pVRyLGcpPdY5eueIJCkvGtWM9/wGIdR8="; }; patches = [ @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { # https://gitlab.gnome.org/GNOME/gnome-nettool/-/merge_requests/3 (fetchpatch { url = "https://gitlab.gnome.org/GNOME/gnome-nettool/-/commit/1124c3e1fdb8472d30b7636500229aa16cdc1244.patch"; - sha256 = "fbpfL8Xb1GsadpQzAdmu8FSPs++bsGCVdcwnzQWttGY="; + hash = "sha256-fbpfL8Xb1GsadpQzAdmu8FSPs++bsGCVdcwnzQWttGY="; }) ]; diff --git a/pkgs/by-name/gn/gnome-notes/package.nix b/pkgs/by-name/gn/gnome-notes/package.nix index c246cb5b912e..0f4c8dbfc5dc 100644 --- a/pkgs/by-name/gn/gnome-notes/package.nix +++ b/pkgs/by-name/gn/gnome-notes/package.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/bijiben/${lib.versions.major version}/bijiben-${version}.tar.xz"; - sha256 = "1gvvb2klkzbmyzwkjgmscdiqcl8lyz9b0rxb4igjz079csq6z805"; + hash = "sha256-BaBvsGbpgC9fJKtnsNL3FFGGY2O6Pjn593X9SadYe78="; }; patches = [ @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { # data/appdata/meson.build:3:5: ERROR: Function does not take positional arguments. (fetchpatch { url = "https://gitlab.gnome.org/GNOME/gnome-notes/-/commit/994af76ce5144062d55d141129bf6bf5fab002ee.patch"; - sha256 = "sha256-z7dPOLZzaqvdqUIDy6+V3dKossRbG0EDjBu2oJCF6b4="; + hash = "sha256-z7dPOLZzaqvdqUIDy6+V3dKossRbG0EDjBu2oJCF6b4="; }) ]; diff --git a/pkgs/by-name/gn/gnome-packagekit/package.nix b/pkgs/by-name/gn/gnome-packagekit/package.nix index 699e24fba18e..173d6d4bd7c5 100644 --- a/pkgs/by-name/gn/gnome-packagekit/package.nix +++ b/pkgs/by-name/gn/gnome-packagekit/package.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gnome-packagekit/${lib.versions.major version}/gnome-packagekit-${version}.tar.xz"; - sha256 = "zaRVplKpI7LqL3Axa9D92Clve2Lu8/r9nOUMjmbF8ZU="; + hash = "sha256-zaRVplKpI7LqL3Axa9D92Clve2Lu8/r9nOUMjmbF8ZU="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/gn/gnome-power-manager/package.nix b/pkgs/by-name/gn/gnome-power-manager/package.nix index 607c5f084139..ac807494d33d 100644 --- a/pkgs/by-name/gn/gnome-power-manager/package.nix +++ b/pkgs/by-name/gn/gnome-power-manager/package.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gnome-power-manager/${lib.versions.major version}/gnome-power-manager-${version}.tar.xz"; - sha256 = "faq0i73bMOnfKrplDLYNBeZnyfiFrOagoeeVDgy90y8="; + hash = "sha256-faq0i73bMOnfKrplDLYNBeZnyfiFrOagoeeVDgy90y8="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/gn/gnome-robots/package.nix b/pkgs/by-name/gn/gnome-robots/package.nix index 5a4ceb8efb65..6ac41501bc1c 100644 --- a/pkgs/by-name/gn/gnome-robots/package.nix +++ b/pkgs/by-name/gn/gnome-robots/package.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gnome-robots/${lib.versions.major version}/gnome-robots-${version}.tar.xz"; - sha256 = "04fbykj576dq1h6cycgfhh8wd6yxmlsqykvj188sbwahay42zgvg"; + hash = "sha256-b78viFdQ8aURCnJPjzWt3ZvGEYTuMc8MDLiZU+T0yxE="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/gn/gnome-screenshot/package.nix b/pkgs/by-name/gn/gnome-screenshot/package.nix index 7af7cec11bfc..ec62a734686e 100644 --- a/pkgs/by-name/gn/gnome-screenshot/package.nix +++ b/pkgs/by-name/gn/gnome-screenshot/package.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gnome-screenshot/${lib.versions.major version}/gnome-screenshot-${version}.tar.xz"; - sha256 = "Stt97JJkKPdCY9V5ZnPPFC5HILbnaPVGio0JM/mMlZc="; + hash = "sha256-Stt97JJkKPdCY9V5ZnPPFC5HILbnaPVGio0JM/mMlZc="; }; patches = [ @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { # https://gitlab.gnome.org/GNOME/gnome-screenshot/-/issues/186 (fetchpatch { url = "https://gitlab.gnome.org/GNOME/gnome-screenshot/-/commit/b60dad3c2536c17bd201f74ad8e40eb74385ed9f.patch"; - sha256 = "Js83h/3xxcw2hsgjzGa5lAYFXVrt6MPhXOTh5dZTx/w="; + hash = "sha256-Js83h/3xxcw2hsgjzGa5lAYFXVrt6MPhXOTh5dZTx/w="; }) ]; diff --git a/pkgs/by-name/gn/gnome-settings-daemon/43/default.nix b/pkgs/by-name/gn/gnome-settings-daemon/43/default.nix index ff0fbbffb066..2643d0f9a904 100644 --- a/pkgs/by-name/gn/gnome-settings-daemon/43/default.nix +++ b/pkgs/by-name/gn/gnome-settings-daemon/43/default.nix @@ -48,14 +48,14 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "mirror://gnome/sources/gnome-settings-daemon/${lib.versions.major finalAttrs.version}/gnome-settings-daemon-${finalAttrs.version}.tar.xz"; - sha256 = "NRO7JPxvgYFmciOmSgZ1NP3M879mMmqUA9OLDw1gE9A="; + hash = "sha256-NRO7JPxvgYFmciOmSgZ1NP3M879mMmqUA9OLDw1gE9A="; }; patches = [ # https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/merge_requests/202 (fetchpatch { url = "https://gitlab.gnome.org/GNOME/gnome-settings-daemon/commit/aae1e774dd9de22fe3520cf9eb2bfbf7216f5eb0.patch"; - sha256 = "O4m0rOW8Zrgu3Q0p0OA8b951VC0FjYbOUk9MLzB9icI="; + hash = "sha256-O4m0rOW8Zrgu3Q0p0OA8b951VC0FjYbOUk9MLzB9icI="; }) (substituteAll { diff --git a/pkgs/by-name/gn/gnome-sound-recorder/package.nix b/pkgs/by-name/gn/gnome-sound-recorder/package.nix index 846624fe6280..bd7bfdf9532a 100644 --- a/pkgs/by-name/gn/gnome-sound-recorder/package.nix +++ b/pkgs/by-name/gn/gnome-sound-recorder/package.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gnome-sound-recorder/${lib.versions.major version}/gnome-sound-recorder-${version}.tar.xz"; - sha256 = "bbbbmjsbUv0KtU+aW/Tymctx5SoTrF/fw+dOtGmFpOY="; + hash = "sha256-bbbbmjsbUv0KtU+aW/Tymctx5SoTrF/fw+dOtGmFpOY="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/gn/gnome-taquin/package.nix b/pkgs/by-name/gn/gnome-taquin/package.nix index e570d9148b45..8cc7aac2c852 100644 --- a/pkgs/by-name/gn/gnome-taquin/package.nix +++ b/pkgs/by-name/gn/gnome-taquin/package.nix @@ -26,18 +26,18 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gnome-taquin/${lib.versions.majorMinor version}/gnome-taquin-${version}.tar.xz"; - sha256 = "0kw131q0ad0rbsp6qifjc8fjlhvjxyihil8a76kj8ya9mn7kvnwn"; + hash = "sha256-lts9j61JeSSnOQrRCKPvckMqHWLSRWyuXhk0BXAYgU8="; }; patches = [ # Fix build with recent Vala. (fetchpatch { url = "https://gitlab.gnome.org/GNOME/gnome-taquin/-/commit/99dea5e7863e112f33f16e59898c56a4f1a547b3.patch"; - sha256 = "U7djuMhb1XJaKAPyogQjaunOkbBK24r25YD7BgH05P4="; + hash = "sha256-U7djuMhb1XJaKAPyogQjaunOkbBK24r25YD7BgH05P4="; }) (fetchpatch { url = "https://gitlab.gnome.org/GNOME/gnome-taquin/-/commit/66be44dc20d114e449fc33156e3939fd05dfbb16.patch"; - sha256 = "RN41RCLHlJyXTARSH9qjsmpYi1UFeMRssoYxRsbngDQ="; + hash = "sha256-RN41RCLHlJyXTARSH9qjsmpYi1UFeMRssoYxRsbngDQ="; }) ]; diff --git a/pkgs/by-name/gn/gnome-tetravex/package.nix b/pkgs/by-name/gn/gnome-tetravex/package.nix index cdf2c28e291d..dc2752f552b9 100644 --- a/pkgs/by-name/gn/gnome-tetravex/package.nix +++ b/pkgs/by-name/gn/gnome-tetravex/package.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gnome-tetravex/${lib.versions.majorMinor version}/gnome-tetravex-${version}.tar.xz"; - sha256 = "06wihvqp2p52zd2dnknsc3rii69qib4a30yp15h558xrg44z3k8z"; + hash = "sha256-H83xCXm5o1JgCdeDociKOJkY82DaTttE+6JccfGGkRs="; }; patches = [ @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { # Taken from https://gitlab.gnome.org/GNOME/gnome-tetravex/-/merge_requests/20 (fetchpatch { url = "https://gitlab.gnome.org/GNOME/gnome-tetravex/-/commit/80912d06f5e588f6aca966fa516103275e58d94e.patch"; - sha256 = "2+nFw5sJzbInibKaq3J10Ufbl3CnZWlgnUtzRTZ5G0I="; + hash = "sha256-2+nFw5sJzbInibKaq3J10Ufbl3CnZWlgnUtzRTZ5G0I="; }) ]; diff --git a/pkgs/by-name/gn/gnome-themes-extra/package.nix b/pkgs/by-name/gn/gnome-themes-extra/package.nix index c40c81b8245f..64d3d4c1a0fe 100644 --- a/pkgs/by-name/gn/gnome-themes-extra/package.nix +++ b/pkgs/by-name/gn/gnome-themes-extra/package.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gnome-themes-extra/${lib.versions.majorMinor version}/gnome-themes-extra-${version}.tar.xz"; - sha256 = "06aqg9asq2vqi9wr29bs4v8z2bf4manhbhfghf4nvw01y2zs0jvw"; + hash = "sha256-fEugv/AB8G2Jg8/BBa2qxC3x0SZ6JZF5ingLrFV6WBk="; }; passthru = { diff --git a/pkgs/by-name/gn/gnome-user-share/package.nix b/pkgs/by-name/gn/gnome-user-share/package.nix index 1d2368478bb1..bfe7dd5bfaa5 100644 --- a/pkgs/by-name/gn/gnome-user-share/package.nix +++ b/pkgs/by-name/gn/gnome-user-share/package.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "mirror://gnome/sources/gnome-user-share/${lib.versions.major finalAttrs.version}/gnome-user-share-${finalAttrs.version}.tar.xz"; - sha256 = "DfMGqgVYMT81Pvf1G/onwDYoGtxFZ34c+/p8n4YVOM4="; + hash = "sha256-DfMGqgVYMT81Pvf1G/onwDYoGtxFZ34c+/p8n4YVOM4="; }; preConfigure = '' diff --git a/pkgs/by-name/gn/gnuastro/package.nix b/pkgs/by-name/gn/gnuastro/package.nix index a7ad1342eec0..3d38dbcfd4c8 100644 --- a/pkgs/by-name/gn/gnuastro/package.nix +++ b/pkgs/by-name/gn/gnuastro/package.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnu/gnuastro/gnuastro-${version}.tar.gz"; - sha256 = "sha256-+X53X/tZgcY/it++lY/Ov5FHwT8OfpZAfd398zs/dwI="; + hash = "sha256-+X53X/tZgcY/it++lY/Ov5FHwT8OfpZAfd398zs/dwI="; }; nativeBuildInputs = [ libtool ]; diff --git a/pkgs/by-name/go/go-camo/package.nix b/pkgs/by-name/go/go-camo/package.nix index 3411f0c4d1b6..20172d75473e 100644 --- a/pkgs/by-name/go/go-camo/package.nix +++ b/pkgs/by-name/go/go-camo/package.nix @@ -8,7 +8,7 @@ buildGoModule rec { owner = "cactus"; repo = pname; rev = "v${version}"; - sha256 = "sha256-2iclQVkj813xW9Ff3yh5dxCun0LxsPn4YpSLeMwsNbY="; + hash = "sha256-2iclQVkj813xW9Ff3yh5dxCun0LxsPn4YpSLeMwsNbY="; }; vendorHash = "sha256-GbBFGbNxsijcUIogjSv8RcIQn6VQ+j21Qlm9eQWzTtc="; diff --git a/pkgs/by-name/go/go-ethereum/package.nix b/pkgs/by-name/go/go-ethereum/package.nix index fc8d252636cf..4b15286f7fa9 100644 --- a/pkgs/by-name/go/go-ethereum/package.nix +++ b/pkgs/by-name/go/go-ethereum/package.nix @@ -15,7 +15,7 @@ in buildGoModule rec { owner = "ethereum"; repo = pname; rev = "v${version}"; - sha256 = "sha256-y831v6ar1RdDvGQMZf2lZKgq2IQzAAQrNwDCL0xbj24="; + hash = "sha256-y831v6ar1RdDvGQMZf2lZKgq2IQzAAQrNwDCL0xbj24="; }; proxyVendor = true; diff --git a/pkgs/by-name/go/go-symbols/package.nix b/pkgs/by-name/go/go-symbols/package.nix index 633392100889..786e9d93a700 100644 --- a/pkgs/by-name/go/go-symbols/package.nix +++ b/pkgs/by-name/go/go-symbols/package.nix @@ -15,7 +15,7 @@ buildGoModule rec { owner = "acroca"; repo = "go-symbols"; rev = "v${version}"; - sha256 = "0yyzw6clndb2r5j9isyd727njs98zzp057v314vfvknsm8g7hqrz"; + hash = "sha256-P2N4Hqrazu02CWOfAu7/KGlpjzjN65hkyWI1S5nh33s="; }; patches = [ diff --git a/pkgs/by-name/go/goatcounter/package.nix b/pkgs/by-name/go/goatcounter/package.nix index 83e05473ae60..a19bf73d3100 100644 --- a/pkgs/by-name/go/goatcounter/package.nix +++ b/pkgs/by-name/go/goatcounter/package.nix @@ -15,7 +15,7 @@ buildGoModule rec { owner = "arp242"; repo = "goatcounter"; rev = "v${version}"; - sha256 = "sha256-lwiLk/YYxX4QwSDjpU/mAikumGXYMzleRzmPjZGruZU="; + hash = "sha256-lwiLk/YYxX4QwSDjpU/mAikumGXYMzleRzmPjZGruZU="; }; vendorHash = "sha256-YAb3uBWQc6hWzF1Z5cAg8RzJQSJV+6dkppfczKS832s="; diff --git a/pkgs/by-name/go/goreman/package.nix b/pkgs/by-name/go/goreman/package.nix index 5b83b1885bc7..062993654e64 100644 --- a/pkgs/by-name/go/goreman/package.nix +++ b/pkgs/by-name/go/goreman/package.nix @@ -8,7 +8,7 @@ buildGoModule rec { owner = "mattn"; repo = "goreman"; rev = "v${version}"; - sha256 = "sha256-Z6b245tC6UsTaHTTlKEFH0egb5z8HTmv/554nkileng="; + hash = "sha256-Z6b245tC6UsTaHTTlKEFH0egb5z8HTmv/554nkileng="; }; vendorHash = "sha256-Qbi2GfBrVLFbH9SMZOd1JqvD/afkrVOjU4ECkFK+dFA="; diff --git a/pkgs/by-name/go/gosmee/package.nix b/pkgs/by-name/go/gosmee/package.nix index 5ae4b5d8dc8b..bfa2fba409a9 100644 --- a/pkgs/by-name/go/gosmee/package.nix +++ b/pkgs/by-name/go/gosmee/package.nix @@ -12,7 +12,7 @@ buildGoModule rec { owner = "chmouel"; repo = "gosmee"; rev = "v${version}"; - sha256 = "sha256-UnGzPkbw7x8l1+9xEXFiJZFzJT5yu7MCgPKkKzaFqkk="; + hash = "sha256-UnGzPkbw7x8l1+9xEXFiJZFzJT5yu7MCgPKkKzaFqkk="; }; vendorHash = null; diff --git a/pkgs/by-name/go/govers/package.nix b/pkgs/by-name/go/govers/package.nix index eb483438acc0..29a690bbf10a 100644 --- a/pkgs/by-name/go/govers/package.nix +++ b/pkgs/by-name/go/govers/package.nix @@ -12,7 +12,7 @@ buildGoModule { owner = "rogpeppe"; repo = "govers"; rev = "77fd787551fc5e7ae30696e009e334d52d2d3a43"; - sha256 = "sha256-lpc8wFKAB+A8mBm9q3qNzTM8ktFS1MYdIvZVFP0eiIs="; + hash = "sha256-lpc8wFKAB+A8mBm9q3qNzTM8ktFS1MYdIvZVFP0eiIs="; }; vendorHash = null; diff --git a/pkgs/by-name/gp/gpscorrelate/package.nix b/pkgs/by-name/gp/gpscorrelate/package.nix index 130ca82d7bc5..e7109c851f26 100644 --- a/pkgs/by-name/gp/gpscorrelate/package.nix +++ b/pkgs/by-name/gp/gpscorrelate/package.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { owner = "dfandrich"; repo = "gpscorrelate"; rev = version; - sha256 = "sha256-1t9XUY12hVaUNOg785dMJCiaMMCI2XCcif1DkKYXOoo="; + hash = "sha256-1t9XUY12hVaUNOg785dMJCiaMMCI2XCcif1DkKYXOoo="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/gp/gpsprune/package.nix b/pkgs/by-name/gp/gpsprune/package.nix index 90cb23f7740c..ed78ef40e131 100644 --- a/pkgs/by-name/gp/gpsprune/package.nix +++ b/pkgs/by-name/gp/gpsprune/package.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://activityworkshop.net/software/gpsprune/gpsprune_${version}.jar"; - sha256 = "sha256-wGg7WPj61yx7zMBIdH9ls18BnD1R713U5Vgc/kL9qYs="; + hash = "sha256-wGg7WPj61yx7zMBIdH9ls18BnD1R713U5Vgc/kL9qYs="; }; dontUnpack = true; diff --git a/pkgs/by-name/gp/gpt4all/package.nix b/pkgs/by-name/gp/gpt4all/package.nix index 893e3594bc50..92fccff0dfe0 100644 --- a/pkgs/by-name/gp/gpt4all/package.nix +++ b/pkgs/by-name/gp/gpt4all/package.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: { embed_model = fetchurl { url = "https://gpt4all.io/models/gguf/nomic-embed-text-v1.5.f16.gguf"; - sha256 = "f7af6f66802f4df86eda10fe9bbcfc75c39562bed48ef6ace719a251cf1c2fdb"; + hash = "sha256-969vZoAvTfhu2hD+m7z8dcOVYr7Ujvas5xmiUc8cL9s="; }; patches = [ diff --git a/pkgs/by-name/gp/gpustat/package.nix b/pkgs/by-name/gp/gpustat/package.nix index 428c2c583a0c..38e513bd8067 100644 --- a/pkgs/by-name/gp/gpustat/package.nix +++ b/pkgs/by-name/gp/gpustat/package.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { owner = "arduano"; repo = "gpustat"; rev = "v${version}"; - sha256 = "sha256-M9P/qfw/tp9ogkNOE3b2fD2rGFnii1/VwmqJHqXb7Mg="; + hash = "sha256-M9P/qfw/tp9ogkNOE3b2fD2rGFnii1/VwmqJHqXb7Mg="; }; cargoHash = "sha256-po/pEMZEtySZnz7l2FI7Wqbmp2CiWBijchKGkqlIMPU="; diff --git a/pkgs/by-name/gr/grafana-reporter/package.nix b/pkgs/by-name/gr/grafana-reporter/package.nix index 309ce2ecba03..c7cb567d5722 100644 --- a/pkgs/by-name/gr/grafana-reporter/package.nix +++ b/pkgs/by-name/gr/grafana-reporter/package.nix @@ -12,7 +12,7 @@ buildGoModule rec { rev = "v${version}"; owner = "IzakMarais"; repo = "reporter"; - sha256 = "sha256-lsraJwx56I2Gn8CePWUlQu1qdMp78P4xwPzLxetYUcw="; + hash = "sha256-lsraJwx56I2Gn8CePWUlQu1qdMp78P4xwPzLxetYUcw="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/by-name/gr/graphene-hardened-malloc/package.nix b/pkgs/by-name/gr/graphene-hardened-malloc/package.nix index c92fc2c398cf..aca52d75dc5b 100644 --- a/pkgs/by-name/gr/graphene-hardened-malloc/package.nix +++ b/pkgs/by-name/gr/graphene-hardened-malloc/package.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "GrapheneOS"; repo = "hardened_malloc"; rev = finalAttrs.version; - sha256 = "sha256-1j7xzhuhK8ZRAJm9dJ95xiTIla7lh3LBiWc/+x/kjp0="; + hash = "sha256-1j7xzhuhK8ZRAJm9dJ95xiTIla7lh3LBiWc/+x/kjp0="; }; nativeCheckInputs = [ python3 ]; diff --git a/pkgs/by-name/gr/gruvbox-plus-icons/package.nix b/pkgs/by-name/gr/gruvbox-plus-icons/package.nix index ff5e1411b8b1..b182026972aa 100644 --- a/pkgs/by-name/gr/gruvbox-plus-icons/package.nix +++ b/pkgs/by-name/gr/gruvbox-plus-icons/package.nix @@ -16,7 +16,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { owner = "SylEleuth"; repo = "gruvbox-plus-icon-pack"; rev = "v${finalAttrs.version}"; - sha256 = "sha256-G7F+69K2aJVBM3yOQIMTH2pDXBfLmYScKIIAza3YNw8="; + hash = "sha256-G7F+69K2aJVBM3yOQIMTH2pDXBfLmYScKIIAza3YNw8="; }; nativeBuildInputs = [ gtk3 ]; diff --git a/pkgs/by-name/gt/gtkhtml/package.nix b/pkgs/by-name/gt/gtkhtml/package.nix index 0820e69d85a9..97782684a54d 100644 --- a/pkgs/by-name/gt/gtkhtml/package.nix +++ b/pkgs/by-name/gt/gtkhtml/package.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gtkhtml/${lib.versions.majorMinor version}/gtkhtml-${version}.tar.xz"; - sha256 = "ca3b6424fb2c7ac5d9cb8fdafb69318fa2e825c9cf6ed17d1e38d9b29e5606c3"; + hash = "sha256-yjtkJPssesXZy4/a+2kxj6LoJcnPbtF9HjjZsp5WBsM="; }; patches = [ @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { (fetchpatch { name = "enchant-2.patch"; url = "https://aur.archlinux.org/cgit/aur.git/plain/enchant-2.patch?h=gtkhtml4&id=0218303a63d64c04d6483a6fe9bb55063fcfaa43"; - sha256 = "f0OToWGHZwxvqf+0qosfA9FfwJ/IXfjIPP5/WrcvArI="; + hash = "sha256-f0OToWGHZwxvqf+0qosfA9FfwJ/IXfjIPP5/WrcvArI="; extraPrefix = ""; }) ]; diff --git a/pkgs/by-name/gu/gucharmap/package.nix b/pkgs/by-name/gu/gucharmap/package.nix index 17f8465f380b..c22eae151402 100644 --- a/pkgs/by-name/gu/gucharmap/package.nix +++ b/pkgs/by-name/gu/gucharmap/package.nix @@ -54,7 +54,7 @@ in stdenv.mkDerivation (finalAttrs: { owner = "GNOME"; repo = "gucharmap"; rev = finalAttrs.version; - sha256 = "sha256-PG86D8QvqHdmo3aJseCerngmuWUqtSMdWzbixWE2HOQ="; + hash = "sha256-PG86D8QvqHdmo3aJseCerngmuWUqtSMdWzbixWE2HOQ="; }; strictDeps = true; diff --git a/pkgs/by-name/ha/handbrake/package.nix b/pkgs/by-name/ha/handbrake/package.nix index 95faf9ffbc59..50c487a46683 100644 --- a/pkgs/by-name/ha/handbrake/package.nix +++ b/pkgs/by-name/ha/handbrake/package.nix @@ -327,7 +327,7 @@ let # Big Buck Bunny example, licensed under CC Attribution 3.0. testMkv = fetchurl { url = "https://github.com/Matroska-Org/matroska-test-files/blob/cf0792be144ac470c4b8052cfe19bb691993e3a2/test_files/test1.mkv?raw=true"; - sha256 = "1hfxbbgxwfkzv85pvpvx55a72qsd0hxjbm9hkl5r3590zw4s75h9"; + hash = "sha256-CZajCf8glZELnTDVJTsETWNxVCl9330L2n863t9a3cE="; }; in runCommand "${pname}-${version}-basic-conversion" { nativeBuildInputs = [ self ]; } '' diff --git a/pkgs/by-name/ha/hap-py/package.nix b/pkgs/by-name/ha/hap-py/package.nix index 7082dc6e8ae5..9f06c822ae96 100644 --- a/pkgs/by-name/ha/hap-py/package.nix +++ b/pkgs/by-name/ha/hap-py/package.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { owner = "Illumina"; repo = pname; rev = "v${version}"; - sha256 = "sha256-K8XXhioMGMHw56MKvp0Eo8S6R36JczBzGRaBz035zRQ="; + hash = "sha256-K8XXhioMGMHw56MKvp0Eo8S6R36JczBzGRaBz035zRQ="; }; # For illumina script BOOST_ROOT = "${boost.out}"; diff --git a/pkgs/by-name/ha/harvid/package.nix b/pkgs/by-name/ha/harvid/package.nix index cdb6e4115b87..83f1148904ea 100644 --- a/pkgs/by-name/ha/harvid/package.nix +++ b/pkgs/by-name/ha/harvid/package.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "x42"; repo = "harvid"; rev = "v${finalAttrs.version}"; - sha256 = "sha256-p0W+rKHH/iuGOcRjl6b4s6jQYkm7bqWCz849SDI/7fQ="; + hash = "sha256-p0W+rKHH/iuGOcRjl6b4s6jQYkm7bqWCz849SDI/7fQ="; }; nativeBuildInputs = diff --git a/pkgs/by-name/he/hello/package.nix b/pkgs/by-name/he/hello/package.nix index 487bc033a23f..70cc95364afc 100644 --- a/pkgs/by-name/he/hello/package.nix +++ b/pkgs/by-name/he/hello/package.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "mirror://gnu/hello/hello-${finalAttrs.version}.tar.gz"; - sha256 = "sha256-jZkUKv2SV28wsM18tCqNxoCZmLxdYH2Idh9RLibH2yA="; + hash = "sha256-jZkUKv2SV28wsM18tCqNxoCZmLxdYH2Idh9RLibH2yA="; }; doCheck = true; diff --git a/pkgs/by-name/hi/hidviz/package.nix b/pkgs/by-name/hi/hidviz/package.nix index 6e92eed1c65e..14c40f30054d 100644 --- a/pkgs/by-name/hi/hidviz/package.nix +++ b/pkgs/by-name/hi/hidviz/package.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { owner = "hidviz"; repo = "hidviz"; rev = "v${version}"; - sha256 = "sha256-9crHFYVNNxJjwJojwqB8qdAGyr1Ieux9qC3m3rpIJw0="; + hash = "sha256-9crHFYVNNxJjwJojwqB8qdAGyr1Ieux9qC3m3rpIJw0="; }; preConfigure = '' diff --git a/pkgs/by-name/hi/highs/package.nix b/pkgs/by-name/hi/highs/package.nix index 2fc244131415..75afbbdfa41c 100644 --- a/pkgs/by-name/hi/highs/package.nix +++ b/pkgs/by-name/hi/highs/package.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ERGO-Code"; repo = "HiGHS"; rev = "v${finalAttrs.version}"; - sha256 = "sha256-q18TfKbZyTZzzPZ8z3U57Yt8q2PSvbkg3qqqiPMgy5Q="; + hash = "sha256-q18TfKbZyTZzzPZ8z3U57Yt8q2PSvbkg3qqqiPMgy5Q="; }; strictDeps = true; diff --git a/pkgs/by-name/hi/hitori/package.nix b/pkgs/by-name/hi/hitori/package.nix index b0fc149d42da..574efd430393 100644 --- a/pkgs/by-name/hi/hitori/package.nix +++ b/pkgs/by-name/hi/hitori/package.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "mirror://gnome/sources/hitori/${lib.versions.major finalAttrs.version}/hitori-${finalAttrs.version}.tar.xz"; - sha256 = "QicL1PlSXRgNMVG9ckUzXcXPJIqYTgL2j/kw2nmeWDs="; + hash = "sha256-QicL1PlSXRgNMVG9ckUzXcXPJIqYTgL2j/kw2nmeWDs="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/ht/httpdirfs/package.nix b/pkgs/by-name/ht/httpdirfs/package.nix index 99a84769459e..22dbceaf3799 100644 --- a/pkgs/by-name/ht/httpdirfs/package.nix +++ b/pkgs/by-name/ht/httpdirfs/package.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "fangfufu"; repo = "httpdirfs"; rev = "refs/tags/${finalAttrs.version}"; - sha256 = "sha256-PUYsT0VDEzerPqwrLJrET4kSsWsQhtnfmLepeaqtA+I="; + hash = "sha256-PUYsT0VDEzerPqwrLJrET4kSsWsQhtnfmLepeaqtA+I="; }; postPatch = lib.optional stdenv.isDarwin '' diff --git a/pkgs/by-name/ht/httpie-desktop/package.nix b/pkgs/by-name/ht/httpie-desktop/package.nix index d5d3d3219839..bc318c071135 100644 --- a/pkgs/by-name/ht/httpie-desktop/package.nix +++ b/pkgs/by-name/ht/httpie-desktop/package.nix @@ -9,7 +9,7 @@ appimageTools.wrapType2 rec { src = fetchurl { url = "https://github.com/httpie/desktop/releases/download/v${version}/HTTPie-${version}.AppImage"; - sha256 = "sha256-OOP1l7J2BgO3nOPSipxfwfN/lOUsl80UzYMBosyBHrM="; + hash = "sha256-OOP1l7J2BgO3nOPSipxfwfN/lOUsl80UzYMBosyBHrM="; }; meta = with lib; { diff --git a/pkgs/by-name/i3/i3pystatus/package.nix b/pkgs/by-name/i3/i3pystatus/package.nix index b06de1abe984..84b5809f9420 100644 --- a/pkgs/by-name/i3/i3pystatus/package.nix +++ b/pkgs/by-name/i3/i3pystatus/package.nix @@ -22,7 +22,7 @@ python3Packages.buildPythonApplication rec { owner = "enkore"; repo = "i3pystatus"; rev = "f3c539ad78ad1c54fc36e8439bf3905a784ccb34"; - sha256 = "3AGREY+elHQk8kaoFp8AHEzk2jNC/ICGYPh2hXo2G/w="; + hash = "sha256-3AGREY+elHQk8kaoFp8AHEzk2jNC/ICGYPh2hXo2G/w="; }; patches = [ diff --git a/pkgs/by-name/ia/iagno/package.nix b/pkgs/by-name/ia/iagno/package.nix index f5fa71b094b9..8e5aff5838c6 100644 --- a/pkgs/by-name/ia/iagno/package.nix +++ b/pkgs/by-name/ia/iagno/package.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/iagno/${lib.versions.majorMinor version}/iagno-${version}.tar.xz"; - sha256 = "097dw1l92l73xah9l56ka5mi3dvx48ffpiv33ni5i5rqw0ng7fc4"; + hash = "sha256-hLnzLOA4l1iiHWPH6xwifbcRa1HTFJqg6uNQkWjg7SQ="; }; patches = [ @@ -34,12 +34,12 @@ stdenv.mkDerivation rec { # https://gitlab.gnome.org/GNOME/dconf-editor/-/merge_requests/15 (fetchpatch { url = "https://gitlab.gnome.org/GNOME/iagno/-/commit/e8a0aeec350ea80349582142c0e8e3cd3f1bce38.patch"; - sha256 = "OO1x0Yx56UFzHTBsPAMYAjnJHlnTjdO1Vk7q6XU8wKQ="; + hash = "sha256-OO1x0Yx56UFzHTBsPAMYAjnJHlnTjdO1Vk7q6XU8wKQ="; }) # https://gitlab.gnome.org/GNOME/dconf-editor/-/merge_requests/13 (fetchpatch { url = "https://gitlab.gnome.org/GNOME/iagno/-/commit/508c0f94e5f182e50ff61be6e04f72574dee97cb.patch"; - sha256 = "U7djuMhb1XJaKAPyogQjaunOkbBK24r25YD7BgH05P4="; + hash = "sha256-U7djuMhb1XJaKAPyogQjaunOkbBK24r25YD7BgH05P4="; }) ]; diff --git a/pkgs/by-name/id/ida-free/package.nix b/pkgs/by-name/id/ida-free/package.nix index 237080eced38..594163049b3a 100644 --- a/pkgs/by-name/id/ida-free/package.nix +++ b/pkgs/by-name/id/ida-free/package.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { "https://www.hex-rays.com/products/ida/news/8_1/images/icon_free.png" "https://web.archive.org/web/20221105181231if_/https://hex-rays.com/products/ida/news/8_1/images/icon_free.png" ]; - sha256 = "sha256-widkv2VGh+eOauUK/6Sz/e2auCNFAsc8n9z0fdrSnW0="; + hash = "sha256-widkv2VGh+eOauUK/6Sz/e2auCNFAsc8n9z0fdrSnW0="; }; desktopItem = makeDesktopItem { diff --git a/pkgs/by-name/id/ideamaker/package.nix b/pkgs/by-name/id/ideamaker/package.nix index 8818869b6036..3677f6f8d780 100644 --- a/pkgs/by-name/id/ideamaker/package.nix +++ b/pkgs/by-name/id/ideamaker/package.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: { in fetchurl { url = "https://download.raise3d.com/ideamaker/release/${semver}/ideaMaker_${finalAttrs.version}-ubuntu_amd64.deb"; - sha256 = "sha256-aTVWCTgnVKD16uhJUVz0vR7KPGJqCVj0xoL53Qi3IKM="; + hash = "sha256-aTVWCTgnVKD16uhJUVz0vR7KPGJqCVj0xoL53Qi3IKM="; }; nativeBuildInputs = [ @@ -47,7 +47,7 @@ stdenv.mkDerivation (finalAttrs: { version = "1.0.1u"; src = fetchurl { url = "https://www.openssl.org/source/openssl-1.0.1u.tar.gz"; - sha256 = "0fb7y9pwbd76pgzd7xzqfrzibmc0vf03sl07f34z5dhm2b5b84j3"; + hash = "sha256-QxK0yhIVtvLJcAdQPYDbgNUVf3b499P+u+a0xW/yZzk="; }; patches = [ ]; withDocs = false; @@ -72,7 +72,7 @@ stdenv.mkDerivation (finalAttrs: { version = "7.47.0"; src = fetchzip { url = "https://curl.se/download/curl-7.47.0.tar.lzma"; - sha256 = "sha256-XlZk1nJbSmiQp7jMSE2QRCY4C9w2us8BgosBSzlD4dE="; + hash = "sha256-XlZk1nJbSmiQp7jMSE2QRCY4C9w2us8BgosBSzlD4dE="; }; configureFlags = previous.configureFlags ++ [ "--with-ca-bundle=${cacert}/etc/ssl/certs/ca-bundle.crt" diff --git a/pkgs/by-name/ig/igvm-tooling/package.nix b/pkgs/by-name/ig/igvm-tooling/package.nix index 6cdc3e786a6c..557bcee8aa0d 100644 --- a/pkgs/by-name/ig/igvm-tooling/package.nix +++ b/pkgs/by-name/ig/igvm-tooling/package.nix @@ -26,7 +26,7 @@ python3.pkgs.buildPythonApplication rec { (fetchpatch { name = "0001-setup.py-remove-unused-libclang-dependency.patch"; url = "https://github.com/microsoft/igvm-tooling/commit/7182e925de9b5e9f5c8c3a3ce6e3942a92506064.patch"; - sha256 = "sha256-tcVxcuLxknyEdo2YjeHOqSG9xQna8US+YyvlcfX+Htw="; + hash = "sha256-tcVxcuLxknyEdo2YjeHOqSG9xQna8US+YyvlcfX+Htw="; stripLen = 1; }) ]; diff --git a/pkgs/by-name/in/inflow/package.nix b/pkgs/by-name/in/inflow/package.nix index 79f3acb58237..8545c48071b8 100644 --- a/pkgs/by-name/in/inflow/package.nix +++ b/pkgs/by-name/in/inflow/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { owner = "stephen-huan"; repo = "inflow"; rev = "v${version}"; - sha256 = "sha256-xKUqkrPwITai8g6U1NiNieAip/AzISgFfFtvR30hLNk="; + hash = "sha256-xKUqkrPwITai8g6U1NiNieAip/AzISgFfFtvR30hLNk="; }; buildPhase = '' diff --git a/pkgs/by-name/io/iotools/package.nix b/pkgs/by-name/io/iotools/package.nix index 182b8f977913..ba33fda97f5f 100644 --- a/pkgs/by-name/io/iotools/package.nix +++ b/pkgs/by-name/io/iotools/package.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { owner = "adurbin"; repo = pname; rev = "18949fdc4dedb1da3f51ee83a582b112fb9f2c71"; - sha256 = "0vymnah44d5bzsjhfmxkcrlrikkp0db22k7a1s8bknz7glk9fldn"; + hash = "sha256-tlGXJn3n27mQDupMIVYDd86YaWazVwel/qs0QqCy1W8="; }; makeFlags = [ diff --git a/pkgs/by-name/is/isabelle/components/isabelle-linter.nix b/pkgs/by-name/is/isabelle/components/isabelle-linter.nix index 1be4ac532d05..bcf02c148930 100644 --- a/pkgs/by-name/is/isabelle/components/isabelle-linter.nix +++ b/pkgs/by-name/is/isabelle/components/isabelle-linter.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { owner = "isabelle-prover"; repo = "isabelle-linter"; rev = "Isabelle2024-v1.0.1"; - sha256 = "sha256-oTrwcfJgbkpkIweDIyc6lZjAvdS9J4agPoJgZzH+PuQ="; + hash = "sha256-oTrwcfJgbkpkIweDIyc6lZjAvdS9J4agPoJgZzH+PuQ="; }; nativeBuildInputs = [ isabelle ]; diff --git a/pkgs/by-name/iu/iucode-tool/package.nix b/pkgs/by-name/iu/iucode-tool/package.nix index bfb53c2bf147..fc92bb67e6c4 100644 --- a/pkgs/by-name/iu/iucode-tool/package.nix +++ b/pkgs/by-name/iu/iucode-tool/package.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { owner = "iucode-tool"; repo = "iucode-tool"; rev = "v${version}"; - sha256 = "04dlisw87dd3q3hhmkqc5dd58cp22fzx3rzah7pvcyij135yjc3a"; + hash = "sha256-ajDpywgyerbvgern0b8T4jJUWisMzwrhwKO1g7iOtBE="; }; patches = [ diff --git a/pkgs/by-name/ja/jailer/package.nix b/pkgs/by-name/ja/jailer/package.nix index 4a41c0eb9dfc..3acbe488083c 100644 --- a/pkgs/by-name/ja/jailer/package.nix +++ b/pkgs/by-name/ja/jailer/package.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "Wisser"; repo = "Jailer"; rev = "bc00c6883bac0d09b549e35a10e202da477e4cb1"; - sha256 = "sha256-nXxTKbhvrBlorNqiF3wZDEgf1VrBamWw8ZSQSUqpGT8="; + hash = "sha256-nXxTKbhvrBlorNqiF3wZDEgf1VrBamWw8ZSQSUqpGT8="; }; diff --git a/pkgs/by-name/je/jellyfin/package.nix b/pkgs/by-name/je/jellyfin/package.nix index 9f3c78719cbb..6022bae3db84 100644 --- a/pkgs/by-name/je/jellyfin/package.nix +++ b/pkgs/by-name/je/jellyfin/package.nix @@ -19,7 +19,7 @@ buildDotnetModule rec { owner = "jellyfin"; repo = "jellyfin"; rev = "v${version}"; - sha256 = "sha256-gZJIsNKXwhUUVgJh8vXuGSu9DEyrVY8NuIeyZHHQKN4="; + hash = "sha256-gZJIsNKXwhUUVgJh8vXuGSu9DEyrVY8NuIeyZHHQKN4="; }; propagatedBuildInputs = [ sqlite ]; diff --git a/pkgs/by-name/jo/josm/package.nix b/pkgs/by-name/jo/josm/package.nix index 16dbb8426aeb..749f6e0ba295 100644 --- a/pkgs/by-name/jo/josm/package.nix +++ b/pkgs/by-name/jo/josm/package.nix @@ -16,7 +16,7 @@ let pkg = fetchsvn { url = "https://josm.openstreetmap.de/svn/trunk/native/linux/tested"; rev = version; - sha256 = "sha256-L7P6FtqKLB4e+ezPzXePM33qj5esNoRlTFXi0/GhdsA="; + hash = "sha256-L7P6FtqKLB4e+ezPzXePM33qj5esNoRlTFXi0/GhdsA="; }; }; diff --git a/pkgs/by-name/ju/justbuild/package.nix b/pkgs/by-name/ju/justbuild/package.nix index 76f73a888def..7b531d554eae 100644 --- a/pkgs/by-name/ju/justbuild/package.nix +++ b/pkgs/by-name/ju/justbuild/package.nix @@ -34,17 +34,17 @@ stdenv.mkDerivation rec { owner = "just-buildsystem"; repo = "justbuild"; rev = "v${version}"; - sha256 = "sha256-kv7HpDEYZml5uk06s8Cxt5rEpxaJBz9s+or6Od1q4Io="; + hash = "sha256-kv7HpDEYZml5uk06s8Cxt5rEpxaJBz9s+or6Od1q4Io="; }; bazelapi = fetchurl { url = "https://github.com/bazelbuild/remote-apis/archive/e1fe21be4c9ae76269a5a63215bb3c72ed9ab3f0.tar.gz"; - sha256 = "7421abd5352ccf927c2050453a4dbfa1f7b1c7170ec3e8702b6fe2d39b8805fe"; + hash = "sha256-dCGr1TUsz5J8IFBFOk2/ofexxxcOw+hwK2/i05uIBf4="; }; googleapi = fetchurl { url = "https://github.com/googleapis/googleapis/archive/2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz"; - sha256 = "5bb6b0253ccf64b53d6c7249625a7e3f6c3bc6402abd52d3778bfa48258703a0"; + hash = "sha256-W7awJTzPZLU9bHJJYlp+P2w7xkAqvVLTd4v6SCWHA6A="; }; nativeBuildInputs = diff --git a/pkgs/by-name/ka/kakoune-lsp/package.nix b/pkgs/by-name/ka/kakoune-lsp/package.nix index 29e9fb4eef09..74fdfb2c6e30 100644 --- a/pkgs/by-name/ka/kakoune-lsp/package.nix +++ b/pkgs/by-name/ka/kakoune-lsp/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { owner = "kakoune-lsp"; repo = "kakoune-lsp"; rev = "v${version}"; - sha256 = "sha256-NZDp98Ne6z7DlJ2vZiqGzw5ukusOkEjb+eyvmxB+IKI="; + hash = "sha256-NZDp98Ne6z7DlJ2vZiqGzw5ukusOkEjb+eyvmxB+IKI="; }; patches = [ (replaceVars ./Hardcode-perl.patch { inherit perl; }) ]; diff --git a/pkgs/by-name/ke/keto/package.nix b/pkgs/by-name/ke/keto/package.nix index 8f50762bfeb2..c85c5750a95a 100644 --- a/pkgs/by-name/ke/keto/package.nix +++ b/pkgs/by-name/ke/keto/package.nix @@ -15,7 +15,7 @@ buildGoModule { owner = "ory"; repo = "keto"; rev = "v${version}"; - sha256 = "sha256-0yylaaXogN2HWXY8Tb7ScN4jdyeHecJ0gBYlVvcwaNE="; + hash = "sha256-0yylaaXogN2HWXY8Tb7ScN4jdyeHecJ0gBYlVvcwaNE="; }; vendorHash = "sha256-lgwV4Ysjmd9e850Rf5c0wSZtMW3U34/piwwG7dQEUV4="; diff --git a/pkgs/by-name/ki/ki/package.nix b/pkgs/by-name/ki/ki/package.nix index e4d95d64234b..6c2e6ca89451 100644 --- a/pkgs/by-name/ki/ki/package.nix +++ b/pkgs/by-name/ki/ki/package.nix @@ -18,7 +18,7 @@ python3Packages.buildPythonApplication rec { owner = "langfield"; repo = pname; rev = "eb32fbd3229dc1a60bcc76a937ad63f3eb869f65"; - sha256 = "sha256-5mQhJhvJQC9835goL3t3DRbD+c4P3KxnOflxvqmxL58="; + hash = "sha256-5mQhJhvJQC9835goL3t3DRbD+c4P3KxnOflxvqmxL58="; }; patches = [ diff --git a/pkgs/by-name/ki/kittysay/package.nix b/pkgs/by-name/ki/kittysay/package.nix index 35f9dc99de5f..6facdced8d63 100644 --- a/pkgs/by-name/ki/kittysay/package.nix +++ b/pkgs/by-name/ki/kittysay/package.nix @@ -13,7 +13,7 @@ in owner = "uncenter"; repo = "kittysay"; rev = "v${version}"; - sha256 = "sha256-ZYHrDBJ8cTqJAh2KUGSCsS1bY/emHRodPxZX2vxAhDs="; + hash = "sha256-ZYHrDBJ8cTqJAh2KUGSCsS1bY/emHRodPxZX2vxAhDs="; }; cargoHash = "sha256-F0WAtpAjBwL5YfzGtPgn7WTL6lgx3bjZFBQdDpjCr3I="; diff --git a/pkgs/by-name/ku/kubectl-doctor/package.nix b/pkgs/by-name/ku/kubectl-doctor/package.nix index 050192b86c9f..670c7d0638dc 100644 --- a/pkgs/by-name/ku/kubectl-doctor/package.nix +++ b/pkgs/by-name/ku/kubectl-doctor/package.nix @@ -8,7 +8,7 @@ buildGoModule rec { owner = "emirozer"; repo = pname; rev = version; - sha256 = "sha256-yp5OfSDxIASiCgISUVNxfe3dsLukgIoHARVPALIaQfY="; + hash = "sha256-yp5OfSDxIASiCgISUVNxfe3dsLukgIoHARVPALIaQfY="; }; patches = [ @@ -16,7 +16,7 @@ buildGoModule rec { # https://github.com/emirozer/kubectl-doctor/pull/21 name = "go-1.19-client-go-0.25.patch"; url = "https://github.com/emirozer/kubectl-doctor/commit/a987ef58063e305409034af280d688a11682dbb9.patch"; - sha256 = "sha256-NQd/WxUfYwBDowhnoUWaOV8k7msiOhff3Bjux+a9R9E="; + hash = "sha256-NQd/WxUfYwBDowhnoUWaOV8k7msiOhff3Bjux+a9R9E="; }) ]; diff --git a/pkgs/by-name/la/laszip_2/package.nix b/pkgs/by-name/la/laszip_2/package.nix index 8af9cae261fe..e7a7bb00302d 100644 --- a/pkgs/by-name/la/laszip_2/package.nix +++ b/pkgs/by-name/la/laszip_2/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "LASzip"; repo = "LASzip"; rev = "v${finalAttrs.version}"; - sha256 = "sha256-TXzse4oLjNX5R2xDR721iV+gW/rP5z3Zciv4OgxfeqA="; + hash = "sha256-TXzse4oLjNX5R2xDR721iV+gW/rP5z3Zciv4OgxfeqA="; }; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/by-name/la/latte-integrale/package.nix b/pkgs/by-name/la/latte-integrale/package.nix index 7eb485974ff2..822e0f238214 100644 --- a/pkgs/by-name/la/latte-integrale/package.nix +++ b/pkgs/by-name/la/latte-integrale/package.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "https://github.com/latte-int/latte/releases/download/version_${lib.replaceStrings ["."] ["_"] finalAttrs.version}/latte-int-${finalAttrs.version}.tar.gz"; - sha256 = "sha256-AGwQ6+XVv9ybFZy6YmSkQyhh/nY84F/oIWJKt9P8IXA="; + hash = "sha256-AGwQ6+XVv9ybFZy6YmSkQyhh/nY84F/oIWJKt9P8IXA="; }; patches = [ @@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: { (fetchpatch { url = "https://github.com/latte-int/latte/commit/6dbf7f07d5c9e1f3afe793f782d191d4465088ae.patch"; excludes = [ "code/latte/sqlite/IntegrationDB.h" ]; - sha256 = "sha256-i7c11y54OLuJ0m7PBnhEoAzJzxC842JU7A6TOtTz06k="; + hash = "sha256-i7c11y54OLuJ0m7PBnhEoAzJzxC842JU7A6TOtTz06k="; }) ]; diff --git a/pkgs/by-name/li/libcpuid/package.nix b/pkgs/by-name/li/libcpuid/package.nix index a9f89e967e26..077c441f5c80 100644 --- a/pkgs/by-name/li/libcpuid/package.nix +++ b/pkgs/by-name/li/libcpuid/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { owner = "anrieff"; repo = "libcpuid"; rev = "v${version}"; - sha256 = "sha256-OZfsEk6sTTvwgAetjilSWbkfC1nMQnPH3oL0IeuqObA="; + hash = "sha256-OZfsEk6sTTvwgAetjilSWbkfC1nMQnPH3oL0IeuqObA="; }; nativeBuildInputs = [ autoreconfHook ]; diff --git a/pkgs/by-name/li/libcyaml/package.nix b/pkgs/by-name/li/libcyaml/package.nix index 9a7ce9ea1541..a1bbd17753ca 100644 --- a/pkgs/by-name/li/libcyaml/package.nix +++ b/pkgs/by-name/li/libcyaml/package.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { owner = "tlsa"; repo = "libcyaml"; rev = "v${version}"; - sha256 = "sha256-JIN/cvh9PRl4/K0Z3WZtSCA3casBxyaxNxjXZZdQRWQ="; + hash = "sha256-JIN/cvh9PRl4/K0Z3WZtSCA3casBxyaxNxjXZZdQRWQ="; }; buildInputs = [ libyaml ]; diff --git a/pkgs/by-name/li/libgnome-keyring/package.nix b/pkgs/by-name/li/libgnome-keyring/package.nix index 4f30ebdae612..0275365b3336 100644 --- a/pkgs/by-name/li/libgnome-keyring/package.nix +++ b/pkgs/by-name/li/libgnome-keyring/package.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "mirror://gnome/sources/libgnome-keyring/${lib.versions.majorMinor finalAttrs.version}/libgnome-keyring-${finalAttrs.version}.tar.xz"; - sha256 = "c4c178fbb05f72acc484d22ddb0568f7532c409b0a13e06513ff54b91e947783"; + hash = "sha256-xMF4+7BfcqzEhNIt2wVo91MsQJsKE+BlE/9UuR6Ud4M="; }; outputs = [ "out" "dev" ]; diff --git a/pkgs/by-name/li/libgpiod_1/package.nix b/pkgs/by-name/li/libgpiod_1/package.nix index ce5a4ac2833d..337229c25db7 100644 --- a/pkgs/by-name/li/libgpiod_1/package.nix +++ b/pkgs/by-name/li/libgpiod_1/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-${version}.tar.gz"; - sha256 = "sha256-gp1KwmjfB4U2CdZ8/H9HbpqnNssqaKYwvpno+tGXvgo="; + hash = "sha256-gp1KwmjfB4U2CdZ8/H9HbpqnNssqaKYwvpno+tGXvgo="; }; patches = [ diff --git a/pkgs/by-name/li/libhttpserver/package.nix b/pkgs/by-name/li/libhttpserver/package.nix index d8e6ce8c3ab5..2a99246aab56 100644 --- a/pkgs/by-name/li/libhttpserver/package.nix +++ b/pkgs/by-name/li/libhttpserver/package.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { owner = "etr"; repo = pname; rev = version; - sha256 = "sha256-Pc3Fvd8D4Ymp7dG9YgU58mDceOqNfhWE1JtnpVaNx/Y="; + hash = "sha256-Pc3Fvd8D4Ymp7dG9YgU58mDceOqNfhWE1JtnpVaNx/Y="; }; nativeBuildInputs = [ autoconf automake libtool ]; diff --git a/pkgs/by-name/li/libiff/package.nix b/pkgs/by-name/li/libiff/package.nix index 40138dc2d661..6a8fd441cc40 100644 --- a/pkgs/by-name/li/libiff/package.nix +++ b/pkgs/by-name/li/libiff/package.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation { owner = "svanderburg"; repo = "libiff"; rev = "b5f542a83c824f26e0816770c9a17c22bd388606"; - sha256 = "sha256-Arh3Ihd5TWg5tdemodrxz2EDxh/hwz9b2/AvrTONFy8="; + hash = "sha256-Arh3Ihd5TWg5tdemodrxz2EDxh/hwz9b2/AvrTONFy8="; }; nativeBuildInputs = [ autoreconfHook diff --git a/pkgs/by-name/li/libilbm/package.nix b/pkgs/by-name/li/libilbm/package.nix index 16f872df848b..2a8ef532dade 100644 --- a/pkgs/by-name/li/libilbm/package.nix +++ b/pkgs/by-name/li/libilbm/package.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation { owner = "svanderburg"; repo = "libilbm"; rev = "586f5822275ef5780509a851cb90c7407b2633d9"; - sha256 = "sha256-EcsrspL/N40yFE15UFWGienpJHhoq1zd8zZe6x4nK6o="; + hash = "sha256-EcsrspL/N40yFE15UFWGienpJHhoq1zd8zZe6x4nK6o="; }; buildInputs = [ libiff ]; nativeBuildInputs = [ diff --git a/pkgs/by-name/li/libnghttp2_asio/package.nix b/pkgs/by-name/li/libnghttp2_asio/package.nix index 7d286b2ffcb5..7853e89d27de 100644 --- a/pkgs/by-name/li/libnghttp2_asio/package.nix +++ b/pkgs/by-name/li/libnghttp2_asio/package.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { owner = "nghttp2"; repo = "nghttp2-asio"; rev = "e877868abe06a83ed0a6ac6e245c07f6f20866b5"; - sha256 = "sha256-XQXRHLz0kvaIQq1nbqkJnETHR51FXMB1P9F/hQeZh6A="; + hash = "sha256-XQXRHLz0kvaIQq1nbqkJnETHR51FXMB1P9F/hQeZh6A="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/li/libscfg/package.nix b/pkgs/by-name/li/libscfg/package.nix index f9eb2a5b804b..333433d8c42c 100644 --- a/pkgs/by-name/li/libscfg/package.nix +++ b/pkgs/by-name/li/libscfg/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { owner = "~emersion"; repo = "libscfg"; rev = "v${version}"; - sha256 = "sha256-aTcvs7QuDOx17U/yP37LhvIGxmm2WR/6qFYRtfjRN6w="; + hash = "sha256-aTcvs7QuDOx17U/yP37LhvIGxmm2WR/6qFYRtfjRN6w="; }; nativeBuildInputs = [ meson ninja pkg-config ]; diff --git a/pkgs/by-name/li/libtorrent-rasterbar-1_2_x/package.nix b/pkgs/by-name/li/libtorrent-rasterbar-1_2_x/package.nix index 928f827e32a5..9de8a04c34da 100644 --- a/pkgs/by-name/li/libtorrent-rasterbar-1_2_x/package.nix +++ b/pkgs/by-name/li/libtorrent-rasterbar-1_2_x/package.nix @@ -17,7 +17,7 @@ in stdenv.mkDerivation { owner = "arvidn"; repo = "libtorrent"; rev = "v${version}"; - sha256 = "05qm8mcyxsnb6zb8nckln1gkk8ncwzfhsz7d7p3fhx6gdsc8j71b"; + hash = "sha256-KxyJmG7PdOjGPe18Dd3nzKI5X7B0MovWN8vq7llFFRc="; }; enableParallelBuilding = true; diff --git a/pkgs/by-name/li/libtoxcore/package.nix b/pkgs/by-name/li/libtoxcore/package.nix index 00f145d17292..6b3a2ffbcb01 100644 --- a/pkgs/by-name/li/libtoxcore/package.nix +++ b/pkgs/by-name/li/libtoxcore/package.nix @@ -21,7 +21,7 @@ in stdenv.mkDerivation rec { fetchurl { url = "https://github.com/TokTok/c-toxcore/releases/download/v${version}/c-toxcore-${version}.tar.gz"; - sha256 = "sha256-i0GPZHDbCFz1mpkVaFYTVWVW3yv0JxSPGBS3sRhihZQ="; + hash = "sha256-i0GPZHDbCFz1mpkVaFYTVWVW3yv0JxSPGBS3sRhihZQ="; }; cmakeFlags = [ diff --git a/pkgs/by-name/li/libxplayer-plparser/package.nix b/pkgs/by-name/li/libxplayer-plparser/package.nix index 67e394968da5..9a1ef21c014e 100644 --- a/pkgs/by-name/li/libxplayer-plparser/package.nix +++ b/pkgs/by-name/li/libxplayer-plparser/package.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { owner = "linuxmint"; repo = pname; rev = version; - sha256 = "6GMKsIpyQdiyHPxrjWHAHvuCouJxrAcYPIo9u6TLOA4="; + hash = "sha256-6GMKsIpyQdiyHPxrjWHAHvuCouJxrAcYPIo9u6TLOA4="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/li/limine/package.nix b/pkgs/by-name/li/limine/package.nix index eade9bd2d631..92d62030ae79 100644 --- a/pkgs/by-name/li/limine/package.nix +++ b/pkgs/by-name/li/limine/package.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation { # Packaging that in Nix is very cumbersome. src = fetchurl { url = "https://github.com/limine-bootloader/limine/releases/download/v${version}/limine-${version}.tar.gz"; - sha256 = "sha256-cR6ilV5giwvbqUoOGbnXQnqZzUz/oL7OGZPYNoFKvy0="; + hash = "sha256-cR6ilV5giwvbqUoOGbnXQnqZzUz/oL7OGZPYNoFKvy0="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/li/linux-wifi-hotspot/package.nix b/pkgs/by-name/li/linux-wifi-hotspot/package.nix index d4e1d9f74725..75ab89eef600 100644 --- a/pkgs/by-name/li/linux-wifi-hotspot/package.nix +++ b/pkgs/by-name/li/linux-wifi-hotspot/package.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "lakinduakash"; repo = "linux-wifi-hotspot"; rev = "v${finalAttrs.version}"; - sha256 = "sha256-+WHYWQ4EyAt+Kq0LHEgC7Kk5HpIqThz6W3PIdW8Wojk="; + hash = "sha256-+WHYWQ4EyAt+Kq0LHEgC7Kk5HpIqThz6W3PIdW8Wojk="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/li/listmonk/package.nix b/pkgs/by-name/li/listmonk/package.nix index 800540a25ea5..a796a4ac5f31 100644 --- a/pkgs/by-name/li/listmonk/package.nix +++ b/pkgs/by-name/li/listmonk/package.nix @@ -8,7 +8,7 @@ buildGoModule rec { owner = "knadh"; repo = "listmonk"; rev = "v${version}"; - sha256 = "sha256-eNX+2ens+mz2V8ZBHtFFHDVbi64AAiiREElMjh67Dd8="; + hash = "sha256-eNX+2ens+mz2V8ZBHtFFHDVbi64AAiiREElMjh67Dd8="; }; vendorHash = "sha256-XAm2VfX1nHWTuAV2COEn8qrqPNv0xbaWgTYCpjrEfMw="; diff --git a/pkgs/by-name/li/listmonk/stuffbin.nix b/pkgs/by-name/li/listmonk/stuffbin.nix index 2640ba8b8519..132a34a017e8 100644 --- a/pkgs/by-name/li/listmonk/stuffbin.nix +++ b/pkgs/by-name/li/listmonk/stuffbin.nix @@ -10,7 +10,7 @@ buildGoModule rec { owner = "knadh"; repo = "stuffbin"; rev = "v${version}"; - sha256 = "sha256-M72xNh7bKUMLzA+M8bJB++kJ5KCrkboQm1v8BasP3Yo="; + hash = "sha256-M72xNh7bKUMLzA+M8bJB++kJ5KCrkboQm1v8BasP3Yo="; }; ldflags = [ "-s" "-w" "-X main.version=${version}" ]; diff --git a/pkgs/by-name/ll/llm-ls/package.nix b/pkgs/by-name/ll/llm-ls/package.nix index 39b0e6e0aae9..a7f5a4b7f183 100644 --- a/pkgs/by-name/ll/llm-ls/package.nix +++ b/pkgs/by-name/ll/llm-ls/package.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage { owner = "huggingface"; repo = "llm-ls"; rev = version; - sha256 = "sha256-ICMM2kqrHFlKt2/jmE4gum1Eb32afTJkT3IRoqcjJJ8="; + hash = "sha256-ICMM2kqrHFlKt2/jmE4gum1Eb32afTJkT3IRoqcjJJ8="; }; cargoHash = "sha256-Fat67JxTYIkxkdwGNAyTfnuLt8ofUGVJ2609sbn1frU="; diff --git a/pkgs/by-name/lo/local-ai/tests.nix b/pkgs/by-name/lo/local-ai/tests.nix index 17119d2b250e..60baeb085ee9 100644 --- a/pkgs/by-name/lo/local-ai/tests.nix +++ b/pkgs/by-name/lo/local-ai/tests.nix @@ -52,7 +52,7 @@ in # Note: q4_0 and q4_1 models can not be loaded parameters.model = fetchurl { url = "https://huggingface.co/skeskinen/ggml/resolve/main/all-MiniLM-L6-v2/ggml-model-f16.bin"; - sha256 = "9c195b2453a4fef60a4f6be3a88a39211366214df6498a4fe4885c9e22314f50"; + hash = "sha256-nBlbJFOk/vYKT2vjqIo5IRNmIU32SYpP5IhcniIxT1A="; }; backend = "bert-embeddings"; embeddings = true; @@ -107,7 +107,7 @@ in # https://ai.meta.com/blog/meta-llama-3-1/ model = fetchurl { url = "https://huggingface.co/lmstudio-community/Meta-Llama-3.1-8B-Instruct-GGUF/resolve/main/Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf"; - sha256 = "f2be3e1a239c12c9f3f01a962b11fb2807f8032fdb63b0a5502ea42ddef55e44"; + hash = "sha256-8r4+GiOcEsnz8BqWKxH7KAf4Ay/bY7ClUC6kLd71XkQ="; }; # defaults from: # https://deepinfra.com/meta-llama/Meta-Llama-3.1-8B-Instruct diff --git a/pkgs/by-name/lo/logiops_0_2_3/package.nix b/pkgs/by-name/lo/logiops_0_2_3/package.nix index c62e3bf9e320..d57328cf1431 100644 --- a/pkgs/by-name/lo/logiops_0_2_3/package.nix +++ b/pkgs/by-name/lo/logiops_0_2_3/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { owner = "pixlone"; repo = "logiops"; rev = "v${version}"; - sha256 = "sha256-1v728hbIM2ODtB+r6SYzItczRJCsbuTvhYD2OUM1+/E="; + hash = "sha256-1v728hbIM2ODtB+r6SYzItczRJCsbuTvhYD2OUM1+/E="; }; PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system"; diff --git a/pkgs/by-name/lp/lprint/package.nix b/pkgs/by-name/lp/lprint/package.nix index eb7353142c6c..c5bb996b63a0 100644 --- a/pkgs/by-name/lp/lprint/package.nix +++ b/pkgs/by-name/lp/lprint/package.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { owner = "michaelrsweet"; repo = pname; rev = "v${version}"; - sha256 = "sha256-1OOLGQ8S4oRNSJanX/AzJ+g5F+jYnE/+o+ie5ucY22U="; + hash = "sha256-1OOLGQ8S4oRNSJanX/AzJ+g5F+jYnE/+o+ie5ucY22U="; }; outputs = [ "out" "dev" ]; diff --git a/pkgs/by-name/lx/lxcfs/package.nix b/pkgs/by-name/lx/lxcfs/package.nix index db006cea566d..b7ade8381c05 100644 --- a/pkgs/by-name/lx/lxcfs/package.nix +++ b/pkgs/by-name/lx/lxcfs/package.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { owner = "lxc"; repo = "lxcfs"; rev = "v${version}"; - sha256 = "sha256-kJ9QaNI8v03E0//UyU6fsav1YGOlKGMxsbE8Pr1Dtic="; + hash = "sha256-kJ9QaNI8v03E0//UyU6fsav1YGOlKGMxsbE8Pr1Dtic="; }; patches = [ diff --git a/pkgs/by-name/lz/lzlib/package.nix b/pkgs/by-name/lz/lzlib/package.nix index 6e9510215abe..b25f76871a0c 100644 --- a/pkgs/by-name/lz/lzlib/package.nix +++ b/pkgs/by-name/lz/lzlib/package.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "mirror://savannah/lzip/lzlib/lzlib-${finalAttrs.version}.tar.lz"; - sha256 = "e362ecccd82d4dd297df6a51b952c65d2172f9bf41a5c4590d3604d83aa519d3"; + hash = "sha256-42LszNgtTdKX32pRuVLGXSFy+b9BpcRZDTYE2DqlGdM="; # hash from release email }; diff --git a/pkgs/by-name/ma/maestro/package.nix b/pkgs/by-name/ma/maestro/package.nix index e4b8321aba9f..37adfb274d29 100644 --- a/pkgs/by-name/ma/maestro/package.nix +++ b/pkgs/by-name/ma/maestro/package.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://github.com/mobile-dev-inc/maestro/releases/download/cli-${version}/maestro.zip"; - sha256 = "sha256-bWZuD2+v6molwW1ef2a3djBnVfYscBjILLGXeeSUmoU="; + hash = "sha256-bWZuD2+v6molwW1ef2a3djBnVfYscBjILLGXeeSUmoU="; }; dontUnpack = true; diff --git a/pkgs/by-name/ma/mako/package.nix b/pkgs/by-name/ma/mako/package.nix index 3ff46c8b477b..ccc6b61cfefc 100644 --- a/pkgs/by-name/ma/mako/package.nix +++ b/pkgs/by-name/ma/mako/package.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "emersion"; repo = "mako"; rev = "refs/tags/v${finalAttrs.version}"; - sha256 = "sha256-QtYtondP7E5QXLRnmcaOQlAm9fKXctfjxeUFqK6FnnE="; + hash = "sha256-QtYtondP7E5QXLRnmcaOQlAm9fKXctfjxeUFqK6FnnE="; }; strictDeps = true; diff --git a/pkgs/by-name/ma/mapserver/package.nix b/pkgs/by-name/ma/mapserver/package.nix index f91876752ded..5d1739d07c07 100644 --- a/pkgs/by-name/ma/mapserver/package.nix +++ b/pkgs/by-name/ma/mapserver/package.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { owner = "MapServer"; repo = "MapServer"; rev = "rel-${lib.replaceStrings [ "." ] [ "-" ] version}"; - sha256 = "sha256-kZEDC89yoQP0ma5avp6r+Hz8JMpErGlBVQkhlHO6UFw="; + hash = "sha256-kZEDC89yoQP0ma5avp6r+Hz8JMpErGlBVQkhlHO6UFw="; }; nativeBuildInputs = diff --git a/pkgs/by-name/ma/marwaita-x/package.nix b/pkgs/by-name/ma/marwaita-x/package.nix index ddeeb5e39b51..9c05736e84f6 100644 --- a/pkgs/by-name/ma/marwaita-x/package.nix +++ b/pkgs/by-name/ma/marwaita-x/package.nix @@ -16,7 +16,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { owner = "darkomarko42"; repo = "marwaita-x"; rev = finalAttrs.version; - sha256 = "sha256-x5b3aaasYbxFGvdNNF6vIrF/ZZWBGbdS2kEuB1rwOlA="; + hash = "sha256-x5b3aaasYbxFGvdNNF6vIrF/ZZWBGbdS2kEuB1rwOlA="; }; buildInputs = [ diff --git a/pkgs/by-name/ma/masterpdfeditor/package.nix b/pkgs/by-name/ma/masterpdfeditor/package.nix index 5d75cfb335c4..34086ab5b9e5 100644 --- a/pkgs/by-name/ma/masterpdfeditor/package.nix +++ b/pkgs/by-name/ma/masterpdfeditor/package.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://code-industry.net/public/master-pdf-editor-${version}-qt5.x86_64.tar.gz"; - sha256 = "sha256-CbrhhQJ0iiXz8hUJEi+/xb2ZGbunuPuIIgmCRgJhNVU="; + hash = "sha256-CbrhhQJ0iiXz8hUJEi+/xb2ZGbunuPuIIgmCRgJhNVU="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/md/mdbook/package.nix b/pkgs/by-name/md/mdbook/package.nix index 8c33bb64e990..aa8ff3dec363 100644 --- a/pkgs/by-name/md/mdbook/package.nix +++ b/pkgs/by-name/md/mdbook/package.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage { owner = "rust-lang"; repo = "mdBook"; rev = "refs/tags/v${version}"; - sha256 = "sha256-GGQK2Mf3EK1rwBMzQkAzWAaK6Fh0Qqqf8dtDjZPxOMA="; + hash = "sha256-GGQK2Mf3EK1rwBMzQkAzWAaK6Fh0Qqqf8dtDjZPxOMA="; }; cargoHash = "sha256-jriSQHn+Y+EWtwDJeMTAuCCHR7fEtWsErAxbG9a4pts="; diff --git a/pkgs/by-name/me/med/package.nix b/pkgs/by-name/me/med/package.nix index 5edc2e3201bd..0e122a900c55 100644 --- a/pkgs/by-name/me/med/package.nix +++ b/pkgs/by-name/me/med/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { owner = "allencch"; repo = "med"; rev = version; - sha256 = "sha256-m2lVRSNaklB0Xfqgtyc0lNWXfTD8wTWsE06eGv4FOBE="; + hash = "sha256-m2lVRSNaklB0Xfqgtyc0lNWXfTD8wTWsE06eGv4FOBE="; }; nativeBuildInputs = [ qt6.wrapQtAppsHook cmake pkg-config ]; diff --git a/pkgs/by-name/mf/mfcj880dwcupswrapper/package.nix b/pkgs/by-name/mf/mfcj880dwcupswrapper/package.nix index 38ff80577071..5fbc3948f032 100644 --- a/pkgs/by-name/mf/mfcj880dwcupswrapper/package.nix +++ b/pkgs/by-name/mf/mfcj880dwcupswrapper/package.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://download.brother.com/welcome/dlf102044/mfcj880dw_cupswrapper_GPL_source_${version}.tar.gz"; - sha256 = "bf291fe31d64afeaefb5b0e606f4baf80c41d80009e34b32b77d56f759e9cf94"; + hash = "sha256-vykf4x1kr+rvtbDmBvS6+AxB2AAJ40syt31W91npz5Q="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/by-name/mf/mfcj880dwlpr/package.nix b/pkgs/by-name/mf/mfcj880dwlpr/package.nix index cbfcd2b54b9c..a1d0a9c44f06 100644 --- a/pkgs/by-name/mf/mfcj880dwlpr/package.nix +++ b/pkgs/by-name/mf/mfcj880dwlpr/package.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://download.brother.com/welcome/dlf102038/mfcj880dwlpr-${version}.i386.deb"; - sha256 = "1680b301f660a407fe0b69f5de59c7473d2d66dc472a1589b0cd9f51736bfea7"; + hash = "sha256-FoCzAfZgpAf+C2n13lnHRz0tZtxHKhWJsM2fUXNr/qc="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/by-name/mi/microdnf/package.nix b/pkgs/by-name/mi/microdnf/package.nix index ec9a1daf5945..ae890fec7c29 100644 --- a/pkgs/by-name/mi/microdnf/package.nix +++ b/pkgs/by-name/mi/microdnf/package.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { owner = "rpm-software-management"; repo = pname; rev = version; - sha256 = "sha256-R7jOeH6pw/THLXxLezp2AmE8lUBagKMRJ0XfXgdLi2E="; + hash = "sha256-R7jOeH6pw/THLXxLezp2AmE8lUBagKMRJ0XfXgdLi2E="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/mo/modrinth-app-unwrapped/package.nix b/pkgs/by-name/mo/modrinth-app-unwrapped/package.nix index c9c5cbdc73f5..46874c6b7b77 100644 --- a/pkgs/by-name/mo/modrinth-app-unwrapped/package.nix +++ b/pkgs/by-name/mo/modrinth-app-unwrapped/package.nix @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage { owner = "modrinth"; repo = "theseus"; rev = "v${modrinth-app-unwrapped.version}"; - sha256 = "sha256-JWR0e2vOBvOLosr22Oo2mAlR0KAhL+261RRybhNctlM="; + hash = "sha256-JWR0e2vOBvOLosr22Oo2mAlR0KAhL+261RRybhNctlM="; }; cargoLock = { diff --git a/pkgs/by-name/mo/mos/package.nix b/pkgs/by-name/mo/mos/package.nix index a0065584800d..803148c91be3 100644 --- a/pkgs/by-name/mo/mos/package.nix +++ b/pkgs/by-name/mo/mos/package.nix @@ -9,7 +9,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { src = fetchurl { url = "https://github.com/Caldis/Mos/releases/download/${finalAttrs.version}/Mos.Versions.${finalAttrs.version}.dmg"; - sha256 = "38ea33e867815506414323484147b882b6d97df4af9759bca0a64d98c95029b3"; + hash = "sha256-OOoz6GeBVQZBQyNIQUe4grbZffSvl1m8oKZNmMlQKbM="; }; sourceRoot = "."; diff --git a/pkgs/by-name/mo/mosdepth/package.nix b/pkgs/by-name/mo/mosdepth/package.nix index 3317f28edef3..b629f492af33 100644 --- a/pkgs/by-name/mo/mosdepth/package.nix +++ b/pkgs/by-name/mo/mosdepth/package.nix @@ -10,7 +10,7 @@ buildNimPackage (finalAttrs: { owner = "brentp"; repo = "mosdepth"; rev = "v${finalAttrs.version}"; - sha256 = "sha256-vHJgIo9qO/L1lZ9DqgXVwv9Pn/6ZMOBfPsY4DEAEImI="; + hash = "sha256-vHJgIo9qO/L1lZ9DqgXVwv9Pn/6ZMOBfPsY4DEAEImI="; }; lockFile = ./lock.json; diff --git a/pkgs/by-name/mo/mouse_m908/package.nix b/pkgs/by-name/mo/mouse_m908/package.nix index 905b8fb1ef1e..f9491674659b 100644 --- a/pkgs/by-name/mo/mouse_m908/package.nix +++ b/pkgs/by-name/mo/mouse_m908/package.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "dokutan"; repo = "mouse_m908"; rev = "v${finalAttrs.version}"; - sha256 = "sha256-sCAvjNpJYkp4G0KkDJtHOBR1vc80DZJtWR2W9gakkzQ="; + hash = "sha256-sCAvjNpJYkp4G0KkDJtHOBR1vc80DZJtWR2W9gakkzQ="; }; nativeBuildInputs = [ pkg-config installShellFiles ]; diff --git a/pkgs/by-name/mp/mpack/package.nix b/pkgs/by-name/mp/mpack/package.nix index d428fbe664c9..5f2fa1124dee 100644 --- a/pkgs/by-name/mp/mpack/package.nix +++ b/pkgs/by-name/mp/mpack/package.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "http://ftp.andrew.cmu.edu/pub/mpack/mpack-${version}.tar.gz"; - sha256 = "0k590z96509k96zxmhv72gkwhrlf55jkmyqlzi72m61r7axhhh97"; + hash = "sha256-J0EIuzo5mCpO/BT7OmUpjmbI5xNnw9q/STOBYtIHqUw="; }; patches = [ diff --git a/pkgs/by-name/mu/mutter/43/default.nix b/pkgs/by-name/mu/mutter/43/default.nix index 9ea450395263..b79c839ec3eb 100644 --- a/pkgs/by-name/mu/mutter/43/default.nix +++ b/pkgs/by-name/mu/mutter/43/default.nix @@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "mirror://gnome/sources/mutter/${lib.versions.major finalAttrs.version}/mutter-${finalAttrs.version}.tar.xz"; - sha256 = "TjTh8XWTS9hJqEvZX6Nb8G6EEuAt8loDbC8RNdUz8oE="; + hash = "sha256-TjTh8XWTS9hJqEvZX6Nb8G6EEuAt8loDbC8RNdUz8oE="; }; patches = [ @@ -72,7 +72,7 @@ stdenv.mkDerivation (finalAttrs: { # https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2572 (fetchpatch { url = "https://gitlab.gnome.org/GNOME/mutter/-/commit/285a5a4d54ca83b136b787ce5ebf1d774f9499d5.patch"; - sha256 = "/npUE3idMSTVlFptsDpZmGWjZ/d2gqruVlJKq4eF4xU="; + hash = "sha256-/npUE3idMSTVlFptsDpZmGWjZ/d2gqruVlJKq4eF4xU="; }) # Remove support for window shading. @@ -84,7 +84,7 @@ stdenv.mkDerivation (finalAttrs: { # https://github.com/BuddiesOfBudgie/magpie/issues/9 (fetchpatch { url = "https://github.com/BuddiesOfBudgie/magpie/commit/4177c466375462ca8ed8fdb60913df4422f19144.patch"; - sha256 = "NVx40WDnlUL050D529KVohvNBdVrheXxmJ73U3+KSeQ="; + hash = "sha256-NVx40WDnlUL050D529KVohvNBdVrheXxmJ73U3+KSeQ="; }) ]; diff --git a/pkgs/by-name/ne/nemo-fileroller/package.nix b/pkgs/by-name/ne/nemo-fileroller/package.nix index 2a279c926fe2..be45cd9193cb 100644 --- a/pkgs/by-name/ne/nemo-fileroller/package.nix +++ b/pkgs/by-name/ne/nemo-fileroller/package.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { owner = "linuxmint"; repo = "nemo-extensions"; rev = version; - sha256 = "sha256-qghGgd+OWYiXvcGUfgiQT6rR4mJPAOfOtYB3lWLg4iA="; + hash = "sha256-qghGgd+OWYiXvcGUfgiQT6rR4mJPAOfOtYB3lWLg4iA="; }; sourceRoot = "${src.name}/nemo-fileroller"; diff --git a/pkgs/by-name/ne/nemo-python/package.nix b/pkgs/by-name/ne/nemo-python/package.nix index 867000c8d71d..7397149f41a7 100644 --- a/pkgs/by-name/ne/nemo-python/package.nix +++ b/pkgs/by-name/ne/nemo-python/package.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { owner = "linuxmint"; repo = "nemo-extensions"; rev = version; - sha256 = "sha256-qghGgd+OWYiXvcGUfgiQT6rR4mJPAOfOtYB3lWLg4iA="; + hash = "sha256-qghGgd+OWYiXvcGUfgiQT6rR4mJPAOfOtYB3lWLg4iA="; }; sourceRoot = "${src.name}/nemo-python"; diff --git a/pkgs/by-name/ne/nemo/package.nix b/pkgs/by-name/ne/nemo/package.nix index e5dece818fe2..8a7cee2c85a4 100644 --- a/pkgs/by-name/ne/nemo/package.nix +++ b/pkgs/by-name/ne/nemo/package.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { owner = "linuxmint"; repo = pname; rev = version; - sha256 = "sha256-1GJLsUlptwXcZUWIOztskV0nHA9BnPmnVeTgUwJ+QDQ="; + hash = "sha256-1GJLsUlptwXcZUWIOztskV0nHA9BnPmnVeTgUwJ+QDQ="; }; patches = [ diff --git a/pkgs/by-name/ne/neovim-qt-unwrapped/package.nix b/pkgs/by-name/ne/neovim-qt-unwrapped/package.nix index 0cd07e2711bc..1e8c13ede81b 100644 --- a/pkgs/by-name/ne/neovim-qt-unwrapped/package.nix +++ b/pkgs/by-name/ne/neovim-qt-unwrapped/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { owner = "equalsraf"; repo = "neovim-qt"; rev = "v${version}"; - sha256 = "sha256-BitFHHwL2aqBUpY/8eHaZIFvnDCeABC6w33Vmbx0z2g="; + hash = "sha256-BitFHHwL2aqBUpY/8eHaZIFvnDCeABC6w33Vmbx0z2g="; }; cmakeFlags = [ diff --git a/pkgs/by-name/ne/neovim-remote/package.nix b/pkgs/by-name/ne/neovim-remote/package.nix index f85d379faa85..ffb686abc8f1 100644 --- a/pkgs/by-name/ne/neovim-remote/package.nix +++ b/pkgs/by-name/ne/neovim-remote/package.nix @@ -13,7 +13,7 @@ with python3.pkgs; buildPythonApplication rec { owner = "mhinz"; repo = "neovim-remote"; rev = "v${version}"; - sha256 = "0lbz4w8hgxsw4k1pxafrl3rhydrvi5jc6vnsmkvnhh6l6rxlmvmq"; + hash = "sha256-uO5KezbUQGj3rNpuw2SJOzcP86DZqX7DJFz3BxEnf1E="; }; patches = [ diff --git a/pkgs/by-name/ne/netproc/package.nix b/pkgs/by-name/ne/netproc/package.nix index 3f5bd8cbd86b..16f8cabe5fbe 100644 --- a/pkgs/by-name/ne/netproc/package.nix +++ b/pkgs/by-name/ne/netproc/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "berghetti"; repo = "netproc"; rev = finalAttrs.version; - sha256 = "sha256-OQWlFwCga33rTseLeO8rAd+pkLHbSNf3YI5OSwrdIyk="; + hash = "sha256-OQWlFwCga33rTseLeO8rAd+pkLHbSNf3YI5OSwrdIyk="; }; buildInputs = [ ncurses ]; diff --git a/pkgs/by-name/ne/nextpnr/package.nix b/pkgs/by-name/ne/nextpnr/package.nix index 9b00d388b578..840ecf152491 100644 --- a/pkgs/by-name/ne/nextpnr/package.nix +++ b/pkgs/by-name/ne/nextpnr/package.nix @@ -27,7 +27,7 @@ let owner = "YosysHQ"; repo = "nextpnr-tests"; rev = "00c55a9eb9ea2e062b51fe0d64741412b185d95d"; - sha256 = "sha256-83suMftMtnaRFq3T2/I7Uahb11WZlXhwYt6Q/rqi2Yo="; + hash = "sha256-83suMftMtnaRFq3T2/I7Uahb11WZlXhwYt6Q/rqi2Yo="; name = "nextpnr-tests"; }; in diff --git a/pkgs/by-name/ni/nimlsp/package.nix b/pkgs/by-name/ni/nimlsp/package.nix index 0cd648b74790..36b9b3d3af01 100644 --- a/pkgs/by-name/ni/nimlsp/package.nix +++ b/pkgs/by-name/ni/nimlsp/package.nix @@ -20,7 +20,7 @@ buildNimPackage (finalAttrs: { owner = "PMunch"; repo = "jsonschema"; rev = "7b41c03e3e1a487d5a8f6b940ca8e764dc2cbabf"; - sha256 = "1js64jqd854yjladxvnylij4rsz7212k31ks541pqrdzm6hpblbz"; + hash = "sha256-f9F1oam/ZXwDKXqGMUUQ5+tMZKTe7t4UlZ4U1LAkRss="; }; in [ jsonSchemaSrc ]; diff --git a/pkgs/by-name/ni/nitch/package.nix b/pkgs/by-name/ni/nitch/package.nix index 772f259ba6fc..e241bcd7e61e 100644 --- a/pkgs/by-name/ni/nitch/package.nix +++ b/pkgs/by-name/ni/nitch/package.nix @@ -13,7 +13,7 @@ buildNimPackage { patches = [ (fetchpatch { url = "https://github.com/unxsh/nitch/commit/6831cf96144f58c4da298a0bc9b50d33056f6c08.patch"; - sha256 = "sha256-uZUzUBLHBsssNqDxZ0NuTRMN9/gBxIlIiGgQkqCqEFc="; + hash = "sha256-uZUzUBLHBsssNqDxZ0NuTRMN9/gBxIlIiGgQkqCqEFc="; }) (fetchpatch { url = "https://github.com/ssleert/nitch/commit/ff10dea47dbc4d9736bd839b87869f53166cf395.patch"; diff --git a/pkgs/by-name/ni/nix-ld/package.nix b/pkgs/by-name/ni/nix-ld/package.nix index 36b6917fcf40..22fe068feeaf 100644 --- a/pkgs/by-name/ni/nix-ld/package.nix +++ b/pkgs/by-name/ni/nix-ld/package.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage { owner = "mic92"; repo = "nix-ld"; rev = "2.0.0"; - sha256 = "sha256-rmSXQ4MYQe/OFDBRlqqw5kyp9b/aeEg0Fg9c167xofg="; + hash = "sha256-rmSXQ4MYQe/OFDBRlqqw5kyp9b/aeEg0Fg9c167xofg="; }; cargoHash = "sha256-w6CQx9kOyBtM2nMwdFb+LtU4oHVEYrTNVmH1A6R5DHM="; diff --git a/pkgs/by-name/ni/nix-store-gcs-proxy/package.nix b/pkgs/by-name/ni/nix-store-gcs-proxy/package.nix index 158e8e6056a2..6d2633af0651 100644 --- a/pkgs/by-name/ni/nix-store-gcs-proxy/package.nix +++ b/pkgs/by-name/ni/nix-store-gcs-proxy/package.nix @@ -7,7 +7,7 @@ buildGoModule rec { owner = "tweag"; repo = "nix-store-gcs-proxy"; rev = "v${version}"; - sha256 = "0804p65px4wd7gzxggpdxsazkd1hbz1p15zzaxf9ygc6sh26ncln"; + hash = "sha256-ljJrBNSGPZ9cV/+XcMNfMLT5le7tvtf/O42Tfou5BCA="; }; vendorHash = "sha256-Bm3yFzm2LXOPYWQDk/UBusV0lPfc/BCKIb3pPlWgDFo="; diff --git a/pkgs/by-name/ni/nixpkgs-fmt/package.nix b/pkgs/by-name/ni/nixpkgs-fmt/package.nix index cbb2ae1d9017..e1d329acc699 100644 --- a/pkgs/by-name/ni/nixpkgs-fmt/package.nix +++ b/pkgs/by-name/ni/nixpkgs-fmt/package.nix @@ -7,7 +7,7 @@ rustPlatform.buildRustPackage rec { owner = "nix-community"; repo = pname; rev = "v${version}"; - sha256 = "sha256-6Ut4/ix915EoaPCewoG3KhKBA+OaggpDqnx2nvKxEpQ="; + hash = "sha256-6Ut4/ix915EoaPCewoG3KhKBA+OaggpDqnx2nvKxEpQ="; }; cargoHash = "sha256-yIwCBm46sgrpTt45uCyyS7M6V0ReGUXVu7tyrjdNqeQ="; diff --git a/pkgs/by-name/nm/nmap/package.nix b/pkgs/by-name/nm/nmap/package.nix index 62b8c0ae0d0d..666f6bd84ecc 100644 --- a/pkgs/by-name/nm/nmap/package.nix +++ b/pkgs/by-name/nm/nmap/package.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://nmap.org/dist/nmap-${version}.tar.bz2"; - sha256 = "sha256-4Uq1MOR7Wv2I8ciiusf4nNj+a0eOItJVxbm923ocV3g="; + hash = "sha256-4Uq1MOR7Wv2I8ciiusf4nNj+a0eOItJVxbm923ocV3g="; }; prePatch = lib.optionalString stdenv.isDarwin '' diff --git a/pkgs/by-name/nm/nmapsi4/package.nix b/pkgs/by-name/nm/nmapsi4/package.nix index a9574b4baa01..1b4e25912e4d 100644 --- a/pkgs/by-name/nm/nmapsi4/package.nix +++ b/pkgs/by-name/nm/nmapsi4/package.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { owner = "nmapsi4"; repo = "nmapsi4"; rev = "v${version}"; - sha256 = "sha256-q3XfwJ4TGK4E58haN0Q0xRH4GDpKD8VZzyxHe/VwBqY="; + hash = "sha256-q3XfwJ4TGK4E58haN0Q0xRH4GDpKD8VZzyxHe/VwBqY="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/nn/nncp/package.nix b/pkgs/by-name/nn/nncp/package.nix index 16f107e6b55c..13c4c4812b92 100644 --- a/pkgs/by-name/nn/nncp/package.nix +++ b/pkgs/by-name/nn/nncp/package.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "http://www.nncpgo.org/download/nncp-${finalAttrs.version}.tar.xz"; - sha256 = "7EEUvNkYSqh4HzjbqjqgQlXfu6nDU2v3WWnma8M0r/I="; + hash = "sha256-7EEUvNkYSqh4HzjbqjqgQlXfu6nDU2v3WWnma8M0r/I="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/no/notary/package.nix b/pkgs/by-name/no/notary/package.nix index 1f35222ee960..0feb21091df6 100644 --- a/pkgs/by-name/no/notary/package.nix +++ b/pkgs/by-name/no/notary/package.nix @@ -10,7 +10,7 @@ buildGoModule rec { owner = "notaryproject"; repo = "notary"; rev = "9d2b3b35929392c9945d976b8bdecbe2f53a299e"; - sha256 = "sha256-u19BfTJwRWholK0b3BcgSmcMM9AR7OeXo64AOi87r0A="; + hash = "sha256-u19BfTJwRWholK0b3BcgSmcMM9AR7OeXo64AOi87r0A="; }; vendorHash = null; diff --git a/pkgs/by-name/nr/nrpl/package.nix b/pkgs/by-name/nr/nrpl/package.nix index c75fe1d5a512..c842d16ba9a9 100644 --- a/pkgs/by-name/nr/nrpl/package.nix +++ b/pkgs/by-name/nr/nrpl/package.nix @@ -8,7 +8,7 @@ buildNimPackage { owner = "wheineman"; repo = "nrpl"; rev = "6d6c189ab7d1c905cc29dc678d66e9e132026f69"; - sha256 = "1cly9lhrawnc42r31b7r0p0i6hcx8r00aa17gv7w9pcpj8ngb4v2"; + hash = "sha256-YpP1LJKX3cTPficoBUBGnUETwQX5rDCyIMxylSFNnrI="; }; nativeBuildInputs = [ makeWrapper ]; @@ -18,7 +18,7 @@ buildNimPackage { (fetchpatch { url = "https://patch-diff.githubusercontent.com/raw/wheineman/nrpl/pull/12.patch"; name = "update_for_new_nim.patch"; - sha256 = "1zff7inhn3l1jnxcnidy705lzi3wqib1chf4rayh1g9i23an7wg1"; + hash = "sha256-4fFj1RAxvQC9ysRBFlbEfMRPCzi+Rcu6lYEOC208zv0="; }) ]; diff --git a/pkgs/by-name/nu/nuget/package.nix b/pkgs/by-name/nu/nuget/package.nix index dd0af4ab2244..9473a95f43e4 100644 --- a/pkgs/by-name/nu/nuget/package.nix +++ b/pkgs/by-name/nu/nuget/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation (attrs: { owner = "mono"; repo = "linux-packaging-nuget"; rev = "upstream/${attrs.version}.bin"; - sha256 = "sha256-9/dSeVshHbpYIgGE/8OzrB4towrWVB3UxDi8Esmbu7Y="; + hash = "sha256-9/dSeVshHbpYIgGE/8OzrB4towrWVB3UxDi8Esmbu7Y="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/nv/nvidia-container-toolkit/nvidia-docker.nix b/pkgs/by-name/nv/nvidia-container-toolkit/nvidia-docker.nix index f2ff4bafaf77..9690be4d7735 100644 --- a/pkgs/by-name/nv/nvidia-container-toolkit/nvidia-docker.nix +++ b/pkgs/by-name/nv/nvidia-container-toolkit/nvidia-docker.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { owner = "NVIDIA"; repo = pname; rev = "v${version}"; - sha256 = "1n1k7fnimky67s12p2ycaq9mgk245fchq62vgd7bl3bzfcbg0z4h"; + hash = "sha256-kHzwFnN/DbpOe1sYDJkrRMxXE1bMiyuCPsbPGq07M9g="; }; buildPhase = '' diff --git a/pkgs/by-name/oc/octosql/package.nix b/pkgs/by-name/oc/octosql/package.nix index 675375cb0941..e81ca18179c7 100644 --- a/pkgs/by-name/oc/octosql/package.nix +++ b/pkgs/by-name/oc/octosql/package.nix @@ -11,7 +11,7 @@ buildGoModule rec { owner = "cube2222"; repo = pname; rev = "v${version}"; - sha256 = "sha256-kzbIts5d2KmFfaAnOdpIXI1fiqBYXe5t981g4Uyk/cc="; + hash = "sha256-kzbIts5d2KmFfaAnOdpIXI1fiqBYXe5t981g4Uyk/cc="; }; vendorHash = "sha256-p/2UsvxxywQKtk/9wDa5fjS0z6xLLzDONuQ5AtnUonk="; diff --git a/pkgs/by-name/oi/oidc-agent/package.nix b/pkgs/by-name/oi/oidc-agent/package.nix index 2be9a24f7db6..6fd8adbb3db2 100644 --- a/pkgs/by-name/oi/oidc-agent/package.nix +++ b/pkgs/by-name/oi/oidc-agent/package.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { owner = "indigo-dc"; repo = pname; rev = "v${version}"; - sha256 = "sha256-SjpCD/x93kYB5759e/D0btLO48d6g4SkEUAX7PYfm2w="; + hash = "sha256-SjpCD/x93kYB5759e/D0btLO48d6g4SkEUAX7PYfm2w="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/ok/okolors/package.nix b/pkgs/by-name/ok/okolors/package.nix index 411021f9593e..8d20c7432e8e 100644 --- a/pkgs/by-name/ok/okolors/package.nix +++ b/pkgs/by-name/ok/okolors/package.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { owner = "Ivordir"; repo = "Okolors"; rev = "v${version}"; - sha256 = "sha256-U7rLynXZGHCeZjaXoXx2IRDgUFv7zOKfb4BPgDROzBc="; + hash = "sha256-U7rLynXZGHCeZjaXoXx2IRDgUFv7zOKfb4BPgDROzBc="; }; cargoHash = "sha256-xRCxpmIocvkg1ErYVqBLHb/jXV2eWeWHg4IO/QsnnF0="; diff --git a/pkgs/by-name/on/onlyoffice-bin/package.nix b/pkgs/by-name/on/onlyoffice-bin/package.nix index 5156778b7e25..fdab6d29f6d2 100644 --- a/pkgs/by-name/on/onlyoffice-bin/package.nix +++ b/pkgs/by-name/on/onlyoffice-bin/package.nix @@ -69,7 +69,7 @@ let minor = null; src = fetchurl { url = "https://github.com/ONLYOFFICE/DesktopEditors/releases/download/v${version}/onlyoffice-desktopeditors_amd64.deb"; - sha256 = "sha256-hS1+gLN17sP3EFud3fQXRWeFiQbrumBONLjqXEl89Js="; + hash = "sha256-hS1+gLN17sP3EFud3fQXRWeFiQbrumBONLjqXEl89Js="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/op/open-fprintd/package.nix b/pkgs/by-name/op/open-fprintd/package.nix index 45aac839e399..06f46d217dfb 100644 --- a/pkgs/by-name/op/open-fprintd/package.nix +++ b/pkgs/by-name/op/open-fprintd/package.nix @@ -8,7 +8,7 @@ python3Packages.buildPythonPackage rec { owner = "uunicorn"; repo = pname; rev = version; - sha256 = "sha256-uVFuwtsmR/9epoqot3lJ/5v5OuJjuRjL7FJF7oXNDzU="; + hash = "sha256-uVFuwtsmR/9epoqot3lJ/5v5OuJjuRjL7FJF7oXNDzU="; }; nativeBuildInputs = [ wrapGAppsNoGuiHook gobject-introspection ]; diff --git a/pkgs/by-name/op/openorienteering-mapper/package.nix b/pkgs/by-name/op/openorienteering-mapper/package.nix index 4a1519337034..037364ed6263 100644 --- a/pkgs/by-name/op/openorienteering-mapper/package.nix +++ b/pkgs/by-name/op/openorienteering-mapper/package.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { # https://github.com/OpenOrienteering/mapper/pull/1907 (fetchpatch { url = "https://github.com/OpenOrienteering/mapper/commit/bc52aa567e90a58d6963b44d5ae1909f3f841508.patch"; - sha256 = "1bkckapzccn6k0ri6bgrr0nhis9498fnwj7b32s2ysym8zcg0355"; + hash = "sha256-pQzw2EfVay+0GOtIbh1KJOkILcj5LRMzmMYy9q+abK4="; }) ]; diff --git a/pkgs/by-name/op/openvas-smb/package.nix b/pkgs/by-name/op/openvas-smb/package.nix index 16a912017975..cc6297628329 100644 --- a/pkgs/by-name/op/openvas-smb/package.nix +++ b/pkgs/by-name/op/openvas-smb/package.nix @@ -15,7 +15,7 @@ let heimdalConfigHeader = fetchurl { url = "https://raw.githubusercontent.com/heimdal/heimdal/d8c10e68a61f10c8fca62b227a0766d294bda4a0/include/heim_threads.h"; - sha256 = "08345hkb5jbdcgh2cx3d624w4c8wxmnnsjxlw46wsnm39k4l0ihw"; + hash = "sha256-HEZAyUyjWs0N4bRLbW3tHDHCiTBtdCbgY23JsiYsZCA="; }; in stdenv.mkDerivation rec { diff --git a/pkgs/by-name/ou/outfox/package.nix b/pkgs/by-name/ou/outfox/package.nix index b38e096823ec..b3ac739d9663 100644 --- a/pkgs/by-name/ou/outfox/package.nix +++ b/pkgs/by-name/ou/outfox/package.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { src = { i686-linux = fetchurl { url = "https://github.com/TeamRizu/OutFox/releases/download/OF5.0.0-042/OutFox-alpha-0.5.0-pre042-Linux-14.04-32bit-i386-i386-legacy-date-20231227.tar.gz"; - sha256 = "sha256-NFjNoqJ7Fq4A7Y0k6oQcWjykV+/b/MiRtJ1p6qlZdjs="; + hash = "sha256-NFjNoqJ7Fq4A7Y0k6oQcWjykV+/b/MiRtJ1p6qlZdjs="; }; x86_64-linux = fetchurl { url = "https://github.com/TeamRizu/OutFox/releases/download/OF5.0.0-042/OutFox-alpha-0.5.0-pre042-Linux-22.04-amd64-current-date-20231224.tar.gz"; diff --git a/pkgs/by-name/ov/ovh-ttyrec/package.nix b/pkgs/by-name/ov/ovh-ttyrec/package.nix index 550df6531ced..88ec7e2c9570 100644 --- a/pkgs/by-name/ov/ovh-ttyrec/package.nix +++ b/pkgs/by-name/ov/ovh-ttyrec/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { owner = "ovh"; repo = "ovh-ttyrec"; rev = "v${version}"; - sha256 = "sha256-VTF9WLwAIWWn+W0sLQaoFBFro+pSXKwcTO6q6MW6JD8="; + hash = "sha256-VTF9WLwAIWWn+W0sLQaoFBFro+pSXKwcTO6q6MW6JD8="; }; nativeBuildInputs = [ zstd ]; diff --git a/pkgs/by-name/pd/pdfannots2json/package.nix b/pkgs/by-name/pd/pdfannots2json/package.nix index 23776a452752..90db280c8b9a 100644 --- a/pkgs/by-name/pd/pdfannots2json/package.nix +++ b/pkgs/by-name/pd/pdfannots2json/package.nix @@ -11,7 +11,7 @@ in owner = "mgmeyers"; repo = "pdfannots2json"; rev = "refs/tags/${version}"; - sha256 = "sha256-qk4OSws/6SevN/Q0lsyxw+fZkm2uy1WwOYYL7CB7QUk="; + hash = "sha256-qk4OSws/6SevN/Q0lsyxw+fZkm2uy1WwOYYL7CB7QUk="; }; vendorHash = null; diff --git a/pkgs/by-name/pi/pigeon/package.nix b/pkgs/by-name/pi/pigeon/package.nix index 2277d4c3616a..bfd6672530bf 100644 --- a/pkgs/by-name/pi/pigeon/package.nix +++ b/pkgs/by-name/pi/pigeon/package.nix @@ -8,7 +8,7 @@ buildGoModule rec { owner = "mna"; repo = "pigeon"; rev = "v${version}"; - sha256 = "sha256-0Cp/OnFvVZj9UZgl3F5MCzemBaHI4smGWU46VQnhLOg="; + hash = "sha256-0Cp/OnFvVZj9UZgl3F5MCzemBaHI4smGWU46VQnhLOg="; }; vendorHash = "sha256-JbBXRkxnB7LeeWdBLIQvyjvWo0zZ1EOuEUPXxHWiq+E="; diff --git a/pkgs/by-name/pi/pix/package.nix b/pkgs/by-name/pi/pix/package.nix index b7804eafeae1..854b4559165a 100644 --- a/pkgs/by-name/pi/pix/package.nix +++ b/pkgs/by-name/pi/pix/package.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { owner = "linuxmint"; repo = pname; rev = version; - sha256 = "sha256-WL9EW7oKeQwufw1VYDigbqAt52GQTpc5RgDEmnKO6vc="; + hash = "sha256-WL9EW7oKeQwufw1VYDigbqAt52GQTpc5RgDEmnKO6vc="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/pl/plzip/package.nix b/pkgs/by-name/pl/plzip/package.nix index db7d3101d7e2..4e361f6a3211 100644 --- a/pkgs/by-name/pl/plzip/package.nix +++ b/pkgs/by-name/pl/plzip/package.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "mirror://savannah/lzip/plzip/plzip-${finalAttrs.version}.tar.lz"; - sha256 = "51f48d33df659bb3e1e7e418275e922ad752615a5bc984139da08f1e6d7d10fd"; + hash = "sha256-UfSNM99lm7Ph5+QYJ16SKtdSYVpbyYQTnaCPHm19EP0="; # hash from release email }; diff --git a/pkgs/by-name/po/pokemon-cursor/package.nix b/pkgs/by-name/po/pokemon-cursor/package.nix index c5718e365ec1..eeaec0a8b68b 100644 --- a/pkgs/by-name/po/pokemon-cursor/package.nix +++ b/pkgs/by-name/po/pokemon-cursor/package.nix @@ -15,7 +15,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { owner = "ful1e5"; repo = "pokemon-cursor"; rev = "v${finalAttrs.version}"; - sha256 = "sha256-EL6Ztbzjm1YuQP+8ZbrhbuBXn+GFiJGG0iGNWzU/rBY="; + hash = "sha256-EL6Ztbzjm1YuQP+8ZbrhbuBXn+GFiJGG0iGNWzU/rBY="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/po/pololu-tic/package.nix b/pkgs/by-name/po/pololu-tic/package.nix index f34f8d27affa..322ff8fa6455 100644 --- a/pkgs/by-name/po/pololu-tic/package.nix +++ b/pkgs/by-name/po/pololu-tic/package.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "pololu"; repo = "pololu-tic-software"; rev = "refs/tags/${finalAttrs.version}"; - sha256 = "sha256-C/v5oaC5zZwm+j9CbFaDW+ebzHxPVb8kZLg9c0HyPbc="; + hash = "sha256-C/v5oaC5zZwm+j9CbFaDW+ebzHxPVb8kZLg9c0HyPbc="; }; outputs = [ diff --git a/pkgs/by-name/po/pop-launcher/package.nix b/pkgs/by-name/po/pop-launcher/package.nix index 4f2a6e382fd3..4d3c9a31ccb3 100644 --- a/pkgs/by-name/po/pop-launcher/package.nix +++ b/pkgs/by-name/po/pop-launcher/package.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { owner = "pop-os"; repo = "launcher"; rev = version; - sha256 = "sha256-BQAO9IodZxGgV8iBmUaOF0yDbAMVDFslKCqlh3pBnb0="; + hash = "sha256-BQAO9IodZxGgV8iBmUaOF0yDbAMVDFslKCqlh3pBnb0="; }; postPatch = '' diff --git a/pkgs/by-name/po/power-profiles-daemon/package.nix b/pkgs/by-name/po/power-profiles-daemon/package.nix index c1fb546461e4..94028f106eab 100644 --- a/pkgs/by-name/po/power-profiles-daemon/package.nix +++ b/pkgs/by-name/po/power-profiles-daemon/package.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "upower"; repo = "power-profiles-daemon"; rev = finalAttrs.version; - sha256 = "sha256-NzaneS/Za73HSK2abBZNmP+ZPbhIG+JXfBTPHm2vBeU="; + hash = "sha256-NzaneS/Za73HSK2abBZNmP+ZPbhIG+JXfBTPHm2vBeU="; }; nativeBuildInputs = diff --git a/pkgs/by-name/pr/prevo-data/package.nix b/pkgs/by-name/pr/prevo-data/package.nix index c73af66dd69c..15f7eb66187c 100644 --- a/pkgs/by-name/pr/prevo-data/package.nix +++ b/pkgs/by-name/pr/prevo-data/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation { owner = "bpeel"; repo = "revo"; rev = "1e8d7197c0bc831e2127909e77e64dfc26906bdd"; - sha256 = "1ldhzpi3d5cbssv8r7acsn7qwxcl8qpqi8ywpsp7cbgx3w7hhkyz"; + hash = "sha256-308IDx/9LXauvtyjiC9GlHWOj9VMnYy21ouVNuL9sNE="; }; nativeBuildInputs = [ prevo-tools ]; diff --git a/pkgs/by-name/pr/prevo-tools/package.nix b/pkgs/by-name/pr/prevo-tools/package.nix index 4feb518103d4..741e6e80d87c 100644 --- a/pkgs/by-name/pr/prevo-tools/package.nix +++ b/pkgs/by-name/pr/prevo-tools/package.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { owner = "bpeel"; repo = "prevodb"; rev = version; - sha256 = "1fyrc4g9qdq04nxs4g8x0krxfani5xady6v9m0qfqpbh4xk2ry2d"; + hash = "sha256-TfgsZidwXewwqGkb31Qv0SrX8wQdPaK7JQA3nB5h2bs="; }; nativeBuildInputs = [ autoreconfHook pkg-config installShellFiles ]; diff --git a/pkgs/by-name/pr/prometheus-jmx-javaagent/package.nix b/pkgs/by-name/pr/prometheus-jmx-javaagent/package.nix index 49ca4c9d6d84..4c317159f552 100644 --- a/pkgs/by-name/pr/prometheus-jmx-javaagent/package.nix +++ b/pkgs/by-name/pr/prometheus-jmx-javaagent/package.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation ( version = "1.0.1"; src = fetchurl { url = "mirror://maven/io/prometheus/jmx/jmx_prometheus_javaagent/${finalAttrs.version}/${jarName}"; - sha256 = "sha256-fWH3N/1mFhDMwUrqeXZPqh6pSjQMvI8AKbPS7eo9gME="; + hash = "sha256-fWH3N/1mFhDMwUrqeXZPqh6pSjQMvI8AKbPS7eo9gME="; }; dontUnpack = true; diff --git a/pkgs/by-name/pr/prometheus-squid-exporter/package.nix b/pkgs/by-name/pr/prometheus-squid-exporter/package.nix index 217449b85bb4..0dc4acd2c0bb 100644 --- a/pkgs/by-name/pr/prometheus-squid-exporter/package.nix +++ b/pkgs/by-name/pr/prometheus-squid-exporter/package.nix @@ -8,7 +8,7 @@ buildGoModule rec { owner = "boynux"; repo = "squid-exporter"; rev = "v${version}"; - sha256 = "sha256-low1nIL7FbIYfIP7KWPskAQ50Hh+d7JI+ryYoR+mP10="; + hash = "sha256-low1nIL7FbIYfIP7KWPskAQ50Hh+d7JI+ryYoR+mP10="; }; vendorHash = "sha256-0BNhjNveUDd0+X0do4Md58zJjXe3+KN27MPEviNuF3g="; diff --git a/pkgs/by-name/pr/protoc-go-inject-tag/package.nix b/pkgs/by-name/pr/protoc-go-inject-tag/package.nix index 4bb673449ea6..cddd70559d91 100644 --- a/pkgs/by-name/pr/protoc-go-inject-tag/package.nix +++ b/pkgs/by-name/pr/protoc-go-inject-tag/package.nix @@ -10,7 +10,7 @@ buildGoModule rec { owner = "favadi"; repo = "protoc-go-inject-tag"; rev = "v${version}"; - sha256 = "01jsrx83pygvjx3nzfnwvb2vn5gagl79m9i67v7cfg1lzz168spj"; + hash = "sha256-8mpkwv80PMfOPiammg596hW7xdrcum9Hl/v5O1DPWgY="; }; vendorHash = "sha256-tMpcJ37yGr7i91Kwz57FmJ+u2x0CAus0+yWOR10fJLo="; diff --git a/pkgs/by-name/pr/prox/package.nix b/pkgs/by-name/pr/prox/package.nix index d1917e376625..7f3713364196 100644 --- a/pkgs/by-name/pr/prox/package.nix +++ b/pkgs/by-name/pr/prox/package.nix @@ -12,7 +12,7 @@ buildGoModule rec { owner = "fgrosse"; repo = pname; rev = "v${version}"; - sha256 = "sha256-KSHTlcAmnuU8F17N0LBS0s5b/k6Of0OEHVd3v50bH3g="; + hash = "sha256-KSHTlcAmnuU8F17N0LBS0s5b/k6Of0OEHVd3v50bH3g="; }; vendorHash = "sha256-i4QJ84Tne1E8s2Fprd5xeWlTQBIb/9tvwws80yHXhbg="; diff --git a/pkgs/by-name/pr/prrte/package.nix b/pkgs/by-name/pr/prrte/package.nix index de604217cc94..922f5e5aa94f 100644 --- a/pkgs/by-name/pr/prrte/package.nix +++ b/pkgs/by-name/pr/prrte/package.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { owner = "openpmix"; repo = "prrte"; rev = "v${version}"; - sha256 = "sha256-0JHtUpGFdPKmgUk0+MNxTfZIUDz/vY/CV+Mqbmv0JFw="; + hash = "sha256-0JHtUpGFdPKmgUk0+MNxTfZIUDz/vY/CV+Mqbmv0JFw="; fetchSubmodules = true; }; diff --git a/pkgs/by-name/py/pybibget/package.nix b/pkgs/by-name/py/pybibget/package.nix index a3f8febc7d07..c57d74bf5d2d 100644 --- a/pkgs/by-name/py/pybibget/package.nix +++ b/pkgs/by-name/py/pybibget/package.nix @@ -9,7 +9,7 @@ let src = fetchPypi { inherit pname version; - sha256 = "1n4as3kdsgrcmxxyjz9klm0v0pb24rsa1b7r43j7wmnfsir8i81k"; + hash = "sha256-M6CIctTOVn7kIPmsoHQmYl2wQaUzfel7ryw/3ebQitg="; }; in diff --git a/pkgs/by-name/qr/qrrs/package.nix b/pkgs/by-name/qr/qrrs/package.nix index c995bf5a6b9a..4b43473a3cf2 100644 --- a/pkgs/by-name/qr/qrrs/package.nix +++ b/pkgs/by-name/qr/qrrs/package.nix @@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec { owner = "lenivaya"; repo = "qrrs"; rev = "v${version}"; - sha256 = "sha256-L8sqvLbh85b8Ds9EvXNkyGVXm8BF3ejFd8ZH7QoxJdU="; + hash = "sha256-L8sqvLbh85b8Ds9EvXNkyGVXm8BF3ejFd8ZH7QoxJdU="; }; cargoHash = "sha256-RLxQ7tG5e3q4vqYJU0eNvvcEnnyNc9R9at0/ACLYJiY="; diff --git a/pkgs/by-name/qr/qrtool/package.nix b/pkgs/by-name/qr/qrtool/package.nix index 4fb17b7ca8dc..bc79fb038f8e 100644 --- a/pkgs/by-name/qr/qrtool/package.nix +++ b/pkgs/by-name/qr/qrtool/package.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { owner = "sorairolake"; repo = "qrtool"; rev = "v${version}"; - sha256 = "sha256-lD/xi2k5baZGUUixy/032jTBevr0uQIT/JmX+d+kPyA="; + hash = "sha256-lD/xi2k5baZGUUixy/032jTBevr0uQIT/JmX+d+kPyA="; }; cargoHash = "sha256-lR/LusIgdA+G7YeSLHjxdcC96tOSqSyalVamS42ORs0="; diff --git a/pkgs/by-name/qu/quadrapassel/package.nix b/pkgs/by-name/qu/quadrapassel/package.nix index 38578e8eb504..519ad05a7a92 100644 --- a/pkgs/by-name/qu/quadrapassel/package.nix +++ b/pkgs/by-name/qu/quadrapassel/package.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/quadrapassel/${lib.versions.major version}/quadrapassel-${version}.tar.xz"; - sha256 = "C9giQUIHxzEj7WpJ9yPaWsjdTfXTXtwJn/6i4TmcwAo="; + hash = "sha256-C9giQUIHxzEj7WpJ9yPaWsjdTfXTXtwJn/6i4TmcwAo="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/qw/qwerty-fr/package.nix b/pkgs/by-name/qw/qwerty-fr/package.nix index f898073f77c1..f406f17795c3 100644 --- a/pkgs/by-name/qw/qwerty-fr/package.nix +++ b/pkgs/by-name/qw/qwerty-fr/package.nix @@ -12,7 +12,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { owner = "qwerty-fr"; repo = "qwerty-fr"; rev = "refs/tags/v${finalAttrs.version}"; - sha256 = "sha256-TD67wKdaPaXzJzjKFCfRZl3WflUfdnUSQl/fnjr9TF8="; + hash = "sha256-TD67wKdaPaXzJzjKFCfRZl3WflUfdnUSQl/fnjr9TF8="; }; installPhase = '' diff --git a/pkgs/by-name/r0/r0vm/package.nix b/pkgs/by-name/r0/r0vm/package.nix index 77f856dcb764..36789e41921b 100644 --- a/pkgs/by-name/r0/r0vm/package.nix +++ b/pkgs/by-name/r0/r0vm/package.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { owner = "risc0"; repo = "risc0"; rev = "v${version}"; - sha256 = "sha256-jtROtI5/4W2pNvn1ZYR/wQAZmECTr7YxuZGu2Ns9paw="; + hash = "sha256-jtROtI5/4W2pNvn1ZYR/wQAZmECTr7YxuZGu2Ns9paw="; }; buildAndTestSubdir = "risc0/r0vm"; @@ -42,7 +42,7 @@ rustPlatform.buildRustPackage rec { recursionZkr = fetchurl { name = "recursion_zkr.zip"; url = "https://risc0-artifacts.s3.us-west-2.amazonaws.com/zkr/${sha256Hash}.zip"; - sha256 = "sha256-ToSWRp4e+gDvs2MNJhq/NF5rKQX7ZLTzope+iOvfg9I="; + hash = "sha256-ToSWRp4e+gDvs2MNJhq/NF5rKQX7ZLTzope+iOvfg9I="; }; in '' diff --git a/pkgs/by-name/rc/rcu/package.nix b/pkgs/by-name/rc/rcu/package.nix index 489bdefbb136..5f9bb9bb27e9 100644 --- a/pkgs/by-name/rc/rcu/package.nix +++ b/pkgs/by-name/rc/rcu/package.nix @@ -21,7 +21,7 @@ python3Packages.buildPythonApplication rec { src = let src-tarball = requireFile { name = "rcu-d${version}-source.tar.gz"; - sha256 = "15559537bjrviq5n87yz4q6n3y3l3bwip8rxg34zf0w9zmr4zmqn"; + hash = "sha256-FtdPcv2JA/fJeD2jG/kadPhhDSbfH2QLjjvLdUZJpZQ="; url = "http://www.davisr.me/projects/rcu/"; }; in runCommand "${src-tarball.name}-unpacked" {} '' diff --git a/pkgs/by-name/re/reaction/package.nix b/pkgs/by-name/re/reaction/package.nix index 740a036d3c4d..3636131db832 100644 --- a/pkgs/by-name/re/reaction/package.nix +++ b/pkgs/by-name/re/reaction/package.nix @@ -14,7 +14,7 @@ in buildGoModule { owner = "ppom"; repo = "reaction"; rev = "v${version}"; - sha256 = "sha256-UL3ck+gejZAu/mZS3ZiZ78a2/I+OesaSRZUhHirgu9o="; + hash = "sha256-UL3ck+gejZAu/mZS3ZiZ78a2/I+OesaSRZUhHirgu9o="; }; vendorHash = "sha256-THUIoWFzkqaTofwH4clBgsmtUlLS9WIB2xjqW7vkhpg="; diff --git a/pkgs/by-name/re/revolt-desktop/package.nix b/pkgs/by-name/re/revolt-desktop/package.nix index 85e8ed70ab0a..7d8f0842a7a3 100644 --- a/pkgs/by-name/re/revolt-desktop/package.nix +++ b/pkgs/by-name/re/revolt-desktop/package.nix @@ -35,7 +35,7 @@ { src = fetchurl { url = "https://github.com/revoltchat/desktop/releases/download/v${version}/Revolt-linux.AppImage"; - sha256 = "sha256-Wsm6ef2Reenq3/aKGaP2yzlOuLKaxKtRHCLLMxvWUUY="; + hash = "sha256-Wsm6ef2Reenq3/aKGaP2yzlOuLKaxKtRHCLLMxvWUUY="; }; appimageContents = appimageTools.extractType2 { inherit (final) src pname version; }; diff --git a/pkgs/by-name/rh/rHttp/package.nix b/pkgs/by-name/rh/rHttp/package.nix index bd28007dc361..d3213be96915 100644 --- a/pkgs/by-name/rh/rHttp/package.nix +++ b/pkgs/by-name/rh/rHttp/package.nix @@ -12,7 +12,7 @@ buildGoModule { owner = "1buran"; repo = "rHttp"; rev = "9b7da3a0f7c2e35c9d326e7920ded15f806f8113"; - sha256 = "1nz3f6zgpbxlwn6c5rqxa8897ygi5r7h7f6624i27rq9kr729cra"; + hash = "sha256-KrMkTp4J5yMiEca4A08u8fmTEFId58KM5bSv+75x49s="; }; vendorHash = "sha256-NR1q44IUSME+x1EOcnXXRoIXw8Av0uH7iXhD+cdd99I="; diff --git a/pkgs/by-name/rm/rmfakecloud/package.nix b/pkgs/by-name/rm/rmfakecloud/package.nix index 44d7b02d721d..315ac8ec43b1 100644 --- a/pkgs/by-name/rm/rmfakecloud/package.nix +++ b/pkgs/by-name/rm/rmfakecloud/package.nix @@ -8,7 +8,7 @@ buildGoModule rec { owner = "ddvk"; repo = pname; rev = "v${version}"; - sha256 = "sha256-J8oB5C5FYZTVq9zopHoL6WYpfTyiiyrQ4YSGu+2eaKw="; + hash = "sha256-J8oB5C5FYZTVq9zopHoL6WYpfTyiiyrQ4YSGu+2eaKw="; }; vendorHash = "sha256-S43qNDAlDWhrkfSffCooveemR1Z7KXS18t97UoolgBM="; diff --git a/pkgs/by-name/rm/rmfakecloud/webui.nix b/pkgs/by-name/rm/rmfakecloud/webui.nix index 98c4822a90b3..91efa1c78d9d 100644 --- a/pkgs/by-name/rm/rmfakecloud/webui.nix +++ b/pkgs/by-name/rm/rmfakecloud/webui.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { yarnOfflineCache = fetchYarnDeps { yarnLock = "${src}/ui/yarn.lock"; - sha256 = "sha256-JLCrpzytMKejmW+WlM6yybsoIZiimiJdPG5dSIn1L14="; + hash = "sha256-JLCrpzytMKejmW+WlM6yybsoIZiimiJdPG5dSIn1L14="; }; nativeBuildInputs = [ fixup-yarn-lock yarn nodejs ]; diff --git a/pkgs/by-name/ro/rofi-blezz/package.nix b/pkgs/by-name/ro/rofi-blezz/package.nix index d8cc9512b4f3..bc552f1e9344 100644 --- a/pkgs/by-name/ro/rofi-blezz/package.nix +++ b/pkgs/by-name/ro/rofi-blezz/package.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation { owner = "davatorium"; repo = "rofi-blezz"; rev = "3a00473471e7c56d2c349ad437937107b7d8e961"; - sha256 = "sha256-hY5UA7nyL6QoOBIZTjEiR0zjZFhkUkRa50r5rVZDnbg="; + hash = "sha256-hY5UA7nyL6QoOBIZTjEiR0zjZFhkUkRa50r5rVZDnbg="; }; patches = [ diff --git a/pkgs/by-name/rp/rpi-imager/package.nix b/pkgs/by-name/rp/rpi-imager/package.nix index ad04c817d5eb..05a893cd0536 100644 --- a/pkgs/by-name/rp/rpi-imager/package.nix +++ b/pkgs/by-name/rp/rpi-imager/package.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "raspberrypi"; repo = "rpi-imager"; rev = "refs/tags/v${finalAttrs.version}"; - sha256 = "sha256-JrotKMyAgQO3Y5RsFAar9N5/wDpWiBcy8RfvBWDiJMs="; + hash = "sha256-JrotKMyAgQO3Y5RsFAar9N5/wDpWiBcy8RfvBWDiJMs="; }; sourceRoot = "${finalAttrs.src.name}/src"; diff --git a/pkgs/by-name/rs/rs/package.nix b/pkgs/by-name/rs/rs/package.nix index 9486c13cb1e2..5edd417375e7 100644 --- a/pkgs/by-name/rs/rs/package.nix +++ b/pkgs/by-name/rs/rs/package.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://www.mirbsd.org/MirOS/dist/mir/rs/rs-${version}.tar.gz"; - sha256 = "0gxwlfk7bzivpp2260w2r6gkyl7vdi05cggn1fijfnp8kzf1b4li"; + hash = "sha256-kZIV3J/oWiejC/Y9VkBs+1A/n8mCAyPEvTv+daajvD8="; }; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/by-name/rs/rsgain/package.nix b/pkgs/by-name/rs/rsgain/package.nix index 2a8fa32ec554..284c5c1dbe23 100644 --- a/pkgs/by-name/rs/rsgain/package.nix +++ b/pkgs/by-name/rs/rsgain/package.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { owner = "complexlogic"; repo = "rsgain"; rev = "v${version}"; - sha256 = "sha256-kTvIMsRI99U2ovkN5pC4OUS/bJWpRYSuRcvObvQRnbQ="; + hash = "sha256-kTvIMsRI99U2ovkN5pC4OUS/bJWpRYSuRcvObvQRnbQ="; }; cmakeFlags = ["-DCMAKE_BUILD_TYPE='Release'"]; diff --git a/pkgs/by-name/rt/rtg-tools/package.nix b/pkgs/by-name/rt/rtg-tools/package.nix index 7872df77e61b..3fe57e0e80ae 100644 --- a/pkgs/by-name/rt/rtg-tools/package.nix +++ b/pkgs/by-name/rt/rtg-tools/package.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { owner = "RealTimeGenomics"; repo = "rtg-tools"; rev = version; - sha256 = "sha256-fMrrjrgaGxBVxn6qMq2g0oFv6qtfhZcQlkvv1E9Os6Y="; + hash = "sha256-fMrrjrgaGxBVxn6qMq2g0oFv6qtfhZcQlkvv1E9Os6Y="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/rt/rtl_fm_streamer/package.nix b/pkgs/by-name/rt/rtl_fm_streamer/package.nix index 05874d646108..3e3fcde3b5f9 100644 --- a/pkgs/by-name/rt/rtl_fm_streamer/package.nix +++ b/pkgs/by-name/rt/rtl_fm_streamer/package.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "AlbrechtL"; repo = "rtl_fm_streamer"; rev = "ceb2bf06883f986ed01aa57c84989ba35b6b9a27"; - sha256 = "sha256-9M7GS6AC7HEJge04vl7V6ZdtwWvbMu/Rhaf9fwQa9WA="; + hash = "sha256-9M7GS6AC7HEJge04vl7V6ZdtwWvbMu/Rhaf9fwQa9WA="; }; postPatch = '' diff --git a/pkgs/by-name/ru/rutorrent/package.nix b/pkgs/by-name/ru/rutorrent/package.nix index eeff6207d915..11c586b8d2aa 100644 --- a/pkgs/by-name/ru/rutorrent/package.nix +++ b/pkgs/by-name/ru/rutorrent/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { owner = "Novik"; repo = "ruTorrent"; rev = "v${version}"; - sha256 = "Hkh2fWaZpJLxUYaojR97XVQWXTRzmFkQe4xKsmY1E8M="; + hash = "sha256-Hkh2fWaZpJLxUYaojR97XVQWXTRzmFkQe4xKsmY1E8M="; }; installPhase = '' diff --git a/pkgs/by-name/ry/rygel/package.nix b/pkgs/by-name/ry/rygel/package.nix index 66d2a5ffae8c..dca12dd494fa 100644 --- a/pkgs/by-name/ry/rygel/package.nix +++ b/pkgs/by-name/ry/rygel/package.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "mirror://gnome/sources/rygel/${lib.versions.majorMinor finalAttrs.version}/rygel-${finalAttrs.version}.tar.xz"; - sha256 = "R9JXBLYQiDdeJqq6Vr5HwXGJRy5vgMdSq+hvAu9OMwQ="; + hash = "sha256-R9JXBLYQiDdeJqq6Vr5HwXGJRy5vgMdSq+hvAu9OMwQ="; }; patches = [ diff --git a/pkgs/by-name/ry/ryujinx/package.nix b/pkgs/by-name/ry/ryujinx/package.nix index 8dc6f1a53979..46385a0c824d 100644 --- a/pkgs/by-name/ry/ryujinx/package.nix +++ b/pkgs/by-name/ry/ryujinx/package.nix @@ -25,7 +25,7 @@ buildDotnetModule rec { owner = "Ryujinx"; repo = "Ryujinx"; rev = "ca59c3f4998e2d1beb3b0d0214611e3332238557"; - sha256 = "09npfx6w12lnr454r9x6xc2aypfp216cjsks8wr3c1zq858krcd4"; + hash = "sha256-pLE8UUH4BzYyR3pqyUwQ112vBOump0wKyZaKwE131yY="; }; enableParallelBuilding = false; diff --git a/pkgs/by-name/sa/sabnzbd/package.nix b/pkgs/by-name/sa/sabnzbd/package.nix index 65e47bd76c62..6723ccbd4ecd 100644 --- a/pkgs/by-name/sa/sabnzbd/package.nix +++ b/pkgs/by-name/sa/sabnzbd/package.nix @@ -79,7 +79,7 @@ stdenv.mkDerivation rec { owner = pname; repo = pname; rev = version; - sha256 = "sha256-WJ58OawPSICCWMWQ042T4OmK5UBRZRU5tnLYxGPbDPc="; + hash = "sha256-WJ58OawPSICCWMWQ042T4OmK5UBRZRU5tnLYxGPbDPc="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/by-name/sa/saga/package.nix b/pkgs/by-name/sa/saga/package.nix index ab1d90a21a1c..43af7ef6b649 100644 --- a/pkgs/by-name/sa/saga/package.nix +++ b/pkgs/by-name/sa/saga/package.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://sourceforge/saga-gis/saga-${version}.tar.gz"; - sha256 = "sha256-741O6C7amxSnOOTledF0izmVhiT79tFI4+EOtpNqP2Q="; + hash = "sha256-741O6C7amxSnOOTledF0izmVhiT79tFI4+EOtpNqP2Q="; }; sourceRoot = "saga-${version}/saga-gis"; diff --git a/pkgs/by-name/sa/sanjuuni/package.nix b/pkgs/by-name/sa/sanjuuni/package.nix index d448f5e07132..872a8dbb13db 100644 --- a/pkgs/by-name/sa/sanjuuni/package.nix +++ b/pkgs/by-name/sa/sanjuuni/package.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { owner = "MCJack123"; repo = "sanjuuni"; rev = version; - sha256 = "sha256-wJRPD4OWOTPiyDr9dYseRA7BI942HPfHONVJGTc/+wU="; + hash = "sha256-wJRPD4OWOTPiyDr9dYseRA7BI942HPfHONVJGTc/+wU="; }; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/by-name/sd/SDL1/package.nix b/pkgs/by-name/sd/SDL1/package.nix index 94b7e03f6e24..8ce29877438a 100644 --- a/pkgs/by-name/sd/SDL1/package.nix +++ b/pkgs/by-name/sd/SDL1/package.nix @@ -82,44 +82,44 @@ stdenv.mkDerivation (finalAttrs: { (fetchpatch { name = "fix_window_resizing.diff"; url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;filename=fix_window_resizing.diff;att=2;bug=665779"; - sha256 = "1z35azc73vvi19pzi6byck31132a8w1vzrghp1x3hy4a4f9z4gc6"; + hash = "sha256-hj3ykyOKeDh6uPDlvwNHSowQxmR+mfhvCnHvcdhXZfw="; }) # Fix drops of keyboard events for SDL_EnableUNICODE (fetchpatch { url = "https://github.com/libsdl-org/SDL-1.2/commit/0332e2bb18dc68d6892c3b653b2547afe323854b.patch"; - sha256 = "0g458iv6pp9sikdch6ms8svz60lf5ks2q5wgid8s9rydhk98lpp5"; + hash = "sha256-5V6K0oTN56RRi48XLPQsjgLzt0a6GsjajDrda3ZEhTw="; }) # Ignore insane joystick axis events (fetchpatch { url = "https://github.com/libsdl-org/SDL-1.2/commit/ab99cc82b0a898ad528d46fa128b649a220a94f4.patch"; - sha256 = "1b3473sawfdbkkxaqf1hg0vn37yk8hf655jhnjwdk296z4gclazh"; + hash = "sha256-8CvKHvkmidm4tFCWYhxE059hN3gwOKz6nKs5rvQ4ZKw="; }) # https://bugzilla.libsdl.org/show_bug.cgi?id=1769 (fetchpatch { url = "https://github.com/libsdl-org/SDL-1.2/commit/5d79977ec7a6b58afa6e4817035aaaba186f7e9f.patch"; - sha256 = "1k7y57b1zy5afib1g7w3in36n8cswbcrzdbrjpn5cb105rnb9vmp"; + hash = "sha256-t+60bC4gLFbslXm1n9nimiFrho2DnxdWdKr4H9Yp/sw="; }) # Workaround X11 bug to allow changing gamma # Ticket: https://bugs.freedesktop.org/show_bug.cgi?id=27222 (fetchpatch { name = "SDL_SetGamma.patch"; url = "https://src.fedoraproject.org/rpms/SDL/raw/7a07323e5cec08bea6f390526f86a1ce5341596d/f/SDL-1.2.15-x11-Bypass-SetGammaRamp-when-changing-gamma.patch"; - sha256 = "0x52s4328kilyq43i7psqkqg7chsfwh0aawr50j566nzd7j51dlv"; + hash = "sha256-m7ZQ5GnfGlMkKJkrBSB3GrLz8MT6njgI9jROJAbRonQ="; }) # Fix a build failure on OS X Mavericks # Ticket: https://bugzilla.libsdl.org/show_bug.cgi?id=2085 (fetchpatch { url = "https://github.com/libsdl-org/SDL-1.2/commit/19039324be71738d8990e91b9ba341b2ea068445.patch"; - sha256 = "0ckwling2ad27c9vxgp97ndjd098d6zbrydza8b9l77k8airj98c"; + hash = "sha256-DCWZo0LzHJoWUr/5vL5pKIEmmz3pvr4TO6Ip8WykfDI="; }) (fetchpatch { url = "https://github.com/libsdl-org/SDL-1.2/commit/7933032ad4d57c24f2230db29f67eb7d21bb5654.patch"; - sha256 = "1by16firaxyr0hjvn35whsgcmq6bl0nwhnpjf75grjzsw9qvwyia"; + hash = "sha256-Knq+ceL6y/zKcfJayC2gy+DKnoa8DLslBNl3laMzwa8="; }) (fetchpatch { name = "CVE-2022-34568.patch"; url = "https://github.com/libsdl-org/SDL-1.2/commit/d7e00208738a0bc6af302723fe64908ac35b777b.patch"; - sha256 = "sha256-fuxXsqZW94/C8CKu9LakppCU4zHupj66O2MngQ4BO9o="; + hash = "sha256-fuxXsqZW94/C8CKu9LakppCU4zHupj66O2MngQ4BO9o="; }) ]; diff --git a/pkgs/by-name/sd/SDL2_sound/package.nix b/pkgs/by-name/sd/SDL2_sound/package.nix index 14f57cb49eab..d67db20695db 100644 --- a/pkgs/by-name/sd/SDL2_sound/package.nix +++ b/pkgs/by-name/sd/SDL2_sound/package.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { owner = "icculus"; repo = "SDL_sound"; rev = "v${version}"; - sha256 = "sha256-N2znqy58tMHgYa07vEsSedWLRhoJzDoINcsUu0UYLnA="; + hash = "sha256-N2znqy58tMHgYa07vEsSedWLRhoJzDoINcsUu0UYLnA="; }; patches = [ @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { # https://github.com/icculus/SDL_sound/pull/32 - fix build on darwin # can be dropped on the next update url = "https://github.com/icculus/SDL_sound/commit/c15d75b7720113b28639baad284f45f943846294.patch"; - sha256 = "sha256-4GL8unsZ7eNkzjLXq9QdaxFQMzX2tdP0cBR1jTaRLc0="; + hash = "sha256-4GL8unsZ7eNkzjLXq9QdaxFQMzX2tdP0cBR1jTaRLc0="; }) ]; diff --git a/pkgs/by-name/sd/SDL2_ttf/package.nix b/pkgs/by-name/sd/SDL2_ttf/package.nix index b4cda2440237..140c104bcb44 100644 --- a/pkgs/by-name/sd/SDL2_ttf/package.nix +++ b/pkgs/by-name/sd/SDL2_ttf/package.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-${finalAttrs.version}.tar.gz"; - sha256 = "sha256-1Iy9HOR1ueF4IGvzty1Wtm2E1E9krAWAMyg5YjTWdyM="; + hash = "sha256-1Iy9HOR1ueF4IGvzty1Wtm2E1E9krAWAMyg5YjTWdyM="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/sd/sd-mux-ctrl/package.nix b/pkgs/by-name/sd/sd-mux-ctrl/package.nix index e1121eadc855..28916ed78045 100644 --- a/pkgs/by-name/sd/sd-mux-ctrl/package.nix +++ b/pkgs/by-name/sd/sd-mux-ctrl/package.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { src = fetchgit { url = "https://git.tizen.org/cgit/tools/testlab/sd-mux"; rev = "9dd189d973da64e033a0c5c2adb3d94b23153d94"; - sha256 = "0fxl8m1zkkyxkc2zi8930m0njfgnd04a22acny6vljnzag2shjvg"; + hash = "sha256-b0uoxVPfSrqNt0wJoQho9jlpQQUjofgFm93P+UNFtDs="; }; nativeBuildInputs = [ cmake pkg-config installShellFiles ]; diff --git a/pkgs/by-name/sh/shab/package.nix b/pkgs/by-name/sh/shab/package.nix index bbc60921903d..25e2baf034e2 100644 --- a/pkgs/by-name/sh/shab/package.nix +++ b/pkgs/by-name/sh/shab/package.nix @@ -10,7 +10,7 @@ let owner = "zimbatm"; repo = "shab"; rev = "v${version}"; - sha256 = "02lf1s6plhhcfyj9xha44wij9jbphb1x5q55xj3b5bx2ji2jsvji"; + hash = "sha256-UW4tRZSir7KG7KXg0sOCd8kkIydEwZ6kdwxCeo0Ojgo="; }; postPatch = '' diff --git a/pkgs/by-name/sh/shapelib/package.nix b/pkgs/by-name/sh/shapelib/package.nix index 8bcf103d8403..fe93064e3f1f 100644 --- a/pkgs/by-name/sh/shapelib/package.nix +++ b/pkgs/by-name/sh/shapelib/package.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://download.osgeo.org/shapelib/shapelib-${version}.tar.gz"; - sha256 = "sha256-XakKYOJUQPEI9OjpVzK/qD7eE8jgwrz4CuQQBsyOvCA="; + hash = "sha256-XakKYOJUQPEI9OjpVzK/qD7eE8jgwrz4CuQQBsyOvCA="; }; doCheck = true; diff --git a/pkgs/by-name/sk/skypeexport/package.nix b/pkgs/by-name/sk/skypeexport/package.nix index c8af575c7895..028f70d2f19e 100644 --- a/pkgs/by-name/sk/skypeexport/package.nix +++ b/pkgs/by-name/sk/skypeexport/package.nix @@ -8,14 +8,14 @@ stdenv.mkDerivation (finalAttrs: { owner = "Temptin"; repo = "SkypeExport"; rev = "v${finalAttrs.version}"; - sha256 = "1ilkh0s3dz5cp83wwgmscnfmnyck5qcwqg1yxp9zv6s356dxnbak"; + hash = "sha256-Uy3bmylDm/3T7T48zBkuk3lbnWW6Ps4Huqz8NjSAk8Y="; }; patches = [ (fetchpatch { name = "boost167.patch"; url = "https://github.com/Temptin/SkypeExport/commit/ef60f2e4fc9e4a5764c8d083a73b585457bc10b1.patch"; - sha256 = "sha256-t+/v7c66OULmQCD/sNt+iDJeQ/6UG0CJ8uQY2PVSFQo="; + hash = "sha256-t+/v7c66OULmQCD/sNt+iDJeQ/6UG0CJ8uQY2PVSFQo="; }) ]; diff --git a/pkgs/by-name/sl/slskd/package.nix b/pkgs/by-name/sl/slskd/package.nix index ffe0ae1b4ba8..8ab85a4eef3f 100644 --- a/pkgs/by-name/sl/slskd/package.nix +++ b/pkgs/by-name/sl/slskd/package.nix @@ -15,7 +15,7 @@ let owner = "slskd"; repo = "slskd"; rev = version; - sha256 = "sha256-qAS8uiXAG0JTOCW/bIVYhv6McUSBihAHFjJu3b5Ttoc="; + hash = "sha256-qAS8uiXAG0JTOCW/bIVYhv6McUSBihAHFjJu3b5Ttoc="; }; meta = with lib; { diff --git a/pkgs/by-name/so/solo5/package.nix b/pkgs/by-name/so/solo5/package.nix index 1ca866c81e5e..15344f680590 100644 --- a/pkgs/by-name/so/solo5/package.nix +++ b/pkgs/by-name/so/solo5/package.nix @@ -21,7 +21,7 @@ in stdenv.mkDerivation { src = fetchurl { url = "https://github.com/Solo5/solo5/releases/download/v${version}/solo5-v${version}.tar.gz"; - sha256 = "sha256-J1xcL/AdcLQ7Ph3TFwEaS9l4cWjDQsTaXTdBDcT7p6E="; + hash = "sha256-J1xcL/AdcLQ7Ph3TFwEaS9l4cWjDQsTaXTdBDcT7p6E="; }; hardeningEnable = [ "pie" ]; diff --git a/pkgs/by-name/sp/spip/package.nix b/pkgs/by-name/sp/spip/package.nix index 9f99a9e438e0..9c9c6e8a20ed 100644 --- a/pkgs/by-name/sp/spip/package.nix +++ b/pkgs/by-name/sp/spip/package.nix @@ -18,12 +18,12 @@ let transcriptome19 = fetchurl { url = transcriptome-url + "/transcriptome_hg19.RData"; - sha256 = "sha256-E8UmHoNoySSIde+TRE6bxVP0PrccpKDvIHBGCvWnYOw="; + hash = "sha256-E8UmHoNoySSIde+TRE6bxVP0PrccpKDvIHBGCvWnYOw="; }; transcriptome38 = fetchurl { url = transcriptome-url + "/transcriptome_hg38.RData"; - sha256 = "sha256-mQMMZVN1byXMYjFoRdezmoZtnhUur2CHOP/j/pmw8as="; + hash = "sha256-mQMMZVN1byXMYjFoRdezmoZtnhUur2CHOP/j/pmw8as="; }; in @@ -36,7 +36,7 @@ stdenv.mkDerivation { owner = "raphaelleman"; repo = "SPiP"; rev = "cae95fe0ee7a2602630b7a4eacbf7cfa0e1763f0"; - sha256 = "sha256-/CufUaQYnsdo8Rij/24JmixPgMi7o1CApLxeTneWAVc="; + hash = "sha256-/CufUaQYnsdo8Rij/24JmixPgMi7o1CApLxeTneWAVc="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/by-name/st/status-im/package.nix b/pkgs/by-name/st/status-im/package.nix index 040d43d24c21..914050e1dfd6 100644 --- a/pkgs/by-name/st/status-im/package.nix +++ b/pkgs/by-name/st/status-im/package.nix @@ -12,7 +12,7 @@ let src = fetchzip { name = "StatusIm-Desktop-v${version}-${commit}-x86_64.AppImage"; url = "https://github.com/status-im/status-desktop/releases/download/${version}/StatusIm-Desktop-v${version}-${commit}-x86_64.tar.gz"; - sha256 = "sha256-i91E1eaN6paM+uZ8EvO1+Wj0Po9KnzQorG0tWKF4hn8="; + hash = "sha256-i91E1eaN6paM+uZ8EvO1+Wj0Po9KnzQorG0tWKF4hn8="; stripRoot = false; postFetch = '' mv $out/StatusIm-Desktop-v${version}-${commit}-x86_64.AppImage $TMPDIR/tmp @@ -31,7 +31,7 @@ let }; icon = fetchurl { url = "https://github.com/status-im/status-desktop/raw/afde83651724a555626b5d9a3d582918de6c3d59/status.png"; - sha256 = "sha256-ViGuOr9LskGs/P7pjPO9zYgosWaZlZZYVuPpliOA5dY="; + hash = "sha256-ViGuOr9LskGs/P7pjPO9zYgosWaZlZZYVuPpliOA5dY="; }; pname = "status-desktop"; in appimageTools.wrapType2 { diff --git a/pkgs/by-name/su/su-exec/package.nix b/pkgs/by-name/su/su-exec/package.nix index f9ab5d503f5b..2af4591784ab 100644 --- a/pkgs/by-name/su/su-exec/package.nix +++ b/pkgs/by-name/su/su-exec/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { owner = "ncopa"; repo = "su-exec"; rev = "v${version}"; - sha256 = "12vqlnpv48cjfh25sn98k1myc7h2wiv5qw2y2awgp6sipzv88abv"; + hash = "sha256-eymE9r9Rm/u4El5wXHbkAh7ma5goWV0EdJIhsq+leIs="; }; installPhase = '' diff --git a/pkgs/by-name/sw/sway-assign-cgroups/package.nix b/pkgs/by-name/sw/sway-assign-cgroups/package.nix index 47acd2ae4d1d..e92dc058eaef 100644 --- a/pkgs/by-name/sw/sway-assign-cgroups/package.nix +++ b/pkgs/by-name/sw/sway-assign-cgroups/package.nix @@ -10,7 +10,7 @@ python3Packages.buildPythonApplication rec { owner = "alebastr"; repo = "sway-systemd"; rev = "v${version}"; - sha256 = "sha256-wznYE1/lVJtvf5Nq96gbPYisxc2gWLahVydwcH1vwoQ="; + hash = "sha256-wznYE1/lVJtvf5Nq96gbPYisxc2gWLahVydwcH1vwoQ="; }; format = "other"; diff --git a/pkgs/by-name/sw/sway-audio-idle-inhibit/package.nix b/pkgs/by-name/sw/sway-audio-idle-inhibit/package.nix index 659eac2935f4..423c932f97d0 100644 --- a/pkgs/by-name/sw/sway-audio-idle-inhibit/package.nix +++ b/pkgs/by-name/sw/sway-audio-idle-inhibit/package.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation { owner = "ErikReider"; repo = "SwayAudioIdleInhibit"; rev = "c850bc4812216d03e05083c69aa05326a7fab9c7"; - sha256 = "sha256-MKzyF5xY0uJ/UWewr8VFrK0y7ekvcWpMv/u9CHG14gs="; + hash = "sha256-MKzyF5xY0uJ/UWewr8VFrK0y7ekvcWpMv/u9CHG14gs="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/sw/swaylock-effects/package.nix b/pkgs/by-name/sw/swaylock-effects/package.nix index aa35229e6efd..0f5ba4971181 100644 --- a/pkgs/by-name/sw/swaylock-effects/package.nix +++ b/pkgs/by-name/sw/swaylock-effects/package.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { owner = "jirutka"; repo = "swaylock-effects"; rev = "v${version}"; - sha256 = "sha256-cuFM+cbUmGfI1EZu7zOsQUj4rA4Uc4nUXcvIfttf9zE="; + hash = "sha256-cuFM+cbUmGfI1EZu7zOsQUj4rA4Uc4nUXcvIfttf9zE="; }; postPatch = '' diff --git a/pkgs/by-name/sy/symphony/package.nix b/pkgs/by-name/sy/symphony/package.nix index 3e420421b0f5..37ac2e58a213 100644 --- a/pkgs/by-name/sy/symphony/package.nix +++ b/pkgs/by-name/sy/symphony/package.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { owner = "coin-or"; repo = "SYMPHONY"; rev = "releases/${version}"; - sha256 = "sha256-OdTUMG3iVhjhw5uKtUnsLCZ4DfMjYHm8+/ozfmw7J6c="; + hash = "sha256-OdTUMG3iVhjhw5uKtUnsLCZ4DfMjYHm8+/ozfmw7J6c="; }; nativeBuildInputs = [ libtool pkg-config glpk gfortran coinmp osi coin-utils ]; diff --git a/pkgs/by-name/sy/syncthing-tray/package.nix b/pkgs/by-name/sy/syncthing-tray/package.nix index 2fc912de8519..0f429fd36c24 100644 --- a/pkgs/by-name/sy/syncthing-tray/package.nix +++ b/pkgs/by-name/sy/syncthing-tray/package.nix @@ -15,7 +15,7 @@ buildGoModule rec { owner = "alex2108"; repo = "syncthing-tray"; rev = "v${version}"; - sha256 = "0869kinnsfzb8ydd0sv9fgqsi1sy5rhqg4whfdnrv82xjc71xyw3"; + hash = "sha256-g/seDpNdoJ1tc5CTh2EuXoeo8XNpa9CaR+s7bW2cySA="; }; vendorHash = "sha256-hGV5bivDUFEbOwU9sU+Eu5Wzz/aZtj6NUkpzHlmZTtw="; diff --git a/pkgs/by-name/sy/syndicate-server/package.nix b/pkgs/by-name/sy/syndicate-server/package.nix index 581ba32caf14..9563739afaaf 100644 --- a/pkgs/by-name/sy/syndicate-server/package.nix +++ b/pkgs/by-name/sy/syndicate-server/package.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { owner = "syndicate-lang"; repo = "syndicate-rs"; rev = "${pname}-v${version}"; - sha256 = "sha256-bTteZIlBSoQ1o5shgd9NeKVvEhZTyG3i2zbeVojWiO8="; + hash = "sha256-bTteZIlBSoQ1o5shgd9NeKVvEhZTyG3i2zbeVojWiO8="; }; cargoHash = "sha256-SIpdFXTk6MC/drjCLaaa49BbGsvCMNbPGCfTxAlCo9c="; nativeBuildInputs = [ diff --git a/pkgs/by-name/ta/tali/package.nix b/pkgs/by-name/ta/tali/package.nix index 8caab35e6c3c..58db1862b349 100644 --- a/pkgs/by-name/ta/tali/package.nix +++ b/pkgs/by-name/ta/tali/package.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/tali/${lib.versions.major version}/tali-${version}.tar.xz"; - sha256 = "+p7eNm8KcuTKpSGJw6sLEMG1aoDHiFsBZgJVjETc59M="; + hash = "sha256-+p7eNm8KcuTKpSGJw6sLEMG1aoDHiFsBZgJVjETc59M="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/ta/tarlz/package.nix b/pkgs/by-name/ta/tarlz/package.nix index 9873d2be1326..636c921d6c5a 100644 --- a/pkgs/by-name/ta/tarlz/package.nix +++ b/pkgs/by-name/ta/tarlz/package.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://savannah/lzip/tarlz/tarlz-${version}.tar.lz"; - sha256 = "7d0bbe9c3a137bb93a10be56988fcf7362e4dbc65490639edc4255b704105fce"; + hash = "sha256-fQu+nDoTe7k6EL5WmI/Pc2Lk28ZUkGOe3EJVtwQQX84="; }; enableParallelBuilding = true; diff --git a/pkgs/by-name/ta/taskchampion-sync-server/package.nix b/pkgs/by-name/ta/taskchampion-sync-server/package.nix index 74939e0a73d9..1e41d4751f40 100644 --- a/pkgs/by-name/ta/taskchampion-sync-server/package.nix +++ b/pkgs/by-name/ta/taskchampion-sync-server/package.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { repo = "taskchampion-sync-server"; rev = "af918bdf0dea7f7b6e920680c947fc37b37ffffb"; fetchSubmodules = false; - sha256 = "sha256-BTGD7hZysmOlsT2W+gqj8+Sj6iBN9Jwiyzq5D03PDzM="; + hash = "sha256-BTGD7hZysmOlsT2W+gqj8+Sj6iBN9Jwiyzq5D03PDzM="; }; cargoHash = "sha256-/HfkE+R8JoNGkCCNQpE/JjGSqPHvjCPnTjOFPCFfJ7A="; diff --git a/pkgs/by-name/te/tegola/package.nix b/pkgs/by-name/te/tegola/package.nix index f4847781f04f..deb794f1c71c 100644 --- a/pkgs/by-name/te/tegola/package.nix +++ b/pkgs/by-name/te/tegola/package.nix @@ -6,7 +6,7 @@ let owner = "go-spatial"; repo = "tegola"; rev = "v${version}"; - sha256 = "sha256-Jlpw3JaU5+DO7Z5qruEMoLRf95cPGd9Z+MeDGSgbMjc="; + hash = "sha256-Jlpw3JaU5+DO7Z5qruEMoLRf95cPGd9Z+MeDGSgbMjc="; }; frontend = buildNpmPackage { diff --git a/pkgs/by-name/te/terraform-compliance/package.nix b/pkgs/by-name/te/terraform-compliance/package.nix index f87cdff374f7..7914b32f8e81 100644 --- a/pkgs/by-name/te/terraform-compliance/package.nix +++ b/pkgs/by-name/te/terraform-compliance/package.nix @@ -12,7 +12,7 @@ python3.pkgs.buildPythonApplication rec { owner = "terraform-compliance"; repo = "cli"; rev = "refs/tags/${version}"; - sha256 = "sha256-2nf/EJcC4KYTBItByX47UqTSs2EOgsUAgRbLEdB4Iyg="; + hash = "sha256-2nf/EJcC4KYTBItByX47UqTSs2EOgsUAgRbLEdB4Iyg="; }; postPatch = '' diff --git a/pkgs/by-name/te/terraform-plugin-docs/package.nix b/pkgs/by-name/te/terraform-plugin-docs/package.nix index 01e53dd08f2b..fe93bb3d3098 100644 --- a/pkgs/by-name/te/terraform-plugin-docs/package.nix +++ b/pkgs/by-name/te/terraform-plugin-docs/package.nix @@ -16,7 +16,7 @@ buildGoModule rec { owner = "hashicorp"; repo = "terraform-plugin-docs"; rev = "refs/tags/v${version}"; - sha256 = "sha256-UEF+CsY302AJApDhnrPoTo09EcR/VOo10bXSf0XgtZk="; + hash = "sha256-UEF+CsY302AJApDhnrPoTo09EcR/VOo10bXSf0XgtZk="; }; vendorHash = "sha256-ZSHCP0eZWCvSObbUOSl0ohiiX79MyGC2ALowzvMXMv4="; diff --git a/pkgs/by-name/te/tetragon/package.nix b/pkgs/by-name/te/tetragon/package.nix index cbb940da53e4..c20fbd42ac0e 100644 --- a/pkgs/by-name/te/tetragon/package.nix +++ b/pkgs/by-name/te/tetragon/package.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "cilium"; repo = "tetragon"; rev = "refs/tags/v${finalAttrs.version}"; - sha256 = "sha256-KOR5MMRnhrlcMPqRjzjSJXvitiZQ8/tlxEnBiQG2x/Q="; + hash = "sha256-KOR5MMRnhrlcMPqRjzjSJXvitiZQ8/tlxEnBiQG2x/Q="; }; buildInputs = [ diff --git a/pkgs/by-name/th/thcrap-steam-proton-wrapper/package.nix b/pkgs/by-name/th/thcrap-steam-proton-wrapper/package.nix index 8b43215c52dc..e8f670f97ad0 100644 --- a/pkgs/by-name/th/thcrap-steam-proton-wrapper/package.nix +++ b/pkgs/by-name/th/thcrap-steam-proton-wrapper/package.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation { owner = "tactikauan"; repo = "thcrap-steam-proton-wrapper"; rev = "2b636c3f5f1ce1b9b41f731aa9397aa68d2ce66b"; - sha256 = "sha256-J2O8F75NMdsxSaNVr8zLf+vLEJE6CHqWQIIscuuJZ3o="; + hash = "sha256-J2O8F75NMdsxSaNVr8zLf+vLEJE6CHqWQIIscuuJZ3o="; }; buildInputs = [ subversion ]; diff --git a/pkgs/by-name/ti/tidgi/package.nix b/pkgs/by-name/ti/tidgi/package.nix index 538b157dbec3..20f0b4a194d1 100644 --- a/pkgs/by-name/ti/tidgi/package.nix +++ b/pkgs/by-name/ti/tidgi/package.nix @@ -14,13 +14,13 @@ stdenv.mkDerivation rec { fetchurl { url = "https://github.com/tiddly-gittly/TidGi-Desktop/releases/download/v${version}/TidGi-darwin-arm64-${version}.zip"; - sha256 = "sha256-1Z9lxZZWrUVQEhBO/Kt2AS/uNs2XfihdL0iGrguPQ5g="; + hash = "sha256-1Z9lxZZWrUVQEhBO/Kt2AS/uNs2XfihdL0iGrguPQ5g="; } else fetchurl { url = "https://github.com/tiddly-gittly/TidGi-Desktop/releases/download/v${version}/TidGi-darwin-x64-${version}.zip"; - sha256 = "sha256-5jHW/QrgzsGQfX4LvsRebdOJPzYTvhtC5mczxp2wPI8="; + hash = "sha256-5jHW/QrgzsGQfX4LvsRebdOJPzYTvhtC5mczxp2wPI8="; }; dontBuild = true; diff --git a/pkgs/by-name/ti/tile38/package.nix b/pkgs/by-name/ti/tile38/package.nix index 83a763eafcf6..ace164ad0fc6 100644 --- a/pkgs/by-name/ti/tile38/package.nix +++ b/pkgs/by-name/ti/tile38/package.nix @@ -8,7 +8,7 @@ buildGoModule rec { owner = "tidwall"; repo = pname; rev = version; - sha256 = "sha256-+HclPZOVBa5cEAuUr5R40+CHI58yZJ6uo8qM06IAgQw="; + hash = "sha256-+HclPZOVBa5cEAuUr5R40+CHI58yZJ6uo8qM06IAgQw="; }; vendorHash = "sha256-nnamNwowRPWQBKUMg800bFgijv8iHbdh/wUwTfX0NcY="; diff --git a/pkgs/by-name/tk/tkey-ssh-agent/package.nix b/pkgs/by-name/tk/tkey-ssh-agent/package.nix index 3a38389ae4a9..22f851065074 100644 --- a/pkgs/by-name/tk/tkey-ssh-agent/package.nix +++ b/pkgs/by-name/tk/tkey-ssh-agent/package.nix @@ -8,7 +8,7 @@ buildGoModule rec { owner = "tillitis"; repo = "tkey-ssh-agent"; rev = "v${version}"; - sha256 = "sha256-Uf3VJJfZn4UYX1q79JdaOfrore+L/Mic3whzpP32JV0="; + hash = "sha256-Uf3VJJfZn4UYX1q79JdaOfrore+L/Mic3whzpP32JV0="; }; vendorHash = "sha256-SFyp1UB6+m7/YllRyY56SwweJ3X175bChXQYiG2M7zM="; diff --git a/pkgs/by-name/tm/tmsu/package.nix b/pkgs/by-name/tm/tmsu/package.nix index 9434f433a2c7..fb7e1fec4a6e 100644 --- a/pkgs/by-name/tm/tmsu/package.nix +++ b/pkgs/by-name/tm/tmsu/package.nix @@ -13,7 +13,7 @@ buildGoModule { owner = "oniony"; repo = "tmsu"; rev = "0bf4b8031cbeffc0347007d85647062953e90571"; - sha256 = "sha256-5Rmelgiqs7YkdDBZNXZW4sBf0l/bwiq0xxB2tWpm1s8="; + hash = "sha256-5Rmelgiqs7YkdDBZNXZW4sBf0l/bwiq0xxB2tWpm1s8="; }; vendorHash = "sha256-r2wzVkPTsxWdVPFLO84tJgl3VJonoU7kNKLOBgHHdF8="; diff --git a/pkgs/by-name/tm/tmux-cssh/package.nix b/pkgs/by-name/tm/tmux-cssh/package.nix index 7da4293dc0c8..031acfff33a1 100644 --- a/pkgs/by-name/tm/tmux-cssh/package.nix +++ b/pkgs/by-name/tm/tmux-cssh/package.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation { owner = "dennishafemann"; repo = "tmux-cssh"; rev = "21750733c5b6fa2fe23b9e50ce69d8564f2f742a"; - sha256 = "473e27f3b69864b905d1340d97917cd202705c761611eb3aec4c24521f69b52c"; + hash = "sha256-Rz4n87aYZLkF0TQNl5F80gJwXHYWEes67EwkUh9ptSw="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/by-name/to/totem/package.nix b/pkgs/by-name/to/totem/package.nix index 8c99d22f822c..9155a0fc1b55 100644 --- a/pkgs/by-name/to/totem/package.nix +++ b/pkgs/by-name/to/totem/package.nix @@ -36,24 +36,24 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/totem/${lib.versions.major version}/totem-${version}.tar.xz"; - sha256 = "s202VZKLWJZGKk05+Dtq1m0328nJnc6wLqii43OUpB4="; + hash = "sha256-s202VZKLWJZGKk05+Dtq1m0328nJnc6wLqii43OUpB4="; }; patches = [ # Lower X11 dependency version since we do not have it. (fetchpatch { url = "https://gitlab.gnome.org/GNOME/totem/-/commit/140d9eea70c3101ef3234abb4de5974cb84b13db.patch"; - sha256 = "ohppxqMiH8Ksc9B2e3AXighfM6KVN+RNXYL+fLELSN8="; + hash = "sha256-ohppxqMiH8Ksc9B2e3AXighfM6KVN+RNXYL+fLELSN8="; revert = true; }) (fetchpatch { url = "https://gitlab.gnome.org/GNOME/totem/-/commit/2610b4536f73493587e4a5a38e01c9961fcabb96.patch"; - sha256 = "nPfzS+LQuAlyQOz67hCdtx93w2frhgWlg1KGX5bEU38="; + hash = "sha256-nPfzS+LQuAlyQOz67hCdtx93w2frhgWlg1KGX5bEU38="; revert = true; }) (fetchpatch { url = "https://gitlab.gnome.org/GNOME/totem/-/commit/5b871aee5292f25bbf39dca18045732e979e7a68.patch"; - sha256 = "LqQLdgyZkIVc+/hQ5sdBLqhtjCVIMDSs9tjVXwMFodg="; + hash = "sha256-LqQLdgyZkIVc+/hQ5sdBLqhtjCVIMDSs9tjVXwMFodg="; revert = true; }) ]; diff --git a/pkgs/by-name/to/toxic/package.nix b/pkgs/by-name/to/toxic/package.nix index d697420bf32e..54462fdaade1 100644 --- a/pkgs/by-name/to/toxic/package.nix +++ b/pkgs/by-name/to/toxic/package.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { owner = "TokTok"; repo = "toxic"; rev = "v${version}"; - sha256 = "sha256-+nOjlQED2pbYwGV6IGeKK1pymBSrDVWCWKjZ42vib7E="; + hash = "sha256-+nOjlQED2pbYwGV6IGeKK1pymBSrDVWCWKjZ42vib7E="; }; makeFlags = [ "PREFIX=$(out)"]; diff --git a/pkgs/by-name/tr/tracy/package.nix b/pkgs/by-name/tr/tracy/package.nix index 4e462bae4a3b..1c726affff47 100644 --- a/pkgs/by-name/tr/tracy/package.nix +++ b/pkgs/by-name/tr/tracy/package.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { owner = "wolfpld"; repo = "tracy"; rev = "v${version}"; - sha256 = "sha256-DN1ExvQ5wcIUyhMAfiakFbZkDsx+5l8VMtYGvSdboPA="; + hash = "sha256-DN1ExvQ5wcIUyhMAfiakFbZkDsx+5l8VMtYGvSdboPA="; }; patches = lib.optionals (stdenv.isDarwin && !(lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11")) [ diff --git a/pkgs/by-name/tr/transmission_3/package.nix b/pkgs/by-name/tr/transmission_3/package.nix index 21dfed11c543..9372ef6dcf5f 100644 --- a/pkgs/by-name/tr/transmission_3/package.nix +++ b/pkgs/by-name/tr/transmission_3/package.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "transmission"; repo = "transmission"; rev = finalAttrs.version; - sha256 = "0ccg0km54f700x9p0jsnncnwvfnxfnxf7kcm7pcx1cj0vw78924z"; + hash = "sha256-n4iEDt9AstDZPZXN47p13brNLbNWS3BTB+A4UuoEjzE="; fetchSubmodules = true; }; diff --git a/pkgs/by-name/tr/tridactyl-native/package.nix b/pkgs/by-name/tr/tridactyl-native/package.nix index 3506f82c0b79..cb9e411b1f0d 100644 --- a/pkgs/by-name/tr/tridactyl-native/package.nix +++ b/pkgs/by-name/tr/tridactyl-native/package.nix @@ -7,7 +7,7 @@ buildNimPackage { owner = "tridactyl"; repo = "native_messenger"; rev = "3059abd9fb3f14d598f6c299335c3ebac5bc689a"; - sha256 = "sha256-gicdpWAoimZMNGLc8w0vtJiFFxeqxB8P4lgWDun7unM="; + hash = "sha256-gicdpWAoimZMNGLc8w0vtJiFFxeqxB8P4lgWDun7unM="; }; lockFile = ./lock.json; diff --git a/pkgs/by-name/un/unsilence/package.nix b/pkgs/by-name/un/unsilence/package.nix index 76a362f279c3..d8bc2237e2d5 100644 --- a/pkgs/by-name/un/unsilence/package.nix +++ b/pkgs/by-name/un/unsilence/package.nix @@ -12,7 +12,7 @@ python3Packages.buildPythonPackage rec { owner = "lagmoellertim"; repo = "unsilence"; rev = version; - sha256 = "sha256-M4Ek1JZwtr7vIg14aTa8h4otIZnPQfKNH4pZE4GpiBQ="; + hash = "sha256-M4Ek1JZwtr7vIg14aTa8h4otIZnPQfKNH4pZE4GpiBQ="; }; nativeBuildInputs = with python3Packages; [ diff --git a/pkgs/by-name/up/upbound/package.nix b/pkgs/by-name/up/upbound/package.nix index c63fb7f458fa..076761cf49ff 100644 --- a/pkgs/by-name/up/upbound/package.nix +++ b/pkgs/by-name/up/upbound/package.nix @@ -8,7 +8,7 @@ buildGoModule rec { owner = pname; repo = "up"; rev = "v${version}"; - sha256 = "sha256-PJMOR/XpWqtSIb3x61o0iLwETCHA5e07etmEZYQtzXw="; + hash = "sha256-PJMOR/XpWqtSIb3x61o0iLwETCHA5e07etmEZYQtzXw="; }; vendorHash = "sha256-WLRXj4G49JEbQc2aFAjLLCpQrDhN94jazWxfM70hHqs="; diff --git a/pkgs/by-name/up/upower-notify/package.nix b/pkgs/by-name/up/upower-notify/package.nix index 83ef9e95fb67..f93fcce1237a 100644 --- a/pkgs/by-name/up/upower-notify/package.nix +++ b/pkgs/by-name/up/upower-notify/package.nix @@ -18,7 +18,7 @@ buildGoModule { owner = "omeid"; repo = "upower-notify"; rev = "c05ffbba9b8d475573be0908d75ac7c64d74be2d"; - sha256 = "sha256-y+Cy3jkIfWiqF2HFopafdNSyGVA2ws4250Lg02rVxmo="; + hash = "sha256-y+Cy3jkIfWiqF2HFopafdNSyGVA2ws4250Lg02rVxmo="; }; vendorHash = "sha256-58zK6t3rb+19ilaQaNgsMVFQBYKPIV40ww8klrGbpnw="; diff --git a/pkgs/by-name/up/ups/package.nix b/pkgs/by-name/up/ups/package.nix index bfd743a8236d..4da9d2f9f3ae 100644 --- a/pkgs/by-name/up/ups/package.nix +++ b/pkgs/by-name/up/ups/package.nix @@ -10,7 +10,7 @@ buildGoModule rec { owner = "rameshvarun"; repo = "ups"; rev = "v${version}"; - sha256 = "sha256-7AuZ1gyp8tAWHM0Ry54tKucPJ3enaGDtvrM1J8uBIT8="; + hash = "sha256-7AuZ1gyp8tAWHM0Ry54tKucPJ3enaGDtvrM1J8uBIT8="; }; vendorHash = "sha256-c6aE6iD6yCnnuSEDhhr3v1ArcfLmSP8QhS7Cz7rtVHs="; diff --git a/pkgs/by-name/ut/ut1999/package.nix b/pkgs/by-name/ut/ut1999/package.nix index 9604c4f51a53..98f4690eb21c 100644 --- a/pkgs/by-name/ut/ut1999/package.nix +++ b/pkgs/by-name/ut/ut1999/package.nix @@ -24,7 +24,7 @@ let unpackGog = runCommand "ut1999-gog" { src = requireFile rec { name = "setup_ut_goty_2.0.0.5.exe"; - sha256 = "00v8jbqhgb1fry7jvr0i3mb5jscc19niigzjc989qrcp9pamghjc"; + hash = "sha256-TMJX1U2XZZxQYvK/GG0KjGlZVh0R5C2Pzy6sB/GSaAM="; message = '' Unreal Tournament 1999 requires the official GOG package, version 2.0.0.5. diff --git a/pkgs/by-name/va/vapoursynth/editor.nix b/pkgs/by-name/va/vapoursynth/editor.nix index 76f11ddf9788..25d583148eb2 100644 --- a/pkgs/by-name/va/vapoursynth/editor.nix +++ b/pkgs/by-name/va/vapoursynth/editor.nix @@ -20,7 +20,7 @@ let owner = "YomikoR"; repo = pname; rev = lib.toLower version; - sha256 = "sha256-+/9j9DJDGXbuTvE8ZXIu6wjcof39SyatS36Q6y9hLPg="; + hash = "sha256-+/9j9DJDGXbuTvE8ZXIu6wjcof39SyatS36Q6y9hLPg="; }; nativeBuildInputs = [ qmake ]; diff --git a/pkgs/by-name/ve/velero/package.nix b/pkgs/by-name/ve/velero/package.nix index a27d844a4e2e..65934fb56b8c 100644 --- a/pkgs/by-name/ve/velero/package.nix +++ b/pkgs/by-name/ve/velero/package.nix @@ -9,7 +9,7 @@ buildGoModule rec { owner = "vmware-tanzu"; repo = "velero"; rev = "v${version}"; - sha256 = "sha256-rXWBTPM3dCGON1DvpCOsA4C4mAuVDqV9YbrvP5yDCa0="; + hash = "sha256-rXWBTPM3dCGON1DvpCOsA4C4mAuVDqV9YbrvP5yDCa0="; }; ldflags = [ diff --git a/pkgs/by-name/vg/vgmstream/package.nix b/pkgs/by-name/vg/vgmstream/package.nix index 349981a5fb64..17ad8025789a 100644 --- a/pkgs/by-name/vg/vgmstream/package.nix +++ b/pkgs/by-name/vg/vgmstream/package.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { owner = "vgmstream"; repo = "vgmstream"; rev = "refs/tags/r${version}"; - sha256 = "sha256-Wa0FAUHdJtG+u9y3ZOt8dxRIo78lekFPghiu67KJZ9s="; + hash = "sha256-Wa0FAUHdJtG+u9y3ZOt8dxRIo78lekFPghiu67KJZ9s="; }; passthru.updateScript = nix-update-script { diff --git a/pkgs/by-name/vi/vimcats/package.nix b/pkgs/by-name/vi/vimcats/package.nix index 756016c6b647..da2bd69d0aba 100644 --- a/pkgs/by-name/vi/vimcats/package.nix +++ b/pkgs/by-name/vi/vimcats/package.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { owner = "mrcjkb"; repo = "vimcats"; rev = "v${version}"; - sha256 = "sha256-QV/eIy6yd6Lnmo8XV+E37/oCZCC3jlPu31emH0MgiO4="; + hash = "sha256-QV/eIy6yd6Lnmo8XV+E37/oCZCC3jlPu31emH0MgiO4="; }; buildFeatures = [ "cli" ]; diff --git a/pkgs/by-name/vi/vinagre/package.nix b/pkgs/by-name/vi/vinagre/package.nix index 23c5cf647554..cf5b182ed6b1 100644 --- a/pkgs/by-name/vi/vinagre/package.nix +++ b/pkgs/by-name/vi/vinagre/package.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/vinagre/${lib.versions.majorMinor version}/vinagre-${version}.tar.xz"; - sha256 = "cd1cdbacca25c8d1debf847455155ee798c3e67a20903df8b228d4ece5505e82"; + hash = "sha256-zRzbrMolyNHev4R0VRVe55jD5nogkD34sijU7OVQXoI="; }; patches = [ @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { (fetchpatch { name = "fno-common.patch"; url = "https://gitlab.gnome.org/Archive/vinagre/-/commit/c51662cf4338516773d64776c3c92796917ff2bd.diff"; - sha256 = "0zn8cd93hjdz6rw2d7gfl1ghzkc9h0x40k9l0jx3n5qfwdq4sir8"; + hash = "sha256-KEdNcOMOFzu6BDRNQDqAic0PX6DunSZ4Nr9JOFJjyH4="; }) ]; diff --git a/pkgs/by-name/vi/vis/package.nix b/pkgs/by-name/vi/vis/package.nix index 4872c53b841b..f16f717e7dc8 100644 --- a/pkgs/by-name/vi/vis/package.nix +++ b/pkgs/by-name/vi/vis/package.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { rev = "v${version}"; - sha256 = "sha256-SYM3zlzhp3NdyOjtXc+pOiWY4/WA/Ax+qAWe18ggq3g="; + hash = "sha256-SYM3zlzhp3NdyOjtXc+pOiWY4/WA/Ax+qAWe18ggq3g="; repo = "vis"; owner = "martanne"; }; diff --git a/pkgs/by-name/vn/vndr/package.nix b/pkgs/by-name/vn/vndr/package.nix index 79cbc3e7e4e4..9e8f57b4e6ef 100644 --- a/pkgs/by-name/vn/vndr/package.nix +++ b/pkgs/by-name/vn/vndr/package.nix @@ -11,7 +11,7 @@ buildGoModule { owner = "LK4D4"; repo = "vndr"; rev = "87603e47e8ea2ddac96f508fc9e9d6fc17b198b0"; - sha256 = "sha256-L7OemAPCv7epOVmjrDDtiGqQqzscm5zj3C6dsZP4uUc="; + hash = "sha256-L7OemAPCv7epOVmjrDDtiGqQqzscm5zj3C6dsZP4uUc="; }; vendorHash = null; diff --git a/pkgs/by-name/vo/volk_2/package.nix b/pkgs/by-name/vo/volk_2/package.nix index b1cb2ab575fd..447922865cbf 100644 --- a/pkgs/by-name/vo/volk_2/package.nix +++ b/pkgs/by-name/vo/volk_2/package.nix @@ -23,14 +23,14 @@ stdenv.mkDerivation (finalAttrs: { owner = "gnuradio"; repo = "volk"; rev = "v${finalAttrs.version}"; - sha256 = "sha256-XvX6emv30bSB29EFm6aC+j8NGOxWqHCNv0Hxtdrq/jc="; + hash = "sha256-XvX6emv30bSB29EFm6aC+j8NGOxWqHCNv0Hxtdrq/jc="; fetchSubmodules = true; }; patches = [ (fetchpatch { url = "https://raw.githubusercontent.com/macports/macports-ports/e83a55ef196d4283be438c052295b2fc44f3df5b/science/volk/files/patch-cpu_features-add-support-for-ARM64.diff"; - sha256 = "sha256-MNUntVvKZC4zuQsxGQCItaUaaQ1d31re2qjyPFbySmI="; + hash = "sha256-MNUntVvKZC4zuQsxGQCItaUaaQ1d31re2qjyPFbySmI="; extraPrefix = ""; }) ]; diff --git a/pkgs/by-name/vp/vpl-gpu-rt/package.nix b/pkgs/by-name/vp/vpl-gpu-rt/package.nix index 2fac21d32f2f..9dac995970f4 100644 --- a/pkgs/by-name/vp/vpl-gpu-rt/package.nix +++ b/pkgs/by-name/vp/vpl-gpu-rt/package.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { owner = "intel"; repo = "vpl-gpu-rt"; rev = "intel-onevpl-${version}"; - sha256 = "sha256-WYlA8+i8TTFHsU4+doLcv75F9MR2V/BEuNGGLgM4p1s="; + hash = "sha256-WYlA8+i8TTFHsU4+doLcv75F9MR2V/BEuNGGLgM4p1s="; }; nativeBuildInputs = [ cmake pkg-config ]; diff --git a/pkgs/by-name/vv/vvvvvv/package.nix b/pkgs/by-name/vv/vvvvvv/package.nix index 92ecebc4b518..c4ed05616620 100644 --- a/pkgs/by-name/vv/vvvvvv/package.nix +++ b/pkgs/by-name/vv/vvvvvv/package.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { dataZip = fetchurl { url = "https://thelettervsixtim.es/makeandplay/data.zip"; name = "data.zip"; - sha256 = "sha256-x2eAlZT2Ry2p9WE252ZX44ZA1YQWSkYRIlCsYpPswOo="; + hash = "sha256-x2eAlZT2Ry2p9WE252ZX44ZA1YQWSkYRIlCsYpPswOo="; meta.license = lib.licenses.unfree; }; diff --git a/pkgs/by-name/wa/waagent/package.nix b/pkgs/by-name/wa/waagent/package.nix index d8966da7bddf..f313cb68ea70 100644 --- a/pkgs/by-name/wa/waagent/package.nix +++ b/pkgs/by-name/wa/waagent/package.nix @@ -18,7 +18,7 @@ python.pkgs.buildPythonApplication rec { owner = "Azure"; repo = "WALinuxAgent"; rev = "refs/tags/v${version}"; - sha256 = "sha256-5V9js9gGkIsdGYrQQK/V6tPfL9lh2Cht4llOKBVTyOM="; + hash = "sha256-5V9js9gGkIsdGYrQQK/V6tPfL9lh2Cht4llOKBVTyOM="; }; patches = [ # Suppress the following error when waagent tries to configure sshd: diff --git a/pkgs/by-name/wa/wapm/package.nix b/pkgs/by-name/wa/wapm/package.nix index afaaed863d67..94d97dbfc285 100644 --- a/pkgs/by-name/wa/wapm/package.nix +++ b/pkgs/by-name/wa/wapm/package.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { owner = "wasmerio"; repo = "wapm-cli"; rev = "v${version}"; - sha256 = "sha256-T7YEe8xg5iwI/npisW0m+6FLi+eaAQVgYNe6TvMlhAs="; + hash = "sha256-T7YEe8xg5iwI/npisW0m+6FLi+eaAQVgYNe6TvMlhAs="; }; cargoHash = "sha256-r4123NJ+nxNOVIg6svWr636xbxOJQ7tp76JoAi2m9p8="; diff --git a/pkgs/by-name/wa/wayland-pipewire-idle-inhibit/package.nix b/pkgs/by-name/wa/wayland-pipewire-idle-inhibit/package.nix index 3ada850b803d..21d5ad196cba 100644 --- a/pkgs/by-name/wa/wayland-pipewire-idle-inhibit/package.nix +++ b/pkgs/by-name/wa/wayland-pipewire-idle-inhibit/package.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { owner = "rafaelrc7"; repo = "wayland-pipewire-idle-inhibit"; rev = "v${version}"; - sha256 = "sha256-2akYbnQnJ0wb51S3bwrm3/EiZydxbwkfuSfsiTvtNz8="; + hash = "sha256-2akYbnQnJ0wb51S3bwrm3/EiZydxbwkfuSfsiTvtNz8="; }; cargoHash = "sha256-C4cispJN2OQRBQiW+H36B8ETNn1oukgdELRVk7V7BQU="; diff --git a/pkgs/by-name/we/websploit/package.nix b/pkgs/by-name/we/websploit/package.nix index 34b8ab8ff257..c653b15658c0 100644 --- a/pkgs/by-name/we/websploit/package.nix +++ b/pkgs/by-name/we/websploit/package.nix @@ -12,7 +12,7 @@ python3.pkgs.buildPythonApplication rec { owner = "f4rih"; repo = "websploit"; rev = "refs/tags/${version}"; - sha256 = "LpDfJmH2FbL37Fk86CAC/bxFqM035DBN6c6FPfGpaIw="; + hash = "sha256-LpDfJmH2FbL37Fk86CAC/bxFqM035DBN6c6FPfGpaIw="; }; nativeBuildInputs = with python3.pkgs; [ diff --git a/pkgs/by-name/we/wechat-uos/package.nix b/pkgs/by-name/we/wechat-uos/package.nix index ae7899be37c3..63b47dde8500 100644 --- a/pkgs/by-name/we/wechat-uos/package.nix +++ b/pkgs/by-name/we/wechat-uos/package.nix @@ -95,7 +95,7 @@ let { name = "license.tar.gz"; url = "https://www.uniontech.com"; - sha256 = "53760079c1a5b58f2fa3d5effe1ed35239590b288841d812229ef4e55b2dbd69"; + hash = "sha256-U3YAecGltY8vo9Xv/h7TUjlZCyiIQdgSIp705VstvWk="; } else uosLicense; installPhase = '' diff --git a/pkgs/by-name/wi/win2xcur/package.nix b/pkgs/by-name/wi/win2xcur/package.nix index 94dcfb935f43..ee4ab9875a44 100644 --- a/pkgs/by-name/wi/win2xcur/package.nix +++ b/pkgs/by-name/wi/win2xcur/package.nix @@ -8,7 +8,7 @@ python3Packages.buildPythonPackage rec { owner = "quantum5"; repo = "win2xcur"; rev = "v${version}"; - sha256 = "sha256-OjLj+QYg8YOJzDq3Y6/uyEXlNWbPm8VA/b1yP9jT6Jo="; + hash = "sha256-OjLj+QYg8YOJzDq3Y6/uyEXlNWbPm8VA/b1yP9jT6Jo="; }; propagatedBuildInputs = with python3Packages; [ numpy wand ]; diff --git a/pkgs/by-name/wi/wiseunpacker/package.nix b/pkgs/by-name/wi/wiseunpacker/package.nix index f5d42fa68f9f..ed8825d73327 100644 --- a/pkgs/by-name/wi/wiseunpacker/package.nix +++ b/pkgs/by-name/wi/wiseunpacker/package.nix @@ -15,7 +15,7 @@ buildDotnetModule rec { owner = "mnadareski"; repo = pname; rev = version; - sha256 = "sha256-APbfo2D/p733AwNNByu5MvC9LA8WW4mAzq6t2w/YNrs="; + hash = "sha256-APbfo2D/p733AwNNByu5MvC9LA8WW4mAzq6t2w/YNrs="; }; dotnet-sdk = dotnetCorePackages.sdk_8_0; diff --git a/pkgs/by-name/xd/xdg-desktop-portal-shana/package.nix b/pkgs/by-name/xd/xdg-desktop-portal-shana/package.nix index 04be8d606e4c..e1baa87bcaa1 100644 --- a/pkgs/by-name/xd/xdg-desktop-portal-shana/package.nix +++ b/pkgs/by-name/xd/xdg-desktop-portal-shana/package.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { owner = "Decodetalkers"; repo = "xdg-desktop-portal-shana"; rev = "v${version}"; - sha256 = "sha256-bBKoAegT3wk2UD2fqSLaix2MuKtVAcHA6vcB9VAzLJw="; + hash = "sha256-bBKoAegT3wk2UD2fqSLaix2MuKtVAcHA6vcB9VAzLJw="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/xe/xed-editor/package.nix b/pkgs/by-name/xe/xed-editor/package.nix index 35dc31e9e46c..80fe7d8fc49f 100644 --- a/pkgs/by-name/xe/xed-editor/package.nix +++ b/pkgs/by-name/xe/xed-editor/package.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { owner = "linuxmint"; repo = "xed"; rev = version; - sha256 = "sha256-Lpdv8mX3GDzXH1FGGdmgK9b8P3EY7ETuEhGfSwc6IIE="; + hash = "sha256-Lpdv8mX3GDzXH1FGGdmgK9b8P3EY7ETuEhGfSwc6IIE="; }; patches = [ diff --git a/pkgs/by-name/xf/xfs-undelete/package.nix b/pkgs/by-name/xf/xfs-undelete/package.nix index e702280b78d9..390a19d1f06c 100644 --- a/pkgs/by-name/xf/xfs-undelete/package.nix +++ b/pkgs/by-name/xf/xfs-undelete/package.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation { repo = "xfs_undelete"; owner = "ianka"; rev = "9e2f7abf0d3a466328e335d251c567ce4194e473"; - sha256 = "0n1718bmr2lfpwx57hajancda51fyrgyk9rbybbadvd8gypvzmhh"; + hash = "sha256-ENa/r3+o7abW8iun6V/2LhTVmFVSwVM6v46KXBcKJ1g="; }; buildInputs = [ tcl-8_6 tcllib coreutils ]; diff --git a/pkgs/by-name/xm/xmonad-log/package.nix b/pkgs/by-name/xm/xmonad-log/package.nix index 385d5edf90cf..f75a52ab2afa 100644 --- a/pkgs/by-name/xm/xmonad-log/package.nix +++ b/pkgs/by-name/xm/xmonad-log/package.nix @@ -8,7 +8,7 @@ buildGoModule { owner = "xintron"; repo = "xmonad-log"; rev = "70c76d59c22cf5f412467cd42fa9ff34eeb2bd1b"; - sha256 = "sha256-hDYb3mSX2+FX/2uazCKPXmNj0avDlutwSMjST7wLBVY="; + hash = "sha256-hDYb3mSX2+FX/2uazCKPXmNj0avDlutwSMjST7wLBVY="; }; vendorHash = "sha256-58zK6t3rb+19ilaQaNgsMVFQBYKPIV40ww8klrGbpnw="; diff --git a/pkgs/by-name/xp/xplayer/package.nix b/pkgs/by-name/xp/xplayer/package.nix index 3ceea76aa409..632d23555e68 100644 --- a/pkgs/by-name/xp/xplayer/package.nix +++ b/pkgs/by-name/xp/xplayer/package.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { owner = "linuxmint"; repo = pname; rev = version; - sha256 = "sha256-o2vLNIELd1EYWG26t5gOpnamJrBJeg4P6fcLirkcmfM="; + hash = "sha256-o2vLNIELd1EYWG26t5gOpnamJrBJeg4P6fcLirkcmfM="; }; # configure wants to find gst-inspect-1.0 via pkgconfig but diff --git a/pkgs/by-name/xp/xplr/package.nix b/pkgs/by-name/xp/xplr/package.nix index b03cec6e5eff..0bdfdfbc8a2c 100644 --- a/pkgs/by-name/xp/xplr/package.nix +++ b/pkgs/by-name/xp/xplr/package.nix @@ -8,7 +8,7 @@ rustPlatform.buildRustPackage rec { owner = "sayanarijit"; repo = pname; rev = "v${version}"; - sha256 = "sha256-0c2QJUEQwKEzzDBDP5XdX7xe1rivazsoZtepB4Dxp/c="; + hash = "sha256-0c2QJUEQwKEzzDBDP5XdX7xe1rivazsoZtepB4Dxp/c="; }; cargoHash = "sha256-RZgdWhVBZozYxbbNslCBLhN6EnogpyVXvht6GbzLnPs="; diff --git a/pkgs/by-name/xr/xreader/package.nix b/pkgs/by-name/xr/xreader/package.nix index 08ea7ad793ae..c8bfafdb684d 100644 --- a/pkgs/by-name/xr/xreader/package.nix +++ b/pkgs/by-name/xr/xreader/package.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { owner = "linuxmint"; repo = pname; rev = version; - sha256 = "sha256-c3oZ+PAsu180mlriQlF86TCBAnehLBv9Nc0SCtSkUuQ="; + hash = "sha256-c3oZ+PAsu180mlriQlF86TCBAnehLBv9Nc0SCtSkUuQ="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/xv/xviewer/package.nix b/pkgs/by-name/xv/xviewer/package.nix index 365988ede268..0e04633f3c6a 100644 --- a/pkgs/by-name/xv/xviewer/package.nix +++ b/pkgs/by-name/xv/xviewer/package.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { owner = "linuxmint"; repo = pname; rev = version; - sha256 = "sha256-J1IlgHKyNGJTn1sIU3q02eTgWqyeRm2leFIhtKPIdhg="; + hash = "sha256-J1IlgHKyNGJTn1sIU3q02eTgWqyeRm2leFIhtKPIdhg="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/ya/yanic/package.nix b/pkgs/by-name/ya/yanic/package.nix index 97f3686cb3d5..459963c19303 100644 --- a/pkgs/by-name/ya/yanic/package.nix +++ b/pkgs/by-name/ya/yanic/package.nix @@ -12,7 +12,7 @@ buildGoModule rec { owner = "FreifunkBremen"; repo = "yanic"; rev = "v${version}"; - sha256 = "sha256-z2vr1QmRCo8y4hopWP14xSV7lsWKkCzK9OehlVLFdIg="; + hash = "sha256-z2vr1QmRCo8y4hopWP14xSV7lsWKkCzK9OehlVLFdIg="; }; vendorHash = "sha256-6UiiajKLzW5e7y0F6GMYDZP6xTyOiccLIKlwvOY7LRo="; diff --git a/pkgs/by-name/ye/yelp-xsl/package.nix b/pkgs/by-name/ye/yelp-xsl/package.nix index e655624b33ba..7f255d9c5671 100644 --- a/pkgs/by-name/ye/yelp-xsl/package.nix +++ b/pkgs/by-name/ye/yelp-xsl/package.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/yelp-xsl/${lib.versions.major version}/yelp-xsl-${version}.tar.xz"; - sha256 = "sha256-I4vhULFlMIDOE5lxMw/TbTomWV4NagQKLAML89IAW80="; + hash = "sha256-I4vhULFlMIDOE5lxMw/TbTomWV4NagQKLAML89IAW80="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/ye/yelp/package.nix b/pkgs/by-name/ye/yelp/package.nix index 49bc8954e9b4..4e95d2599142 100644 --- a/pkgs/by-name/ye/yelp/package.nix +++ b/pkgs/by-name/ye/yelp/package.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/yelp/${lib.versions.major version}/yelp-${version}.tar.xz"; - sha256 = "sha256-osX9B4epCJxyLMZr0Phc33CI2HDntsyFeZ+OW/+erEs="; + hash = "sha256-osX9B4epCJxyLMZr0Phc33CI2HDntsyFeZ+OW/+erEs="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/yg/yggdrasil/package.nix b/pkgs/by-name/yg/yggdrasil/package.nix index cd24d14636f9..73df89af5295 100644 --- a/pkgs/by-name/yg/yggdrasil/package.nix +++ b/pkgs/by-name/yg/yggdrasil/package.nix @@ -8,7 +8,7 @@ buildGoModule rec { owner = "yggdrasil-network"; repo = "yggdrasil-go"; rev = "v${version}"; - sha256 = "sha256-3sX1xNfblmIXI1hiXL9bhA4+CobUZ5xhpJFKugzwlGE="; + hash = "sha256-3sX1xNfblmIXI1hiXL9bhA4+CobUZ5xhpJFKugzwlGE="; }; vendorHash = "sha256-HBl30BnSERivIHb3dbfhDwwBvs3MUkltDf+R790vSGE="; diff --git a/pkgs/by-name/yg/yggstack/package.nix b/pkgs/by-name/yg/yggstack/package.nix index c7e5ed31ed46..f2dff7cf9e52 100644 --- a/pkgs/by-name/yg/yggstack/package.nix +++ b/pkgs/by-name/yg/yggstack/package.nix @@ -8,7 +8,7 @@ buildGoModule rec { owner = "yggdrasil-network"; repo = "yggstack"; rev = "${version}"; - sha256 = "sha256-RQ7AvVv+VLfgzlb7orZbSB7TNz/hj2fo832ed4WUN80="; + hash = "sha256-RQ7AvVv+VLfgzlb7orZbSB7TNz/hj2fo832ed4WUN80="; }; vendorHash = "sha256-Hjb3KSh+2qYYKdgv4+dsSp0kAbzz8gu9qnQdA7wB5fA="; diff --git a/pkgs/by-name/yo/youtrack_2022_3/package.nix b/pkgs/by-name/yo/youtrack_2022_3/package.nix index 388c536bf15d..5e1ab1a754f5 100644 --- a/pkgs/by-name/yo/youtrack_2022_3/package.nix +++ b/pkgs/by-name/yo/youtrack_2022_3/package.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation (finalAttrs: { jar = fetchurl { url = "https://download.jetbrains.com/charisma/youtrack-${finalAttrs.version}.jar"; - sha256 = "sha256-NQKWmKEq5ljUXd64zY27Nj8TU+uLdA37chbFVdmwjNs="; + hash = "sha256-NQKWmKEq5ljUXd64zY27Nj8TU+uLdA37chbFVdmwjNs="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/by-name/za/zapret/package.nix b/pkgs/by-name/za/zapret/package.nix index b0dad91d4cb7..658d525bf36f 100644 --- a/pkgs/by-name/za/zapret/package.nix +++ b/pkgs/by-name/za/zapret/package.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation { owner = "bol-van"; repo = "zapret"; rev = "9cf72b7c68f6a7c80dfddc6c1cf6d6db32718376"; - sha256 = "sha256-8cqKCNYLLkZXlwrybKUPG6fLd7gmf8zV9tjWoTxAwIY="; + hash = "sha256-8cqKCNYLLkZXlwrybKUPG6fLd7gmf8zV9tjWoTxAwIY="; }; buildInputs = [ libcap zlib libnetfilter_queue libnfnetlink ]; diff --git a/pkgs/by-name/ze/zerotierone/package.nix b/pkgs/by-name/ze/zerotierone/package.nix index 8cadec450c94..eb09f58e888a 100644 --- a/pkgs/by-name/ze/zerotierone/package.nix +++ b/pkgs/by-name/ze/zerotierone/package.nix @@ -23,7 +23,7 @@ let owner = "zerotier"; repo = "ZeroTierOne"; rev = version; - sha256 = "sha256-YWcqALUB3ZEukL4er2FKcyNdEbuaf//QU5hRbKAfxDA="; + hash = "sha256-YWcqALUB3ZEukL4er2FKcyNdEbuaf//QU5hRbKAfxDA="; }; in stdenv.mkDerivation { diff --git a/pkgs/by-name/zo/zoraxy/package.nix b/pkgs/by-name/zo/zoraxy/package.nix index 48f2b3c03ae8..b81d03125182 100644 --- a/pkgs/by-name/zo/zoraxy/package.nix +++ b/pkgs/by-name/zo/zoraxy/package.nix @@ -11,7 +11,7 @@ buildGoModule rec { owner = "tobychui"; repo = "zoraxy"; rev = "refs/tags/${version}"; - sha256 = "sha256-ZjsBGtY6M5jIXylzg4k8U4krwqx5d5VuMiVHAeUIbXY="; + hash = "sha256-ZjsBGtY6M5jIXylzg4k8U4krwqx5d5VuMiVHAeUIbXY="; }; sourceRoot = "${src.name}/src"; diff --git a/pkgs/by-name/zs/zsh-wd/package.nix b/pkgs/by-name/zs/zsh-wd/package.nix index bf861684d2af..e59b17a67e49 100644 --- a/pkgs/by-name/zs/zsh-wd/package.nix +++ b/pkgs/by-name/zs/zsh-wd/package.nix @@ -8,7 +8,7 @@ stdenvNoCC.mkDerivation rec { owner = "mfaerevaag"; repo = "wd"; rev = "v${version}"; - sha256 = "sha256-rHHCnHa0/t2ij+6rExgvNt2EFBnkgs6l7oE6zL+xc58="; + hash = "sha256-rHHCnHa0/t2ij+6rExgvNt2EFBnkgs6l7oE6zL+xc58="; }; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/by-name/zs/zsh-zhooks/package.nix b/pkgs/by-name/zs/zsh-zhooks/package.nix index f787f4eb4309..047cd75ef61e 100644 --- a/pkgs/by-name/zs/zsh-zhooks/package.nix +++ b/pkgs/by-name/zs/zsh-zhooks/package.nix @@ -11,7 +11,7 @@ stdenvNoCC.mkDerivation { owner = "agkozak"; repo = "zhooks"; rev = "e6616b4a2786b45a56a2f591b79439836e678d22"; - sha256 = "sha256-zahXMPeJ8kb/UZd85RBcMbomB7HjfEKzQKjF2NnumhQ="; + hash = "sha256-zahXMPeJ8kb/UZd85RBcMbomB7HjfEKzQKjF2NnumhQ="; }; dontBuild = true; diff --git a/pkgs/by-name/zs/zsync/package.nix b/pkgs/by-name/zs/zsync/package.nix index f0950cdc33c4..e925d1c8419b 100644 --- a/pkgs/by-name/zs/zsync/package.nix +++ b/pkgs/by-name/zs/zsync/package.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "http://zsync.moria.org.uk/download/zsync-${version}.tar.bz2"; - sha256 = "1wjslvfy76szf0mgg2i9y9q30858xyjn6v2acc24zal76d1m778b"; + hash = "sha256-C51TQzOHqk8EY0psY6XvqCAwcPIpivcqcF+b492mWvI="; }; env = lib.optionalAttrs stdenv.cc.isClang { From 3477b6f431d31081fab8ee1804d7ed0ea6aad7aa Mon Sep 17 00:00:00 2001 From: nicoo Date: Sat, 14 Sep 2024 21:58:23 +0000 Subject: [PATCH 228/236] =?UTF-8?q?cargo-profiler:=20`sha256`=20=E2=86=92?= =?UTF-8?q?=20`hash`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/by-name/ca/cargo-profiler/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ca/cargo-profiler/package.nix b/pkgs/by-name/ca/cargo-profiler/package.nix index 63b6aa567d89..d8e4def6b756 100644 --- a/pkgs/by-name/ca/cargo-profiler/package.nix +++ b/pkgs/by-name/ca/cargo-profiler/package.nix @@ -10,7 +10,7 @@ let # Version-specific variables version = "0.2.0"; rev = "0a8ab772fd5c0f1579e4847c5d05aa443ffa2bc8"; - sha256 = "sha256-ZRAbvSMrPtgaWy9RwlykQ3iiPxHCMh/tS5p67/4XqqA="; + hash = "sha256-ZRAbvSMrPtgaWy9RwlykQ3iiPxHCMh/tS5p67/4XqqA="; cargoHash = "sha256-qt3S6ZcLEP9ZQoP5+kSQdmBlxdMgGUqLszdU7JkFNVI="; inherit (rustPlatform) buildRustPackage; @@ -18,7 +18,7 @@ in buildRustPackage rec { inherit pname version; src = fetchFromGitHub { - inherit owner rev sha256; + inherit owner rev hash; repo = pname; }; From 7ed3d18d09f752bca9899e9f795de3451eea719e Mon Sep 17 00:00:00 2001 From: nicoo Date: Sat, 14 Sep 2024 22:00:35 +0000 Subject: [PATCH 229/236] =?UTF-8?q?corefonts:=20`sha256`=20=E2=86=92=20`ha?= =?UTF-8?q?sh`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/by-name/co/corefonts/package.nix | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/pkgs/by-name/co/corefonts/package.nix b/pkgs/by-name/co/corefonts/package.nix index 1ad30af49383..f2c9533b01fc 100644 --- a/pkgs/by-name/co/corefonts/package.nix +++ b/pkgs/by-name/co/corefonts/package.nix @@ -2,32 +2,32 @@ let fonts = [ - { name = "andale"; sha256 = "0w7927hlwayqf3vvanf8f3qp2g1i404jzqvhp1z3mp0sjm1gw905"; } - { name = "arial"; sha256 = "1xkqyivbyb3z9dcalzidf8m4npzfpls2g0kldyn8g73f2i6plac5"; } - { name = "arialb"; sha256 = "1a60zqrg63kjnykh5hz7dbpzvx7lyivn3vbrp7jyv9d1nvzz09d4"; } - { name = "comic"; sha256 = "0ki0rljjc1pxkbsxg515fwx15yc95bdyaksa3pjd89nyxzzg6vcw"; } - { name = "courie"; sha256 = "111k3waxki9yyxpjwl2qrdkswvsd2dmvhbjmmrwyipam2s31sldv"; } - { name = "georgi"; sha256 = "0083jcpd837j2c06kp1q8glfjn9k7z6vg3wi137savk0lv6psb1c"; } - { name = "impact"; sha256 = "1yyc5z7zmm3s418hmrkmc8znc55afsrz5dgxblpn9n81fhxyyqb0"; } - { name = "times"; sha256 = "1aq7z3l46vwgqljvq9zfgkii6aivy00z1529qbjkspggqrg5jmnv"; } - { name = "trebuc"; sha256 = "1jfsgz80pvyqvpfpaiz5pd8zwlcn67rg2jgynjwf22sip2dhssas"; } - { name = "webdin"; sha256 = "0nnp2znmnmx87ijq9zma0vl0hd46npx38p0cc6lgp00hpid5nnb4"; } - { name = "verdan"; sha256 = "15mdbbfqbyp25a6ynik3rck3m3mg44plwrj79rwncc9nbqjn3jy1"; } - { name = "wd97vwr"; sha256 = "1lmkh3zb6xv47k0z2mcwk3vk8jff9m845c9igxm14bbvs6k2c4gn"; } + { name = "andale"; hash = "sha256-BST+QpUa3Dp+uHDjLwkgMTxx8XDIWbX3cNgrTuER6XA="; } + { name = "arial"; hash = "sha256-hSl6TRRunIesb3SCJzS97l9LKnItfqpYS38sv3b0ePY="; } + { name = "arialb"; hash = "sha256-pCXw/7ahpe3luXntYXf09PT972rnwwKnt3IO8zL+wKg="; } + { name = "comic"; hash = "sha256-nG3z/u/eJtTkHUpP5dsqifkSOncllNf1mv0GJiXNIE4="; } + { name = "courie"; hash = "sha256-u1EdhhZV3eh5rlUuuGsTTW+uZ8tYUC5v9z7F2RUfM4Q="; } + { name = "georgi"; hash = "sha256-LCx9zaZgbqXPCJGPt80/M1np6EM43GkAE/IM1C6TAwE="; } + { name = "impact"; hash = "sha256-YGHvO3QB2WQvXf218rN2qhRmP2J15gpRIHrU+s8vzPs="; } + { name = "times"; hash = "sha256-21ZZXsbvXT3lwkmU8AHwOyoT43zuJ7wlxY9vQ+j4B6s="; } + { name = "trebuc"; hash = "sha256-WmkNm7hRC+G4tP5J8fIxllH+UbvlR3Xd3djvC9B/2sk="; } + { name = "webdin"; hash = "sha256-ZFlbWrwQgPuoYQxcNPq1hjQI6Aaq/oRlPKhXW+0X11o="; } + { name = "verdan"; hash = "sha256-wcthJV42MWZ5TkdmTi8hr446JstjRuuNKuL6hd1arZY="; } + { name = "wd97vwr"; hash = "sha256-9hEmptF7LRJqfzGxQlBNzkk095icVfHBPGR3s/6As9I="; } ]; eula = fetchurl { url = "https://corefonts.sourceforge.net/eula.htm"; - sha256 = "1aqbcnl032g2hd7iy56cs022g47scb0jxxp3mm206x1yqc90vs1c"; + hash = "sha256-LOgNEsM+dANEreP2LsFi+pAnBNDMFB9Pg+KJAahlC6s="; }; in stdenv.mkDerivation { pname = "corefonts"; version = "1"; - exes = map ({name, sha256}: fetchurl { + exes = map ({name, hash}: fetchurl { url = "mirror://sourceforge/corefonts/the%20fonts/final/${name}32.exe"; - inherit sha256; + inherit hash; }) fonts; nativeBuildInputs = [ cabextract ]; From 4538b56ab54ac757440e8ba955bf0a0f2c75972b Mon Sep 17 00:00:00 2001 From: nicoo Date: Sat, 14 Sep 2024 22:01:59 +0000 Subject: [PATCH 230/236] =?UTF-8?q?fluxcd:=20`sha256`=20=E2=86=92=20`hash`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/by-name/fl/fluxcd/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/fl/fluxcd/package.nix b/pkgs/by-name/fl/fluxcd/package.nix index 782fcb50bf74..a1b520e5fe84 100644 --- a/pkgs/by-name/fl/fluxcd/package.nix +++ b/pkgs/by-name/fl/fluxcd/package.nix @@ -9,7 +9,7 @@ let version = "2.3.0"; - sha256 = "sha256-ZQs1rWI31qDo/BgjrmiNnEdR2OL8bUHVz+j5VceEp2k="; + hash = "sha256-ZQs1rWI31qDo/BgjrmiNnEdR2OL8bUHVz+j5VceEp2k="; manifestsSha256 = "sha256-PdhR+UDquIJWtpSymtT6V7qO5fVJOkFz6RGzAx7xeb4="; manifests = fetchzip { @@ -27,7 +27,7 @@ buildGoModule rec { owner = "fluxcd"; repo = "flux2"; rev = "v${version}"; - hash = sha256; + inherit hash; }; vendorHash = "sha256-0YH3pgFrsnh5jIsZpj/sIgfiOCTtIlPltMS5mdGz1eM="; From d2ff0833351f9d309d33824d2ab2285901aca0c3 Mon Sep 17 00:00:00 2001 From: nicoo Date: Sat, 14 Sep 2024 22:02:58 +0000 Subject: [PATCH 231/236] =?UTF-8?q?solana-cli:=20`sha256`=20=E2=86=92=20`h?= =?UTF-8?q?ash`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/by-name/so/solana-cli/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/so/solana-cli/package.nix b/pkgs/by-name/so/solana-cli/package.nix index aa7bcd58936d..e82849b9685f 100644 --- a/pkgs/by-name/so/solana-cli/package.nix +++ b/pkgs/by-name/so/solana-cli/package.nix @@ -32,7 +32,7 @@ }: let version = "1.17.31"; - sha256 = "sha256-5qPW199o+CVJlqGwiAegsquBRWEb5uDKITxjN5dQYAQ="; + hash = "sha256-5qPW199o+CVJlqGwiAegsquBRWEb5uDKITxjN5dQYAQ="; rocksdb = rocksdb_8_3; inherit (darwin.apple_sdk_11_0) Libsystem; @@ -46,7 +46,7 @@ rustPlatform.buildRustPackage rec { owner = "solana-labs"; repo = "solana"; rev = "v${version}"; - inherit sha256; + inherit hash; }; cargoLock = { From 4ad16ff03d0f55120574aaeefafbdeeb8bbf6ce6 Mon Sep 17 00:00:00 2001 From: nicoo Date: Sun, 15 Sep 2024 09:31:45 +0000 Subject: [PATCH 232/236] =?UTF-8?q?swt:=20`sha256`=20=E2=86=92=20`hash`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/by-name/sw/swt/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/sw/swt/package.nix b/pkgs/by-name/sw/swt/package.nix index 49f2d4ce0f88..7f386779d47d 100644 --- a/pkgs/by-name/sw/swt/package.nix +++ b/pkgs/by-name/sw/swt/package.nix @@ -22,11 +22,11 @@ stdenv.mkDerivation (finalAttrs: { passthru.srcMetadataByPlatform = { x86_64-linux.platform = "gtk-linux-x86_64"; - x86_64-linux.sha256 = "17frac2nsx22hfa72264as31rn35hfh9gfgy0n6wvc3knl5d2716"; + x86_64-linux.hash = "sha256-JhzRCrVzsM2NBf65l6CDZdgchlbECHGUg0J0bQVT2Z0="; i686-linux.platform = "gtk-linux-x86"; - i686-linux.sha256 = "13ca17rga9yvdshqvh0sfzarmdcl4wv4pid0ls7v35v4844zbc8b"; + i686-linux.hash = "sha256-C7H1CUFkl7GPpqDFSzYnlLWa1XcawI2hbtsn9fIJio0="; x86_64-darwin.platform = "cocoa-macosx-x86_64"; - x86_64-darwin.sha256 = "0wjyxlw7i9zd2m8syd6k1q85fj8pzhxlfsrl8fpgsj37p698bd0a"; + x86_64-darwin.hash = "sha256-CrSFkrlnSP2uQzRrRzv8F0lXEA7TNK9RFe2neDjtXnI="; }; passthru.srcMetadata = finalAttrs.passthru.srcMetadataByPlatform.${stdenv.hostPlatform.system} or null; @@ -40,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: { assert srcMetadata != null; fetchzip { url = "https://archive.eclipse.org/eclipse/downloads/drops4/R-${finalAttrs.fullVersion}/swt-${finalAttrs.version}-${srcMetadata.platform}.zip"; - inherit (srcMetadata) sha256; + inherit (srcMetadata) hash; stripRoot = false; postFetch = '' mkdir "$unpackDir" From 61fd4d4a3d1d520a5d02d6e7a01d6c358ba21570 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sun, 15 Sep 2024 13:30:05 +0400 Subject: [PATCH 233/236] thonny: add darwin bundle --- pkgs/applications/editors/thonny/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/editors/thonny/default.nix b/pkgs/applications/editors/thonny/default.nix index d051d2818e23..0ff468dcd38a 100644 --- a/pkgs/applications/editors/thonny/default.nix +++ b/pkgs/applications/editors/thonny/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, python3, makeDesktopItem, copyDesktopItems }: +{ lib, stdenv, fetchFromGitHub, python3, makeDesktopItem, copyDesktopItems, desktopToDarwinBundle }: with python3.pkgs; @@ -13,7 +13,8 @@ buildPythonApplication rec { hash = "sha256-/ms2RESnV3bsJpK1zYYLHNUu1FtA6PntaseTbKMfUMc="; }; - nativeBuildInputs = [ copyDesktopItems ]; + nativeBuildInputs = [ copyDesktopItems ] + ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; desktopItems = [ (makeDesktopItem { name = "Thonny"; @@ -24,7 +25,7 @@ buildPythonApplication rec { categories = [ "Development" "IDE" ]; }) ]; - propagatedBuildInputs = with python3.pkgs; [ + propagatedBuildInputs = with python3.pkgs; ([ jedi pyserial tkinter @@ -34,8 +35,9 @@ buildPythonApplication rec { pyperclip asttokens send2trash + ] ++ lib.optionals stdenv.isLinux [ dbus-next - ]; + ]); preInstall = '' export HOME=$(mktemp -d) From 7d0b98b4b5f4568249ac6cbf50b11fcdc7830a21 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sun, 15 Sep 2024 13:32:01 +0400 Subject: [PATCH 234/236] thonny: migrate to by-name --- .../thonny/default.nix => by-name/th/thonny/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{applications/editors/thonny/default.nix => by-name/th/thonny/package.nix} (100%) diff --git a/pkgs/applications/editors/thonny/default.nix b/pkgs/by-name/th/thonny/package.nix similarity index 100% rename from pkgs/applications/editors/thonny/default.nix rename to pkgs/by-name/th/thonny/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 153f1675d545..c69fb86a1351 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33608,8 +33608,6 @@ with pkgs; thokr = callPackage ../applications/misc/thokr { }; - thonny = callPackage ../applications/editors/thonny { }; - betterbird-unwrapped = callPackage ../applications/networking/mailreaders/betterbird { }; betterbird = wrapThunderbird betterbird-unwrapped { desktopName = "Betterbird"; From b28301d784662f8974d1203bdf933c04f84ab098 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sun, 15 Sep 2024 13:35:37 +0400 Subject: [PATCH 235/236] thonny: nixfmt-rfc-style --- pkgs/by-name/th/thonny/package.nix | 65 +++++++++++++++++++----------- 1 file changed, 41 insertions(+), 24 deletions(-) diff --git a/pkgs/by-name/th/thonny/package.nix b/pkgs/by-name/th/thonny/package.nix index 0ff468dcd38a..a3448dacf3ef 100644 --- a/pkgs/by-name/th/thonny/package.nix +++ b/pkgs/by-name/th/thonny/package.nix @@ -1,4 +1,12 @@ -{ lib, stdenv, fetchFromGitHub, python3, makeDesktopItem, copyDesktopItems, desktopToDarwinBundle }: +{ + lib, + stdenv, + fetchFromGitHub, + python3, + makeDesktopItem, + copyDesktopItems, + desktopToDarwinBundle, +}: with python3.pkgs; @@ -13,31 +21,40 @@ buildPythonApplication rec { hash = "sha256-/ms2RESnV3bsJpK1zYYLHNUu1FtA6PntaseTbKMfUMc="; }; - nativeBuildInputs = [ copyDesktopItems ] - ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; + nativeBuildInputs = [ copyDesktopItems ] ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; - desktopItems = [ (makeDesktopItem { - name = "Thonny"; - exec = "thonny"; - icon = "thonny"; - desktopName = "Thonny"; - comment = "Python IDE for beginners"; - categories = [ "Development" "IDE" ]; - }) ]; + desktopItems = [ + (makeDesktopItem { + name = "Thonny"; + exec = "thonny"; + icon = "thonny"; + desktopName = "Thonny"; + comment = "Python IDE for beginners"; + categories = [ + "Development" + "IDE" + ]; + }) + ]; - propagatedBuildInputs = with python3.pkgs; ([ - jedi - pyserial - tkinter - docutils - pylint - mypy - pyperclip - asttokens - send2trash - ] ++ lib.optionals stdenv.isLinux [ - dbus-next - ]); + propagatedBuildInputs = + with python3.pkgs; + ( + [ + jedi + pyserial + tkinter + docutils + pylint + mypy + pyperclip + asttokens + send2trash + ] + ++ lib.optionals stdenv.isLinux [ + dbus-next + ] + ); preInstall = '' export HOME=$(mktemp -d) From 6cf7d32a365794f382edfa5fcd7a7181a605bc9e Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sun, 15 Sep 2024 15:38:17 +0400 Subject: [PATCH 236/236] thonny: derivation cleanup --- pkgs/by-name/th/thonny/package.nix | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/th/thonny/package.nix b/pkgs/by-name/th/thonny/package.nix index a3448dacf3ef..91c40a3c7b3c 100644 --- a/pkgs/by-name/th/thonny/package.nix +++ b/pkgs/by-name/th/thonny/package.nix @@ -37,7 +37,7 @@ buildPythonApplication rec { }) ]; - propagatedBuildInputs = + dependencies = with python3.pkgs; ( [ @@ -56,10 +56,6 @@ buildPythonApplication rec { ] ); - preInstall = '' - export HOME=$(mktemp -d) - ''; - preFixup = '' wrapProgram "$out/bin/thonny" \ --prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath ${python3.pkgs.jedi}) @@ -72,7 +68,7 @@ buildPythonApplication rec { # Tests need a DISPLAY doCheck = false; - meta = with lib; { + meta = { description = "Python IDE for beginners"; longDescription = '' Thonny is a Python IDE for beginners. It supports different ways @@ -81,9 +77,9 @@ buildPythonApplication rec { for explaining the concepts of references and heap. ''; homepage = "https://www.thonny.org/"; - license = licenses.mit; - maintainers = with maintainers; [ leenaars ]; - platforms = platforms.unix; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ leenaars ]; + platforms = lib.platforms.unix; mainProgram = "thonny"; }; }