Skip to content

Instantly share code, notes, and snippets.

@johnrichardrinehart
Created October 11, 2021 09:51
Show Gist options
  • Save johnrichardrinehart/e601804092ad4a8239a0db7b4ca12b76 to your computer and use it in GitHub Desktop.
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)
{ 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