mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-21 21:05:38 +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" ''
|
||||
printf "\nEnter the seed phrase for your SSH key...\n"
|
||||
printf "\nThen press ^D when complete.\n\n"
|
||||
mkdir -p ~/.ssh/
|
||||
${pkgs.melt}/bin/melt restore ~/.ssh/id_ed25519
|
||||
printf "\n\nContinuing activation.\n\n"
|
||||
'');
|
||||
|
@ -40,6 +40,7 @@ inputs.darwin.lib.darwinSystem {
|
||||
python.enable = true;
|
||||
rust.enable = true;
|
||||
lua.enable = true;
|
||||
obsidian.enable = true;
|
||||
kubernetes.enable = true;
|
||||
_1password.enable = true;
|
||||
slack.enable = true;
|
||||
|
@ -9,12 +9,18 @@
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf
|
||||
(config.gui.enable && config._1password.enable && pkgs.stdenv.isLinux) {
|
||||
unfreePackages = [ "1password" "_1password-gui" ];
|
||||
home-manager.users.${config.user} = {
|
||||
home.packages = with pkgs; [ _1password-gui ];
|
||||
};
|
||||
config = lib.mkIf (config.gui.enable && config._1password.enable) {
|
||||
unfreePackages = [ "1password" "_1password-gui" "1password-cli" ];
|
||||
home-manager.users.${config.user} = {
|
||||
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"; };
|
||||
};
|
||||
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 = {
|
||||
g = "git";
|
||||
gs = "git status";
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }: {
|
||||
{ config, pkgs, lib, ... }: {
|
||||
home-manager.users.${config.user} = {
|
||||
|
||||
programs.fish = {
|
||||
@ -60,12 +60,24 @@
|
||||
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 = {
|
||||
|
||||
# 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
|
||||
registry.nixpkgs.to = {
|
||||
|
@ -24,9 +24,9 @@
|
||||
home.activation.reloadHammerspoon =
|
||||
config.home-manager.users.${config.user}.lib.dag.entryAfter
|
||||
[ "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 /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("Launcher"):init()
|
||||
hs.loadSpoon("DismissAlerts"):init()
|
||||
hs.loadSpoon("MoveWindow"):init()
|
||||
hs.ipc.cliInstall() -- Install Hammerspoon CLI program
|
||||
|
@ -8,7 +8,7 @@
|
||||
if ! xcode-select --version 2>/dev/null; then
|
||||
$DRY_RUN_CMD xcode-select --install
|
||||
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)"
|
||||
fi
|
||||
'';
|
||||
@ -29,7 +29,7 @@
|
||||
"openjdk" # Required by Apache Directory Studio
|
||||
];
|
||||
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
|
||||
"gitify" # Git notifications in menu bar
|
||||
"keybase" # GUI on Nix not available for macOS
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
config = lib.mkIf pkgs.stdenv.isDarwin {
|
||||
networking = {
|
||||
computerName = "${config.fullName}'\\''s Mac";
|
||||
computerName = config.networking.hostName;
|
||||
# Adjust if necessary
|
||||
# hostName = "";
|
||||
};
|
||||
|
@ -34,8 +34,8 @@
|
||||
# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
|
||||
AppleKeyboardUIMode = 3;
|
||||
|
||||
# Automatically show and hide the menu bar
|
||||
_HIHideMenuBar = true;
|
||||
# Only hide menu bar in fullscreen
|
||||
_HIHideMenuBar = false;
|
||||
|
||||
# Expand save panel by default
|
||||
NSNavPanelExpandedStateForSaveMode = true;
|
||||
@ -180,7 +180,7 @@
|
||||
"$(__dock_item /System/Applications/Mail.app)" \
|
||||
"$(__dock_item /Applications/zoom.us.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 /System/Applications/System\ Settings.app)"
|
||||
'';
|
||||
|
@ -9,8 +9,18 @@
|
||||
|
||||
};
|
||||
|
||||
# Used for aerc
|
||||
home-manager.users.${config.user}.xdg.enable = true;
|
||||
home-manager.users.${config.user} = {
|
||||
|
||||
# Default shell setting doesn't work
|
||||
home.sessionVariables = { SHELL = "${pkgs.fish}/bin/fish"; };
|
||||
|
||||
# Used for aerc
|
||||
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