Skip to content

Instantly share code, notes, and snippets.

@dmvianna
Last active February 16, 2018 08:09
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 dmvianna/7748ff62caed1e05c5fb45e8762f8df6 to your computer and use it in GitHub Desktop.
Save dmvianna/7748ff62caed1e05c5fb45e8762f8df6 to your computer and use it in GitHub Desktop.
configuration.nix
# 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
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# decrypt LUKS partition
boot.initrd.luks.devices = [
{
name = "root";
device = "/dev/nvme0n1p2";
preLVM = true;
}
];
boot.extraModulePackages = [
config.boot.kernelPackages.broadcom_sta
];
boot.initrd.kernelModules = [
"wl"
];
nix.buildCores = 0;
networking.hostName = "nanban"; # Define your hostname.
networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
fonts.enableFontDir = true;
fonts.enableGhostscriptFonts = true;
fonts.fonts = with pkgs; [
corefonts
inconsolata # monospaced
source-code-pro
unifont
];
fonts.fontconfig.defaultFonts.monospace = [ "Inconsolata" ];
# Select internationalisation properties.
i18n = {
consoleFont = "Lat2-Terminus16";
consoleKeyMap = "us";
defaultLocale = "en_AU.UTF-8";
};
# Set your time zone.
time.timeZone = "Australia/Melbourne";
# allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = (with pkgs; [
cabal2nix
cabal-install
chromium
dmenu
emacs
firefox
ghc
git
gnumake
gnupg
htop
inconsolata
keepassx
keepassx2
keychain
nix-prefetch-scripts
nix-repl
openconnect
openconnect_openssl
pass
pciutils
rxvt_unicode-with-plugins
sqlite
xfce.thunar
xfce.xfce4icontheme
xfce.xfce4settings
unzip
upower
wget
which
xorg.xbacklight
xclip
xorg.xev
xautolock
# for clipboard syncing
xsel
parcellite
xdotool
]) ++
(with pkgs.haskellPackages; [
stylish-haskell
taffybar
hlint
hasktags
# hoogle # must be joking
]);
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable the X11 windowing system.
services.xserver = {
enable = true;
layout = "us";
desktopManager.default = "none";
desktopManager.xterm.enable = false;
displayManager.slim.defaultUser = "dmvianna";
windowManager.default = "xmonad";
windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
extraPackages = haskellPackages : [haskellPackages.taffybar];
};
synaptics = {
enable = true;
twoFingerScroll = true;
horizontalScroll = true;
tapButtons = true;
palmDetect = true;
additionalOptions = ''
Option "VertScrollDelta" "-111"
Option "HorizScrollDelta" "-111"
'';
};
};
# Enable the KDE Desktop Environment.
# services.xserver.displayManager.sddm.enable = true;
# services.xserver.desktopManager.plasma5.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.extraUsers.dmvianna = {
createHome = true;
extraGroups = ["wheel" "video" "audio" "disk" "networkmanager"];
group = "users";
isNormalUser = true;
uid = 1000;
};
programs.slock.enable = true;
services.upower.enable = true;
# The NixOS release to be compatible with for stateful data such as databases.
system.stateVersion = "17.03";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment