Last active
November 14, 2021 09:58
-
-
Save joncol/a0257fa0dc0a7fb187ba553b1425f34f to your computer and use it in GitHub Desktop.
Basic configuration for bootstrapping NixOS and Home Manager. Requires `sudo nix-channel --add https://nixos.org/channels/nixos-unstable && sudo nix-channel --update` (to get `nix 2.4` with Flake support).
This file contains hidden or 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, ... }: | |
{ | |
nix.package = pkgs.nixUnstable; | |
nix.extraOptions = '' | |
experimental-features = nix-command flakes | |
''; | |
boot.loader.grub.enable = true; | |
boot.loader.grub.version = 2; | |
boot.loader.grub.device = "nodev"; | |
boot.loader.grub.efiSupport = true; | |
boot.loader.efi.canTouchEfiVariables = true; | |
########################################### | |
# IMPORTANT # | |
# # | |
# Change this to be your wanted hostname. # | |
########################################### | |
networking.hostName = "myHostName"; | |
######################################################################### | |
# Note that you don't have to enable `NetworkManager` if you don't need # | |
# wifi support. # | |
######################################################################### | |
networking.networkmanager.enable = true; | |
networking.useDHCP = false; | |
############################################################################## | |
# IMPORTANT # | |
# # | |
# Here you should put `networking.interfaces.<interface>.useDHCP = true` for # | |
# your machine's network cards. # | |
# The interface names can be found out by inspecting the autogenerated # | |
# configuration file, obtained via `nixos-generate-config --root /mnt` # | |
############################################################################## | |
environment.variables.EDITOR = "vim"; | |
environment.systemPackages = with pkgs; [ | |
git | |
just | |
nix_2_4 | |
vim | |
]; | |
time.timeZone = "Europe/Stockholm"; | |
i18n.defaultLocale = "en_US.UTF-8"; | |
console = { | |
font = "Lat2-Terminus16"; | |
keyMap = ../../files/colemak.map; | |
}; | |
virtualisation.docker.enable = true; | |
users.users.jco = { | |
isNormalUser = true; | |
extraGroups = [ "wheel" ]; | |
}; | |
# This value determines the NixOS release from which the default | |
# settings for stateful data, like file locations and database versions | |
# on your system were taken. It‘s perfectly fine and recommended to leave | |
# this value at the release version of the first install of this system. | |
# Before changing this value read the documentation for this option | |
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). | |
system.stateVersion = "21.05"; # Did you read the comment? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment