Skip to content

Instantly share code, notes, and snippets.

@castleberrysam
Created May 4, 2020 06:08
Show Gist options
  • Save castleberrysam/bc493edb2f5bc7f21ed7a2d6da66d14c to your computer and use it in GitHub Desktop.
Save castleberrysam/bc493edb2f5bc7f21ed7a2d6da66d14c 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 = [ ./hardware-configuration.nix ];
# Use the systemd-boot EFI boot loader.
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = false;
grub.device = "/dev/sda";
};
# Networking configuration
networking = {
hostName = "ThinkPad-T470";
networkmanager = {
enable = true;
dhcp = "dhcpcd";
};
useDHCP = false;
interfaces = {
enp0s31f6.useDHCP = true;
wlp4s0.useDHCP = true;
};
# firewall.allowedTCPPorts = [ ... ];
# firewall.allowedUDPPorts = [ ... ];
};
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
# Set your time zone.
time.timeZone = "America/Chicago";
# 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;
pinentryFlavor = "gnome3";
};
# Enable CUPS to print documents.
# services.printing.enable = true;
# Sound configuration
sound.enable = true;
hardware.pulseaudio.enable = true;
# X11 configuration
services.xserver = {
enable = true;
layout = "us";
libinput = {
enable = true;
tapping = false;
};
windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
};
};
services.upower = {
enable = true;
percentageLow = 20;
percentageCritical = 10;
percentageAction = 5;
};
services.journald.extraConfig = "Storage=volatile";
virtualisation.virtualbox.host = {
enable = true;
enableExtensionPack = true;
};
fonts.fonts = with pkgs; [
terminus_font
corefonts
];
users.users.sam = {
uid = 1000;
group = "sam";
shell = pkgs.bashInteractive;
home = "/home/sam";
createHome = true;
extraGroups = [ "users" "wheel" "sudo" "vboxusers" ];
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "20.03"; # Did you read the comment?
# Enable use of proprietary packages
nixpkgs.config.allowUnfree = true;
environment.etc = {
"sensors.d/50_ignore_temp2.conf".text = ''
chip "thinkpad-isa-0000"
ignore temp2
'';
};
environment.systemPackages = with pkgs; [
# system packages
networkmanager
# X11
# remember to add new font packages to fonts.fonts)
corefonts
terminus_font
xorg.xf86inputlibinput
# desktop environment
i3-gaps
i3blocks acpi playerctl sysstat lm_sensors
dunst libnotify
networkmanagerapplet
xfce.xfce4-power-manager xfce.xfconf upower
nitrogen
redshift
# graphical applications
firefox-unwrapped
spotify
audacious
guvcview
pavucontrol
libreoffice
zoom-us
gnome3.evince
gnome3.eog
gnome3.gnome-screenshot
# virutalization and emulation
wineWowPackages.staging
# https://github.com/NixOS/nixpkgs/issues/76108
#virtualbox
# editors and terminal emulators
emacs
eclipses.eclipse-java
rxvt-unicode
# command line tools
gcc binutils
gcc-arm-embedded
gdb-multitarget
gnumake
autoconf automake
file
p7zip
htop
parted
# password manager
pass gnupg
# graphviz tools
graphviz
python38Packages.xdot
# xorg tools
xfontsel
xorg.xev
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment