Update generic linode config

This commit is contained in:
Henrik Lissner 2020-12-31 01:59:04 -05:00
parent e74a392d76
commit 2302f1291a
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 18 additions and 10 deletions

View file

@ -51,7 +51,7 @@ with inputs;
boot.kernelPackages = pkgs.linuxPackages_5_9; boot.kernelPackages = pkgs.linuxPackages_5_9;
boot.loader = { boot.loader = {
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = mkDefault true;
systemd-boot.configurationLimit = 10; systemd-boot.configurationLimit = 10;
systemd-boot.enable = mkDefault true; systemd-boot.enable = mkDefault true;
}; };

View file

@ -9,9 +9,9 @@
# - /dev/sdc -> NixOS # - /dev/sdc -> NixOS
# #
# 3. Once booted into Finnix (step 2) pipe this script to sh: # 3. Once booted into Finnix (step 2) pipe this script to sh:
# iso=https://channels.nixos.org/nixos-20.09/latest-nixos-minimal-x86_64-linux.iso # iso=https://channels.nixos.org/nixos-unstable/latest-nixos-minimal-x86_64-linux.iso
# update-ca-certificates # update-ca-certificates
# curl $url | dd of=/dev/sda # curl -k $iso | dd bs=1M of=/dev/sda
# #
# 4. Create two configuration profiles: # 4. Create two configuration profiles:
# - Installer # - Installer
@ -31,11 +31,12 @@
# 6. Install dotfiles: # 6. Install dotfiles:
# mount /dev/sda /mnt # mount /dev/sda /mnt
# swapon /dev/sdb # swapon /dev/sdb
# nix-env -iA nixos.git # nix-env -iA nixos.git nixos.nixFlakes
# nix-env -iA nixos.nixFlakes # mkdir -p /mnt/home/hlissner/.config
# mkdir -p /mnt/home/hlissner # cd /mnt/home/hlissner/.config
# git clone https://github.com/hlissner/dotfiles /mnt/home/hlissner/.config/dotfiles # git clone https://github.com/hlissner/dotfiles
# nixos-install --root "$(PREFIX)" --flake /mnt/home/hlissner/.config/dotfiles#linode # nixos-generate-config --root /mnt
# nixos-install --root /mnt --flake .#linode --impure
# #
# 7. Reboot into "Boot" profile. # 7. Reboot into "Boot" profile.
@ -43,6 +44,10 @@
with lib; with lib;
{ {
imports = filter pathExists [
/etc/nixos/hardware-configuration.nix
];
environment.systemPackages = environment.systemPackages =
with pkgs; [ inetutils mtr sysstat git ]; with pkgs; [ inetutils mtr sysstat git ];
@ -68,7 +73,7 @@ with lib;
version = 2; version = 2;
device = "nodev"; device = "nodev";
copyKernels = true; copyKernels = true;
fsIdentifier = "provided"; fsIdentifier = "label";
extraConfig = "serial; terminal_input serial; terminal_output serial"; extraConfig = "serial; terminal_input serial; terminal_output serial";
}; };
# Disable globals # Disable globals
@ -80,6 +85,9 @@ with lib;
networking = { networking = {
useDHCP = false; useDHCP = false;
usePredictableInterfaceNames = false; usePredictableInterfaceNames = false;
interfaces.eth0.useDHCP = true; interfaces.eth0 = {
useDHCP = true;
preferTempAddress = false;
};
}; };
} }