{ pkgs, lib, config, hostName, ... }: { imports = [ ./softwares.nix ./options.nix julm/mutt.nix (import (julm/hosts + "/${hostName}.nix")) ]; host.base = lib.elem hostName [ "losurdo" "mermet" "oignon" ]; host.desktop = lib.elem hostName [ /*"losurdo"*/ "oignon" ]; host.server = lib.elem hostName [ "losurdo" "mermet" ]; host.admin = lib.elem hostName [ "losurdo" "mermet" "oignon" ]; host.developer = lib.elem hostName [ "losurdo" "oignon" ]; host.media = lib.elem hostName [ "losurdo" "oignon" ]; programs.bat.enable = config.host.base; programs.bash.enable = config.host.base; #programs.broot.enable = config.host.base; programs.firefox = { enable = config.host.desktop; profiles = let defaultProfile = { settings = { "browser.bookmarks.showMobileBookmarks" = 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"; }; }]; }; }; programs.gpg.enable = config.host.base; home.file."${config.programs.gpg.homedir}/gpg.conf".text = '' # julm@autogeree.net trusted-key 0xD15AF7F467E8299B # julm@sourcephile.fr (2021-08-12) trusted-key 0xA58CD81C3863926F ''; services.gpg-agent.enable = config.host.base; services.gpg-agent.sshKeys = [ # julm@autogeree.net "D275EBA09C7E1FFBFB47F6EEF164E6D56FB24AB2" # julm@sourcephile.fr (2021-08-12) "3D94D14514F1EA2B6D62F1275D888897B082415D" ]; programs.direnv.enable = config.host.base; programs.htop.enable = config.host.base; programs.irssi.enable = hostName == "mermet" || hostName == "losurdo"; 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.man.enable = config.host.base; #programs.neovim.enable = config.host.base; programs.ssh.enable = config.host.base; programs.ssh.matchBlocks."lan.losurdo.sourcephile.fr" = { compression = true; # Helps to get a better framerate with forwardX11 forwardX11 = true; forwardX11Trusted = true; serverAliveInterval = 15; }; programs.tmux.enable = config.host.base; programs.vim.enable = config.host.base; manual.manpages.enable = config.host.base; programs.git = { enable = config.host.base; 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"; sendemail.smtpServerPort = "465"; sendemail.smtpUser = "julm@sourcephile.fr"; }; }; services.redshift.enable = lib.mkDefault config.host.desktop; xsession.enable = lib.mkDefault config.host.desktop; xsession.windowManager.xmonad.enable = lib.mkDefault 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"; }; # Warning: triggers a rebuild of mumble #nixpkgs.config.mumble.speechdSupport = lib.mkDefault config.host.desktop; home.packages = lib.optionals config.host.base [ #pkgs.amfora pkgs.bc #pkgs.browsh #pkgs.cabal2nix pkgs.coreutils pkgs.croc pkgs.curl #pkgs.dnsutils pkgs.exa pkgs.file #pkgs.git-remote-gpg pkgs.glib # gio #pkgs.go-mtpfs pkgs.gvfs #pkgs.haskell.packages.ghc865.zerobin pkgs.htop pkgs.hwinfo pkgs.inetutils #pkgs.ipfs #pkgs.i7z pkgs.less pkgs.lf pkgs.lftp pkgs.libfaketime pkgs.libidn pkgs.libxml2.bin #pkgs.linuxPackages.cpupower #pkgs.linuxPackages.perf pkgs.lm_sensors pkgs.lsof pkgs.lsscsi pkgs.mastodon-archive #pkgs.meli pkgs.mosh pkgs.ncdu pkgs.ncurses pkgs.ntfs3g #pkgs.onionshare pkgs.openssl pkgs.p7zip pkgs.pass pkgs.pastebinit pkgs.pciutils pkgs.poppler_utils pkgs.powertop pkgs.procps #pkgs.profanity pkgs.pv #pkgs.ranger #pkgs.ripgrep pkgs.sanoid #pkgs.sdate pkgs.sshfs pkgs.tcpdump pkgs.tree pkgs.unar pkgs.unzip pkgs.usbutils pkgs.utillinux pkgs.vbetool pkgs.wget pkgs.wgetpaste pkgs.which pkgs.xdg_utils pkgs.zfs ] ++ lib.optionals config.host.desktop [ #pkgs.calibre #pkgs.chromium pkgs.amule pkgs.dino pkgs.djview pkgs.dmenu pkgs.evince pkgs.freeciv_gtk pkgs.gajim pkgs.geeqie pkgs.gimp pkgs.glxinfo pkgs.gparted pkgs.gpicview pkgs.hicolor-icon-theme pkgs.keepass pkgs.libdvdcss pkgs.libreoffice pkgs.liferea pkgs.mpv pkgs.mumble pkgs.networkmanager-openvpn pkgs.networkmanagerapplet pkgs.nix-du pkgs.pavucontrol pkgs.pdftk #pkgs.ristretto pkgs.thunderbird pkgs.transmission-gtk pkgs.vlc pkgs.xclip pkgs.xorg.xkill pkgs.xsane pkgs.yubikey-personalization-gui ] ++ lib.optionals config.host.media [ pkgs.aria2 pkgs.convmv pkgs.ffmpeg pkgs.imagemagick pkgs.mplayer pkgs.podl pkgs.stig pkgs.yt-dlp ] ++ lib.optionals config.host.admin [ pkgs.acpi pkgs.bmon pkgs.cachix pkgs.cryptsetup #pkgs.compsize pkgs.dstat pkgs.e2fsprogs pkgs.ethtool pkgs.knot-dns pkgs.ldns pkgs.miniupnpc pkgs.nmon pkgs.nnn pkgs.parted pkgs.rdfind pkgs.smartmontools pkgs.strace pkgs.stress-ng ] ++ lib.optionals config.host.developer [ pkgs.aspell pkgs.aspellDicts.fr pkgs.binutils pkgs.binwalk #pkgs.dracut not yet packaged pkgs.git-chglog pkgs.git-crypt pkgs.git-quick-stats pkgs.gnumake pkgs.graphviz pkgs.hledger pkgs.hunspell pkgs.hunspellDicts.fr-moderne pkgs.jc pkgs.jq pkgs.mailutils pkgs.neofetch pkgs.nix-prefetch-git pkgs.nixpkgs-review pkgs.opusTools pkgs.patchelf pkgs.picocom pkgs.qprint pkgs.reuse pkgs.shellcheck pkgs.sipcalc pkgs.socat pkgs.sqlite pkgs.tig pkgs.xmlstarlet pkgs.xsel pkgs.yubikey-personalization ]; }