Skip to content

Instantly share code, notes, and snippets.

@setekhid
Last active May 22, 2017 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save setekhid/652f7f62a34c46764974902e686e8c4b to your computer and use it in GitHub Desktop.
Save setekhid/652f7f62a34c46764974902e686e8c4b to your computer and use it in GitHub Desktop.
lbnuc /etc/nixos
# Edit this configuration file to define what should be installed on
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
# Define on which hard drive you want to install Grub.
boot.loader.grub.device = "/dev/sda";
networking.hostName = "lbnuc"; # 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 = "Asia/Hong_Kong";
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs; [
# Common system utilities
wget curl tree unzip iftop mtr rsync
gitSVN subversion mercurial darcs vim tmux
# Development environment
vagrant cmake gnumake gnum4
ctags cscope gcc clang go stack ocaml opam
];
# Set global environment variables
environment.variables.EDITOR = "vim";
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.openssh.permitRootLogin = "yes";
# Enable the polipo service
services.polipo.enable = true;
services.polipo.proxyAddress = "0.0.0.0";
services.polipo.proxyPort = 8123;
services.polipo.allowedClients = ["0.0.0.0/0"];
services.polipo.socksParentProxy = "localhost:9050";
# Enable the docker daemon service
virtualisation.docker.enable = true;
virtualisation.docker.socketActivation = true;
# Enable the virtual box service
virtualisation.virtualbox.host.enable = true;
# Disable firewall
networking.firewall.enable = false;
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable the X11 windowing system.
# services.xserver.enable = true;
# services.xserver.layout = "us";
# services.xserver.xkbOptions = "eurosign:e";
# Enable the KDE Desktop Environment.
# services.xserver.displayManager.kdm.enable = true;
# services.xserver.desktopManager.kde4.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
# users.extraUsers.guest = {
# isNormalUser = true;
# uid = 1000;
# };
# The NixOS release to be compatible with for stateful data such as databases.
system.stateVersion = "16.09";
}
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:
{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
boot.initrd.availableKernelModules = [ "ahci" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/7da95303-108e-4e1e-9c6e-64c799875213";
fsType = "ext4";
};
fileSystems."/data" =
{ device = "/dev/disk/by-uuid/09d3df55-5d55-40c2-afdf-821df8e1b895";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/f4b5162c-c060-422c-ba54-5d1fa2f7af42";
fsType = "xfs";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/1fa0d529-9698-44c0-8e24-e121679f92b7"; }
];
fileSystems."/var/lib/docker" =
{ device = "/data/var_lib_docker";
options = ["bind"];
};
nix.maxJobs = 4;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment