Skip to content

Instantly share code, notes, and snippets.

@ProofOfPizza
Last active February 5, 2021 14:36
Show Gist options
  • Save ProofOfPizza/2ea408a102aea2ba607ed81f59bdd345 to your computer and use it in GitHub Desktop.
Save ProofOfPizza/2ea408a102aea2ba607ed81f59bdd345 to your computer and use it in GitHub Desktop.
#{ config, pkgs ? import (fetchTarball https://github.com/NixOS/nixpkgs/archive/7ed3d2df76cd1f637c6163858ac0e1db9cdf7b00.tar.gz) {}, ... }:
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
# ./systemPackages.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.luks.devices = {
luksroot = {
device="/dev/disk/by-uuid/20261c85-34fe-42c5-b8aa-03a967132a70"; # This is where you enter the UUID of the crypto_LUKS disk.
preLVM=true;
};
};
# networking.hostName = "nixos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Set your time zone.
# time.timeZone = "Europe/Amsterdam";
# 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.wlp2s0.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.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# };
systemd.user.services."dunst" = {
enable = true;
wantedBy = [ "default.target" ];
serviceConfig.Restart = "always";
serviceConfig.ExecStart = "${pkgs.dunst}/bin/dunst";
};
location.latitude = 51.92;
location.longitude = 4.47;
services = {
# Enable touchpad support (enabled default in most desktopManager).
xserver.libinput.enable = true;
# Enable the OpenSSH daemon.
openssh.enable = true;
printing.enable = true;
redshift = {
enable= true;
temperature.day = 5700;
temperature.night = 3000;
};
gnome3.gnome-keyring.enable = true;
};
virtualisation = {
docker.enable = true;
docker.enableOnBoot = true;
};
environment.shells = [ pkgs.zsh pkgs.bash ];
programs.vim.defaultEditor = true;
fonts.fonts = [ pkgs.powerline-fonts ];
fonts.enableFontDir = true;
fonts.enableDefaultFonts = true;
fonts.fontconfig.enable = true;
fonts.fontconfig.defaultFonts.monospace = [ "Inconsolata-g for Powerline:h15" ];
console.font = "Meslo for Powerline:h16";
time.timeZone = "Europe/Amsterdam";
networking.networkmanager.enable = true;
# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.mutableUsers = false;
users.extraUsers.chai = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "docker" ]; # Enable ‘sudo’ for the user.
uid = 1000;
createHome = true;
hashedPassword = "$6$XZiV7Wrf$iWgXELwcwrxmBV07MpvANheHEiHAz5PYfacGqH3fqsJIOrFYRV35kJT2tPPiGZFfMizN8rBph693JCYgvOS6a1";
home = "/home/chai";
shell = pkgs.zsh;
};
# from other sources:
nixpkgs.config.allowUnfree = true;
environment.pathsToLink = [ "/libexec" ]; # links /libexec from derivations to /run/current-system/sw
services.xserver = {
enable = true;
desktopManager = {
xterm.enable = false;
};
displayManager = {
defaultSession = "none+i3";
};
windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
extraPackages = with pkgs; [
dmenu #application launcher most people use
i3status # gives you the default i3 status bar
i3lock #default i3 screen locker
i3blocks #if you are planning on using i3blocks over i3status
];
};
};
environment.systemPackages = with pkgs; [
wget
neovim
firefox
];
system.stateVersion = "20.09"; # Did you read the comment?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment