···276276277277278278 /* Like `mapAttrsRecursive', but it takes an additional predicate
279279- function that tells it whether to recursive into an attribute
279279+ function that tells it whether to recurse into an attribute
280280 set. If it returns false, `mapAttrsRecursiveCond' does not
281281 recurse, but does apply the map function. If it returns true, it
282282 does recurse, and does not apply the map function.
···804804 </listitem>
805805 <listitem>
806806 <para>
807807+ <literal>nixos-generate-config</literal> now puts the dhcp
808808+ configuration in <literal>hardware-configuration.nix</literal>
809809+ instead of <literal>configuration.nix</literal>.
810810+ </para>
811811+ </listitem>
812812+ <listitem>
813813+ <para>
807814 <literal>fetchFromSourcehut</literal> now allows fetching
808815 repositories recursively using <literal>fetchgit</literal> or
809816 <literal>fetchhg</literal> if the argument
+2
nixos/doc/manual/release-notes/rl-2205.section.md
···274274275275- A new option `boot.initrd.extraModprobeConfig` has been added which can be used to configure kernel modules that are loaded in the initrd.
276276277277+- `nixos-generate-config` now puts the dhcp configuration in `hardware-configuration.nix` instead of `configuration.nix`.
278278+277279- `fetchFromSourcehut` now allows fetching repositories recursively
278280 using `fetchgit` or `fetchhg` if the argument `fetchSubmodules`
279281 is set to `true`.
···279279 push @initrdKernelModules, "dm-snapshot";
280280}
281281282282-my $virt = `systemd-detect-virt`;
282282+my $virt = `@detectvirt@`;
283283chomp $virt;
284284285285···398398 # Maybe this is a bind-mount of a filesystem we saw earlier?
399399 if (defined $fsByDev{$fields[2]}) {
400400 # Make sure this isn't a btrfs subvolume.
401401- my $msg = `btrfs subvol show $rootDir$mountPoint`;
401401+ my $msg = `@btrfs@ subvol show $rootDir$mountPoint`;
402402 if ($? != 0 || $msg =~ /ERROR:/s) {
403403 my $path = $fields[3]; $path = "" if $path eq "/";
404404 my $base = $fsByDev{$fields[2]};
···436436437437 # Is this a btrfs filesystem?
438438 if ($fsType eq "btrfs") {
439439- my ($status, @info) = runCommand("btrfs subvol show $rootDir$mountPoint");
439439+ my ($status, @info) = runCommand("@btrfs@ subvol show $rootDir$mountPoint");
440440 if ($status != 0 || join("", @info) =~ /ERROR:/) {
441441 die "Failed to retrieve subvolume info for $mountPoint\n";
442442 }
···558558 $fsAndSwap .= "swapDevices =" . multiLineList(" ", @swapDevices) . ";\n";
559559}
560560561561+my $networkingDhcpConfig = generateNetworkingDhcpConfig();
562562+561563my $hwConfig = <<EOF;
562564# Do not modify this file! It was generated by ‘nixos-generate-config’
563565# and may be overwritten by future invocations. Please make changes
···572574 boot.kernelModules = [$kernelModules ];
573575 boot.extraModulePackages = [$modulePackages ];
574576$fsAndSwap
577577+$networkingDhcpConfig
575578${\join "", (map { " $_\n" } (uniq @attrs))}}
576579EOF
577580···580583 # The global useDHCP flag is deprecated, therefore explicitly set to false here.
581584 # Per-interface useDHCP will be mandatory in the future, so this generated config
582585 # replicates the default behaviour.
583583- networking.useDHCP = false;
586586+ networking.useDHCP = lib.mkDefault false;
584587EOF
585588586589 foreach my $path (glob "/sys/class/net/*") {
587590 my $dev = basename($path);
588591 if ($dev ne "lo") {
589589- $config .= " networking.interfaces.$dev.useDHCP = true;\n";
592592+ $config .= " networking.interfaces.$dev.useDHCP = lib.mkDefault true;\n";
590593 }
591594 }
592595
+9-3
nixos/modules/installer/tools/tools.nix
···3333 nixos-generate-config = makeProg {
3434 name = "nixos-generate-config";
3535 src = ./nixos-generate-config.pl;
3636- path = lib.optionals (lib.elem "btrfs" config.boot.supportedFilesystems) [ pkgs.btrfs-progs ];
3736 perl = "${pkgs.perl.withPackages (p: [ p.FileSlurp ])}/bin/perl";
3737+ detectvirt = "${pkgs.systemd}/bin/systemd-detect-virt";
3838+ btrfs = "${pkgs.btrfs-progs}/bin/btrfs";
3839 inherit (config.system.nixos-generate-config) configuration desktopConfiguration;
3940 xserverEnabled = config.services.xserver.enable;
4041 };
···133134134135 $bootLoaderConfig
135136 # networking.hostName = "nixos"; # Define your hostname.
137137+ # Pick only one of the below networking options.
136138 # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
139139+ # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
137140138141 # Set your time zone.
139142 # time.timeZone = "Europe/Amsterdam";
140143141141- $networkingDhcpConfig
142144 # Configure network proxy if necessary
143145 # networking.proxy.default = "http://user:password\@proxy:port/";
144146 # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
···148150 # console = {
149151 # font = "Lat2-Terminus16";
150152 # keyMap = "us";
153153+ # useXkbConfig = true; # use xkbOptions in tty.
151154 # };
152155153156 $xserverConfig
···155158 $desktopConfiguration
156159 # Configure keymap in X11
157160 # services.xserver.layout = "us";
158158- # services.xserver.xkbOptions = "eurosign:e";
161161+ # services.xserver.xkbOptions = {
162162+ # "eurosign:e";
163163+ # "caps:escape" # map caps to escape.
164164+ # };
159165160166 # Enable CUPS to print documents.
161167 # services.printing.enable = true;
···105105 </term>
106106 <listitem>
107107 <para>
108108- 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>.
108108+ 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>.
109109 </para>
110110 <para>
111111- 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:
111111+ 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:
112112 </para>
113113<screen>
114114<prompt>$ </prompt>flatpak remote-add --if-not-exists appcenter https://flatpak.elementary.io/repo.flatpakrepo
···4747 '';
48484949 preInstall = ''
5050- # Install our override for plank dockitems as Appcenter is not ready to be preinstalled.
5151- # See: https://github.com/NixOS/nixpkgs/issues/70214.
5050+ # Install our override for plank dockitems as the desktop file path is different.
5251 schema_dir=$out/share/glib-2.0/schemas
5352 install -D ${./overrides/plank-dockitems.gschema.override} $schema_dir/plank-dockitems.gschema.override
5453
···425425 google-musicmanager = throw "google-musicmanager has been removed because Google Play Music was discontinued"; # Added 2021-03-07
426426 google-music-scripts = throw "google-music-scripts has been removed because Google Play Music was discontinued"; # Added 2021-03-07
427427 go-pup = pup; # Added 2017-12-19
428428+ gpgstats = throw "gpgstats has been removed: upstream is gone"; # Added 2022-02-06
428429429429- gpgstats = throw "gpgstats has been removed: upstream is gone"; # added 2022-02-06
430430 graalvm11 = graalvm11-ce;
431431 graalvm8-ce = throw "graalvm8-ce has been removed by upstream."; # Added 2021-10-19
432432 graalvm8 = throw "graalvm8-ce has been removed by upstream."; # Added 2021-10-19