feat: darwin system apps and sk ssh keys working
This commit is contained in:
parent
fca82b60ce
commit
c4ad720492
2 changed files with 72 additions and 2 deletions
|
@ -6,7 +6,6 @@
|
|||
}:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
discord
|
||||
home-manager
|
||||
jetbrains.clion
|
||||
jetbrains.idea-ultimate
|
||||
|
@ -30,7 +29,6 @@
|
|||
pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"clion"
|
||||
"discord"
|
||||
"idea-ultimate"
|
||||
"pycharm-professional"
|
||||
"webstorm"
|
||||
|
@ -39,11 +37,27 @@
|
|||
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"
|
||||
|
@ -54,10 +68,59 @@
|
|||
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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
7
darwin/irl-mac-mini.nix
Normal file
7
darwin/irl-mac-mini.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
networking.hostName = "irl-mac-mini";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue