1 { inputs, pkgs, lib, config, hostName, ... }:
8 (import (julm/hosts + "/${hostName}.nix"))
10 host.base = lib.elem hostName [ "losurdo" "mermet" "oignon" ];
11 host.desktop = lib.elem hostName [ /*"losurdo"*/ "oignon" ];
12 host.server = lib.elem hostName [ "losurdo" "mermet" ];
13 host.admin = lib.elem hostName [ "losurdo" "mermet" "oignon" ];
14 host.developer = lib.elem hostName [ "losurdo" "oignon" ];
15 host.media = lib.elem hostName [ "losurdo" "oignon" ];
16 programs.bat.enable = config.host.base;
17 programs.bash.enable = config.host.base;
18 #programs.broot.enable = config.host.base;
20 enable = config.host.desktop;
22 let defaultProfile = {
24 "browser.bookmarks.showMobileBookmarks" = true;
25 "browser.search.isUS" = false;
26 "browser.search.region" = "FR";
27 "distribution.searchplugins.defaultLocale" = "fr-FR";
28 "general.useragent.locale" = "fr-FR";
29 "security.identityblock.show_extended_validation" = true;
30 "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
32 userChrome = builtins.readFile softwares/firefox/userChrome.css;
34 "rp4xy6ye.2021" = lib.mkMerge [defaultProfile {
38 "browser.startup.homepage" = "https://code.sourcephile.fr";
41 "8y3d28fa.tor" = lib.mkMerge [defaultProfile {
45 "browser.startup.homepage" = "https://check.torproject.org";
50 programs.gpg.enable = config.host.base;
51 home.file."${config.programs.gpg.homedir}/gpg.conf".text = ''
53 trusted-key 0xD15AF7F467E8299B
54 # julm@sourcephile.fr (2021-08-12)
55 trusted-key 0xA58CD81C3863926F
57 services.gpg-agent.enable = config.host.base;
58 services.gpg-agent.sshKeys = [
60 "D275EBA09C7E1FFBFB47F6EEF164E6D56FB24AB2"
61 # julm@sourcephile.fr (2021-08-12)
62 "3D94D14514F1EA2B6D62F1275D888897B082415D"
64 programs.direnv.enable = config.host.base;
65 programs.htop.enable = config.host.base;
66 programs.irssi.enable = hostName == "mermet" || hostName == "losurdo";
67 programs.irssi.extraConfig = builtins.readFile julm/irssi/config;
68 home.file.".irssi/passwd".text = ''
69 FreeNode : ${pkgs.pass}/bin/pass freenode.net/irc/julm
70 GeekNode : ${pkgs.pass}/bin/pass geeknode.org/irc/julm
71 IndyMedia : ${pkgs.pass}/bin/pass indymedia.org/irc/julm
72 Libera : ${pkgs.pass}/bin/pass libera.chat/irc/julm
73 OFTC : ${pkgs.pass}/bin/pass oftc.net/irc/julm
74 ToileLibre : ${pkgs.pass}/bin/pass toile-libre.org/irc/julm
76 programs.man.enable = config.host.base;
77 programs.neovim.enable = config.host.developer;
78 programs.ssh.enable = config.host.base;
79 programs.ssh.matchBlocks."lan.losurdo.sourcephile.fr" = {
80 compression = true; # Helps to get a better framerate with forwardX11
82 forwardX11Trusted = true;
83 serverAliveInterval = 15;
85 programs.tmux.enable = config.host.base;
86 programs.vim.enable = config.host.base;
87 manual.manpages.enable = config.host.base;
89 enable = config.host.base;
90 userName = "Julien Moutinho";
91 userEmail = "julm@sourcephile.fr";
92 signing.key = "0x7182433A39582282929B2A222E3618DD0D087650";
93 signing.signByDefault = false;
95 if lib.elem hostName [ "losurdo" "oignon" ]
99 sendemail.smtpEncryption = "ssl"; # Yes, "ssl", not "tls" which does not work because it expects STARTTLS.
100 sendemail.smtpServer = "mail.sourcephile.fr";
101 sendemail.smtpServerPort = "465";
102 sendemail.smtpUser = "julm@sourcephile.fr";
105 services.redshift.enable = lib.mkDefault config.host.desktop;
106 xsession.enable = lib.mkDefault config.host.desktop;
107 xsession.windowManager.xmonad.enable = lib.mkDefault config.host.desktop;
108 home.stateVersion = "20.09";
109 home.sessionPath = [ "${config.home.homeDirectory}/bin" ];
110 home.sessionVariables = {
112 LANG = "fr_FR.UTF-8";
114 LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive";
117 # Warning: triggers a rebuild of mumble
118 #nixpkgs.config.mumble.speechdSupport = lib.mkDefault config.host.desktop;
120 lib.optionals config.host.base [
135 #pkgs.haskell.packages.ghc865.zerobin
147 #pkgs.linuxPackages.cpupower
148 #pkgs.linuxPackages.perf
152 pkgs.mastodon-archive
186 ] ++ lib.optionals config.host.desktop [
201 pkgs.hicolor-icon-theme
208 pkgs.networkmanager-openvpn
209 pkgs.networkmanagerapplet
215 pkgs.transmission-gtk
218 (pkgs.texlive.combine { inherit (pkgs.texlive) scheme-medium xdvi ucs; })
219 #(pkgs.texlive.combine { inherit (pkgs.texlive) scheme-medium xdvi; })
222 pkgs.yubikey-personalization-gui
223 ] ++ lib.optionals config.host.media [
232 ] ++ lib.optionals config.host.admin [
251 ] ++ lib.optionals config.host.developer [
256 #pkgs.dracut not yet packaged
264 pkgs.hunspellDicts.fr-moderne
269 pkgs.nix-prefetch-git
284 pkgs.yubikey-personalization