Created
October 19, 2017 19:15
-
-
Save anonymous/32d54678a7119a050786e9e9adbf6c2a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ | |
./hardware-configuration.nix | |
]; | |
# The NixOS release to be compatible with for stateful data such as databases. | |
system.stateVersion = "17.09"; | |
# Environment | |
environment.etc.hosts.enable = false; | |
# Allow Unfree Packages | |
nixpkgs.config.allowUnfree = true; | |
# Shell Locales | |
i18n = { | |
#consoleFont = "Lat2-Terminus16"; | |
consoleKeyMap = "us"; | |
defaultLocale = "en_US.UTF-8"; | |
}; | |
# Time | |
time.timeZone = "Europe/Prague"; | |
# Boot Configuration | |
boot.loader.systemd-boot.enable = true; | |
boot.extraModprobeConfig = "options snd_hda_intel power_save_controler=N"; | |
boot.earlyVconsoleSetup = true; | |
boot.plymouth = { | |
enable = false; | |
theme = "spinner"; | |
}; | |
boot.initrd.luks.devices = [ | |
{ name = "rootfs"; | |
device = "/dev/sda4"; | |
preLVM = true; | |
} | |
]; | |
# Hardware Configuration | |
hardware.enableAllFirmware = true; | |
#hardware.pulseaudio.configFile = "/home/burim/default.pa"; | |
hardware.bluetooth.enable = true; | |
# Networking | |
networking.hostName = "nixOs"; | |
networking.networkmanager.enable = true; | |
networking.nameservers = [ "127.0.0.1" ]; | |
#networking.extraResolvconfConf = ''name_servers=127.0.0.1 | |
#name_servers_append=::FFFF:127.0.0.1''; | |
networking.firewall.allowPing = false; | |
# OpenSSH daemon. | |
services.openssh.enable = false; | |
# Firewall | |
networking.firewall.enable = true; | |
# Open ports in the firewall. | |
# networking.firewall.allowedTCPPorts = [ ... ]; | |
# networking.firewall.allowedUDPPorts = [ ... ]; | |
# List packages installed in system profile. | |
# environment.systemPackages = with pkgs; [ | |
# curl | |
# ] | |
# Systemd Services | |
services.dnscrypt-proxy = { | |
enable = true; | |
localPort = 53; | |
resolverName = ''dnscrypt.eu-nl''; | |
}; | |
# Tor Service Configuration | |
services.tor = { | |
enable = true; | |
controlPort = 9061; | |
}; | |
services.tor.client = { | |
enable = true; | |
socksListenAddress = ''9051''; | |
socksListenAddressFaster = ''9251''; | |
socksPolicy = null; | |
privoxy.enable = true; | |
}; | |
services.tor.relay = { | |
enable = false; | |
accountingMax = null; | |
nickname = ''anonymous''; | |
contactInfo = null; | |
}; | |
# Enable CUPS to print documents. | |
# services.printing.enable = true; | |
# User Accounts | |
users.extraUsers.burim = { | |
isNormalUser = true; | |
home = "/home/burim"; | |
description = "Burim Augustin Berisa"; | |
extraGroups = [ "wheel" "networkmanager" "dnscrypt-proxy" ]; | |
}; | |
# X Window System | |
services.xserver = { | |
enable = true; | |
autorun = false; | |
videoDrivers = [ "nouveau" ]; | |
layout = "us"; | |
}; | |
services.xserver.desktopManager.gnome3.enable = true; | |
services.xserver.windowManager.i3.enable = true; | |
services.xserver.displayManager.gdm = { | |
enable = true; | |
}; | |
services.xserver.desktopManager.default = "i3"; | |
services.xserver.desktopManager.session = | |
[ { manage = "desktop"; | |
name = "i3"; | |
start = '' | |
${pkgs.i3}/bin/i3 & | |
waitPID=$! | |
''; | |
} | |
]; | |
services.xserver.libinput = { | |
enable = true; | |
accelProfile = "adaptive"; | |
accelSpeed = "-0.9"; | |
naturalScrolling = true; | |
scrollMethod = "twofinger"; | |
disableWhileTyping = false; | |
}; | |
#environment.sessionVariables = { | |
# GTK_DATA_PREFIX = [ "/home/burim/.nix-profile" ]; | |
#}; | |
virtualisation.virtualbox.host.enable = true; | |
# services.udev.extraRules = '' | |
# SUBSYSTEM=="backlight",RUN+="/run/current-system/sw/bin/chgrp video /sys/class/backlight/%k/brightness /sys/class/backlight/%k/actual_brightness /sys/class/backlight/%k/bl_power",RUN+="/run/current-system/sw/bin/chmod 664 /sys/class/backlight/%k/brightness /sys/class/backlight/%k/bl_power" | |
# ''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment