{ config, pkgs, ... }: { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix ]; # System boot = { loader = { grub.enable = false; gummiboot.enable = true; generationsDir = { enable = false; copyKernels = false; }; }; #kernelPackages = pkgs.linuxPackages_4_2; kernel = { sysctl = { "kernel.nmi_watchdog" = 0; # Disable watchdog "vm.swappiness" = 0; # Avoid swapping as much as possible "vm.laptop_mode" = 5; # Use laptop mode (Knob at 5) "vm.dirty_writeback_centisecs" = 6000; # Aggregate disk IO }; }; extraModprobeConfig = '' options libata.force=noncq options resume=/dev/sda5 options snd_hda_intel index=0 model=intel-mac-auto id=PCH options snd_hda_intel index=1 model=intel-mac-auto id=HDMI options snd-hda-intel model=mbp101 options hid_apple fnmode=2 ''; }; hardware.opengl.driSupport32Bit = true; # SSD boot.tmpOnTmpfs = true; # save some writes fileSystems."/".options = "discard,noatime"; fileSystems."/boot".options = "discard,noatime,defaults"; powerManagement = { enable = true; resumeCommands = "i3lock -u -c 1d1f21 -i /home/fazo/Pictures/background.jpg"; }; time.timeZone = "Europe/Rome"; virtualisation.virtualbox.host.enable = true; # Networking networking.hostName = "warren"; networking.hostId = "476783f8"; networking.wireless.enable = true; networking.connman.enable = true; i18n = { consoleFont = "lat9w-16"; consoleKeyMap = "it"; defaultLocale = "it_IT.UTF-8"; }; # Packages nixpkgs.config = { allowUnfree = true; packageOverrides = pkgs: { ncmpcpp = pkgs.ncmpcpp.override { outputsSupport = true; visualizerSupport = true; clockSupport = true; }; chromium = pkgs.chromium.override { enablePepperFlash = true; }; }; }; environment.systemPackages = with pkgs; [ # Development atom git nodejs (haskellPackages.ghcWithPackages (hs: with hs; [ cabal-install ] )) # Libs and Tools xsel urxvt_perls xclip python34Packages.udiskie encfs # Desktop Environment helpers dmenu bar-xft i3lock sxhkd # Games minecraft steam dwarf_fortress # Applications neovim ranger weechat bc w3m gnupg zathura go14Packages.ipfs.bin tmux htop rxvt_unicode pandoc mosh ncdu cv pv tree screenfetch scrot iotop iftop # Desktop Applications chromium libreoffice gparted # Media beets mpd mpc_cli ncmpcpp popcorntime mpv # Drivers, file systems and other compatibility-aimed packages ntfs3g exfat utillinuxCurses gptfdisk encfs xlibs.xbacklight acpi ]; fonts = { enableFontDir = true; enableGhostscriptFonts = true; fonts = with pkgs; [ gohufont inconsolata dejavu_fonts ]; }; # Services services = { # SSH openssh = { enable = true; permitRootLogin = "no"; passwordAuthentication = false; }; # Desktop Environment xserver = { enable = true; layout = "it"; windowManager.bspwm.enable = true; desktopManager.xterm.enable = false; desktopManager.default = "none"; displayManager.desktopManagerHandlesLidAndPower = false; windowManager.default = "bspwm"; multitouch = { enable = true; invertScroll = true; }; synaptics = { enable = true; }; }; logind.extraConfig = '' handlePowerKey=ignore ''; upower.enable = true; tlp = { enable = true; extraConfig = '' CPU_SCALING_GOVERNOR_ON_AC=performance CPU_SCALING_GOVERNOR_ON_BAT=powersave ''; }; mpd = { enable = true; user = "fazo"; group = "users"; dataDir = "/home/fazo/.config/mpd"; musicDirectory = "/home/fazo/Music"; extraConfig = '' audio_output { type "fifo" name "FIFO" path "/tmp/mpd.fifo" format "44100:16:1" } audio_output { type "alsa" name "Fazo-PC" mixer_type "software" } ''; }; redshift = { enable = true; latitude = "9.6"; longitude = "45.47"; }; syncthing = { enable = true; user = "fazo"; dataDir = "/home/fazo/.config/syncthing"; }; }; # Custom Services systemd.services.ipfs = { after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; path = [ pkgs.bash pkgs.fuse ]; serviceConfig = { User = "fazo"; ExecStart = "${pkgs.go14Packages.ipfs.bin}/bin/ipfs daemon --init"; }; }; # User environment programs.zsh = { enable = true; shellInit = "export ZDOTDIR=~/.config/zsh"; }; programs.kbdlight.enable = true; users.extraUsers.fazo = { isNormalUser = true; extraGroups = [ "wheel" "transmission" "vboxusers" ]; uid = 1000; shell = "/run/current-system/sw/bin/zsh"; openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIqHaL0uH1ko/jLI3JeetD4bITUF34IE9HTEvF2Go8JYbhk3YSsG0/EoNu8dhA35S45Y7TXUk/K0axcqmFUePVwY271b7L+9I7/ehUg1wHOaNLCf/ueAyRfo5ZUHuH1YnTg9TinwVi0dynjVMaaVDR1YWVgzuw0KTEDW5em5m+jRbDvFrrq72D2GD/fYqkc2Z/cmnRijMi26PCF1xTq4g6BlIUYloCN+ZlDRvkSWiqCcFD3a/QOZXsUBVg80K4QrHVwj4+Bu2M1KDLhmW+8fzMkbwzKumUFt9SwcQh5Tq/MQfzSWOO2wtn1sys0BDKGazJwn9gMFNkcFbRsD5Uqcgh fazo@mac.lan" ]; }; }