nix: remove lingering file
[julm/julm-nix.git] / homes / julm.nix
index 6989119fc0e515df3979e045d967106618f22a5c..e55ad14f27daf1f3efa2b31272c647f6a03b183e 100644 (file)
@@ -1,52 +1,82 @@
-{ pkgs, lib, config, ... }:
+{ pkgs, lib, config, hostName, ... }:
 {
 imports = [
   ./softwares.nix
   ./options.nix
   julm/mutt.nix
-  julm/hosts/oignon.nix
+  (import (julm/hosts + "/${hostName}.nix"))
 ];
-host.desktop =
-  config.host.name == "oignon";
-host.server =
-  config.host.name == "mermet" ||
-  config.host.name == "losurdo";
-programs.bash.enable = true;
-programs.gpg.enable = true;
-home.file.".gnupg/gpg.conf".text = ''
+programs.firefox = {
+  profiles =
+    let defaultProfile = {
+      settings = {
+        "browser.bookmarks.showMobileBookmarks" = true;
+        "browser.compactmode.show" = true;
+        "browser.search.isUS" = false;
+        "browser.search.region" = "FR";
+        "distribution.searchplugins.defaultLocale" = "fr-FR";
+        "general.useragent.locale" = "fr-FR";
+        "security.identityblock.show_extended_validation" = true;
+        "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
+      };
+      userChrome = builtins.readFile softwares/firefox/userChrome.css;
+    }; in {
+      "rp4xy6ye.2021" = lib.mkMerge [defaultProfile {
+        id = 0;
+        name = "2021";
+        settings = {
+          "browser.startup.homepage" = "https://code.sourcephile.fr";
+        };
+      }];
+      "8y3d28fa.tor" = lib.mkMerge [defaultProfile {
+        id = 1;
+        name = "tor";
+        settings = {
+          "browser.startup.homepage" = "https://check.torproject.org";
+        };
+      }];
+    };
+};
+home.file."${config.programs.gpg.homedir}/gpg.conf".text = ''
   # julm@autogeree.net
   trusted-key 0xD15AF7F467E8299B
-  # julm@sourcephile.fr
-  trusted-key 0x2E3618DD0D087650
+  # julm@sourcephile.fr (2021-08-12)
+  trusted-key 0xA58CD81C3863926F
 '';
-services.gpg-agent.enable = true;
 services.gpg-agent.sshKeys = [
   # julm@autogeree.net
   "D275EBA09C7E1FFBFB47F6EEF164E6D56FB24AB2"
-  # julm@sourcephile.fr
-  "123BF80054E9E9CE2BD7B899F07207665392B727"
+  # julm@sourcephile.fr (2021-08-12)
+  "3D94D14514F1EA2B6D62F1275D888897B082415D"
+  # Ed25519 key added on: 2021-10-31 06:48:49
+  # Fingerprints:  MD5:fe:fe:81:79:d8:7f:e4:ff:64:ac:f3:1c:bd:65:24:3a
+  #                SHA256:bCfwfC8MQTjm6c1HcMLtzvGpnWRdqLwe/bvbh2jsNaA
+  "F6CCA60CF05FADAE911CFBEC0BCDED22F40A19FD"
 ];
-programs.direnv.enable = true;
-programs.htop.enable = true;
-programs.irssi.enable = config.host.name == "mermet";
+programs.irssi.extraConfig = builtins.readFile julm/irssi/config;
 home.file.".irssi/passwd".text = ''
   FreeNode   : ${pkgs.pass}/bin/pass freenode.net/irc/julm
   GeekNode   : ${pkgs.pass}/bin/pass geeknode.org/irc/julm
   IndyMedia  : ${pkgs.pass}/bin/pass indymedia.org/irc/julm
+  Libera     : ${pkgs.pass}/bin/pass libera.chat/irc/julm
+  OFTC       : ${pkgs.pass}/bin/pass oftc.net/irc/julm
   ToileLibre : ${pkgs.pass}/bin/pass toile-libre.org/irc/julm
 '';
-programs.vim.enable = true;
-programs.ssh.enable = true;
-programs.tmux.enable = true;
-programs.man.enable = true;
-manual.manpages.enable = false;
-  # builtins.elem config.host.name ["losurdo" "oignon"];
+programs.ssh.matchBlocks = lib.genAttrs ["lan.losurdo.sourcephile.fr" "losurdo.wg"] (_: {
+  compression = true; # Helps to get a better framerate with forwardX11
+  forwardX11 = true;
+  forwardX11Trusted = true;
+  serverAliveInterval = 15;
+});
 programs.git = {
-  enable = true;
   userName = "Julien Moutinho";
   userEmail = "julm@sourcephile.fr";
   signing.key = "0x7182433A39582282929B2A222E3618DD0D087650";
   signing.signByDefault = false;
+  package =
+    if lib.elem hostName [ "losurdo" "oignon" ]
+    then pkgs.gitFull
+    else pkgs.gitMinimal;
   extraConfig = {
     sendemail.smtpEncryption = "ssl"; # Yes, "ssl", not "tls" which does not work because it expects STARTTLS.
     sendemail.smtpServer = "mail.sourcephile.fr";
@@ -54,155 +84,13 @@ programs.git = {
     sendemail.smtpUser = "julm@sourcephile.fr";
   };
 };
-services.redshift.enable = config.host.desktop;
-xsession.enable = config.host.desktop;
-xsession.windowManager.xmonad.enable = config.host.desktop;
 home.stateVersion = "20.09";
+home.sessionPath = [ "${config.home.homeDirectory}/bin" ];
 home.sessionVariables = {
   EDITOR = "vim";
   LANG = "fr_FR.UTF-8";
   LESS = "-FRSX";
   LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive";
   MANPAGER = "less";
-  PATH = lib.makeBinPath [ config.home.homeDirectory ] + ":$PATH";
 };
-# Warning: triggers a rebuild of mumble
-#nixpkgs.config.mumble.speechdSupport = config.host.desktop;
-home.packages = [
-  pkgs.acpi
-  pkgs.amfora
-  pkgs.aria2
-  pkgs.aspell
-  pkgs.aspellDicts.fr
-  pkgs.bc
-  pkgs.binutils
-  pkgs.bison
-  pkgs.bmon
-  pkgs.browsh
-  pkgs.cabal2nix
-  pkgs.compsize
-  pkgs.convmv
-  pkgs.coreutils
-  pkgs.croc
-  pkgs.cryptsetup
-  pkgs.curl
-  pkgs.dino
-  pkgs.direnv
-  #pkgs.dnsutils
-  pkgs.dstat
-  pkgs.e2fsprogs
-  pkgs.ethtool
-  pkgs.exa
-  pkgs.ffmpeg
-  pkgs.file
-  pkgs.flex
-  pkgs.gcc
-  pkgs.git-crypt
-  #pkgs.git-remote-gpg
-  pkgs.glib # gio
-  pkgs.go-mtpfs
-  pkgs.gnumake
-  pkgs.gvfs
-  #pkgs.haskell.packages.ghc865.zerobin
-  pkgs.hledger
-  pkgs.home-manager
-  pkgs.htop
-  pkgs.hunspell
-  pkgs.hunspellDicts.fr-moderne
-  pkgs.imagemagick
-  pkgs.inetutils
-  pkgs.jq
-  pkgs.knot-dns
-  pkgs.ldns
-  pkgs.less
-  pkgs.libfaketime
-  pkgs.libidn
-  pkgs.libxml2.bin
-  pkgs.linuxPackages.cpupower
-  pkgs.linuxPackages.perf
-  pkgs.lm_sensors
-  pkgs.lsof
-  pkgs.lsscsi
-  pkgs.meli
-  pkgs.miniupnpc
-  pkgs.mosh
-  pkgs.ncdu
-  pkgs.ncurses
-  pkgs.neofetch
-  pkgs.nix-prefetch-git
-  pkgs.nixpkgs-review
-  pkgs.nmon
-  pkgs.ntfs3g
-  pkgs.onionshare
-  pkgs.openssl
-  pkgs.p7zip
-  pkgs.parted
-  pkgs.pass
-  pkgs.pastebinit
-  pkgs.patchelf
-  pkgs.pciutils
-  pkgs.poppler_utils
-  pkgs.powertop
-  pkgs.procps
-  pkgs.qprint
-  pkgs.ranger
-  pkgs.rdfind
-  pkgs.ripgrep
-  pkgs.sanoid
-  pkgs.shellcheck
-  pkgs.sipcalc
-  pkgs.smartmontools
-  pkgs.sqlite
-  pkgs.sshfs
-  pkgs.stig
-  pkgs.strace
-  pkgs.stress
-  pkgs.sudo
-  pkgs.tcpdump
-  pkgs.thttpd
-  pkgs.tig
-  pkgs.tree
-  pkgs.unzip
-  pkgs.usbutils
-  pkgs.utillinux
-  pkgs.vbetool
-  pkgs.wget
-  pkgs.wgetpaste
-  pkgs.which
-  pkgs.xdg_utils
-  pkgs.xmlstarlet
-  pkgs.xsel
-  pkgs.youtube-dl
-  pkgs.zfs
-  ] ++ lib.optionals config.host.desktop [
-  pkgs.amule
-  pkgs.chromium
-  pkgs.djview
-  pkgs.dmenu
-  pkgs.evince
-  pkgs.firefox
-  pkgs.freeciv_gtk
-  pkgs.geeqie
-  pkgs.gimp
-  pkgs.gparted
-  pkgs.graphviz
-  pkgs.hicolor-icon-theme
-  pkgs.keepass
-  pkgs.libdvdcss
-  pkgs.libreoffice
-  pkgs.liferea
-  pkgs.mplayer
-  pkgs.mumble
-  pkgs.networkmanager-openvpn
-  pkgs.networkmanagerapplet
-  pkgs.nix-du
-  pkgs.parcellite
-  pkgs.pasystray
-  pkgs.pavucontrol
-  pkgs.thunderbird
-  pkgs.transmission-gtk
-  pkgs.vlc
-  pkgs.xclip
-  pkgs.xsane
-];
 }