···276277278 /* Like `mapAttrsRecursive', but it takes an additional predicate
279- function that tells it whether to recursive into an attribute
280 set. If it returns false, `mapAttrsRecursiveCond' does not
281 recurse, but does apply the map function. If it returns true, it
282 does recurse, and does not apply the map function.
···276277278 /* Like `mapAttrsRecursive', but it takes an additional predicate
279+ function that tells it whether to recurse into an attribute
280 set. If it returns false, `mapAttrsRecursiveCond' does not
281 recurse, but does apply the map function. If it returns true, it
282 does recurse, and does not apply the map function.
···804 </listitem>
805 <listitem>
806 <para>
0000000807 <literal>fetchFromSourcehut</literal> now allows fetching
808 repositories recursively using <literal>fetchgit</literal> or
809 <literal>fetchhg</literal> if the argument
···804 </listitem>
805 <listitem>
806 <para>
807+ <literal>nixos-generate-config</literal> now puts the dhcp
808+ configuration in <literal>hardware-configuration.nix</literal>
809+ instead of <literal>configuration.nix</literal>.
810+ </para>
811+ </listitem>
812+ <listitem>
813+ <para>
814 <literal>fetchFromSourcehut</literal> now allows fetching
815 repositories recursively using <literal>fetchgit</literal> or
816 <literal>fetchhg</literal> if the argument
+2
nixos/doc/manual/release-notes/rl-2205.section.md
···274275- A new option `boot.initrd.extraModprobeConfig` has been added which can be used to configure kernel modules that are loaded in the initrd.
27600277- `fetchFromSourcehut` now allows fetching repositories recursively
278 using `fetchgit` or `fetchhg` if the argument `fetchSubmodules`
279 is set to `true`.
···274275- A new option `boot.initrd.extraModprobeConfig` has been added which can be used to configure kernel modules that are loaded in the initrd.
276277+- `nixos-generate-config` now puts the dhcp configuration in `hardware-configuration.nix` instead of `configuration.nix`.
278+279- `fetchFromSourcehut` now allows fetching repositories recursively
280 using `fetchgit` or `fetchhg` if the argument `fetchSubmodules`
281 is set to `true`.
···279 push @initrdKernelModules, "dm-snapshot";
280}
281282-my $virt = `systemd-detect-virt`;
283chomp $virt;
284285···398 # Maybe this is a bind-mount of a filesystem we saw earlier?
399 if (defined $fsByDev{$fields[2]}) {
400 # Make sure this isn't a btrfs subvolume.
401- my $msg = `btrfs subvol show $rootDir$mountPoint`;
402 if ($? != 0 || $msg =~ /ERROR:/s) {
403 my $path = $fields[3]; $path = "" if $path eq "/";
404 my $base = $fsByDev{$fields[2]};
···436437 # Is this a btrfs filesystem?
438 if ($fsType eq "btrfs") {
439- my ($status, @info) = runCommand("btrfs subvol show $rootDir$mountPoint");
440 if ($status != 0 || join("", @info) =~ /ERROR:/) {
441 die "Failed to retrieve subvolume info for $mountPoint\n";
442 }
···558 $fsAndSwap .= "swapDevices =" . multiLineList(" ", @swapDevices) . ";\n";
559}
56000561my $hwConfig = <<EOF;
562# Do not modify this file! It was generated by ‘nixos-generate-config’
563# and may be overwritten by future invocations. Please make changes
···572 boot.kernelModules = [$kernelModules ];
573 boot.extraModulePackages = [$modulePackages ];
574$fsAndSwap
0575${\join "", (map { " $_\n" } (uniq @attrs))}}
576EOF
577···580 # The global useDHCP flag is deprecated, therefore explicitly set to false here.
581 # Per-interface useDHCP will be mandatory in the future, so this generated config
582 # replicates the default behaviour.
583- networking.useDHCP = false;
584EOF
585586 foreach my $path (glob "/sys/class/net/*") {
587 my $dev = basename($path);
588 if ($dev ne "lo") {
589- $config .= " networking.interfaces.$dev.useDHCP = true;\n";
590 }
591 }
592
···279 push @initrdKernelModules, "dm-snapshot";
280}
281282+my $virt = `@detectvirt@`;
283chomp $virt;
284285···398 # Maybe this is a bind-mount of a filesystem we saw earlier?
399 if (defined $fsByDev{$fields[2]}) {
400 # Make sure this isn't a btrfs subvolume.
401+ my $msg = `@btrfs@ subvol show $rootDir$mountPoint`;
402 if ($? != 0 || $msg =~ /ERROR:/s) {
403 my $path = $fields[3]; $path = "" if $path eq "/";
404 my $base = $fsByDev{$fields[2]};
···436437 # Is this a btrfs filesystem?
438 if ($fsType eq "btrfs") {
439+ my ($status, @info) = runCommand("@btrfs@ subvol show $rootDir$mountPoint");
440 if ($status != 0 || join("", @info) =~ /ERROR:/) {
441 die "Failed to retrieve subvolume info for $mountPoint\n";
442 }
···558 $fsAndSwap .= "swapDevices =" . multiLineList(" ", @swapDevices) . ";\n";
559}
560561+my $networkingDhcpConfig = generateNetworkingDhcpConfig();
562+563my $hwConfig = <<EOF;
564# Do not modify this file! It was generated by ‘nixos-generate-config’
565# and may be overwritten by future invocations. Please make changes
···574 boot.kernelModules = [$kernelModules ];
575 boot.extraModulePackages = [$modulePackages ];
576$fsAndSwap
577+$networkingDhcpConfig
578${\join "", (map { " $_\n" } (uniq @attrs))}}
579EOF
580···583 # The global useDHCP flag is deprecated, therefore explicitly set to false here.
584 # Per-interface useDHCP will be mandatory in the future, so this generated config
585 # replicates the default behaviour.
586+ networking.useDHCP = lib.mkDefault false;
587EOF
588589 foreach my $path (glob "/sys/class/net/*") {
590 my $dev = basename($path);
591 if ($dev ne "lo") {
592+ $config .= " networking.interfaces.$dev.useDHCP = lib.mkDefault true;\n";
593 }
594 }
595
···105 </term>
106 <listitem>
107 <para>
108- AppCenter has been available since 20.03, but it is of little use. This is because there is no functioning PackageKit backend for Nix 2.0. Starting from 21.11, the Flatpak backend should work so you can install some Flatpak applications using it. See this <link xlink:href="https://github.com/NixOS/nixpkgs/issues/70214">issue</link>.
109 </para>
110 <para>
111- To use AppCenter on NixOS, add <literal>pantheon.appcenter</literal> to <xref linkend="opt-environment.systemPackages" />, <link linkend="module-services-flatpak">enable Flatpak support</link> and optionally add the <literal>appcenter</literal> Flatpak remote:
112 </para>
113<screen>
114<prompt>$ </prompt>flatpak remote-add --if-not-exists appcenter https://flatpak.elementary.io/repo.flatpakrepo
···105 </term>
106 <listitem>
107 <para>
108+ AppCenter has been available since 20.03. Starting from 21.11, the Flatpak backend should work so you can install some Flatpak applications using it. However, due to missing appstream metadata, the Packagekit backend does not function currently. See this <link xlink:href="https://github.com/NixOS/nixpkgs/issues/15932">issue</link>.
109 </para>
110 <para>
111+ If you are using Pantheon, AppCenter should be installed by default if you have <link linkend="module-services-flatpak">Flatpak support</link> enabled. If you also wish to add the <literal>appcenter</literal> Flatpak remote:
112 </para>
113<screen>
114<prompt>$ </prompt>flatpak remote-add --if-not-exists appcenter https://flatpak.elementary.io/repo.flatpakrepo
···116 url = "https://sources.debian.org/data/main/a/anki/2.1.15+dfsg-3/debian/patches/fix-mpv-args.patch";
117 sha256 = "1dimnnawk64m5bbdbjrxw5k08q95l728n94cgkrrwxwavmmywaj2";
118 })
00000119 ];
120121 # Anki does not use setup.py
···116 url = "https://sources.debian.org/data/main/a/anki/2.1.15+dfsg-3/debian/patches/fix-mpv-args.patch";
117 sha256 = "1dimnnawk64m5bbdbjrxw5k08q95l728n94cgkrrwxwavmmywaj2";
118 })
119+ (fetchpatch {
120+ name = "anki-2.1.15-unescape.patch";
121+ url = "https://795309.bugs.gentoo.org/attachment.cgi?id=715200";
122+ sha256 = "14rz864kdaba4fd1marwkyz9n1jiqnbjy4al8bvwlhpvp0rm1qk6";
123+ })
124 ];
125126 # Anki does not use setup.py
···1-{ lib, stdenv, fetchurl }:
23stdenv.mkDerivation rec {
4 pname = "haveged";
5- version = "1.9.2";
67- src = fetchurl {
8- url = "http://www.issihosts.com/haveged/haveged-${version}.tar.gz";
9- sha256 = "0w5ypz6451msckivjriwyw8djydlwffam7x23xh626s2vzdrlzgp";
0010 };
1112- meta = {
00000000000013 description = "A simple entropy daemon";
14 longDescription = ''
15 The haveged project is an attempt to provide an easy-to-use, unpredictable
···19 of haveged is directed towards improving overall reliability and adaptability while minimizing
20 the barriers to using haveged for other tasks.
21 '';
22- homepage = "http://www.issihosts.com/haveged/";
23- license = lib.licenses.gpl3;
24- maintainers = [ lib.maintainers.domenkozar ];
25- platforms = lib.platforms.unix;
26 };
27}
···1+{ lib, stdenv, fetchFromGitHub }:
23stdenv.mkDerivation rec {
4 pname = "haveged";
5+ version = "1.9.15";
67+ src = fetchFromGitHub {
8+ owner = "jirka-h";
9+ repo = "haveged";
10+ rev = "v${version}";
11+ sha256 = "sha256-bU+/lRx0RAqHheNQ9CWT/V0oZnZd0W9EHhhX3RRIZ/0=";
12 };
1314+ strictDeps = true;
15+16+ postPatch = ''
17+ patchShebangs ent # test shebang
18+ '';
19+20+ installFlags = [
21+ "sbindir=$(out)/bin" # no reason for us to have a $out/sbin, its just a symlink to $out/bin
22+ ];
23+24+ doCheck = true;
25+26+ meta = with lib; {
27 description = "A simple entropy daemon";
28 longDescription = ''
29 The haveged project is an attempt to provide an easy-to-use, unpredictable
···33 of haveged is directed towards improving overall reliability and adaptability while minimizing
34 the barriers to using haveged for other tasks.
35 '';
36+ homepage = "https://github.com/jirka-h/haveged";
37+ license = licenses.gpl3;
38+ maintainers = with maintainers; [ domenkozar ];
39+ platforms = platforms.unix;
40 };
41}
···425 google-musicmanager = throw "google-musicmanager has been removed because Google Play Music was discontinued"; # Added 2021-03-07
426 google-music-scripts = throw "google-music-scripts has been removed because Google Play Music was discontinued"; # Added 2021-03-07
427 go-pup = pup; # Added 2017-12-19
0428429- gpgstats = throw "gpgstats has been removed: upstream is gone"; # added 2022-02-06
430 graalvm11 = graalvm11-ce;
431 graalvm8-ce = throw "graalvm8-ce has been removed by upstream."; # Added 2021-10-19
432 graalvm8 = throw "graalvm8-ce has been removed by upstream."; # Added 2021-10-19
···425 google-musicmanager = throw "google-musicmanager has been removed because Google Play Music was discontinued"; # Added 2021-03-07
426 google-music-scripts = throw "google-music-scripts has been removed because Google Play Music was discontinued"; # Added 2021-03-07
427 go-pup = pup; # Added 2017-12-19
428+ gpgstats = throw "gpgstats has been removed: upstream is gone"; # Added 2022-02-06
4290430 graalvm11 = graalvm11-ce;
431 graalvm8-ce = throw "graalvm8-ce has been removed by upstream."; # Added 2021-10-19
432 graalvm8 = throw "graalvm8-ce has been removed by upstream."; # Added 2021-10-19