Skip to content

Instantly share code, notes, and snippets.

@samueldr
Created December 13, 2017 22:12
Show Gist options
  • Save samueldr/4f71777774756ad8ddaad9b3477e0552 to your computer and use it in GitHub Desktop.
Save samueldr/4f71777774756ad8ddaad9b3477e0552 to your computer and use it in GitHub Desktop.
{ config, pkgs, lib, ... }:
{
# NixOS wants to enable GRUB by default
boot.loader.grub.enable = false;
# Enables the generation of /boot/extlinux/extlinux.conf
boot.loader.generic-extlinux-compatible.enable = true;
#boot.kernelPackages = pkgs.linuxPackages_latest; # This is the default, AFAIK, and did not boot
boot.kernelPackages = pkgs.linuxPackages_4_13; # With this, everything is fine.
# Needed for the virtual console to work on the RPi 3, as the default of 16M doesn't seem to be enough.
boot.kernelParams = ["cma=32M"];
environment.systemPackages = with pkgs; [
htop
vim
tmux
git
];
# File systems configuration for using the installer's partition layout
fileSystems = {
"/boot" = {
device = "/dev/disk/by-label/NIXOS_BOOT";
fsType = "vfat";
};
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
};
};
programs.bash.enableCompletion = true;
services.openssh.enable = true;
services.avahi = {
enable = true;
nssmdns = true;
publish.enable = true;
publish.addresses = true;
};
i18n = {
consoleKeyMap = "cf";
defaultLocale = "en_CA.UTF-8";
};
# The manual might fail with out of memory error on the installation media.
services.nixosManual.enable = false;
networking.hostName = "bart";
swapDevices = [ { device = "/swapfile"; size = 2048; } ];
users.extraUsers.samuel = {
home = "/Users/samuel";
description = "Samuel Dionne-Riel";
isNormalUser = true;
uid = 1000;
extraGroups = [
"adm"
"audio"
"wheel"
"systemd-journal"
];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment