Skip to content

Instantly share code, notes, and snippets.

@tosmi
Created July 7, 2017 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tosmi/4de7b57e2fc7d2055c9b2f25640462a4 to your computer and use it in GitHub Desktop.
Save tosmi/4de7b57e2fc7d2055c9b2f25640462a4 to your computer and use it in GitHub Desktop.
# 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 gummiboot efi boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.luks.devices = [ { name = "cryptroot"; device = "/dev/sda2"; allowDiscards = true; } ];
boot.initrd.kernelModules = [ "cifs" ];
boot.kernelPackages = pkgs.linuxPackages_4_9;
boot.blacklistedKernelModules = [ "snd_soc_skl" "snd_soc_skl_ipc" "snd_soc_sst_dsp" ];
networking.hostName = "steve"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Select internationalisation properties.
# i18n = {
# consoleFont = "Lat2-Terminus16";
# consoleKeyMap = "us";
# defaultLocale = "en_US.UTF-8";
# };
# Set your time zone.
time.timeZone = "Europe/Vienna";
# Allow unfree pkgs
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs; [
wget
curl
firefox
emacs
i3
i3status
dmenu
vim
git
gnumake
gcc
gnupg21
pciutils
zeal
sysstat
libreoffice
xscreensaver
];
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.openssh.permitRootLogin = "no";
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.layout = "us";
services.xserver.xkbOptions = "eurosign:e";
services.xserver.windowManager.i3.enable = true;
services.cron.enable = true;
services.openssh.forwardX11 = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.extraUsers.pinhead = {
isNormalUser = true;
uid = 1000;
group = "pinhead";
extraGroups = [ "wheel" "docker" "vboxusers" "audio" ];
};
users.extraUsers.pinssh = {
isNormalUser = true;
uid = 1001;
group = "pinssh";
openssh.authorizedKeys.keys = [ "no-X11-forwarding,no-pty,no-agent-forwarding ssh-rsa ... ];
};
users.groups.pinhead = {
gid = 1000;
};
users.groups.pinssh = {
gid = 1001;
};
# The NixOS release to be compatible with for stateful data such as databases.
system.stateVersion = "16.09";
virtualisation.docker.enable = true;
virtualisation.virtualbox.host.enable = true;
hardware.pulseaudio.enable = true;
services.xserver.displayManager.slim = {
enable = true;
theme = pkgs.fetchurl {
url = "https://github.com/edwtjo/nixos-black-theme/archive/v1.0.tar.gz";
sha256 = "13bm7k3p6k7yq47nba08bn48cfv536k4ipnwwp1q1l2ydlp85r9d";
};
};
fonts = {
enableFontDir = true;
enableGhostscriptFonts = true;
fonts = with pkgs; [
inconsolata # monospaced
terminus_font
];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment