arnaucube
arnaucube/configsPublic Self-hosted repository
configs/nixos/common-configuration.nix
nixos/common-configuration.nixRaw
  1# This file contains the config shared across different devices.
  2
  3{ config, pkgs, ... }:
  4
  5{
  6  # Set your time zone.
  7  time.timeZone = "Europe/Madrid";
  8
  9  # Select internationalisation properties.
 10  i18n.defaultLocale = "en_US.UTF-8";
 11
 12  i18n.extraLocaleSettings = {
 13    LC_ADDRESS = "es_ES.UTF-8";
 14    LC_IDENTIFICATION = "es_ES.UTF-8";
 15    LC_MEASUREMENT = "es_ES.UTF-8";
 16    LC_MONETARY = "es_ES.UTF-8";
 17    LC_NAME = "es_ES.UTF-8";
 18    LC_NUMERIC = "es_ES.UTF-8";
 19    LC_PAPER = "es_ES.UTF-8";
 20    LC_TELEPHONE = "es_ES.UTF-8";
 21    LC_TIME = "es_ES.UTF-8";
 22  };
 23
 24  services.displayManager = {
 25      defaultSession = "none+i3";
 26  };
 27  services.xserver = {
 28    xkb = { # Configure keymap in X11
 29      layout = "us";
 30      variant = "";
 31    };
 32
 33    enable=true;
 34    #displayManager = {
 35    #  defaultSession = "none+i3";
 36    #};
 37    windowManager.i3 = {
 38      enable=true;
 39      extraPackages = with pkgs; [
 40        dmenu
 41        i3status
 42        i3lock
 43      ];
 44    };
 45  };
 46
 47  environment.systemPackages = with pkgs; [
 48	# utilities
 49 	wget
 50	tmux
 51	git
 52	delta
 53	tig
 54	mosh
 55	bat
 56	ripgrep
 57	fzf
 58	screenfetch
 59	htop
 60	jq
 61	keynav
 62	unzip
 63	gnutar
 64	xorg.xmodmap # keyboard remapping
 65	xfce.xfce4-screenshooter
 66	pulseaudio
 67	usbutils
 68
 69	# code editors
 70  	vim
 71	neovim
 72	vimHugeX # to make clipboard work in vim
 73	xclip # to make clipboard work in neovim
 74
 75	# terminals
 76	alacritty
 77	kitty
 78
 79	# pdf
 80	zathura
 81	mate.atril
 82
 83	# file explorers/managers
 84	lf
 85	yazi
 86	xfce.thunar
 87	xfce.xfconf # needed to save preferences of thunar
 88	xfce.ristretto
 89	xfce.tumbler # for thumbnails of imgs
 90	# for detecting usbs:
 91	xfce.thunar-volman
 92	gvfs
 93	polkit_gnome
 94	udiskie
 95
 96	# media
 97	pavucontrol
 98	mpv
 99	vlc
100	feh
101	kolourpaint
102	calibre
103
104	# browsers
105	firefox
106	qutebrowser
107	chromium
108
109	# languages
110	#texlive.combined.scheme-medium # includes latexmk
111	#texlivePackages.minted
112	pgf-umlsd # latex diagrams
113	pgf
114	(pkgs.texlive.combine {
115		inherit (pkgs.texlive)
116		scheme-medium # includes latexmk
117		minted # syntax highligting
118		pgf
119		;
120	})
121	gnumake
122	#gcc
123	clang
124	clang-tools
125	pkg-config
126	openssl.dev
127	stdenv
128	rustup
129	wabt # wasm binary toolkit
130	wasmedge # to execute wasm binaries
131	sage
132	go
133	(python3.withPackages(ps: with ps; [
134		matplotlib numpy qmk
135	]))
136	pipx
137	nodejs
138
139	# other
140	qmk
141	vial
142	via
143  ];
144
145  environment.variables = {
146 	LIBCLANG_PATH = "${pkgs.llvmPackages_17.libclang.lib}/lib";
147	PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
148	OPENSSL_DIR = "${pkgs.openssl.dev}";
149  };
150
151  fonts.packages = with pkgs; [
152    dina-font
153    proggyfonts
154    terminus_font
155    fira-code
156    liberation_ttf
157    noto-fonts
158    tamsyn
159    termsyn
160    gohufont
161  ];
162
163  programs.zsh.enable = true;
164  users.defaultUserShell = pkgs.zsh;
165  environment.shells = with pkgs; [zsh];
166
167  # set default pdf reader to zathura
168  xdg.mime.enable=true;
169  environment.sessionVariables = {
170    BROWSER = "zathura";
171  };
172  xdg.mime.defaultApplications = {
173    "application/pdf" = "zathura";
174  };
175
176  # gvfs needed for Thunar to detect external disks
177  services.gvfs.enable = true;
178
179  # bluetooth related
180  hardware.bluetooth.enable = true;
181  services.blueman.enable = true;
182
183  #hardware.pulseaudio.enable = true;
184
185  # udev rules (for Vial)
186  services.udev.extraRules = ''
187    KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="4653", ATTRS{idProduct}=="0001", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
188  '';
189  services.udev.packages = with pkgs; [
190    qmk
191    qmk-udev-rules
192    qmk_hid
193    via
194    vial
195  ];
196}