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 gimp
103 calibre
104 tauon
105
106 # browsers
107 firefox
108 qutebrowser
109 chromium
110
111 # languages
112 #texlive.combined.scheme-medium # includes latexmk
113 #texlivePackages.minted
114 pgf-umlsd # latex diagrams
115 pgf
116 (pkgs.texlive.combine {
117 inherit (pkgs.texlive)
118 scheme-medium # includes latexmk
119 minted # syntax highligting
120 pgf
121 ;
122 })
123 gnumake
124 #gcc
125 clang
126 clang-tools
127 pkg-config
128 openssl.dev
129 stdenv
130 rustup
131 wabt # wasm binary toolkit
132 wasmedge # to execute wasm binaries
133 sage
134 coq
135 coqPackages.mathcomp
136 coqPackages.coqide
137 opam # ocaml package manager, for coq packages
138 go
139 (python3.withPackages(ps: with ps; [
140 matplotlib numpy qmk
141 ]))
142 pipx
143 nodejs
144
145 # other
146 qmk
147 vial
148 via
149 ];
150
151 environment.variables = {
152 LIBCLANG_PATH = "${pkgs.llvmPackages_17.libclang.lib}/lib";
153 PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
154 OPENSSL_DIR = "${pkgs.openssl.dev}";
155 };
156
157 fonts.packages = with pkgs; [
158 dina-font
159 proggyfonts
160 terminus_font
161 fira-code
162 liberation_ttf
163 noto-fonts
164 tamsyn
165 termsyn
166 gohufont
167 ];
168
169 programs.zsh.enable = true;
170 users.defaultUserShell = pkgs.zsh;
171 environment.shells = with pkgs; [zsh];
172
173 # set default pdf reader to zathura
174 xdg.mime.enable=true;
175 environment.sessionVariables = {
176 BROWSER = "zathura";
177 };
178 xdg.mime.defaultApplications = {
179 "application/pdf" = "zathura";
180 };
181
182 # gvfs needed for Thunar to detect external disks
183 services.gvfs.enable = true;
184
185 # bluetooth related
186 hardware.bluetooth.enable = true;
187 services.blueman.enable = true;
188
189 #hardware.pulseaudio.enable = true;
190
191 # udev rules (for Vial)
192 services.udev.extraRules = ''
193 KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="4653", ATTRS{idProduct}=="0001", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
194 '';
195 services.udev.packages = with pkgs; [
196 qmk
197 qmk-udev-rules
198 qmk_hid
199 via
200 vial
201 ];
202}