mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 11:45:45 +03:00

After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
79 lines
1.8 KiB
Nix
79 lines
1.8 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
with lib;
|
|
{
|
|
imports = [ ../profiles/qemu-guest.nix ];
|
|
|
|
services.openssh = {
|
|
enable = true;
|
|
|
|
settings.PermitRootLogin = "prohibit-password";
|
|
settings.PasswordAuthentication = mkDefault false;
|
|
};
|
|
|
|
networking = {
|
|
usePredictableInterfaceNames = false;
|
|
useDHCP = false;
|
|
interfaces.eth0 = {
|
|
useDHCP = true;
|
|
|
|
# Linode expects IPv6 privacy extensions to be disabled, so disable them
|
|
# See: https://www.linode.com/docs/guides/manual-network-configuration/#static-vs-dynamic-addressing
|
|
tempAddress = "disabled";
|
|
};
|
|
};
|
|
|
|
# Install diagnostic tools for Linode support
|
|
environment.systemPackages = with pkgs; [
|
|
inetutils
|
|
mtr
|
|
sysstat
|
|
];
|
|
|
|
fileSystems."/" = {
|
|
fsType = "ext4";
|
|
device = "/dev/sda";
|
|
autoResize = true;
|
|
};
|
|
|
|
swapDevices = mkDefault [ { device = "/dev/sdb"; } ];
|
|
|
|
# Enable LISH and Linode Booting w/ GRUB
|
|
boot = {
|
|
# Add Required Kernel Modules
|
|
# NOTE: These are not documented in the install guide
|
|
initrd.availableKernelModules = [
|
|
"virtio_pci"
|
|
"virtio_scsi"
|
|
"ahci"
|
|
"sd_mod"
|
|
];
|
|
|
|
# Set Up LISH Serial Connection
|
|
kernelParams = [ "console=ttyS0,19200n8" ];
|
|
kernelModules = [ "virtio_net" ];
|
|
|
|
loader = {
|
|
# Increase Timeout to Allow LISH Connection
|
|
# NOTE: The image generator tries to set a timeout of 0, so we must force
|
|
timeout = lib.mkForce 10;
|
|
|
|
grub = {
|
|
enable = true;
|
|
forceInstall = true;
|
|
device = "nodev";
|
|
|
|
# Allow serial connection for GRUB to be able to use LISH
|
|
extraConfig = ''
|
|
serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1;
|
|
terminal_input serial;
|
|
terminal_output serial
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
}
|