Skip to content

Instantly share code, notes, and snippets.

Created February 3, 2018 13:06
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 anonymous/11eaa512e97ffcc48470b80ec11847a5 to your computer and use it in GitHub Desktop.
Save anonymous/11eaa512e97ffcc48470b80ec11847a5 to your computer and use it in GitHub Desktop.
{ config, pkgs, ... }:
let
unstable = import <nixpkgs-unstable> { config.allowUnfree = true; };
in
{
imports =
[
/etc/nixos/hardware-configuration.nix
];
hardware.pulseaudio.enable = true;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking = {
hostName = "username-thinkpad-nixos";
networkmanager.enable = true;
firewall.enable = false;
dhcpcd.extraConfig = "noarp";
};
i18n = {
consoleFont = "Lat2-Terminus16";
consoleKeyMap = "us";
defaultLocale = "en_US.UTF-8";
};
time.timeZone = "Europe/Amsterdam";
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
binutils
cabal-install
calibre
clisp
darktable
dropbox-cli
dunst
elmPackages.elm
emacs
exfat
feh
ffmpeg
fzy
ghc
gimp
git
gnumake
google-chrome
haskellPackages.xmobar
htop
httpie
irssi
keepassx2
khal
leiningen
libnotify
maim
mpv
nodejs-8_x
plantuml
powertop
(python36.withPackages (ps: with ps; [ setuptools ]))
ranger
rfkill
rofi
rxvt_unicode
screenfetch
slop
stack
sxhkd
transmission_gtk
unstable.firefox-devedition-bin
tdesktop
tmpwatch
unstable.vscode
upx
vdirsyncer
vimHugeX
wget
xbanish
xclip
zathura
];
services.xserver = {
enable = true;
layout = "us";
xkbOptions = "eurosign:e, ctrl:nocaps";
videoDrivers = [ "intel" ];
libinput.enable = true;
config = ''
Section "InputClass"
Identifier "Enable libinput for TrackPoint"
MatchIsPointer "on"
Driver "libinput"
Option "ScrollMethod" "button"
Option "ScrollButton" "8"
EndSection
'';
desktopManager = {
default = "none";
xterm.enable = false;
};
displayManager.lightdm.enable = true;
windowManager = {
xmonad.enable = true;
xmonad.enableContribAndExtras = true;
default = "xmonad";
};
};
services.redshift = {
enable = true;
latitude = "52";
longitude = "6";
temperature = {
day = 5500;
night = 1500;
};
};
environment.shellAliases = {
lsa = "ls -lahF";
todo = "vim ~/Dropbox/docs/todo/personal.md";
};
programs.fish = {
enable = true;
shellInit = ''
set PATH ~/.local/bin $PATH;
set PATH ~/.npm-g/bin $PATH;
set -e SSH_ASKPASS;
~/.fehbg &
'';
interactiveShellInit = ''
shuf -n 1 .remember 2> /dev/null | cat
'';
};
users.extraUsers.username = {
extraGroups = [ "wheel" "networkmanager" ];
isNormalUser = true;
uid = 1000;
shell = "${pkgs.fish}/bin/fish";
};
systemd.user.services.dropbox = {
enable = true;
description = "Dropbox";
wantedBy = [ "default.target" ];
serviceConfig = {
ExecStart = "${pkgs.dropbox}/bin/dropbox";
Restart = "always";
};
};
systemd.user.services.xbanish = {
enable = true;
description = "xbanish";
wantedBy = [ "default.target" ];
serviceConfig = {
ExecStart = "${pkgs.xbanish}/bin/xbanish";
Restart = "always";
};
};
systemd.user.services.dunst = {
enable = true;
description = "dunst daemon";
wantedBy = [ "default.target" ];
serviceConfig = {
ExecStart = "${pkgs.dunst}/bin/dunst";
Restart = "always";
};
};
security.sudo.extraConfig = ''
# Allow thinkpad-brightness to change the brightness
username ALL = (root) NOPASSWD: /home/username/.local/bin/tpb
'';
system.stateVersion = "17.09";
}
system: "x86_64-linux", multi-user?: yes, version: nix-env (Nix) 1.11.16, channels(username): "", channels(root): "nixpkgs-unstable-18.03pre126798.42b9b8f7c86, nixos-17.09.2905.c1d9aff56e0", nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment