2022-09-18 15:49:37 +00:00
|
|
|
{ pkgs, lib, config, home-manager, nix-darwin, inputs, ... }: {
|
|
|
|
|
|
|
|
# Can probably be removed when this is resolved:
|
|
|
|
# https://github.com/nix-community/home-manager/issues/1341
|
|
|
|
home.activation = {
|
2022-09-19 14:23:37 +00:00
|
|
|
copyApplications =
|
|
|
|
let
|
|
|
|
apps = pkgs.buildEnv {
|
|
|
|
name = "home-manager-applications";
|
|
|
|
paths = config.home.packages;
|
|
|
|
pathsToLink = "/Applications";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
|
|
|
baseDir="$HOME/Applications/Home Manager Apps"
|
|
|
|
if [ -d "$baseDir" ]; then
|
|
|
|
rm -rf "$baseDir"
|
|
|
|
fi
|
|
|
|
mkdir -p "$baseDir"
|
|
|
|
for appFile in ${apps}/Applications/*; do
|
|
|
|
target="$baseDir/$(basename "$appFile")"
|
|
|
|
$DRY_RUN_CMD cp ''${VERBOSE_ARG:+-v} -fHRL "$appFile" "$baseDir"
|
|
|
|
$DRY_RUN_CMD chmod ''${VERBOSE_ARG:+-v} -R +w "$target"
|
|
|
|
done
|
|
|
|
'';
|
2022-09-18 15:49:37 +00:00
|
|
|
};
|
|
|
|
|
2022-10-01 06:58:37 +00:00
|
|
|
|
2022-09-18 15:49:37 +00:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
((emacsPackagesFor emacs-mac).emacsWithPackages
|
2022-09-19 14:23:37 +00:00
|
|
|
(epkgs: with epkgs; [
|
|
|
|
vterm
|
|
|
|
pdf-tools
|
2022-09-20 19:14:28 +00:00
|
|
|
pkgs.mu
|
2022-09-19 14:23:37 +00:00
|
|
|
]))
|
|
|
|
(aspellWithDicts
|
|
|
|
(dpkgs: with dpkgs; [
|
|
|
|
en
|
|
|
|
en-computers
|
|
|
|
en-science
|
2022-09-18 15:49:37 +00:00
|
|
|
]))
|
2022-10-01 06:58:37 +00:00
|
|
|
(python3.withPackages
|
|
|
|
(python-packages: with python-packages; [
|
|
|
|
hypothesis
|
|
|
|
graphviz
|
|
|
|
z3
|
2022-10-24 16:35:22 +00:00
|
|
|
pygments
|
2022-10-01 06:58:37 +00:00
|
|
|
]))
|
2022-09-19 09:38:12 +00:00
|
|
|
bat
|
2022-10-21 12:14:37 +00:00
|
|
|
cbqn
|
2022-10-08 21:25:21 +00:00
|
|
|
cloc
|
2022-10-01 06:58:37 +00:00
|
|
|
clojure
|
2022-09-18 15:49:37 +00:00
|
|
|
fd
|
2022-09-19 14:06:07 +00:00
|
|
|
ffmpeg
|
2022-09-19 14:23:37 +00:00
|
|
|
fzf
|
2022-10-25 17:45:31 +00:00
|
|
|
ghc
|
2022-10-01 06:58:37 +00:00
|
|
|
go
|
|
|
|
graphviz
|
2022-09-19 14:23:37 +00:00
|
|
|
htop
|
2022-10-01 06:58:37 +00:00
|
|
|
inkscape
|
|
|
|
leiningen
|
2022-09-19 14:23:37 +00:00
|
|
|
nixpkgs-fmt
|
2022-10-10 07:34:32 +00:00
|
|
|
jdk
|
2022-10-01 06:58:37 +00:00
|
|
|
pandoc
|
|
|
|
parallel
|
|
|
|
poppler_utils
|
2022-09-18 15:49:37 +00:00
|
|
|
ripgrep
|
2022-09-19 14:24:16 +00:00
|
|
|
rnix-lsp
|
2022-10-21 12:14:42 +00:00
|
|
|
rust-analyzer
|
2022-10-01 06:58:37 +00:00
|
|
|
rustup
|
|
|
|
texlive.combined.scheme-full
|
2022-09-18 15:49:37 +00:00
|
|
|
tree
|
|
|
|
wget
|
|
|
|
];
|
|
|
|
|
2022-09-19 14:23:37 +00:00
|
|
|
# Somehow related to: https://github.com/NixOS/nixpkgs/issues/1000
|
2022-09-18 15:49:37 +00:00
|
|
|
home.file.".aspell.conf".text = "data-dir ${pkgs.aspell}/lib/aspell";
|
|
|
|
|
2022-09-20 19:14:28 +00:00
|
|
|
accounts.email = {
|
|
|
|
accounts.uio = {
|
|
|
|
address = "larstvei@ifi.uio.no";
|
|
|
|
userName = "larstvei@ifi.uio.no";
|
|
|
|
realName = "Lars Tveito";
|
|
|
|
imap.host = "imap.uio.no";
|
|
|
|
smtp.host = "smtp.uio.no";
|
|
|
|
|
|
|
|
mbsync = {
|
|
|
|
enable = true;
|
|
|
|
create = "maildir";
|
|
|
|
# Because of Office 365, see: https://kdecherf.com/blog/2017/05/01/mbsync-and-office-365/
|
|
|
|
extraConfig.account.Timeout = 120;
|
|
|
|
extraConfig.account.PipelineDepth = 1;
|
|
|
|
};
|
|
|
|
|
|
|
|
msmtp.enable = true;
|
|
|
|
mu.enable = true;
|
|
|
|
|
|
|
|
primary = true;
|
|
|
|
passwordCommand = "security find-internet-password -s imap.uio.no -a larstvei -w";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-09-19 14:23:37 +00:00
|
|
|
programs = {
|
|
|
|
fzf = {
|
|
|
|
enable = true;
|
|
|
|
enableFishIntegration = true;
|
2022-09-18 19:33:50 +00:00
|
|
|
};
|
|
|
|
|
2022-09-19 14:23:37 +00:00
|
|
|
fish = {
|
|
|
|
enable = true;
|
2022-09-18 19:33:50 +00:00
|
|
|
|
2022-09-19 14:23:37 +00:00
|
|
|
functions = {
|
|
|
|
track_directories = {
|
|
|
|
description = "For directory tracking in emacs vterm";
|
|
|
|
onEvent = "fish_postexec";
|
|
|
|
body = "printf \'\\e]51;A\'(pwd)\'\\e\\\\\'";
|
|
|
|
};
|
2022-09-18 20:57:44 +00:00
|
|
|
};
|
2022-09-19 14:23:37 +00:00
|
|
|
|
|
|
|
shellInit = ''
|
2022-10-09 21:15:07 +00:00
|
|
|
if test "$TERM" != "dumb"
|
|
|
|
track_directories
|
|
|
|
end
|
2022-09-19 14:23:37 +00:00
|
|
|
'';
|
2022-09-18 20:57:44 +00:00
|
|
|
};
|
|
|
|
|
2022-09-19 14:23:37 +00:00
|
|
|
starship = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
character = {
|
|
|
|
success_symbol = "[λ](bold green)";
|
|
|
|
error_symbol = "[λ](bold red)";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
git = {
|
|
|
|
enable = true;
|
|
|
|
userName = "larstvei";
|
|
|
|
userEmail = "larstvei@ifi.uio.no";
|
|
|
|
ignores = [ ".dir-locals.el" ".envrc" ".DS_Store" ];
|
|
|
|
};
|
|
|
|
|
2022-09-20 19:14:28 +00:00
|
|
|
mu.enable = true;
|
|
|
|
msmtp.enable = true;
|
|
|
|
mbsync.enable = true;
|
|
|
|
|
2022-09-19 14:23:37 +00:00
|
|
|
# Let Home Manager install and manage itself.
|
|
|
|
home-manager.enable = true;
|
2022-09-18 15:49:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# This value determines the Home Manager release that your
|
|
|
|
# configuration is compatible with. This helps avoid breakage
|
|
|
|
# when a new Home Manager release introduces backwards
|
|
|
|
# incompatible changes.
|
|
|
|
#
|
|
|
|
# You can update Home Manager without changing this value. See
|
|
|
|
# the Home Manager release notes for a list of state version
|
|
|
|
# changes in each release.
|
|
|
|
home.stateVersion = "22.05";
|
|
|
|
}
|