# Pastebin ae2inQzU # 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 ]; hardware.bluetooth.enable = true; hardware.cpu.intel.updateMicrocode = true; hardware.trackpoint.emulateWheel = true; hardware.pulseaudio.enable = true; hardware.pulseaudio.support32Bit = true; hardware.opengl = { driSupport = true; driSupport32Bit = true; extraPackages = with pkgs; [ vaapiIntel libvdpau-va-gl vaapiVdpau ]; }; hardware.bumblebee.connectDisplay = true; hardware.bumblebee.driver = "nvidia"; hardware.bumblebee.enable = true; boot = { kernelParams = [ "acpi_osi=Linux acpi=force acpi_enforce_resources=lax acpi_osi='!Windows 2015' ipv6.disable=1 net.ifnames=0" ]; # i915.modeset=1 scsi_mod.use_blk_mq=1 rd.udev.log-priority=3 supportedFilesystems = [ "nfs" "ntfs" "exfat" ]; kernelModules = [ "tun" "virtio" ]; blacklistedKernelModules = [ "nouveau" ]; }; # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; networking = { hostName = "amara"; # Define your hostname. wireless.enable = true; wireless.interfaces = [ "wlan0" ]; nameservers = [ "8.8.8.8" "8.8.4.4" ]; }; # Select internationalisation properties. i18n = { consoleFont = "ter-v20n"; consolePackages = [ pkgs.terminus_font ]; # inputMethod.enabled = "ibus"; # inputMethod.ibus.engines = with pkgs.ibus-engines; [ uniemoji ]; }; # Set your time zone. time.timeZone = "Europe/Amsterdam"; environment= { variables.pathsToLink = [ "/share" "/usr/share/themes" ]; sessionVariables = { GTK_THEME = "Arc-Dark"; GTK_PATH = "${config.system.path}/lib/gtk-3.0:${config.system.path}/lib/gtk-2.0"; QT_QPA_PLATFORMTHEME = "gtk2"; XDG_CURRENT_DESKTOP = "GNOME"; VDPAU_DRIVER = "va_gl"; }; variables.XCURSOR_PATH = "$HOME/.icons"; profileRelativeEnvVars.XCURSOR_PATH = [ "/share/icons" ]; etc = { "xdg/gtk-3.0/settings.ini" = { text = '' [Settings] gtk-theme-name=Arc-Dark gtk-application-prefer-dark-theme = true ''; mode = "444"; }; "gtk-2.0/gtkrc" = { text = '' gtk-icon-theme-name = "Arc-Dark" ''; mode = "444"; }; }; systemPackages = with pkgs; [ parted xorg.xkill gparted gksu chromium wget gitAndTools.gitFull gtk-engine-murrine arc-theme arc-icon-theme moka-icon-theme kdeFrameworks.oxygen-icons5 oxygen libsForQt5.qtstyleplugins elementary-icon-theme playerctl zathura steam neovim gnumake automake autoconf w3m imagemagick epdfview bomi mpv ntfs3g vifm acpi manpages htop udiskie qt5.qtwebengine i3lock xautolock scrot ffmpegthumbnailer unzip unrar feh qutebrowser pavucontrol blender spotify openvpn kodi kodiPlugins.exodus transmission_gtk simplescreenrecorder python35Packages.youtube-dl-light w3m xonotic #open-source fps mosh usbutils xorg.xset torbrowser #y'know gnupg keybase calibre ruby_2_4 libva vdpauinfo psmisc #killall epdfview #DevOps awscli terraform gnome3.gnome-disk-utility gnome3.file-roller mcomix #Xfce xfce.exo xfce.gvfs xfce.thunar xfce.thunar-archive-plugin xfce.terminal xfce.tumbler # A D-Bus thumbnailer service xfce.xfce4settings xfce.xfconf xfce.xfce4taskmanager xfce.gigolo # A frontend to easily manage connections to remote filesystems ]; }; nixpkgs.config = { allowUnfree = true; }; powerManagement.cpuFreqGovernor = pkgs.lib.mkForce null; services = { udev = { packages = with pkgs; [ android-udev-rules libmtp ]; extraRules = '' # Make autosuspend exception for Bluetooth Mobile Mouse 3600 and RX1000 Laser Mouse ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="8087", ATTR{idProduct}=="07dc", GOTO="power_usb_rules_end" ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c046 ", GOTO="power_usb_rules_end" ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="on" LABEL="power_usb_rules_end" # Suspend the system when battery level drops to 5% or lower SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="[0-5]", RUN+="/run/current-system/sw/bin/systemctl hibernate" ''; }; nixosManual.showManual = true; compton = { enable = true; fade = true; vSync = "opengl-swc"; }; kmscon.enable = true; tlp.enable = true; tlp.extraConfig = '' USB_BLACKLIST="8087:07dc" ''; thermald.enable = true; psd.browsers = [ "chromium" ]; emacs.enable = true; emacs.defaultEditor = true; acpid.lidEventCommands = "~/bin/blurlock"; redshift = { enable = true; latitude = "39.0200"; longitude = "1.4821"; }; }; # virtualisation = { # docker.enable = true; # }; programs = { light.enable = true; adb.enable = true; fish.enable =true; java.enable = true; chromium = { enable = true; extensions = [ "gcbommkclmclpchllfjekcdonpmejbdp" # https everywhere "dbepggeogbaibhgnhhndojpepiihcmeb" # vimium "cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock origin ]; }; }; # Enable the OpenSSH daemon. services.openssh.enable = true; networking.firewall.enable = false; # Enable the X11 windowing system. services.xserver = { enable = true; layout = "us"; xkbOptions = "terminate:ctrl_alt_bksp, ctrl:nocaps"; desktopManager = { xterm.enable = false; default = "none"; }; windowManager.i3.enable = true; windowManager.default = "i3"; libinput = { enable = true; disableWhileTyping = true; tapping = true; }; # videoDrivers = [ "modesetting" ]; videoDrivers = [ "intel" ]; # deviceSection = '' # Option "DRI" "2" # Option "DPI" "309 x 173" # ''; # useGlamor = true; displayManager = { sessionCommands = '' # Launch xfce settings daemon. ${pkgs.xfce.xfce4settings}/bin/xfsettingsd & ''; session = [ { manage = "desktop"; name = "i3"; start = '' ${pkgs.i3}/bin/i3 & waitPID=$! ''; } ]; slim = { enable = true; defaultUser = "taohansen"; extraConfig = '' welcome_msg session_msg intro_msg username_msg password_msg sessiondir ''; theme = pkgs.fetchurl { url = "https://github.com/edwtjo/nixos-black-theme/archive/v1.0.tar.gz"; sha256 = "13bm7k3p6k7yq47nba08bn48cfv536k4ipnwwp1q1l2ydlp85r9d"; }; }; }; }; # TODO # services.xserver.windowManager.exwm = { # enable = true; # enableDefaultConfig = false; fonts = { enableFontDir = true; fonts = with pkgs; [ ]; fontconfig = { dpi = 96; ultimate.enable = true; defaultFonts.monospace = [ "Liberation Mono" ]; }; }; users = { defaultUserShell = "/run/current-system/sw/bin/fish"; extraUsers.taohansen = { isNormalUser = true; uid = 1000; extraGroups = ["wheel" "docker" "disk" "audio" "cdrom" "video" "systemd-journal lp"]; }; }; security.sudo = { enable = true; wheelNeedsPassword = false; }; # The NixOS release to be compatible with for stateful data such as databases. system.stateVersion = "17.03"; system.autoUpgrade.enable = true; }