···274 replacement. It stores backups as volume dump files and thus better integrates
275 into contemporary backup solutions.
27600277- The `dnsmasq` service now takes configuration via the
278 `services.dnsmasq.settings` attribute set. The option
279 `services.dnsmasq.extraConfig` will be deprecated when NixOS 22.11 reaches
···274 replacement. It stores backups as volume dump files and thus better integrates
275 into contemporary backup solutions.
276277+- `services.maddy` now allows to configure users and their credentials using `services.maddy.ensureCredentials`.
278+279- The `dnsmasq` service now takes configuration via the
280 `services.dnsmasq.settings` attribute set. The option
281 `services.dnsmasq.extraConfig` will be deprecated when NixOS 22.11 reaches
+36-2
nixos/modules/services/mail/maddy.nix
···228 default = [];
229 description = lib.mdDoc ''
230 List of IMAP accounts which get automatically created. Note that for
231- a complete setup, user credentials for these accounts are required too
232- and can be created using the command `maddyctl creds`.
233 This option does not delete accounts which are not (anymore) listed.
234 '';
235 example = [
···238 ];
239 };
240000000000000000000000000000241 };
242 };
243···264 ${pkgs.maddy}/bin/maddyctl imap-acct create ${account}
265 fi
266 '') cfg.ensureAccounts}
0000000267 ''}
268 '';
269 serviceConfig = {
···228 default = [];
229 description = lib.mdDoc ''
230 List of IMAP accounts which get automatically created. Note that for
231+ a complete setup, user credentials for these accounts are required
232+ and can be created using the `ensureCredentials` option.
233 This option does not delete accounts which are not (anymore) listed.
234 '';
235 example = [
···238 ];
239 };
240241+ ensureCredentials = mkOption {
242+ default = {};
243+ description = lib.mdDoc ''
244+ List of user accounts which get automatically created if they don't
245+ exist yet. Note that for a complete setup, corresponding mail boxes
246+ have to get created using the `ensureAccounts` option.
247+ This option does not delete accounts which are not (anymore) listed.
248+ '';
249+ example = {
250+ "user1@localhost".passwordFile = /secrets/user1-localhost;
251+ "user2@localhost".passwordFile = /secrets/user2-localhost;
252+ };
253+ type = types.attrsOf (types.submodule {
254+ options = {
255+ passwordFile = mkOption {
256+ type = types.path;
257+ example = "/path/to/file";
258+ default = null;
259+ description = lib.mdDoc ''
260+ Specifies the path to a file containing the
261+ clear text password for the user.
262+ '';
263+ };
264+ };
265+ });
266+ };
267+268 };
269 };
270···291 ${pkgs.maddy}/bin/maddyctl imap-acct create ${account}
292 fi
293 '') cfg.ensureAccounts}
294+ ''}
295+ ${optionalString (cfg.ensureCredentials != {}) ''
296+ ${concatStringsSep "\n" (mapAttrsToList (name: cfg: ''
297+ if ! ${pkgs.maddy}/bin/maddyctl creds list | grep "${name}"; then
298+ ${pkgs.maddy}/bin/maddyctl creds create --password $(cat ${escapeShellArg cfg.passwordFile}) ${name}
299+ fi
300+ '') cfg.ensureCredentials)}
301 ''}
302 '';
303 serviceConfig = {
···9}:
10rustPlatform.buildRustPackage rec {
11 pname = "polkadot";
12- version = "0.9.40";
1314 src = fetchFromGitHub {
15 owner = "paritytech";
16 repo = "polkadot";
17 rev = "v${version}";
18- hash = "sha256-gwifWhGsStC8vhMxc+LWSvs/av8c04cdWv7iszIQ/k8=";
1920 # the build process of polkadot requires a .git folder in order to determine
21 # the git commit hash that is being built and add it to the version string.
···34 cargoLock = {
35 lockFile = ./Cargo.lock;
36 outputHashes = {
37- "binary-merkle-tree-4.0.0-dev" = "sha256-YxCAFrLWTmGjTFzNkyjE+DNs2cl4IjAlB7qz0KPN1vE=";
38 "sub-tokens-0.1.0" = "sha256-GvhgZhOIX39zF+TbQWtTCgahDec4lQjH+NqamLFLUxM=";
39 };
40 };
···9}:
10rustPlatform.buildRustPackage rec {
11 pname = "polkadot";
12+ version = "0.9.41";
1314 src = fetchFromGitHub {
15 owner = "paritytech";
16 repo = "polkadot";
17 rev = "v${version}";
18+ hash = "sha256-wjV/+2n9B617S6MxC48vtpbBBKGCWBEjRj7K6m630Mo=";
1920 # the build process of polkadot requires a .git folder in order to determine
21 # the git commit hash that is being built and add it to the version string.
···34 cargoLock = {
35 lockFile = ./Cargo.lock;
36 outputHashes = {
37+ "binary-merkle-tree-4.0.0-dev" = "sha256-ngtW11MGs+fcuCp9J5NH+dYJeK4YM5vWpRk0OuLYHus=";
38 "sub-tokens-0.1.0" = "sha256-GvhgZhOIX39zF+TbQWtTCgahDec4lQjH+NqamLFLUxM=";
39 };
40 };
···18 # E.g. for cudaPackages_11_8 we use gcc11 with gcc12's libstdc++
19 # Cf. https://github.com/NixOS/nixpkgs/pull/218265 for context
20 backendStdenv = final.callPackage ./stdenv.nix {
21- nixpkgsStdenv = prev.pkgs.stdenv;
22- nvccCompatibleStdenv = prev.pkgs.buildPackages."${finalVersion.gcc}Stdenv";
00000023 };
2425 ### Add classic cudatoolkit package
···18 # E.g. for cudaPackages_11_8 we use gcc11 with gcc12's libstdc++
19 # Cf. https://github.com/NixOS/nixpkgs/pull/218265 for context
20 backendStdenv = final.callPackage ./stdenv.nix {
21+ # We use buildPackages (= pkgsBuildHost) because we look for a gcc that
22+ # runs on our build platform, and that produces executables for the host
23+ # platform (= platform on which we deploy and run the downstream packages).
24+ # The target platform of buildPackages.gcc is our host platform, so its
25+ # .lib output should be the libstdc++ we want to be writing in the runpaths
26+ # Cf. https://github.com/NixOS/nixpkgs/pull/225661#discussion_r1164564576
27+ nixpkgsCompatibleLibstdcxx = final.pkgs.buildPackages.gcc.cc.lib;
28+ nvccCompatibleCC = final.pkgs.buildPackages."${finalVersion.gcc}".cc;
29 };
3031 ### Add classic cudatoolkit package
+28-12
pkgs/development/compilers/cudatoolkit/stdenv.nix
···1-{ nixpkgsStdenv
2-, nvccCompatibleStdenv
03, overrideCC
04, wrapCCWith
5}:
67-overrideCC nixpkgsStdenv (wrapCCWith {
8- cc = nvccCompatibleStdenv.cc.cc;
00910- # This option is for clang's libcxx, but we (ab)use it for gcc's libstdc++.
11- # Note that libstdc++ maintains forward-compatibility: if we load a newer
12- # libstdc++ into the process, we can still use libraries built against an
13- # older libstdc++. This, in practice, means that we should use libstdc++ from
14- # the same stdenv that the rest of nixpkgs uses.
15- # We currently do not try to support anything other than gcc and linux.
16- libcxx = nixpkgsStdenv.cc.cc.lib;
17-})
000000000000
···1+{ lib
2+, nixpkgsCompatibleLibstdcxx
3+, nvccCompatibleCC
4, overrideCC
5+, stdenv
6, wrapCCWith
7}:
89+let
10+ cc = wrapCCWith
11+ {
12+ cc = nvccCompatibleCC;
1314+ # This option is for clang's libcxx, but we (ab)use it for gcc's libstdc++.
15+ # Note that libstdc++ maintains forward-compatibility: if we load a newer
16+ # libstdc++ into the process, we can still use libraries built against an
17+ # older libstdc++. This, in practice, means that we should use libstdc++ from
18+ # the same stdenv that the rest of nixpkgs uses.
19+ # We currently do not try to support anything other than gcc and linux.
20+ libcxx = nixpkgsCompatibleLibstdcxx;
21+ };
22+ cudaStdenv = overrideCC stdenv cc;
23+ passthruExtra = {
24+ inherit nixpkgsCompatibleLibstdcxx;
25+ # cc already exposed
26+ };
27+ assertCondition = true;
28+in
29+lib.extendDerivation
30+ assertCondition
31+ passthruExtra
32+ cudaStdenv
33+
-2
pkgs/development/compilers/elm/default.nix
···107108 # elm-format requires text >= 2.0
109 text = self.text_2_0_2;
110- # elm-format-lib requires hspec-golden < 0.2
111- hspec-golden = self.hspec-golden_0_1_0_3;
112 # unorderd-container's tests indirectly depend on text < 2.0
113 unordered-containers = overrideCabal (drv: { doCheck = false; }) super.unordered-containers;
114 # relude-1.1.0.0's tests depend on hedgehog < 1.2, which indirectly depends on text < 2.0
···107108 # elm-format requires text >= 2.0
109 text = self.text_2_0_2;
00110 # unorderd-container's tests indirectly depend on text < 2.0
111 unordered-containers = overrideCabal (drv: { doCheck = false; }) super.unordered-containers;
112 # relude-1.1.0.0's tests depend on hedgehog < 1.2, which indirectly depends on text < 2.0