Last active
November 15, 2019 01:58
-
-
Save fehu/986151c80f51ce8035a7905de20e4ef6 to your computer and use it in GitHub Desktop.
NixOS config
This file contains hidden or 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, ... }: | |
let | |
all-hies = import (fetchTarball "https://github.com/infinisil/all-hies/tarball/master") {}; | |
in { | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix | |
]; | |
# Use the GRUB 2 boot loader. | |
boot.loader.grub.enable = true; | |
# boot.loader.grub.version = 2; | |
boot.loader.grub.efiSupport = true; | |
boot.loader.grub.efiInstallAsRemovable = true; | |
# boot.loader.grub.efiInstallAsRemovable = true; | |
# boot.loader.efi.efiSysMountPoint = "/boot/efi"; | |
# Define on which hard drive you want to install Grub. | |
boot.loader.grub.device = "nodev"; # for efi only | |
# networking.hostName = "nixos"; # Define your hostname. | |
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. | |
# The global useDHCP flag is deprecated, therefore explicitly set to false here. | |
# Per-interface useDHCP will be mandatory in the future, so this generated config | |
# replicates the default behaviour. | |
networking.useDHCP = false; | |
# networking.interfaces.enp0s3.useDHCP = true; | |
# Configure network proxy if necessary | |
# networking.proxy.default = "http://user:password@proxy:port/"; | |
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; | |
# Select internationalisation properties. | |
# i18n = { | |
# consoleFont = "Lat2-Terminus16"; | |
# consoleKeyMap = "us"; | |
# defaultLocale = "en_US.UTF-8"; | |
# }; | |
# Set your time zone. | |
time.timeZone = "America/Mexico_City"; | |
# List packages installed in system profile. To search, run: | |
# $ nix search wget | |
nixpkgs.config.allowUnfree = true; | |
environment.systemPackages = with pkgs; [ | |
# system | |
wget git gnumake mkpasswd | |
# xmonad | |
xmobar dmenu | |
# web | |
chromium | |
# media | |
deadbeef feh flac vlc | |
# editors | |
vim kate atom jetbrains.idea-community | |
# Haskell | |
ghc cabal-install stack | |
(all-hies.selection { selector = p: { inherit (p) ghc865; }; }) | |
# Scala | |
scala sbt ammonite visualvm | |
# keybase | |
keybase-gui | |
# comm | |
slack | |
# graphics | |
gimp inkscape | |
# docker | |
docker-compose | |
# kube | |
kubectl kubectx | |
# aws | |
awscli aws-iam-authenticator | |
# games | |
steam | |
# misc | |
xtrlock-pam | |
]; | |
# Some programs need SUID wrappers, can be configured further or are | |
# started in user sessions. | |
# programs.mtr.enable = true; | |
# programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; | |
programs = { | |
zsh.enable = true; | |
zsh.ohMyZsh = { | |
enable = true; | |
plugins = [ "git" "git-remote-branch" "extract" "stack" "cabal" "sudo" "dirhistory" "z" ]; | |
theme = "lambda"; | |
}; | |
java.enable = true; | |
chromium.enable = true; | |
}; | |
# List services that you want to enable: | |
# Enable the OpenSSH daemon. | |
# services.openssh.enable = true; | |
# Open ports in the firewall. | |
# networking.firewall.allowedTCPPorts = [ ... ]; | |
# networking.firewall.allowedUDPPorts = [ ... ]; | |
# Or disable the firewall altogether. | |
# networking.firewall.enable = false; | |
# Enable CUPS to print documents. | |
# services.printing.enable = true; | |
# Enable sound. | |
sound.enable = true; | |
hardware.pulseaudio.enable = true; | |
hardware.pulseaudio.support32Bit = true; | |
# Enable the X11 windowing system. | |
services.xserver.enable = true; | |
services.xserver.xkbModel = "pc105"; | |
services.xserver.layout = "us, ru"; | |
services.xserver.xkbVariant = "altgr-intl, "; | |
services.xserver.xkbOptions = "grp:caps_toggle, grp_led:caps, terminate:ctrl_alt_bksp"; | |
# services.xserver.layout = "us"; | |
# services.xserver.xkbOptions = "eurosign:e"; | |
# Enable touchpad support. | |
# services.xserver.libinput.enable = true; | |
# services.xserver.displayManager.sddm.enable = true; | |
services.xserver.windowManager.default = "xmonad"; | |
services.xserver.windowManager.xmonad.enable = true; | |
services.xserver.windowManager.xmonad.enableContribAndExtras = true; | |
services.xserver.windowManager.xmonad.config = /etc/xmonad/xmonad.hs; | |
services.xserver.desktopManager.gnome3.enable = true; | |
# services.gnome3.chrome-gnome-shell.enable; | |
# environment.gnome3.excludePackages = [ pkgs.gnome3.totem pkgs.gnome3.gnome-music pkgs.gnome3.gnome-contacts pkgs.gnome3.geary ]; | |
# services.gnome3.chrome-gnome-shell.enable; | |
services.xserver.videoDrivers = [ "nvidia" ]; | |
hardware.opengl.driSupport32Bit = true; | |
services.kbfs.enable = true; | |
services.keybase.enable = true; | |
services.neo4j.enable = true; | |
services.postgresql.enable = true; | |
virtualisation.docker.enable = true; | |
# Define a user account. Don't forget to set a password with ‘passwd’. | |
users.mutableUsers = false; | |
users.users.fehu = { | |
isNormalUser = true; | |
shell = pkgs.zsh; | |
home = "/home/fehu"; | |
extraGroups = [ "wheel" "video" "networkmanager" "docker" ]; | |
hashedPassword = import ./secret.users.fehu.hashedPassword; | |
}; | |
# 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 = "19.09"; # Did you read the comment? | |
} |
This file contains hidden or 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
# Do not modify this file! It was generated by ‘nixos-generate-config’ | |
# and may be overwritten by future invocations. Please make changes | |
# to /etc/nixos/configuration.nix instead. | |
{ config, lib, pkgs, ... }: | |
{ | |
imports = [ ]; | |
boot.initrd.availableKernelModules = [ "ata_piix" "ohci_pci" "sd_mod" "sr_mod" ]; | |
boot.initrd.kernelModules = [ ]; | |
boot.kernelModules = [ ]; | |
boot.extraModulePackages = [ ]; | |
fileSystems."/" = | |
{ device = "/dev/disk/by-label/nixos"; | |
fsType = "ext4"; | |
}; | |
# fileSystems."/boot" = | |
# { device = "/dev/disk/by-label/boot"; | |
# fsType = "fat32"; | |
# }; | |
fileSystems."/var" = | |
{ device = "/dev/disk/by-label/nixos-var"; | |
fsType = "ext4"; | |
}; | |
fileSystems."/home" = | |
{ device = "/dev/disk/by-label/home"; | |
fsType = "ext4"; | |
}; | |
swapDevices = [ { device = "/dev/disk/by-label/swap"; } ]; | |
nix.maxJobs = lib.mkDefault 8; | |
# virtualisation.virtualbox.guest.enable = true; | |
} |
This file contains hidden or 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
mount /dev/disk/by-label/nixos /mnt/ | |
mount /dev/disk/by-label/nixos-var /mnt/var/ | |
mount /dev/disk/by-label/home /mnt/home/ | |
mount /dev/disk/by-label/boot /mnt/boot/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment