1 { pkgs, lib, config, hostName, ... }:
7 (import (julm/hosts + "/${hostName}.nix"))
9 host.base = lib.elem hostName [ "losurdo" "mermet" "oignon" ];
10 host.desktop = lib.elem hostName [ /*"losurdo"*/ "oignon" ];
11 host.server = lib.elem hostName [ "losurdo" "mermet" ];
12 host.admin = lib.elem hostName [ "losurdo" "mermet" "oignon" ];
13 host.developer = lib.elem hostName [ "losurdo" "oignon" ];
14 host.media = lib.elem hostName [ "losurdo" "oignon" ];
15 programs.bat.enable = config.host.base;
16 programs.bash.enable = config.host.base;
17 #programs.broot.enable = config.host.base;
19 enable = config.host.desktop;
21 let defaultProfile = {
23 "browser.bookmarks.showMobileBookmarks" = true;
24 "browser.search.isUS" = false;
25 "browser.search.region" = "FR";
26 "distribution.searchplugins.defaultLocale" = "fr-FR";
27 "general.useragent.locale" = "fr-FR";
28 "security.identityblock.show_extended_validation" = true;
29 "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
31 userChrome = builtins.readFile softwares/firefox/userChrome.css;
33 "rp4xy6ye.2021" = lib.mkMerge [defaultProfile {
37 "browser.startup.homepage" = "https://code.sourcephile.fr";
40 "8y3d28fa.tor" = lib.mkMerge [defaultProfile {
44 "browser.startup.homepage" = "https://check.torproject.org";
49 programs.gpg.enable = config.host.base;
50 home.file."${config.programs.gpg.homedir}/gpg.conf".text = ''
52 trusted-key 0xD15AF7F467E8299B
53 # julm@sourcephile.fr (2021-08-12)
54 trusted-key 0xA58CD81C3863926F
56 services.gpg-agent.enable = config.host.base;
57 services.gpg-agent.sshKeys = [
59 "D275EBA09C7E1FFBFB47F6EEF164E6D56FB24AB2"
60 # julm@sourcephile.fr (2021-08-12)
61 "3D94D14514F1EA2B6D62F1275D888897B082415D"
63 programs.direnv.enable = config.host.base;
64 programs.htop.enable = config.host.base;
65 programs.irssi.enable = hostName == "mermet" || hostName == "losurdo";
66 programs.irssi.extraConfig = builtins.readFile julm/irssi/config;
67 home.file.".irssi/passwd".text = ''
68 FreeNode : ${pkgs.pass}/bin/pass freenode.net/irc/julm
69 GeekNode : ${pkgs.pass}/bin/pass geeknode.org/irc/julm
70 IndyMedia : ${pkgs.pass}/bin/pass indymedia.org/irc/julm
71 Libera : ${pkgs.pass}/bin/pass libera.chat/irc/julm
72 OFTC : ${pkgs.pass}/bin/pass oftc.net/irc/julm
73 ToileLibre : ${pkgs.pass}/bin/pass toile-libre.org/irc/julm
75 programs.man.enable = config.host.base;
76 #programs.neovim.enable = config.host.base;
77 programs.ssh.enable = config.host.base;
78 programs.ssh.matchBlocks."lan.losurdo.sourcephile.fr" = {
79 compression = true; # Helps to get a better framerate with forwardX11
81 forwardX11Trusted = true;
82 serverAliveInterval = 15;
84 programs.tmux.enable = config.host.base;
85 programs.vim.enable = config.host.base;
86 manual.manpages.enable = config.host.base;
88 enable = config.host.base;
89 userName = "Julien Moutinho";
90 userEmail = "julm@sourcephile.fr";
91 signing.key = "0x7182433A39582282929B2A222E3618DD0D087650";
92 signing.signByDefault = false;
94 if lib.elem hostName [ "losurdo" "oignon" ]
98 sendemail.smtpEncryption = "ssl"; # Yes, "ssl", not "tls" which does not work because it expects STARTTLS.
99 sendemail.smtpServer = "mail.sourcephile.fr";
100 sendemail.smtpServerPort = "465";
101 sendemail.smtpUser = "julm@sourcephile.fr";
104 services.redshift.enable = lib.mkDefault config.host.desktop;
105 xsession.enable = lib.mkDefault config.host.desktop;
106 xsession.windowManager.xmonad.enable = lib.mkDefault config.host.desktop;
107 home.stateVersion = "20.09";
108 home.sessionPath = [ "${config.home.homeDirectory}/bin" ];
109 home.sessionVariables = {
111 LANG = "fr_FR.UTF-8";
113 LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive";
116 # Warning: triggers a rebuild of mumble
117 #nixpkgs.config.mumble.speechdSupport = lib.mkDefault config.host.desktop;
119 lib.optionals config.host.base [
134 #pkgs.haskell.packages.ghc865.zerobin
146 #pkgs.linuxPackages.cpupower
147 #pkgs.linuxPackages.perf
151 pkgs.mastodon-archive
185 ] ++ lib.optionals config.host.desktop [
200 pkgs.hicolor-icon-theme
207 pkgs.networkmanager-openvpn
208 pkgs.networkmanagerapplet
214 pkgs.transmission-gtk
217 (pkgs.texlive.combine { inherit (pkgs.texlive) scheme-medium xdvi ucs; })
218 #(pkgs.texlive.combine { inherit (pkgs.texlive) scheme-medium xdvi; })
221 pkgs.yubikey-personalization-gui
222 ] ++ lib.optionals config.host.media [
231 ] ++ lib.optionals config.host.admin [
250 ] ++ lib.optionals config.host.developer [
255 #pkgs.dracut not yet packaged
263 pkgs.hunspellDicts.fr-moderne
268 pkgs.nix-prefetch-git
283 pkgs.yubikey-personalization