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 meshtastic esptool # meshtastic related
142 unicodeit
143 ]))
144 pipx
145 nodejs
146
147 # other
148 qmk
149 vial
150 via
151
152 freecad
153 orca-slicer
154 ];
155
156 environment.variables = {
157 LIBCLANG_PATH = "${pkgs.llvmPackages_17.libclang.lib}/lib";
158 PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
159 OPENSSL_DIR = "${pkgs.openssl.dev}";
160 };
161
162 fonts.packages = with pkgs; [
163 dina-font
164 proggyfonts
165 terminus_font
166 fira-code
167 liberation_ttf
168 noto-fonts
169 tamsyn
170 termsyn
171 gohufont
172 ];
173
174 programs.zsh.enable = true;
175 users.defaultUserShell = pkgs.zsh;
176 environment.shells = with pkgs; [zsh];
177
178 # set default pdf reader to zathura
179 xdg.mime.enable=true;
180 environment.sessionVariables = {
181 BROWSER = "zathura";
182 };
183 xdg.mime.defaultApplications = {
184 "application/pdf" = "zathura";
185 };
186
187 # gvfs needed for Thunar to detect external disks
188 services.gvfs.enable = true;
189
190 # bluetooth related
191 hardware.bluetooth.enable = true;
192 services.blueman.enable = true;
193
194 #hardware.pulseaudio.enable = true;
195 services.pulseaudio.enable = true;
196 services.pipewire.enable=false;
197 services.pipewire.pulse.enable=false;
198
199 # udev rules (for Vial)
200 services.udev.extraRules = ''
201 KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="4653", ATTRS{idProduct}=="0001", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
202 '';
203 services.udev.packages = with pkgs; [
204 qmk
205 qmk-udev-rules
206 qmk_hid
207 via
208 vial
209 ];
210}