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; [
|
environment.systemPackages = with pkgs; [
|
||||||
discord
|
|
||||||
home-manager
|
home-manager
|
||||||
jetbrains.clion
|
jetbrains.clion
|
||||||
jetbrains.idea-ultimate
|
jetbrains.idea-ultimate
|
||||||
|
@ -30,7 +29,6 @@
|
||||||
pkg:
|
pkg:
|
||||||
builtins.elem (lib.getName pkg) [
|
builtins.elem (lib.getName pkg) [
|
||||||
"clion"
|
"clion"
|
||||||
"discord"
|
|
||||||
"idea-ultimate"
|
"idea-ultimate"
|
||||||
"pycharm-professional"
|
"pycharm-professional"
|
||||||
"webstorm"
|
"webstorm"
|
||||||
|
@ -39,11 +37,27 @@
|
||||||
homebrew = {
|
homebrew = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
onActivation = {
|
||||||
|
autoUpdate = true;
|
||||||
|
cleanup = "zap";
|
||||||
|
};
|
||||||
|
|
||||||
|
brews = [
|
||||||
|
"libfido2"
|
||||||
|
"mas"
|
||||||
|
"openssh"
|
||||||
|
"theseal/ssh-askpass/ssh-askpass"
|
||||||
|
];
|
||||||
|
|
||||||
casks = [
|
casks = [
|
||||||
"affinity-designer"
|
"affinity-designer"
|
||||||
"affinity-photo"
|
"affinity-photo"
|
||||||
"affinity-publisher"
|
"affinity-publisher"
|
||||||
|
"audacity"
|
||||||
|
"discord"
|
||||||
|
"element"
|
||||||
"fantastical"
|
"fantastical"
|
||||||
|
"firefox"
|
||||||
"ghostty"
|
"ghostty"
|
||||||
"notion"
|
"notion"
|
||||||
"obsidian"
|
"obsidian"
|
||||||
|
@ -54,10 +68,59 @@
|
||||||
masApps = {
|
masApps = {
|
||||||
"Things" = 904280696;
|
"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 = {
|
system = {
|
||||||
|
defaults.NSGlobalDomain = {
|
||||||
|
"com.apple.swipescrolldirection" = false;
|
||||||
|
};
|
||||||
primaryUser = "irl";
|
primaryUser = "irl";
|
||||||
stateVersion = 6;
|
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