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