Compare commits

...

12 Commits

Author SHA1 Message Date
c11ea192cb add ssh key 2025-03-10 23:13:33 +01:00
c05ec2c48e vscodium stuff 2025-03-10 23:11:01 +01:00
0772bbbf50 add aldente license 2025-03-10 22:46:01 +01:00
4c50216342 add plists for other apps 2025-03-10 22:41:02 +01:00
d8dbea94c1 add import script 2025-03-10 22:37:49 +01:00
b0c3e9e512 export plist 2025-03-10 22:34:28 +01:00
2d309816ff last raycast export 2025-03-10 22:25:04 +01:00
3b76820774 add alt tab settings 2025-03-10 22:19:30 +01:00
0d0baa3b60 cleanup darwin config 2025-03-10 22:11:57 +01:00
e96cac4f4b raycast config 2025-03-10 21:57:10 +01:00
7a1676b0ea docs 2025-03-10 21:57:06 +01:00
f32120de52 remove old sops stuff 2025-03-10 21:56:26 +01:00
16 changed files with 126 additions and 35 deletions

2
.envrc
View File

@ -1,2 +0,0 @@
# export SOPS_AGE_KEY_FILE=${HOME}/.config/sops/age/keys.txt
export SOPS_AGE_KEY_FILE=$(pwd)/.keys.txt

View File

@ -1,4 +0,0 @@
creation_rules:
- path_regex: secrets/[^/]+\.(yaml|json|env|ini)$
age: >-
age1fwwfdh3np846pcwlsre2d8py3a8z5gfltx3jcyghdfx9esn6a40sm60mdj

View File

@ -25,6 +25,10 @@ nix run nix-darwin -- switch --flake ~/.config/nix-macos#<host>
vai
```
## Documentation
- [nix-darwin](https://daiderd.com/nix-darwin/manual/index.html)
## Crypt
Files under `secrets` are encrypted using `git-crypt`.
@ -37,3 +41,13 @@ git-crypt export-key - | base64 > .key.b64
cat .key.b64 | base64 --decode > .key
git-crypt unlock .key
```
## TODO
Stuff that I would like to automate, but have not found a way/time
- Disable the default Spotlight keyboard shortcut. For now manually go to Settings -> Keyboard Shortcuts -> Spotlight -> Untick
- `chsh -s /run/current-system/sw/bin/fish`
- vscodium settings (download `zokugun.sync-settings` -> open repository settings -> paste secrets/configs/vscodium-sync.yaml -> download config)

View File

@ -20,36 +20,52 @@
# Nix Darwin
# https://daiderd.com/nix-darwin/manual/index.html
# Security
system.defaults.screensaver.askForPassword = true;
system.defaults.screensaver.askForPasswordDelay = 0;
system.defaults.loginwindow.GuestEnabled = false;
system.defaults = {
# Security
screensaver.askForPassword = true;
screensaver.askForPasswordDelay = 0;
loginwindow.GuestEnabled = false;
# Dock
system.defaults.dock.autohide = true;
system.defaults.dock.orientation = "left";
system.defaults.dock.show-recents = false;
system.defaults.dock.persistent-apps = [
"/Applications/Arc.app"
"/Applications/Ghostty.app"
"/Applications/VSCodium.app"
"/Applications/Spotify.app"
"/System/Applications/System Settings.app"
];
system.defaults.dock.persistent-others = [ ];
# Dock
dock = {
autohide = true;
orientation = "left";
show-recents = false;
persistent-apps = [
"/Applications/Arc.app"
"/Applications/Ghostty.app"
"/Applications/VSCodium.app"
"/Applications/Spotify.app"
"/System/Applications/System Settings.app"
];
persistent-others = [ ];
};
# Finder
finder = {
AppleShowAllExtensions = true;
ShowPathbar = true;
};
# Trackpad
NSGlobalDomain = {
InitialKeyRepeat = 25;
KeyRepeat = 2;
"com.apple.mouse.tapBehavior" = 1;
"com.apple.trackpad.scaling" = 0.875;
};
trackpad = {
Dragging = true;
Clicking = true;
TrackpadRightClick = true;
};
};
# Input devices
system.keyboard.enableKeyMapping = true;
system.keyboard.remapCapsLockToEscape = true;
system.defaults.NSGlobalDomain.InitialKeyRepeat = 25;
system.defaults.NSGlobalDomain.KeyRepeat = 2;
system.defaults.NSGlobalDomain."com.apple.mouse.tapBehavior" = 1;
system.defaults.NSGlobalDomain."com.apple.trackpad.scaling" = 0.875;
system.defaults.trackpad.Dragging = true;
# Finder
system.defaults.finder.AppleShowAllExtensions = true;
system.defaults.finder.ShowPathbar = true;
system.keyboard = {
enableKeyMapping = true;
remapCapsLockToEscape = true;
};
# Other
system.startup.chime = false;
@ -59,6 +75,7 @@
shell = pkgs.fish;
};
programs.fish.enable = true;
environment.shells = [ pkgs.fish ];
homebrew = {
enable = true;

View File

@ -3,7 +3,6 @@
pkgs,
lib,
config,
sops-nix,
...
}:
{
@ -46,6 +45,9 @@
g = "lazygit";
d = "lazydocker";
vai = "darwin-rebuild switch --flake ~/.config/nix-macos#${host.hostName}";
p = "pnpm";
px = "pnpm -s dlx";
};
};

View File

@ -21,7 +21,6 @@ with pkgs;
woff2
bat
rsync
sops
# Dev
devenv

27
scripts/plist/export.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
# Create secrets directory if it doesn't exist
mkdir -p secrets/plist
# Array of app IDs to export
APP_IDS=(
"com.lwouis.alt-tab-macos"
"com.jordanbaird.Ice"
"com.apphousekitchen.aldente-pro.plist"
"com.lihaoyun6.QuickRecorder.plist"
)
# Export each plist
for APP_ID in "${APP_IDS[@]}"; do
echo "Exporting $APP_ID..."
defaults export "$APP_ID" - >"secrets/plist/$APP_ID.plist"
# Check if export was successful
if [ $? -eq 0 ]; then
echo "Successfully exported $APP_ID to secrets/$APP_ID.plist"
else
echo "Failed to export $APP_ID"
fi
done
echo "All exports completed!"

38
scripts/plist/import.sh Executable file
View File

@ -0,0 +1,38 @@
#!/bin/bash
# Path to the plist directory
PLIST_DIR="secrets/plist"
# Check if the plist directory exists
if [ ! -d "$PLIST_DIR" ]; then
echo "Error: Directory $PLIST_DIR does not exist."
exit 1
fi
# Get all plist files in the directory
PLIST_FILES=("$PLIST_DIR"/*.plist)
# Check if there are any plist files
if [ ${#PLIST_FILES[@]} -eq 0 ] || [ "${PLIST_FILES[0]}" = "$PLIST_DIR/*.plist" ]; then
echo "No plist files found in $PLIST_DIR."
exit 1
fi
# Import each plist
for PLIST_PATH in "${PLIST_FILES[@]}"; do
# Extract app ID from filename (remove path and .plist extension)
FILENAME=$(basename "$PLIST_PATH")
APP_ID="${FILENAME%.plist}"
echo "Importing $APP_ID..."
cat "$PLIST_PATH" | defaults import "$APP_ID" -
# Check if import was successful
if [ $? -eq 0 ]; then
echo "Successfully imported $APP_ID from $PLIST_PATH"
else
echo "Failed to import $APP_ID"
fi
done
echo "All imports completed!"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.