Skip to content

Instantly share code, notes, and snippets.

@as3ii
Last active September 7, 2020 20:30
Show Gist options
  • Save as3ii/81d99535274d4d70b1d7eacc71aecb75 to your computer and use it in GitHub Desktop.
Save as3ii/81d99535274d4d70b1d7eacc71aecb75 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 systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest; # use latest kernel stable release
networking.hostName = "as3ii-nixos"; # Define your hostname.
networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# 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.enp0s3.useDHCP = true;
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
# font = "Lat2-Terminus16";
keyMap = "it";
};
# Set your time zone.
time.timeZone = "Europe/Rome";
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
neovim firefox zathura alacritty exa mpv htop
];
# 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";
# };
# 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;
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.layout = "it";
# services.xserver.xkbOptions = "eurosign:e";
hardware.opengl.enable = true;
hardware.opengl.driSupport32Bit = true;
# Enable touchpad support.
services.xserver.libinput.enable = true;
# window manager
services.xserver.displayManager.lightdm.enable = true;
services.xserver.windowManager.xmonad.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.as3ii = {
isNormalUser = true;
extraGroups = [ "wheel" "jackaudio" "audio" "video" "realtime" ];
shell = pkgs.zsh;
};
# 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?
programs = {
qt5ct.enable = true;
zsh = {
enable = true;
enableCompletion = true;
#enableBashCompletion = true;
autosuggestions.enable = true;
histFile = "$HOME/.local/share/history";
syntaxHighlighting.enable = true;
};
bash = {
enableCompletion = true;
enableLsColors = true;
};
thefuck.enable = true;
ccache.enable = true;
file-roller.enable = true;
firejail.enable = true;
less.enable = true;
light.enable = true;
};
environment.variables = {
"EDITOR" = "nvim";
"READER" = "zathura";
"VISUAL" = "nvim";
"CODEEDITOR" = "nvim";
"TERMINAL" = "alacritty";
"BROWSER" = "firefox";
"COLORTERM" = "truecolor";
"PAGER" = "less";
"LESS" = "-R";
"LESSHISTFILE" = "-";
"LESS_TERMCAP_mb" = "$'\E[01;31m'";
"LESS_TERMCAP_md" = "$'\E[01;31m'";
"LESS_TERMCAP_me" = "$'\E[0m'";
"LESS_TERMCAP_se" = "$'\E[0m'";
"LESS_TERMCAP_so" = "$'\E[01;44;33m'";
"LESS_TERMCAP_ue" = "$'\E[0m'";
"LESS_TERMCAP_us" = "$'\E[01;32m'";
"LESSOPEN" = "|${pkgs.highlight} /bin/highlight -O ansi %s 2>/dev/null";
};
environment.shellAliases = {
"grep" = "grep --color=auto";
"ip" = "ip -c ";
":q" = "exit";
"cp" = "cp --reflink=auto -i";
"mv" = "mv -i";
"vim" = "nvim";
"v" = "vim";
"open" = "xdg-open";
"tree" = "exa --tree --level=3";
"ls" = "exa --classify";
"ll" = "exa --classify --group --long --header --git";
"la" = "exa --classify --all";
"sl" = "ls";
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment