Last active
November 27, 2017 17:05
-
-
Save petersjt014/da69a634af3f84f52e189ee764ca0688 to your computer and use it in GitHub Desktop.
wip nix config; has video driver issues + rendering artifacts
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
# 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 | |
]; | |
# <nixos/modules/installer/scan/not-detected.nix> (?) | |
# file:///nix/store/v44h2if5y45q78k96q06ql06snibj6j0-nixos-manual/share/doc/nixos/index.html#sec-uefi-installation | |
# https://zimbatm.com/journal/2016/09/09/nixos-window-dual-boot/ | |
nixpkgs.config.allowUnfree = true; | |
# TODO: make paste on txti.es/pastebin/any other that does custom urls, also znet/ipfs | |
# TODO: (!) get wireless working; initialhashedpassword dont do; get windows in grub list | |
# also sexyify grub list with rEFInd or something | |
# https://gist.github.com/AcouBass/4f5bcb3410f14bd5063a718b1d53bc4c | |
# https://www.reddit.com/r/NixOS/comments/31lx3i/windows_and_nixos_dual_boot | |
# https://zimbatm.com/journal/2016/09/09/nixos-window-dual-boot | |
# https://nixos.org/nix-dev/2011-July/006400.html | |
# file:///nix/store/v44h2if5y45q78k96q06ql06snibj6j0-nixos-manual/share/doc/nixos/options.html#opt-networking.supplicant | |
# file:///nix/store/v44h2if5y45q78k96q06ql06snibj6j0-nixos-manual/share/doc/nixos/options.html#opt-networking.wicd.enable | |
# file:///nix/store/v44h2if5y45q78k96q06ql06snibj6j0-nixos-manual/share/doc/nixos/options.html#opt-networking.wireless.driver | |
# laranxa wpa_supplicant[8543]: Failed to open config file '/etc/wpa_supplicant.conf', error: No such file or directory | |
# maybe not prob anymore | |
# programs.chromium.defaultSearchProviderSuggestURL | |
# services.xserver.libinput.additionalOptions | |
# !! services.xserver.multitouch.additionalOptions | |
networking.networkmanager.enable = true; | |
boot.loader.grub = { | |
enable = true; | |
version = 2; | |
device = "/dev/sda"; # or "nodev" for efi only | |
#efiSupport = true; | |
#efiInstallAsRemovable = true; | |
configurationLimit = 5; | |
}; | |
networking.hostName = "laranxa"; # Define your hostname. | |
# Select internationalisation properties. | |
i18n = { | |
consoleFont = "Lat2-Terminus16"; | |
consoleKeyMap = "us"; | |
defaultLocale = "en_US.UTF-8"; | |
}; | |
# Set your time zone. | |
time.timeZone = "America/Chicago"; | |
environment = { | |
variables.EDITOR="nano"; | |
}; | |
# List packages installed in system profile. To search by name, run: | |
# $ nix-env -qaP | grep wget | |
environment.systemPackages = with pkgs; [ | |
acpi acpitool falkon fzf illum | |
git gparted heatseeker htop hwinfo | |
kate lynx nix-repl nnn p7zip | |
sakura testdisk tmux wget mkpasswd | |
networkmanager xorg.xbacklight | |
#mosh rofi xarchiver | |
]; | |
services.redshift = { | |
enable = true; | |
latitude = "43.0389"; | |
longitude = "87.9065"; | |
temperature = { | |
day = 5500; | |
night = 3250; | |
}; | |
brightness = { | |
day = "0.80"; | |
night = "0.35"; | |
}; | |
}; | |
# Some programs need SUID wrappers, can be configured further or are | |
# started in user sessions. | |
programs.bash.enableCompletion = true; | |
programs.mtr.enable = true; | |
# programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; | |
programs.nano.syntaxHighlight = true; | |
# Enable the OpenSSH daemon. | |
services.openssh = { | |
enable = true; | |
passwordAuthentication = true; | |
allowSFTP = true; | |
ports = [ 22 ]; | |
}; | |
# Open ports in the firewall. | |
networking.firewall.allowedTCPPorts = [ 22 ]; | |
networking.firewall.allowedUDPPorts = [ 22 ]; | |
# Or disable the firewall altogether. | |
# networking.firewall.enable = false; | |
security.rngd.enable = true; | |
security.sudo.enable = true; | |
powerManagement.powertop.enable = true; | |
#TODO: CJDNS things (move by netwrk; also try for vanity address) | |
#TODO: services.kbfs.* | |
#TODO: onioncat?; also: comb options page in manual for interesting stuff | |
# Enable CUPS to print documents. | |
services.printing.enable = true; | |
# Enable the X11 windowing system. | |
# more stuff here related to keylights(?) | |
services.xserver = { | |
enable = true; | |
layout = "us"; | |
xkbOptions = "eurosign:e"; | |
libinput.enable = true; | |
displayManager.sddm.enable = true; | |
desktopManager.plasma5.enable = true; | |
videoDrivers = [ "ati_unfree" ]; | |
#deviceSection = '' | |
# Identifier "Card0" | |
# Driver "intel" | |
# Option "Backlight" "intel_backlight" | |
#''; | |
}; | |
sound.mediaKeys = { | |
enable = true; | |
volumeStep = "5%"; | |
}; | |
services.actkbd = { | |
enable = true; | |
bindings = [ | |
# "Mute" media key | |
{ keys = [ 121 ]; events = [ "key" ]; command = "${pkgs.alsaUtils}/bin/amixer -q set Master toggle"; } | |
# "Lower Volume" media key | |
{ keys = [ 122 ]; events = [ "key" "rep" ]; command = "${pkgs.alsaUtils}/bin/amixer -q set Master ${config.sound.mediaKeys.volumeStep}- unmute"; } | |
# "Raise Volume" media key | |
{ keys = [ 123 ]; events = [ "key" "rep" ]; command = "${pkgs.alsaUtils}/bin/amixer -q set Master ${config.sound.mediaKeys.volumeStep}+ unmute"; } | |
]; | |
}; | |
services.illum.enable = true; | |
services.acpid.enable = true; | |
hardware.pulseaudio.systemWide = true; | |
users.extraUsers.josh = { | |
isNormalUser = true; | |
uid = 1000; | |
extraGroups = ["wheel" "networkmanager" "video"]; | |
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9XttuZZylyWAq9QvzoOpxxSLZchxYE9qcBYlwKXluF ed25519-key-20171101 [josh]"]; | |
initialHashedPassword = "$6$SFdBtvtp$tdhwhRYrEfZv0PWHYVnj2j2US/6GLTGe5geomh1cz2P.Gta9fU3Mmbk5HAxpmD2I32FlC0zPOMv/eRhXX9iY70:17496::::::"; | |
}; | |
# This value determines the NixOS release with which your system is to be | |
# compatible, in order to avoid breaking some software such as database | |
# servers. You should change this only after NixOS release notes say you | |
# should. | |
system.stateVersion = "17.09"; # Did you read the comment? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment