treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:
nix-build ci -A fmt.check
This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).
This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).
Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).
If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
This commit is contained in:
@@ -1,23 +1,28 @@
|
||||
# Provide a basic configuration for installation devices like CDs.
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Enable devices which are usually scanned, because we don't know the
|
||||
# target system.
|
||||
../installer/scan/detected.nix
|
||||
../installer/scan/not-detected.nix
|
||||
imports = [
|
||||
# Enable devices which are usually scanned, because we don't know the
|
||||
# target system.
|
||||
../installer/scan/detected.nix
|
||||
../installer/scan/not-detected.nix
|
||||
|
||||
# Allow "nixos-rebuild" to work properly by providing
|
||||
# /etc/nixos/configuration.nix.
|
||||
./clone-config.nix
|
||||
# Allow "nixos-rebuild" to work properly by providing
|
||||
# /etc/nixos/configuration.nix.
|
||||
./clone-config.nix
|
||||
|
||||
# Include a copy of Nixpkgs so that nixos-install works out of
|
||||
# the box.
|
||||
../installer/cd-dvd/channel.nix
|
||||
];
|
||||
# Include a copy of Nixpkgs so that nixos-install works out of
|
||||
# the box.
|
||||
../installer/cd-dvd/channel.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
system.nixos.variant_id = lib.mkDefault "installer";
|
||||
@@ -31,7 +36,11 @@ with lib;
|
||||
# Use less privileged nixos user
|
||||
users.users.nixos = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" "video" ];
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
"video"
|
||||
];
|
||||
# Allow the graphical user to login without password
|
||||
initialHashedPassword = "";
|
||||
};
|
||||
@@ -52,21 +61,23 @@ with lib;
|
||||
services.getty.autologinUser = "nixos";
|
||||
|
||||
# Some more help text.
|
||||
services.getty.helpLine = ''
|
||||
The "nixos" and "root" accounts have empty passwords.
|
||||
services.getty.helpLine =
|
||||
''
|
||||
The "nixos" and "root" accounts have empty passwords.
|
||||
|
||||
To log in over ssh you must set a password for either "nixos" or "root"
|
||||
with `passwd` (prefix with `sudo` for "root"), or add your public key to
|
||||
/home/nixos/.ssh/authorized_keys or /root/.ssh/authorized_keys.
|
||||
To log in over ssh you must set a password for either "nixos" or "root"
|
||||
with `passwd` (prefix with `sudo` for "root"), or add your public key to
|
||||
/home/nixos/.ssh/authorized_keys or /root/.ssh/authorized_keys.
|
||||
|
||||
If you need a wireless connection, type
|
||||
`sudo systemctl start wpa_supplicant` and configure a
|
||||
network using `wpa_cli`. See the NixOS manual for details.
|
||||
'' + optionalString config.services.xserver.enable ''
|
||||
If you need a wireless connection, type
|
||||
`sudo systemctl start wpa_supplicant` and configure a
|
||||
network using `wpa_cli`. See the NixOS manual for details.
|
||||
''
|
||||
+ optionalString config.services.xserver.enable ''
|
||||
|
||||
Type `sudo systemctl start display-manager' to
|
||||
start the graphical user interface.
|
||||
'';
|
||||
Type `sudo systemctl start display-manager' to
|
||||
start the graphical user interface.
|
||||
'';
|
||||
|
||||
# We run sshd by default. Login is only possible after adding a
|
||||
# password via "passwd" or by adding a ssh key to ~/.ssh/authorized_keys.
|
||||
@@ -81,7 +92,7 @@ with lib;
|
||||
# Enable wpa_supplicant, but don't start it by default.
|
||||
networking.wireless.enable = mkDefault true;
|
||||
networking.wireless.userControlled.enable = true;
|
||||
systemd.services.wpa_supplicant.wantedBy = mkOverride 50 [];
|
||||
systemd.services.wpa_supplicant.wantedBy = mkOverride 50 [ ];
|
||||
|
||||
# Tell the Nix evaluator to garbage collect more aggressively.
|
||||
# This is desirable in memory-constrained environments that don't
|
||||
@@ -97,7 +108,8 @@ with lib;
|
||||
|
||||
# To speed up installation a little bit, include the complete
|
||||
# stdenv in the Nix store on the CD.
|
||||
system.extraDependencies = with pkgs;
|
||||
system.extraDependencies =
|
||||
with pkgs;
|
||||
[
|
||||
stdenv
|
||||
stdenvNoCC # for runCommand
|
||||
|
||||
Reference in New Issue
Block a user