Created
November 14, 2017 18:12
-
-
Save tomster/1a6d26d7ccd9d071dad80e1d54202e57 to your computer and use it in GitHub Desktop.
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, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix | |
]; | |
# Use the GRUB 2 boot loader (for ZFS) | |
boot.loader.systemd-boot.enable = true; | |
boot.loader.efi.canTouchEfiVariables = true; | |
boot.loader.grub.device = "/dev/nvme0n1"; | |
boot.initrd.luks.devices = [{ | |
name = "root"; | |
device = "/dev/nvme0n1p2"; | |
preLVM = true; | |
allowDiscards = true; | |
}]; | |
boot.supportedFilesystems = [ "zfs" ]; | |
nixpkgs.config.allowUnfree = true; | |
networking.hostName = "karbon"; | |
# set hostid for zfs | |
networking.hostId = "8425e349"; | |
networking.networkmanager.enable = true; | |
security.sudo.wheelNeedsPassword = false; | |
# Set your time zone. | |
time.timeZone = "Europe/Berlin"; | |
# List packages installed in system profile. To search by name, run: | |
# $ nix-env -qaP | grep wget | |
environment.systemPackages = with pkgs; [ | |
i3 | |
rofi | |
fish | |
]; | |
# use fish as shell | |
programs.fish.enable = true; | |
# enable virtualbox host | |
# virtualisation = { | |
# virtualbox = { | |
# host.enable = true; | |
# # disable hardening to allow running as non-root | |
# host.enableHardening = false; | |
# }; | |
# libvirtd.enable = true; | |
#}; | |
# Enable the OpenSSH daemon. | |
services.openssh.enable = true; | |
# disable the firewall | |
networking.firewall.enable = false; | |
# Enable the X11 and use i3 | |
services.xserver = { | |
enable = true; | |
layout = "gb"; | |
libinput.enable = true; | |
synaptics.enable = false; | |
# services.xserver.xkbOptions = "eurosign:e"; | |
config = '' | |
Section "InputClass" | |
Identifier "Enable libinput for TrackPoint" | |
MatchIsPointer "on" | |
Driver "libinput" | |
EndSection | |
''; | |
windowManager.i3.enable = true; | |
}; | |
# Define initial user account. Don't forget to set a password with ‘passwd’. | |
users.extraUsers.tomster = { | |
isNormalUser = true; | |
uid = 1000; | |
extraGroups = [ "wheel" "vboxusers" "libvirtd" "networkmanager" ]; | |
shell = pkgs.fish; | |
initialPassword = "changeme"; | |
}; | |
# 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? | |
system.autoUpgrade.enable = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment