Skip to content

Instantly share code, notes, and snippets.

@FintanH
Last active November 21, 2020 12:04
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 FintanH/ae67d653d7d05434d89cf42fe800a01a to your computer and use it in GitHub Desktop.
Save FintanH/ae67d653d7d05434d89cf42fe800a01a 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’).
# Edit this configuration file to define what should be installed on
# Edit this configuration file to define what should be installed on
{ config, pkgs, options, ... }:
{
imports =
[ # thinkpad
<nixos-hardware/lenovo/thinkpad>
<nixos-hardware/lenovo/thinkpad/x1>
<nixos-hardware/lenovo/thinkpad/x1/7th-gen>
# Include the results of the hardware scan.
./hardware-configuration.nix
# ./gnome.nix
# Include cachix
./cachix.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_testing;
boot.kernelModules = [ "acpi" "acpi_call" ];
# Allow non-free firmware, such as for intel wifi
hardware = {
enableRedistributableFirmware = true;
};
# NetworkManager
networking.networkmanager.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";
# Configure network time server
networking.timeServers = options.networking.timeServers.default ++ [ "ntp.example.com" ];
# Select internationalisation properties.
# i18n = {
# consoleFont = "Lat2-Terminus16";
# consoleKeyMap = "us";
# defaultLocale = "en_US.UTF-8";
# };
# Set your time zone.
time.timeZone = "Europe/Dublin";
# Allow unfree
nixpkgs.config.allowUnfree = true;
# zsh settings
# Enable zsh
programs.zsh.enable = true;
# Enable Oh-my-zsh
programs.zsh.ohMyZsh = {
enable = true;
plugins = [ "git" "sudo" ];
};
programs.zsh.interactiveShellInit = ''
export ZSH=${pkgs.oh-my-zsh}/share/oh-my-zsh/
# Customize your oh-my-zsh options here
ZSH_THEME="lambda"
plugins=(git)
source $ZSH/oh-my-zsh.sh
'';
programs.zsh.promptInit = ""; # Clear this to avoid a conflict with oh-my-zsh
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
exfat
firefox
gcc
spotify
libGL
(let neuronSrc = builtins.fetchTarball "https://github.com/srid/neuron/archive/master.tar.gz";
in import neuronSrc {})
nodejs
rustup
slack
udisks2
wget
# display configuration
autorandr
# sound
pulseaudioFull
alsaUtils
cmus
# dev tools
git
nix-prefetch-git
neovim
# haskell
cabal-install
cabal2nix
# hardware
bolt
thunderbolt
];
# Make nvim default editor
programs.vim.defaultEditor = 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:
# firmware update
services.fwupd.enable = true;
# Daemon to enable security levels for Thunderbolt 3
services.hardware.bolt.enable = true;
# acpi daemon
services.acpid.enable = true;
# 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;
services.printing.drivers = [ pkgs.gutenprint ];
# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.autorun = true;
services.xserver.layout = "us";
services.xserver.xkbOptions = "eurosign:e";
# Enable touchpad support.
services.xserver.libinput.enable = true;
# Enable the KDE Desktop Environment.
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
# Enable the GNOME Desktop Environment.
# services.xserver.displayManager.gdm.enable = true;
# services.xserver.desktopManager.gnome3.enable = true;
# Video drivers
services.xserver.videoDrivers = [ "intel" "modesetting" ];
# NTP Time syncing
services.ntp.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.haptop = {
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.09"; # Did you read the comment?
}
# Edit this configuration file to define what should be installed on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment