1
0
dotfiles/darwin/home-manager.nix

79 lines
2.1 KiB
Nix

{ email, name, pkgs, sshSignKey, user, ... }:
{
# It me
users.users.${user} = {
name = "${user}";
home = "/Users/${user}";
isHidden = false;
shell = pkgs.zsh;
};
homebrew = {
enable = true;
onActivation = {
autoUpdate = true;
upgrade = true;
cleanup = "zap";
};
casks = pkgs.callPackage ./casks.nix { };
brews = [
"openssl" # Required by cargo-update (`LDFLAGS="-L/usr/local/opt/openssl@3/lib" CPPFLAGS="-I/usr/local/opt/openssl@3/include" cargo install cargo-update`)
# MiniZinc solvers
"dekker1/minizinc/choco"
"dekker1/minizinc/flatzingo"
"dekker1/minizinc/geas"
"dekker1/minizinc/jacop"
"dekker1/minizinc/fzn-oscar-cbls"
"dekker1/minizinc/fzn-picat"
"dekker1/minizinc/pumpkin"
"dekker1/minizinc/yuck"
"scip"
];
taps = [
"dekker1/minizinc"
];
# These app IDs are from using the mas CLI app
# mas = mac app store
# https://github.com/mas-cli/mas
#
# $ nix shell nixpkgs#mas
# $ mas search <app name>
#
masApps = {
"1Password for Safari" = 1569813296;
"Baking Soda" = 1601151613;
"Keynote" = 409183694;
"Numbers" = 409203825;
"Pages" = 409201541;
"Pixelmator Pro" = 1289583905;
"Qantas" = 1468230799;
"Textual IRC Client" = 1262957439;
"The Unarchiver" = 425424353;
"Userscripts-Mac-App" = 1463298887;
"Vinegar" = 1591303229;
"Wipr" = 1320666476;
};
};
# Enable home-manager
home-manager = {
useGlobalPkgs = true;
users.${user} = { pkgs, config, lib, ... }: {
home.enableNixpkgsReleaseCheck = false;
home.stateVersion = "21.11";
programs = lib.attrsets.recursiveUpdate (import ../shared/home-manager.nix {
inherit config email lib name pkgs sshSignKey user;
}) {
# MacOS specific home-manager program settings
git.extraConfig.gpg.ssh.program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign";
skim.enable = true;
ssh.matchBlocks."*".extraOptions."UseKeychain" = "yes";
};
};
};
}