Skip to content

Instantly share code, notes, and snippets.

@freddie-freeloader
Created May 1, 2019 16:19
Show Gist options
  • Save freddie-freeloader/0b8ae1824c180a665532c272a84f92e8 to your computer and use it in GitHub Desktop.
Save freddie-freeloader/0b8ae1824c180a665532c272a84f92e8 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
./ssd-configuration.nix
./users.nix <home-manager/nixos>
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# NOTE ON NETWORKING:
# networkmanager was not able to connect to WLAN network and re-prompted the
# password box every time. The problem seemed to be that - for some reason -
# wpa_supplicant was still running after `nixos-rebuild switch`. So kill it
# first and then do `systemctl restart network-manager` and then maybe, maybe
# it works again. :D
networking.hostName = "citadel"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true;
#networking.networkmanager.networks = {
# little_kittens = { psk = "are_so_sweet"; };
#};
networking.firewall.enable = 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_GB.UTF-8";
};
# Set your time zone.
time.timeZone = "Europe/Berlin";
services.emacs.enable = true;
fonts.fonts = with pkgs; [
iosevka-bin
unifont
font-awesome_5
];
nixpkgs.config = {
packageOverrides = pkgs: rec {
polybar = pkgs.polybar.override {
i3Support = true;
};
};
};
environment.systemPackages = with pkgs; [
##################
# Nicer defaults #
##################
bat # replaces cat
prettyping # replaces ping
fzf # replaces backward search
skim # replaces backward search
htop # replaces top
tldr # shorter man
noti # Notify when done with something
autorandr
dunst
notify-desktop
elinks # For reading html mails in mutt
aspell
aspellDicts.de
aspellDicts.en
aspellDicts.en-computers
redshift
wget
neovim
firefox
networkmanager
networkmanagerapplet
home-manager
git
gnome3.gnome-terminal
haskellPackages.gitit
shutter
signal-desktop
zathura
polybar
killall
rofi
pmutils # Needed for handling closing of lid
];
nixpkgs.config.allowUnfree = true;
#nixpkgs.config.firefox = {
# enableAdobeFlash = true;
#};
# 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; };
# 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.layout = "gb";
services.xserver.xkbOptions = "caps:escape, compose:prsc";
services.xserver.xkbModel = "pc105";
services.upower.enable = true;
# Enable touchpad support.
services.xserver.libinput.enable = true;
services.xserver.libinput.disableWhileTyping = true;
services.xserver.synaptics = {
twoFingerScroll = true;
vertTwoFingerScroll = true;
horizTwoFingerScroll = true;
};
services.xserver.desktopManager = {
default = "xfce";
xterm.enable = false;
xfce = {
enable = true;
noDesktop = true;
enableXfwm = false;
};
};
services.xserver.displayManager.lightdm.enable = true;
services.xserver.windowManager.i3 = {
enable = true;
configFile = "/home/jub/.i3/config"; # TODO: Does not work ATM for some reason
package = pkgs.i3-gaps;
extraPackages = with pkgs; [
dmenu
i3status
i3lock
];
};
services.nixosManual.showManual = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.jub = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user.
};
# 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.03"; # Did you read the comment?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment