{ config, lib, pkgs, ... }: with lib; let name = "Niten"; email = "niten@fudo.org"; hostname = config.instance.hostname; host-config = config.fudo.hosts.${hostname}; enable-gui = host-config.enable-gui; gui-packages = with pkgs; [ exodus firefox jq nyxt openttd redshift signal-desktop spotify xclip ]; common-packages = with pkgs; [ ant asdf atop binutils btrfs-progs bundix byobu cdrtools cargo clojure cmake curl doomEmacsInit enca file fortune git gnome.gnome-tweaks gnutls gnupg google-chrome guile imagemagick ipfs iptables jdk leiningen libisofs lispPackages.quicklisp lsof lshw minecraft mkpasswd mplayer mtr nixfmt nix-index nixops nix-prefetch-git nyxt nmap opencv-java openldap openssl pciutils pipewire pv pwgen python ruby rustc sbcl stdenv telnet texlive.combined.scheme-basic tmux unzip youtube-dl yubikey-manager yubikey-personalization # Check and pick a favorite molly-brown ncgopher amfora asuka kristall castor ]; in { programs = { bash = { enable = true; }; git = { enable = true; userName = name; userEmail = email; ignores = [ "*~" ]; extraConfig = { pull = { rebase = false; }; }; }; }; xresources.properties = mkIf enable-gui { "Xft.antialias" = 1; "Xft.autohint" = 0; "Xft.dpi" = 192; "Xft.hinting" = 1; "Xft.hintstyle" = "hintfull"; "Xft.lcdfilter" = "lcddefault"; }; services.gpg-agent.enable = true; home = { packages = if enable-gui then common-packages ++ gui-packages else common-packages; file = { ".doom.d" = { source = pkgs.doom-emacs-config; recursive = true; onChange = "${pkgs.doomEmacsInit}/bin/doom-emacs-init.sh"; }; ".local/share/openttd/baseset" = mkIf enable-gui { source = "${pkgs.openttd-data}/data"; }; # ".xsessions" = { # mode = "0554"; # text = '' # # -*-bash-*- # gdmauth=$XAUTHORITY # unset XAUTHORITY # export XAUTHORITY # xauth merge "$gdmauth" # if [ -f $HOME/.xinitrc ]; then # bash --login -i $HOME/.xinitrc # fi # ''; # }; }; sessionVariables = { EDITOR = "emacsclient -t"; ALTERNATE_EDITOR = ""; HISTCONTROL = "ignoredups:ignorespace"; }; }; }