]> Git — Sourcephile - julm/julm-nix.git/blob - homes/julm.nix
wireguard: fix listenPorts
[julm/julm-nix.git] / homes / julm.nix
1 { pkgs, lib, config, hostName, ... }:
2 {
3 imports = [
4 ./softwares.nix
5 ./options.nix
6 julm/mutt.nix
7 (import (julm/hosts + "/${hostName}.nix"))
8 ];
9 host.desktop = lib.elem hostName [ /*"losurdo"*/ "oignon" ];
10 host.server = lib.elem hostName [ "losurdo" "mermet" ];
11 host.admin = lib.elem hostName [ "losurdo" "mermet" "oignon" ];
12 host.developer = lib.elem hostName [ "losurdo" "oignon" ];
13 host.media = lib.elem hostName [ "losurdo" "oignon" ];
14 programs.bat.enable = true;
15 programs.bash.enable = true;
16 #programs.broot.enable = true;
17 programs.firefox = {
18 enable = config.host.desktop;
19 profiles =
20 let defaultProfile = {
21 settings = {
22 "browser.bookmarks.showMobileBookmarks" = true;
23 "browser.search.isUS" = false;
24 "browser.search.region" = "FR";
25 "distribution.searchplugins.defaultLocale" = "fr-FR";
26 "general.useragent.locale" = "fr-FR";
27 "security.identityblock.show_extended_validation" = true;
28 "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
29 };
30 userChrome = builtins.readFile softwares/firefox/userChrome.css;
31 }; in {
32 "rp4xy6ye.2021" = lib.mkMerge [defaultProfile {
33 id = 0;
34 name = "2021";
35 settings = {
36 "browser.startup.homepage" = "https://code.sourcephile.fr";
37 };
38 }];
39 "8y3d28fa.tor" = lib.mkMerge [defaultProfile {
40 id = 1;
41 name = "tor";
42 settings = {
43 "browser.startup.homepage" = "https://check.torproject.org";
44 };
45 }];
46 };
47 };
48 programs.gpg.enable = true;
49 home.file."${config.programs.gpg.homedir}/gpg.conf".text = ''
50 # julm@autogeree.net
51 trusted-key 0xD15AF7F467E8299B
52 # julm@sourcephile.fr (2021-08-12)
53 trusted-key 0xA58CD81C3863926F
54 '';
55 services.gpg-agent.enable = true;
56 services.gpg-agent.sshKeys = [
57 # julm@autogeree.net
58 "D275EBA09C7E1FFBFB47F6EEF164E6D56FB24AB2"
59 # julm@sourcephile.fr (2021-08-12)
60 "3D94D14514F1EA2B6D62F1275D888897B082415D"
61 ];
62 programs.direnv.enable = true;
63 programs.htop.enable = true;
64 programs.irssi.enable = hostName == "mermet" || hostName == "losurdo";
65 programs.irssi.extraConfig = builtins.readFile julm/irssi/config;
66 home.file.".irssi/passwd".text = ''
67 FreeNode : ${pkgs.pass}/bin/pass freenode.net/irc/julm
68 GeekNode : ${pkgs.pass}/bin/pass geeknode.org/irc/julm
69 IndyMedia : ${pkgs.pass}/bin/pass indymedia.org/irc/julm
70 Libera : ${pkgs.pass}/bin/pass libera.chat/irc/julm
71 OFTC : ${pkgs.pass}/bin/pass oftc.net/irc/julm
72 ToileLibre : ${pkgs.pass}/bin/pass toile-libre.org/irc/julm
73 '';
74 programs.man.enable = true;
75 #programs.neovim.enable = true;
76 programs.ssh.enable = true;
77 programs.ssh.matchBlocks."lan.losurdo.sourcephile.fr" = {
78 compression = true; # Helps to get a better framerate with forwardX11
79 forwardX11 = true;
80 forwardX11Trusted = true;
81 serverAliveInterval = 15;
82 };
83 programs.tmux.enable = true;
84 programs.vim.enable = true;
85 manual.manpages.enable = true;
86 programs.git = {
87 enable = true;
88 userName = "Julien Moutinho";
89 userEmail = "julm@sourcephile.fr";
90 signing.key = "0x7182433A39582282929B2A222E3618DD0D087650";
91 signing.signByDefault = false;
92 package =
93 if lib.elem hostName [ "losurdo" "oignon" ]
94 then pkgs.gitFull
95 else pkgs.gitMinimal;
96 extraConfig = {
97 sendemail.smtpEncryption = "ssl"; # Yes, "ssl", not "tls" which does not work because it expects STARTTLS.
98 sendemail.smtpServer = "mail.sourcephile.fr";
99 sendemail.smtpServerPort = "465";
100 sendemail.smtpUser = "julm@sourcephile.fr";
101 };
102 };
103 services.redshift.enable = lib.mkDefault config.host.desktop;
104 xsession.enable = lib.mkDefault config.host.desktop;
105 xsession.windowManager.xmonad.enable = lib.mkDefault config.host.desktop;
106 home.stateVersion = "20.09";
107 home.sessionPath = [ "${config.home.homeDirectory}/bin" ];
108 home.sessionVariables = {
109 EDITOR = "vim";
110 LANG = "fr_FR.UTF-8";
111 LESS = "-FRSX";
112 LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive";
113 MANPAGER = "less";
114 };
115 # Warning: triggers a rebuild of mumble
116 #nixpkgs.config.mumble.speechdSupport = lib.mkDefault config.host.desktop;
117 home.packages = [
118 #pkgs.amfora
119 pkgs.bc
120 #pkgs.browsh
121 #pkgs.cabal2nix
122 pkgs.coreutils
123 pkgs.croc
124 pkgs.curl
125 #pkgs.dnsutils
126 pkgs.exa
127 pkgs.file
128 #pkgs.git-remote-gpg
129 pkgs.glib # gio
130 #pkgs.go-mtpfs
131 pkgs.gvfs
132 #pkgs.haskell.packages.ghc865.zerobin
133 pkgs.htop
134 pkgs.hwinfo
135 pkgs.inetutils
136 #pkgs.ipfs
137 #pkgs.i7z
138 pkgs.less
139 pkgs.lf
140 pkgs.lftp
141 pkgs.libfaketime
142 pkgs.libidn
143 pkgs.libxml2.bin
144 #pkgs.linuxPackages.cpupower
145 #pkgs.linuxPackages.perf
146 pkgs.lm_sensors
147 pkgs.lsof
148 pkgs.lsscsi
149 pkgs.mastodon-archive
150 #pkgs.meli
151 pkgs.mosh
152 pkgs.ncdu
153 pkgs.ncurses
154 pkgs.ntfs3g
155 #pkgs.onionshare
156 pkgs.openssl
157 pkgs.p7zip
158 pkgs.pass
159 pkgs.pastebinit
160 pkgs.pciutils
161 pkgs.poppler_utils
162 pkgs.powertop
163 pkgs.procps
164 #pkgs.profanity
165 pkgs.pv
166 #pkgs.ranger
167 #pkgs.ripgrep
168 pkgs.sanoid
169 #pkgs.sdate
170 pkgs.sshfs
171 pkgs.tcpdump
172 pkgs.tree
173 pkgs.unar
174 pkgs.unzip
175 pkgs.usbutils
176 pkgs.utillinux
177 pkgs.vbetool
178 pkgs.wget
179 pkgs.wgetpaste
180 pkgs.which
181 pkgs.xdg_utils
182 pkgs.zfs
183 ] ++ lib.optionals config.host.desktop [
184 #pkgs.calibre
185 #pkgs.chromium
186 pkgs.amule
187 pkgs.dino
188 pkgs.djview
189 pkgs.dmenu
190 pkgs.evince
191 pkgs.freeciv_gtk
192 pkgs.gajim
193 pkgs.geeqie
194 pkgs.gimp
195 pkgs.glxinfo
196 pkgs.gparted
197 pkgs.hicolor-icon-theme
198 pkgs.keepass
199 pkgs.libdvdcss
200 pkgs.libreoffice
201 pkgs.liferea
202 pkgs.mpv
203 pkgs.mumble
204 pkgs.networkmanager-openvpn
205 pkgs.networkmanagerapplet
206 pkgs.nix-du
207 pkgs.pavucontrol
208 pkgs.pdftk
209 pkgs.thunderbird
210 pkgs.transmission-gtk
211 pkgs.vlc
212 pkgs.xclip
213 pkgs.xorg.xkill
214 pkgs.xsane
215 pkgs.yubikey-personalization-gui
216 ] ++ lib.optionals config.host.media [
217 pkgs.aria2
218 pkgs.convmv
219 pkgs.ffmpeg
220 pkgs.imagemagick
221 pkgs.mplayer
222 pkgs.podl
223 pkgs.stig
224 pkgs.youtube-dl
225 ] ++ lib.optionals config.host.admin [
226 #pkgs.compsize
227 pkgs.acpi
228 pkgs.bmon
229 pkgs.cachix
230 pkgs.cryptsetup
231 pkgs.dstat
232 pkgs.e2fsprogs
233 pkgs.ethtool
234 pkgs.knot-dns
235 pkgs.ldns
236 pkgs.miniupnpc
237 pkgs.nmon
238 pkgs.nnn
239 pkgs.parted
240 pkgs.rdfind
241 pkgs.smartmontools
242 pkgs.strace
243 pkgs.stress-ng
244 ] ++ lib.optionals config.host.developer [
245 pkgs.aspell
246 pkgs.aspellDicts.fr
247 pkgs.binutils
248 pkgs.binwalk
249 #pkgs.dracut not yet packaged
250 pkgs.git-crypt
251 pkgs.git-quick-stats
252 pkgs.gnumake
253 pkgs.graphviz
254 pkgs.hledger
255 pkgs.hunspell
256 pkgs.hunspellDicts.fr-moderne
257 pkgs.jq
258 pkgs.neofetch
259 pkgs.nix-prefetch-git
260 pkgs.nixpkgs-review
261 pkgs.opusTools
262 pkgs.patchelf
263 pkgs.qprint
264 pkgs.reuse
265 pkgs.shellcheck
266 pkgs.sipcalc
267 pkgs.socat
268 pkgs.sqlite
269 pkgs.tig
270 pkgs.xmlstarlet
271 pkgs.xsel
272 pkgs.yubikey-personalization
273 ];
274 }