Created
May 1, 2022 05:56
-
-
Save hhefesto/03e04c408f42c3f49b1e2e06f4009d2c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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; | |
# networking.hostName = "nixos"; # Define your hostname. | |
# networking.wireless.enable = true; # Enables wireless support via wpa_supplic> | |
# Set your time zone. | |
time.timeZone = "America/Mexico_City"; | |
# 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.enp2s0.useDHCP = true; | |
networking.interfaces.wlp3s0.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"; | |
# }; | |
# Enable the X11 windowing system. | |
services.xserver.enable = true; | |
services.xserver.layout = "us"; | |
services.xserver.xkbOptions = "ctrl:nocaps"; | |
services.xserver.xkbVariant = "altgr-intl"; | |
services.xserver.windowManager.xmonad = { | |
enable = true; | |
enableContribAndExtras = true; | |
extraPackages = haskellPackages:[ | |
haskellPackages.xmonad-contrib | |
haskellPackages.xmonad-extras | |
haskellPackages.xmonad | |
]; | |
}; | |
services.xserver.displayManager = { | |
defaultSession = "none+xmonad"; | |
gdm.enable = true; | |
sessionCommands = let myCustomLayout = pkgs.writeText "xkb-layout" '' | |
! swap Caps_Lock and Control_R | |
remove Lock = Caps_Lock | |
remove Control = Control_R | |
keysym Control_R = Caps_Lock | |
keysym Caps_Lock = Control_R | |
add Lock = Caps_Lock | |
add Control = Control_R | |
''; | |
in "${pkgs.xorg.xmodmap}/bin/xmodmap ${myCustomLayout}"; | |
# autoLogin.user = "hhefesto"; | |
}; | |
services.xserver.desktopManager.gnome.enable = true; | |
# Enable the GNOME Desktop Environment. | |
# services.xserver.displayManager.gdm.enable = true; | |
# services.xserver.desktopManager.gnome.enable = true; | |
# Configure keymap in X11 | |
# services.xserver.layout = "us"; | |
# services.xserver.xkbOptions = "eurosign:e"; | |
# Enable CUPS to print documents. | |
# services.printing.enable = true; | |
# Enable sound. | |
# sound.enable = true; | |
hardware.pulseaudio.enable = true; | |
# Enable touchpad support (enabled default in most desktopManager). | |
# services.xserver.libinput.enable = true; | |
# Define a user account. Don't forget to set a password with ‘passwd’. | |
# users.users.jane = { | |
# isNormalUser = true; | |
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. | |
# }; | |
nixpkgs.config.allowUnfree = true; | |
# List packages installed in system profile. To search, run: | |
# $ nix search wget | |
environment.systemPackages = with pkgs; [ | |
emacs # Do not forget to add an editor to edit configuration.nix! The Nano edi> | |
wget | |
git | |
firefox | |
zsh | |
signal-desktop | |
haskellPackages.xmobar | |
libreoffice | |
vlc | |
gnome3.nautilus | |
google-chrome | |
cachix | |
hack-font | |
zlib | |
]; | |
fonts.fonts = with pkgs; [ | |
hack-font | |
]; | |
programs.zsh = { | |
enable = true; | |
enableCompletion = true; | |
autosuggestions.enable = true; | |
interactiveShellInit = '' | |
# z - jump around | |
# source ${pkgs.fetchurl {url = "https://github.com/rupa/z/raw/2ebe419ae1831> | |
save_aliases=$(alias -L) | |
export ZSH=${pkgs.oh-my-zsh}/share/oh-my-zsh | |
export ZSH_THEME="bira" #"lambda" | |
plugins=(git sudo colorize extract history postgres) | |
source $ZSH/oh-my-zsh.sh | |
eval $save_aliases; unset save_aliases | |
''; | |
promptInit = '' | |
any-nix-shell zsh --info-right | source /dev/stdin | |
''; | |
}; | |
users.mutableUsers = false; | |
# Password generated with ```mkpasswd -m sha-512``` | |
users.users.root.initialHashedPassword = "$6$8Pqx7rwobCF86AnY$ATee1uTXg1c18p0uVj> | |
users.users.enriquead.initialHashedPassword = "$6$8Pqx7rwobCF86AnY$ATee1uTXg1c18> | |
users.extraUsers.enriquead = { | |
createHome = true; | |
isNormalUser = true; | |
home = "/home/enriquead"; | |
description = "Enrique Aguilar"; | |
extraGroups = [ "video" "wheel" "networkmanager" "docker" ]; | |
# Password generated with ```mkpasswd -m sha-512``` | |
hashedPassword = "$6$8Pqx7rwobCF86AnY$ATee1uTXg1c18p0uVjLf9yLSwfsUj2e1TMX/Nf9z> | |
shell = pkgs.zsh; #"/run/current-system/sw/bin/bash"; | |
}; | |
nix.package = pkgs.nixFlakes; | |
nix.extraOptions = "experimental-features = nix-command flakes"; | |
nix.binaryCaches = [ "https://hydra.iohk.io" | |
]; | |
nix.binaryCachePublicKeys = [ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjv> | |
]; | |
nix.allowedUsers = [ "@wheel" "enriquead" ]; | |
nix.trustedUsers = [ "root" "enriquead" ]; | |
hardware.pulseaudio.enable = 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; | |
# 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 = "21.11"; # Did you read the comment? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment