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