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
68 # code editors
69 vim
70 neovim
71 vimHugeX # to make clipboard work in vim
72 xclip # to make clipboard work in neovim
73
74 # terminals
75 alacritty
76 kitty
77
78 # pdf
79 zathura
80 mate.atril
81
82 # file explorers/managers
83 lf
84 yazi
85 xfce.thunar
86 xfce.xfconf # needed to save preferences of thunar
87 xfce.ristretto
88 xfce.tumbler # for thumbnails of imgs
89 # for detecting usbs:
90 xfce.thunar-volman
91 gvfs
92 polkit_gnome
93 udiskie
94
95 # media
96 pavucontrol
97 mpv
98 vlc
99 feh
100 kolourpaint
101 calibre
102
103 # browsers
104 firefox
105 qutebrowser
106 chromium
107
108 # languages
109 #texlive.combined.scheme-medium # includes latexmk
110 #texlivePackages.minted
111 pgf-umlsd # latex diagrams
112 pgf
113 (pkgs.texlive.combine {
114 inherit (pkgs.texlive)
115 scheme-medium # includes latexmk
116 minted # syntax highligting
117 pgf
118 ;
119 })
120 #gcc
121 clang
122 clang-tools
123 pkg-config
124 openssl.dev
125 stdenv
126 rustup
127 wabt # wasm binary toolkit
128 wasmedge # to execute wasm binaries
129 sage
130 go
131 (python3.withPackages(ps: with ps; [
132 matplotlib numpy
133 ]))
134 pipx
135 nodejs
136 ];
137
138 environment.variables = {
139 LIBCLANG_PATH = "${pkgs.llvmPackages_17.libclang.lib}/lib";
140 PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
141 OPENSSL_DIR = "${pkgs.openssl.dev}";
142 };
143
144 fonts.packages = with pkgs; [
145 dina-font
146 proggyfonts
147 terminus_font
148 fira-code
149 liberation_ttf
150 noto-fonts
151 tamsyn
152 termsyn
153 gohufont
154 ];
155
156 programs.zsh.enable = true;
157 users.defaultUserShell = pkgs.zsh;
158 environment.shells = with pkgs; [zsh];
159
160 # set default pdf reader to zathura
161 xdg.mime.enable=true;
162 environment.sessionVariables = {
163 BROWSER = "zathura";
164 };
165 xdg.mime.defaultApplications = {
166 "application/pdf" = "zathura";
167 };
168
169 # gvfs needed for Thunar to detect external disks
170 services.gvfs.enable = true;
171
172 # bluetooth related
173 hardware.bluetooth.enable = true;
174 services.blueman.enable = true;
175
176 #hardware.pulseaudio.enable = true;
177}