Created
October 11, 2021 09:51
-
-
Save johnrichardrinehart/e601804092ad4a8239a0db7b4ca12b76 to your computer and use it in GitHub Desktop.
configuration.nix to use for fresh installs of NixOS 21.05 (enables flakes and sets some standard options for grub/UEFI)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: | |
let | |
grubOptions = { | |
boot.loader.grub.enable = true; | |
boot.loader.grub.version = 2; | |
boot.loader.grub.device = "/dev/vda"; | |
}; | |
uefiOptions = { | |
boot.loader.systemd-boot.enable = true; | |
boot.loader.efi.canTouchEfiVariables = true; | |
boot.loader.timeout = 2; | |
}; | |
in | |
{ | |
imports = [ | |
./hardware-configuration.nix | |
]; | |
environment.systemPackages = [ | |
pkgs.git | |
pkgs.vim | |
]; | |
nix = { | |
package = pkgs.nixUnstable; | |
extraOptions = "experimental-features = nix-command flakes"; | |
}; | |
system.stateVersion = "21.05"; | |
} // grubOptions # can be changed to uefiOptions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment