mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-15 08:03:44 +00:00
applied
This commit is contained in:
parent
32f8cc2a28
commit
f01ee2d84b
6 changed files with 58 additions and 9 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
|||
result
|
||||
.direnv
|
||||
|
||||
.cache-home
|
||||
private-backup/
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"description": "Right Command = Option+W (tmux prefix)",
|
||||
"description": "Right Command = Ctrl+B (tmux prefix)",
|
||||
"manipulators": [
|
||||
{
|
||||
"from": {
|
||||
|
|
@ -299,9 +299,9 @@
|
|||
},
|
||||
"to": [
|
||||
{
|
||||
"key_code": "w",
|
||||
"key_code": "b",
|
||||
"modifiers": [
|
||||
"left_option"
|
||||
"left_control"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1,4 +1,16 @@
|
|||
{...}: {
|
||||
{lib, ...}: {
|
||||
home.activation.removeLegacyTmuxLink = lib.hm.dag.entryBefore ["checkLinkTargets"] ''
|
||||
path="$HOME/.config/tmux/tmux.conf"
|
||||
if [ -L "$path" ]; then
|
||||
target="$(readlink "$path")"
|
||||
case "$target" in
|
||||
../../dots/tmux/*|dots/tmux/*|"$HOME"/dots/tmux/*)
|
||||
rm -f "$path"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
'';
|
||||
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
|
|
|
|||
13
home/zsh.nix
13
home/zsh.nix
|
|
@ -4,6 +4,19 @@
|
|||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.activation.removeLegacyZshLinks = lib.hm.dag.entryBefore ["checkLinkTargets"] ''
|
||||
for path in "$HOME/.zshenv" "$HOME/.zshrc"; do
|
||||
if [ -L "$path" ]; then
|
||||
target="$(readlink "$path")"
|
||||
case "$target" in
|
||||
dots/zsh/*|"$HOME"/dots/zsh/*)
|
||||
rm -f "$path"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
'';
|
||||
|
||||
home.activation.ensureOhMyZshCache = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
mkdir -p "${config.xdg.cacheHome}/oh-my-zsh"
|
||||
'';
|
||||
|
|
|
|||
|
|
@ -1,8 +1,32 @@
|
|||
{...}: {
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
karabinerAgentsDir =
|
||||
"${pkgs.karabiner-elements}/Library/Application Support/org.pqrs/Karabiner-Elements/"
|
||||
+ "Karabiner-Elements Non-Privileged Agents v2.app/Contents/Library/LaunchAgents";
|
||||
in {
|
||||
security.pam.services.sudo_local.touchIdAuth = true;
|
||||
|
||||
services.karabiner-elements.enable = true;
|
||||
|
||||
# Karabiner-Elements 15.7.0 moved its user launch agents into the
|
||||
# Non-Privileged Agents v2 bundle and renamed karabiner_grabber.
|
||||
# nix-darwin's built-in module still points at the old top-level paths.
|
||||
environment.userLaunchAgents."org.pqrs.karabiner.agent.karabiner_grabber.plist".enable =
|
||||
lib.mkForce false;
|
||||
environment.userLaunchAgents."org.pqrs.karabiner.agent.karabiner_observer.plist".enable =
|
||||
lib.mkForce false;
|
||||
environment.userLaunchAgents."org.pqrs.karabiner.karabiner_console_user_server.plist".enable =
|
||||
lib.mkForce false;
|
||||
|
||||
environment.userLaunchAgents."org.pqrs.service.agent.Karabiner-Core-Service.plist".source = "${karabinerAgentsDir}/org.pqrs.service.agent.Karabiner-Core-Service.plist";
|
||||
environment.userLaunchAgents."org.pqrs.service.agent.Karabiner-NotificationWindow.plist".source = "${karabinerAgentsDir}/org.pqrs.service.agent.Karabiner-NotificationWindow.plist";
|
||||
environment.userLaunchAgents."org.pqrs.service.agent.Karabiner-Menu.plist".source = "${karabinerAgentsDir}/org.pqrs.service.agent.Karabiner-Menu.plist";
|
||||
environment.userLaunchAgents."org.pqrs.service.agent.karabiner_console_user_server.plist".source = "${karabinerAgentsDir}/org.pqrs.service.agent.karabiner_console_user_server.plist";
|
||||
environment.userLaunchAgents."org.pqrs.service.agent.Karabiner-MultitouchExtension.plist".source = "${karabinerAgentsDir}/org.pqrs.service.agent.Karabiner-MultitouchExtension.plist";
|
||||
|
||||
system.defaults = {
|
||||
dock.autohide = true;
|
||||
dock.show-recents = false;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@ set -euo pipefail
|
|||
|
||||
umask 077
|
||||
|
||||
backup_root="${HOME}/Backups/nix-migration"
|
||||
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
backup_root="${repo_root}/private-backup"
|
||||
timestamp="$(date +%Y%m%d-%H%M%S)"
|
||||
backup_dir="${1:-${backup_root}/${timestamp}}"
|
||||
|
||||
|
|
@ -36,7 +37,6 @@ if command -v nix >/dev/null 2>&1; then
|
|||
nix --version > "${backup_dir}/manifests/nix-version.txt" 2>&1 || true
|
||||
fi
|
||||
|
||||
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
git -C "${repo_root}" status --short > "${backup_dir}/manifests/nix-repo-status.txt" 2>&1 || true
|
||||
git -C "${repo_root}" rev-parse HEAD > "${backup_dir}/manifests/nix-repo-head.txt" 2>&1 || true
|
||||
|
||||
|
|
@ -71,7 +71,6 @@ home_paths=(
|
|||
".claude.json"
|
||||
".claude.json.backup"
|
||||
"dots"
|
||||
"Documents/GitHub/nix"
|
||||
)
|
||||
|
||||
library_paths=(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue