mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 23:22:57 +00:00
fixes for onboarding aarch64-darwin
This commit is contained in:
parent
68c5816d4d
commit
324956c091
@ -5,6 +5,7 @@
|
|||||||
program = builtins.toString (pkgs.writeShellScript "loadkey" ''
|
program = builtins.toString (pkgs.writeShellScript "loadkey" ''
|
||||||
printf "\nEnter the seed phrase for your SSH key...\n"
|
printf "\nEnter the seed phrase for your SSH key...\n"
|
||||||
printf "\nThen press ^D when complete.\n\n"
|
printf "\nThen press ^D when complete.\n\n"
|
||||||
|
mkdir -p ~/.ssh/
|
||||||
${pkgs.melt}/bin/melt restore ~/.ssh/id_ed25519
|
${pkgs.melt}/bin/melt restore ~/.ssh/id_ed25519
|
||||||
printf "\n\nContinuing activation.\n\n"
|
printf "\n\nContinuing activation.\n\n"
|
||||||
'');
|
'');
|
||||||
|
@ -40,6 +40,7 @@ inputs.darwin.lib.darwinSystem {
|
|||||||
python.enable = true;
|
python.enable = true;
|
||||||
rust.enable = true;
|
rust.enable = true;
|
||||||
lua.enable = true;
|
lua.enable = true;
|
||||||
|
obsidian.enable = true;
|
||||||
kubernetes.enable = true;
|
kubernetes.enable = true;
|
||||||
_1password.enable = true;
|
_1password.enable = true;
|
||||||
slack.enable = true;
|
slack.enable = true;
|
||||||
|
@ -9,12 +9,18 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf
|
config = lib.mkIf (config.gui.enable && config._1password.enable) {
|
||||||
(config.gui.enable && config._1password.enable && pkgs.stdenv.isLinux) {
|
unfreePackages = [ "1password" "_1password-gui" "1password-cli" ];
|
||||||
unfreePackages = [ "1password" "_1password-gui" ];
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
home.packages = with pkgs; [ _1password-gui ];
|
home.packages = with pkgs; [ _1password-gui ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# https://1password.community/discussion/135462/firefox-extension-does-not-connect-to-linux-app
|
||||||
|
# Doesn't seem to fix the issue on macOS anyway
|
||||||
|
environment.etc."1password/custom_allowed_browsers".text = ''
|
||||||
|
${config.home-manager.users.${config.user}.programs.firefox.package}
|
||||||
|
firefox
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -35,8 +35,20 @@ in {
|
|||||||
init = { defaultBranch = "master"; };
|
init = { defaultBranch = "master"; };
|
||||||
};
|
};
|
||||||
ignores = [ ".direnv/**" "result" ];
|
ignores = [ ".direnv/**" "result" ];
|
||||||
|
includes = [{
|
||||||
|
path = "~/.config/git/personal";
|
||||||
|
condition = "gitdir:~/dev/personal/";
|
||||||
|
}];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Personal git config
|
||||||
|
# TODO: fix with variables
|
||||||
|
xdg.configFile."git/personal".text = ''
|
||||||
|
[user]
|
||||||
|
name = "Noah Masur"
|
||||||
|
email = "7386960+nmasur@users.noreply.github.com"
|
||||||
|
'';
|
||||||
|
|
||||||
programs.fish.shellAbbrs = {
|
programs.fish.shellAbbrs = {
|
||||||
g = "git";
|
g = "git";
|
||||||
gs = "git status";
|
gs = "git status";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
@ -60,12 +60,24 @@
|
|||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Create nix-index if doesn't exist
|
||||||
|
home.activation.createNixIndex =
|
||||||
|
let cacheDir = "${config.homePath}/.cache/nix-index";
|
||||||
|
in lib.mkIf
|
||||||
|
config.home-manager.users.${config.user}.programs.nix-index.enable
|
||||||
|
(config.home-manager.users.${config.user}.lib.dag.entryAfter
|
||||||
|
[ "writeBoundary" ] ''
|
||||||
|
if [ ! -d ${cacheDir} ]; then
|
||||||
|
$DRY_RUN_CMD ${pkgs.nix-index}/bin/nix-index -f ${pkgs.path}
|
||||||
|
fi
|
||||||
|
'');
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
|
|
||||||
# Set channel to flake packages, used for nix-shell commands
|
# Set channel to flake packages, used for nix-shell commands
|
||||||
nixPath = [ "nixpkgs=${pkgs.path}" ];
|
nixPath = [{ nixpkgs = pkgs.path; }];
|
||||||
|
|
||||||
# Set registry to this flake's packages, used for nix X commands
|
# Set registry to this flake's packages, used for nix X commands
|
||||||
registry.nixpkgs.to = {
|
registry.nixpkgs.to = {
|
||||||
|
@ -24,9 +24,9 @@
|
|||||||
home.activation.reloadHammerspoon =
|
home.activation.reloadHammerspoon =
|
||||||
config.home-manager.users.${config.user}.lib.dag.entryAfter
|
config.home-manager.users.${config.user}.lib.dag.entryAfter
|
||||||
[ "writeBoundary" ] ''
|
[ "writeBoundary" ] ''
|
||||||
$DRY_RUN_CMD /usr/local/bin/hs -c "hs.reload()"
|
$DRY_RUN_CMD /Applications/Hammerspoon.app/Contents/Frameworks/hs/hs -c "hs.reload()"
|
||||||
$DRY_RUN_CMD sleep 1
|
$DRY_RUN_CMD sleep 1
|
||||||
$DRY_RUN_CMD /usr/local/bin/hs -c "hs.console.clearConsole()"
|
$DRY_RUN_CMD /Applications/Hammerspoon.app/Contents/Frameworks/hs/hs -c "hs.console.clearConsole()"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
hs.ipc.cliInstall() -- Install Hammerspoon CLI program
|
||||||
hs.loadSpoon("ControlEscape"):start() -- Load Hammerspoon bits from https://github.com/jasonrudolph/ControlEscape.spoon
|
hs.loadSpoon("ControlEscape"):start() -- Load Hammerspoon bits from https://github.com/jasonrudolph/ControlEscape.spoon
|
||||||
hs.loadSpoon("Launcher"):init()
|
hs.loadSpoon("Launcher"):init()
|
||||||
hs.loadSpoon("DismissAlerts"):init()
|
hs.loadSpoon("DismissAlerts"):init()
|
||||||
hs.loadSpoon("MoveWindow"):init()
|
hs.loadSpoon("MoveWindow"):init()
|
||||||
hs.ipc.cliInstall() -- Install Hammerspoon CLI program
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
if ! xcode-select --version 2>/dev/null; then
|
if ! xcode-select --version 2>/dev/null; then
|
||||||
$DRY_RUN_CMD xcode-select --install
|
$DRY_RUN_CMD xcode-select --install
|
||||||
fi
|
fi
|
||||||
if ! /usr/local/bin/brew --version 2>/dev/null; then
|
if ! /opt/homebrew/bin/brew --version 2>/dev/null; then
|
||||||
$DRY_RUN_CMD /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
$DRY_RUN_CMD /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
@ -29,7 +29,7 @@
|
|||||||
"openjdk" # Required by Apache Directory Studio
|
"openjdk" # Required by Apache Directory Studio
|
||||||
];
|
];
|
||||||
casks = [
|
casks = [
|
||||||
# "1password" # 1Password packaging on Nix is broken for macOS
|
"1password" # 1Password will not launch from Nix on macOS
|
||||||
"apache-directory-studio" # Packaging on Nix is not available for macOS
|
"apache-directory-studio" # Packaging on Nix is not available for macOS
|
||||||
"gitify" # Git notifications in menu bar
|
"gitify" # Git notifications in menu bar
|
||||||
"keybase" # GUI on Nix not available for macOS
|
"keybase" # GUI on Nix not available for macOS
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
config = lib.mkIf pkgs.stdenv.isDarwin {
|
config = lib.mkIf pkgs.stdenv.isDarwin {
|
||||||
networking = {
|
networking = {
|
||||||
computerName = "${config.fullName}'\\''s Mac";
|
computerName = config.networking.hostName;
|
||||||
# Adjust if necessary
|
# Adjust if necessary
|
||||||
# hostName = "";
|
# hostName = "";
|
||||||
};
|
};
|
||||||
|
@ -34,8 +34,8 @@
|
|||||||
# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
|
# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
|
||||||
AppleKeyboardUIMode = 3;
|
AppleKeyboardUIMode = 3;
|
||||||
|
|
||||||
# Automatically show and hide the menu bar
|
# Only hide menu bar in fullscreen
|
||||||
_HIHideMenuBar = true;
|
_HIHideMenuBar = false;
|
||||||
|
|
||||||
# Expand save panel by default
|
# Expand save panel by default
|
||||||
NSNavPanelExpandedStateForSaveMode = true;
|
NSNavPanelExpandedStateForSaveMode = true;
|
||||||
@ -180,7 +180,7 @@
|
|||||||
"$(__dock_item /System/Applications/Mail.app)" \
|
"$(__dock_item /System/Applications/Mail.app)" \
|
||||||
"$(__dock_item /Applications/zoom.us.app)" \
|
"$(__dock_item /Applications/zoom.us.app)" \
|
||||||
"$(__dock_item ${pkgs.discord}/Applications/Discord.app)" \
|
"$(__dock_item ${pkgs.discord}/Applications/Discord.app)" \
|
||||||
"$(__dock_item /Applications/Obsidian.app)" \
|
"$(__dock_item ${pkgs.obsidian}/Applications/Obsidian.app)" \
|
||||||
"$(__dock_item ${pkgs.kitty}/Applications/kitty.app)" \
|
"$(__dock_item ${pkgs.kitty}/Applications/kitty.app)" \
|
||||||
"$(__dock_item /System/Applications/System\ Settings.app)"
|
"$(__dock_item /System/Applications/System\ Settings.app)"
|
||||||
'';
|
'';
|
||||||
|
@ -9,8 +9,18 @@
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
|
# Default shell setting doesn't work
|
||||||
|
home.sessionVariables = { SHELL = "${pkgs.fish}/bin/fish"; };
|
||||||
|
|
||||||
# Used for aerc
|
# Used for aerc
|
||||||
home-manager.users.${config.user}.xdg.enable = true;
|
xdg.enable = true;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# Fix for: 'Error: HOME is set to "/var/root" but we expect "/var/empty"'
|
||||||
|
home-manager.users.root.home.homeDirectory = lib.mkForce "/var/root";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user