2025-07-03 21:31:06 +01:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
nix-darwin,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
{
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
home-manager
|
|
|
|
jetbrains.clion
|
|
|
|
jetbrains.idea-ultimate
|
|
|
|
jetbrains.pycharm-professional
|
|
|
|
jetbrains.webstorm
|
|
|
|
];
|
|
|
|
|
|
|
|
environment.darwinConfig = "/Users/irl/.config/nix-configs";
|
|
|
|
|
|
|
|
nix = {
|
|
|
|
package = pkgs.nix;
|
|
|
|
settings = {
|
|
|
|
"extra-experimental-features" = [
|
|
|
|
"nix-command"
|
|
|
|
"flakes"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nixpkgs.config.allowUnfreePredicate =
|
|
|
|
pkg:
|
|
|
|
builtins.elem (lib.getName pkg) [
|
|
|
|
"clion"
|
|
|
|
"idea-ultimate"
|
|
|
|
"pycharm-professional"
|
|
|
|
"webstorm"
|
|
|
|
];
|
|
|
|
|
|
|
|
homebrew = {
|
|
|
|
enable = true;
|
|
|
|
|
2025-07-06 22:54:49 +01:00
|
|
|
onActivation = {
|
|
|
|
autoUpdate = true;
|
|
|
|
cleanup = "zap";
|
|
|
|
};
|
|
|
|
|
|
|
|
brews = [
|
|
|
|
"libfido2"
|
|
|
|
"mas"
|
|
|
|
"openssh"
|
|
|
|
"theseal/ssh-askpass/ssh-askpass"
|
|
|
|
];
|
|
|
|
|
2025-07-03 21:31:06 +01:00
|
|
|
casks = [
|
|
|
|
"affinity-designer"
|
|
|
|
"affinity-photo"
|
|
|
|
"affinity-publisher"
|
2025-07-06 22:54:49 +01:00
|
|
|
"audacity"
|
|
|
|
"discord"
|
|
|
|
"element"
|
2025-07-03 21:31:06 +01:00
|
|
|
"fantastical"
|
2025-07-06 22:54:49 +01:00
|
|
|
"firefox"
|
2025-07-03 21:31:06 +01:00
|
|
|
"ghostty"
|
|
|
|
"notion"
|
|
|
|
"obsidian"
|
|
|
|
"tor-browser"
|
|
|
|
"vlc"
|
|
|
|
];
|
|
|
|
|
|
|
|
masApps = {
|
|
|
|
"Things" = 904280696;
|
|
|
|
};
|
2025-07-06 22:54:49 +01:00
|
|
|
|
|
|
|
taps = [
|
|
|
|
"theseal/ssh-askpass"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
programs = {
|
|
|
|
# TODO: rewrite in fish maybe
|
|
|
|
zsh.shellInit = ''
|
|
|
|
export SSH_ASKPASS=/opt/homebrew/bin/ssh-askpass
|
|
|
|
export SSH_ASKPASS_REQUIRE=force
|
|
|
|
|
|
|
|
checkSSHAgent() {
|
|
|
|
if [ "$1" = "-k" ] ; then
|
|
|
|
pkill -9 ssh-agent
|
|
|
|
fi
|
|
|
|
|
|
|
|
ssh_agent_conf="$HOME/.ssh/agent"
|
|
|
|
if [ -e "$ssh_agent_conf" ] ; then
|
|
|
|
. "$ssh_agent_conf"
|
|
|
|
fi
|
|
|
|
if ! ps aux | awk '{print $2}' | grep -q "$SSH_AGENT_PID" \
|
|
|
|
|| ! [ -e "$ssh_agent_conf" ] \
|
|
|
|
|| [ -z "$SSH_AGENT_PID" ] ; \
|
|
|
|
then
|
|
|
|
ssh-agent -s | grep -v echo > "$ssh_agent_conf"
|
|
|
|
. "$ssh_agent_conf"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
checkSSHAgent
|
|
|
|
'';
|
2025-07-03 21:31:06 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
system = {
|
2025-07-06 22:54:49 +01:00
|
|
|
defaults.NSGlobalDomain = {
|
|
|
|
"com.apple.swipescrolldirection" = false;
|
|
|
|
};
|
2025-07-03 21:31:06 +01:00
|
|
|
primaryUser = "irl";
|
|
|
|
stateVersion = 6;
|
|
|
|
};
|
2025-07-06 22:54:49 +01:00
|
|
|
|
|
|
|
users.users = {
|
|
|
|
irl = {
|
|
|
|
description = "irl";
|
|
|
|
home = "/Users/irl";
|
|
|
|
name = "irl";
|
|
|
|
|
|
|
|
# This is the macOS zsh, not from nix!
|
|
|
|
# My home-manager configuration contains some zshrc to automatically
|
|
|
|
# start fish for interactive shells where the parent process is not
|
|
|
|
# already fish.
|
|
|
|
shell = "/bin/zsh";
|
|
|
|
};
|
|
|
|
};
|
2025-07-03 21:31:06 +01:00
|
|
|
}
|