Skip to content

Instantly share code, notes, and snippets.

@dhable
Last active February 6, 2017 15:26
Show Gist options
  • Save dhable/adfc936c932375ae589e064cd2172521 to your computer and use it in GitHub Desktop.
Save dhable/adfc936c932375ae589e064cd2172521 to your computer and use it in GitHub Desktop.
I spent some time with NixOS trying to make a development environment similar to my Mac. Not suggested for full time desktop use yet.
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
virtualisation.virtualbox.guest.enable = true;
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.device = "/dev/sda";
boot.initrd.checkJournalingFS = false;
# networking.hostName = "nixos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Select internationalisation properties.
# i18n = {
# consoleFont = "Lat2-Terminus16";
# consoleKeyMap = "us";
# defaultLocale = "en_US.UTF-8";
# };
# Set your time zone.
time.timeZone = "US/Central";
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
nix.binaryCaches = [ http://cache.nixos.org http://hydra.nixos.org ];
environment.systemPackages = with pkgs; [
# System Stuff
powertop gnupg gnupg1 dpkg patchelf binutils
# CLI Applications
vim aspell wget zsh unzip which lsof lshw htop curl
file manpages posix_man_pages telnet traceroute tree keybase oh-my-zsh
# Development Stuff
ant maven openjdk gitFull zeal clang cmake nix-repl tmux python python27Packages.pip
gcc pkgconfig stdenv nox visualvm nodejs erlangR19 lfe
# X11 Stuff
chromium keepassx xdg_utils wireshark gdb xscreensaver unclutter
networkmanagerapplet volumeicon libnotify gnome3.gnome_desktop
arc-gtk-theme libreoffice xclip
];
nixpkgs.config = {
allowUnfree = true;
chromium.enablePepperFlash = true;
chromium.enablePepperPDF = true;
};
fonts = {
enableFontDir = true;
enableCoreFonts = true;
enableGhostscriptFonts = true;
fonts = with pkgs; [
powerline-fonts
ubuntu_font_family
];
};
programs = {
zsh = {
enable = true;
interactiveShellInit = ''
export ZSH=${pkgs.oh-my-zsh}/share/oh-my-zsh/
ZSH_THEME="agnoster"
plugins=(git)
source $ZSH/oh-my-zsh.sh'';
promptInit = "";
};
};
services.xserver = {
enable = true;
layout = "us";
displayManager.gdm.enable = true;
desktopManager.gnome3.enable = true;
};
services.printing.enable = true;
security.sudo = {
enable = true;
wheelNeedsPassword = false;
};
users.extraUsers.dhable = {
description = "Dan Hable";
isNormalUser = true;
shell = "${pkgs.zsh}/bin/zsh";
extraGroups = [ "wheel" ];
uid = 1000;
};
# The NixOS release to be compatible with for stateful data such as databases.
system.stateVersion = "16.09";
}
@dhable
Copy link
Author

dhable commented Feb 6, 2017

Things that don't work:

  • gitkraken

Things that don't work as well on NixOS as the Mac:

  • IntelliJ IDEA
  • bazel build scripts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment