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 # --- sway wm config:
47 services.xserver.displayManager.gdm.enable=true;
48 services.xserver.displayManager.gdm.wayland=false;
49 #services.xserver.displayManager.plasma5.enable=true;
50 # Enable the gnome-keyring secrets vault.
51 # Will be exposed through DBus to programs willing to store secrets.
52 services.gnome.gnome-keyring.enable = true;
53 # enable sway wm
54 programs.sway = {
55 enable = true;
56 wrapperFeatures.gtk = true;
57 };
58 security.polkit.enable = true;
59 # --- end of sway config.
60
61 environment.systemPackages = with pkgs; [
62 # sway wm utilities
63 grim # screenshot functionality
64 slurp # screenshot functionality
65 wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout
66 mako # notification system developed by swaywm maintainer
67
68 # utilities
69 wget
70 tmux
71 git
72 delta
73 tig
74 mosh
75 bat
76 ripgrep
77 fzf
78 screenfetch
79 htop
80 jq
81 keynav
82 unzip
83 gnutar
84 xorg.xmodmap # keyboard remapping
85 xfce.xfce4-screenshooter
86 pulseaudio
87 usbutils
88 time
89
90 # code editors
91 vim
92 neovim
93 vimHugeX # to make clipboard work in vim
94 xclip # to make clipboard work in neovim
95
96 # terminals
97 alacritty
98 kitty
99
100 # pdf
101 zathura
102 mate.atril
103
104 # file explorers/managers
105 lf
106 yazi
107 xfce.thunar
108 xfce.xfconf # needed to save preferences of thunar
109 xfce.ristretto
110 xfce.tumbler # for thumbnails of imgs
111 # for detecting usbs:
112 xfce.thunar-volman
113 gvfs
114 polkit_gnome
115 udiskie
116
117 # media
118 pavucontrol
119 mpv
120 vlc
121 feh
122 #kolourpaint
123 gimp
124 calibre
125 tauon
126
127 # browsers
128 firefox
129 qutebrowser
130 chromium
131
132 # languages
133 #texlive.combined.scheme-medium # includes latexmk
134 #texlivePackages.minted
135 pgf-umlsd # latex diagrams
136 pgf
137 (pkgs.texlive.combine {
138 inherit (pkgs.texlive)
139 scheme-medium # includes latexmk
140 minted # syntax highligting
141 pgf
142 ;
143 })
144 gnumake
145 #gcc
146 clang
147 clang-tools
148
149 openssl.dev
150
151 stdenv
152 rustup
153 wabt # wasm binary toolkit
154 wasmedge # to execute wasm binaries
155 sage
156 coq
157 coqPackages.mathcomp
158 #coqPackages.coqide
159 opam # ocaml package manager, for coq packages
160 go
161 (python3.withPackages(ps: with ps; [
162 matplotlib numpy
163 qmk
164 meshtastic esptool # meshtastic related
165 unicodeit
166 ]))
167 pipx
168 nodejs
169 pnpm
170
171 # other
172 qmk
173 vial
174 via
175
176 freecad
177 orca-slicer
178 ];
179
180 environment.variables = {
181 LIBCLANG_PATH = "${pkgs.llvmPackages_17.libclang.lib}/lib";
182 PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
183 OPENSSL_DIR = "${pkgs.openssl.dev}";
184 };
185
186 fonts.packages = with pkgs; [
187 dina-font
188 proggyfonts
189 terminus_font
190 fira-code
191 liberation_ttf
192 noto-fonts
193 tamsyn
194 termsyn
195 gohufont
196 ];
197
198 programs.zsh.enable = true;
199 users.defaultUserShell = pkgs.zsh;
200 environment.shells = with pkgs; [zsh];
201
202 # set default pdf reader to zathura
203 xdg.mime.enable=true;
204 environment.sessionVariables = {
205 BROWSER = "zathura";
206 };
207 xdg.mime.defaultApplications = {
208 "application/pdf" = "zathura";
209 };
210
211 # gvfs needed for Thunar to detect external disks
212 services.gvfs.enable = true;
213
214 # bluetooth related
215 hardware.bluetooth.enable = true;
216 services.blueman.enable = true;
217
218 #hardware.pulseaudio.enable = true;
219 services.pulseaudio.enable = true;
220 services.pipewire.enable=false;
221 services.pipewire.pulse.enable=false;
222
223 # udev rules (for Vial)
224 services.udev.extraRules = ''
225 KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="4653", ATTRS{idProduct}=="0001", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
226 '';
227 services.udev.packages = with pkgs; [
228 qmk
229 qmk-udev-rules
230 qmk_hid
231 via
232 vial
233 ];
234}