Skip to content

Instantly share code, notes, and snippets.

@ghasshee
Created June 1, 2019 13:49
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 ghasshee/9517023989eae5dd4b4f80b5d514ce95 to your computer and use it in GitHub Desktop.
Save ghasshee/9517023989eae5dd4b4f80b5d514ce95 to your computer and use it in GitHub Desktop.
configuration.nix
# HELP => $ man configuration.nix
# SEARCH PKGs => $ nix-env -qaP | grep wget
{ config, pkgs, ... }:
{
imports =
[ ./hardware-configuration.nix ];
hardware = {
opengl.driSupport32Bit = true;
pulseaudio.support32Bit = true;
bluetooth.enable = true; };
boot = {
kernelPackages = pkgs.linuxPackages_latest;
consoleLogLevel = 5 ;
kernelParams = ["resume=/dev/nvme0n1p2" ];
blacklistedKernelModules = ["nouveau"];
initrd = {
checkJournalingFS = false;
luks.devices = [{
name = "root";
device = "/dev/nvme0n1p2";
preLVM = true; }];
};
loader = {
grub = {
enable = true;
device = "/dev/nvme0n1";
extraConfig =
"GRUB_CMDLINE_LINUX_DEFAULT=\"resume=/dev/nvme0n1p2\"";
# efiSupport = true;
# forceInstall = true;
};
# systemd-boot.enable = true;
# efi.canTouchEfiVariables= true;
};
};
networking = {
hostName = "ghasshee";
networkmanager = {
enable = true;
};
nameservers = [ "8.8.8.8" "8.8.4.4" ];
firewall = {
# enable = false;
allowPing = true;
# allowedTCPPorts = [ 8080 ];
# allowedUDPPorts = [ ... ];
};
};
i18n = {
consoleFont = "Lat2-Terminus16";
consoleKeyMap = "us";
defaultLocale = "en_US.UTF-8";
inputMethod = {
enabled = "ibus";
ibus.engines = with pkgs.ibus-engines; [ anthy m17n ]; };
};
time.timeZone = "Asia/Tokyo";
nix.binaryCaches = [http://cache.nixos.org];
# nix.package = pkgs.nix1; ## this updates to 19.03
nixpkgs.config = {
allowUnfree = true;
allowBroken = true;
firefox.icedtea = true;
};
environment = {
etc."fuse.conf".text = ''user_allow_other'';
systemPackages =
let
patched-ghc822 = pkgs.haskell.packages.ghc822.override (old: {
overrides = self: super: {
#heap = self.callHackage "heap" "0.6.0" {};
#PortMidi = self.callHackage "PortMidi" "0.1.5" {};
#stm = self.callHackage "stm" "2.5.0.0" {};
#containers = self.callHackage "containers" "0.5.7.0" {};
#HCodecs = self.callHackage "HCodecs" "0.5" {};
#array = self.callHackage "array" "0.5.1.1" {};
#arrows = self.callHackage "arrows" "0.4.4.1" {};
#deepseq = self.callHackage "deepseq" "1.3.0.2" {};
};
});
patched-ghc = pkgs.haskellPackages.override (old:{
overrides = self: super: {
# Euterpea = self.callHackage "Euterpea" "2.0.6" {};
# heap = self.callHackage "heap" "0.6.0" {};
};
});
patched-ghc844 = pkgs.haskell.packages.ghc844.override (old:{
overrides = self: super: {
Euterpea = self.callHackage "Euterpea" "2.0.6" {};
};
});
hs844 = [ (patched-ghc844.ghcWithPackages (p: with p;[
Euterpea
])) ];
hs822 = [ (patched-ghc822.ghcWithPackages (p: with p;[
])) ];
hs = [ (patched-ghc.ghcWithPackages (p: with p; [
#cabal-install hoogle
#hakyll
#gnuplot GLUT
#effect-monad
# algebra
#megaparsec
#hmatrix
#cryptonite secp256k1-haskell # secp256k1
#base58-bytestring vector-sized mwc-random
]))];
sys = with pkgs;
[
networkmanager
acpi
## BASE
zsh vim bvi tmux w3m git curl wget gnused xsel
tree less jq mlocate unzip xz
sl lolcat figlet
bc # calculator
at # scheduled process execution
sdcv # Dictionary
man-db # man
manpages
## PROCESS MANAGE
lsof psutils htop
psmisc # killall, pstree, ..etc
fzf tcpdump
## linuxPackages.perf # for a kernel package
config.boot.kernelPackages.perf # for a current kernel package,
## SECURITY
openssl.dev openssh gnupg sshfs stunnel
## NETWORK
iptables nettools irssi
## X
xorg.xmodmap xorg.xlibsWrapper
xlibs.xmodmap xlibs.xbacklight xterm tty-clock xcalib
tk tcl # tk/tcl
numix-icon-theme-circle numix-gtk-theme
## GPU-things
freeglut
## Android
jmtpfs
## Music/Sound/Video
pulseaudioLight # pulseaudioFull
dvdplusrwtools dvdauthor
espeak # festival festival-english
timidity
ffmpeg mplayer sox
gnome3.totem vlc # kde4.dragon kde4.kmix
## Virtualization / Containers
docker #python27Packages.docker_compose
## Browser / Mail / PDF
chromium firefoxWrapper thunderbird
kdeApplications.okular mupdf evince
## MATH
sage
## Applications
dropbox-cli
xorg.libxshmfence
atom
qrencode
vokoscreen
maim # command-line screenshot
gimp
youtube-dl
gnome3.eog # image viewer
tesseract # OCR
djvu2pdf
timidity # MIDI
minecraft # Game
###################
### Languages ###
###################
# systemd.lib systemd.dev libudev
stdenv binutils.bintools
makeWrapper cmake automake autoconf glibc
gdb
nodejs ruby jekyll
# Python
python27Full python27Packages.pygments
(python36.withPackages (x: with x; [
python pip numpy matplotlib toolz pytest
ipython jupyter virtualenvwrapper
tk tkinter
numpy scipy networkx matplotlib toolz ]))
pypyPackages.virtualenv
# Idris
idris
vimPlugins.idris-vim
# OCaml
ocaml opam
ocamlPackages.utop ocamlPackages.camlp4
ocamlPackages.findlib ocamlPackages.batteries
# Haskell
ghc cabal-install
# coq
coq coqPackages_8_6.ssreflect
# Rust with C dependencies
rustup cargo
binutils gcc gnumake
openssl pkgconfig
]; in sys ++ hs ++ hs822 ++ hs844 ;
};
services = {
acpid = {
enable = true;
};
redshift = {
enable = true;
latitude = "40";
longitude = "135";
};
openssh = {
enable = true;
};
xserver = {
enable = true;
layout = "us";
xkbOptions = "eurosign:e";
displayManager.slim = {
enable = true;
defaultUser = "ghasshee";
autoLogin = true;
};
desktopManager.xfce.enable = true;
# desktopManager.kde4.enable = true;
synaptics = {
enable = true;
# tapButtons = true;
twoFingerScroll = true;
horizontalScroll= true;
vertEdgeScroll = false;
accelFactor = "0.015";
buttonsMap = [1 3 2];
fingersMap = [1 3 2];
additionalOptions = ''
Option "VertScrollDelta" "50"
Option "HorizScrollDelta" "-20"
'';
};
};
# multitouch.enable = true;
# multitouch.invertScroll = true;
printing = {
enable = true; # enable CUPS Printing
drivers = [
pkgs.gutenprint pkgs.hplipWithPlugin
pkgs.cups-bjnp pkgs.cups-dymo ];
};
};
# Shells
programs = {
zsh = {
enable = true;
promptInit = "";
interactiveShellInit = "";
};
};
# environment.promptInit = "";
# environment.interactiveShellInit = "";
# User ( Do not forget to set with `passwd`
users = {
users = {};
extraUsers = {
ghasshee = {
isNormalUser = true;
home = "/home/ghasshee";
extraGroups = ["wheel" "networkmanager" "adbusers"];
shell = "/run/current-system/sw/bin/zsh";
uid = 1000;
};
};
};
# system.stateVersion = "19.03";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment