{ 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; onActivation = { autoUpdate = true; cleanup = "zap"; }; brews = [ "libfido2" "mas" "openssh" "theseal/ssh-askpass/ssh-askpass" ]; casks = [ "affinity-designer" "affinity-photo" "affinity-publisher" "audacity" "discord" "element" "fantastical" "firefox" "ghostty" "notion" "obsidian" "tor-browser" "vlc" ]; masApps = { "Things" = 904280696; }; 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 ''; }; system = { defaults.NSGlobalDomain = { "com.apple.swipescrolldirection" = false; }; primaryUser = "irl"; stateVersion = 6; }; 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"; }; }; }