Merge branch 'nightly'
This commit is contained in:
commit
0c23f34a6f
4 changed files with 37 additions and 10 deletions
|
|
@ -15,6 +15,10 @@
|
||||||
outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager, nixvim, claude-code }:
|
outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager, nixvim, claude-code }:
|
||||||
let
|
let
|
||||||
configuration = { pkgs, ... }: {
|
configuration = { pkgs, ... }: {
|
||||||
|
imports = [
|
||||||
|
./system
|
||||||
|
];
|
||||||
|
|
||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
[ pkgs.vim
|
[ pkgs.vim
|
||||||
pkgs.git
|
pkgs.git
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,16 @@ create_directory "$PAPER_PATH" "paper"
|
||||||
[ -n "$CONTENT_PATH" ] && [ "$CONTENT_PATH" != "null" ] && [ -d "$CONTENT_PATH" ] && zoxide add "$CONTENT_PATH" 2>/dev/null || true
|
[ -n "$CONTENT_PATH" ] && [ "$CONTENT_PATH" != "null" ] && [ -d "$CONTENT_PATH" ] && zoxide add "$CONTENT_PATH" 2>/dev/null || true
|
||||||
[ -n "$PAPER_PATH" ] && [ "$PAPER_PATH" != "null" ] && [ -d "$PAPER_PATH" ] && zoxide add "$PAPER_PATH" 2>/dev/null || true
|
[ -n "$PAPER_PATH" ] && [ "$PAPER_PATH" != "null" ] && [ -d "$PAPER_PATH" ] && zoxide add "$PAPER_PATH" 2>/dev/null || true
|
||||||
|
|
||||||
|
# Check if session already exists and attach if it does
|
||||||
|
if is_session_running "$SESSION_NAME"; then
|
||||||
|
printf "\033[1;32mAttaching to existing session: %s\033[0m\n" "$SESSION_NAME"
|
||||||
|
tmux attach-session -t "$SESSION_NAME"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update papis cache
|
||||||
|
papis cache reset > /dev/null 2>&1
|
||||||
|
|
||||||
# Create remote directory if server connection is configured
|
# Create remote directory if server connection is configured
|
||||||
if [ -n "$SERVER" ] && [ -n "$REMOTE_DIR" ]; then
|
if [ -n "$SERVER" ] && [ -n "$REMOTE_DIR" ]; then
|
||||||
printf "\033[2mEnsuring remote directory exists: %s:%s\033[0m\n" "$SERVER" "$REMOTE_DIR"
|
printf "\033[2mEnsuring remote directory exists: %s:%s\033[0m\n" "$SERVER" "$REMOTE_DIR"
|
||||||
|
|
@ -108,16 +118,6 @@ if [ -n "$SERVER" ] && [ -n "$REMOTE_DIR" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if session already exists and attach if it does
|
|
||||||
if is_session_running "$SESSION_NAME"; then
|
|
||||||
printf "\033[1;32mAttaching to existing session: %s\033[0m\n" "$SESSION_NAME"
|
|
||||||
tmux attach-session -t "$SESSION_NAME"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Update papis cache
|
|
||||||
papis cache reset > /dev/null 2>&1
|
|
||||||
|
|
||||||
# Launch appropriate template
|
# Launch appropriate template
|
||||||
case "$TEMPLATE" in
|
case "$TEMPLATE" in
|
||||||
"basic")
|
"basic")
|
||||||
|
|
|
||||||
7
system/default.nix
Normal file
7
system/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./macos-defaults.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
16
system/macos-defaults.nix
Normal file
16
system/macos-defaults.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Set primary user for system preferences
|
||||||
|
system.primaryUser = "yanlin";
|
||||||
|
|
||||||
|
# Menu bar spacing configuration using activation scripts
|
||||||
|
# Uses sudo to run as user since activation now runs as root
|
||||||
|
# NSStatusItemSpacing controls horizontal spacing between menu bar items
|
||||||
|
# NSStatusItemSelectionPadding controls padding inside selection overlay
|
||||||
|
system.activationScripts.extraActivation.text = ''
|
||||||
|
echo "Setting menu bar spacing preferences..."
|
||||||
|
sudo -u yanlin defaults -currentHost write -globalDomain NSStatusItemSpacing -int 12
|
||||||
|
sudo -u yanlin defaults -currentHost write -globalDomain NSStatusItemSelectionPadding -int 6
|
||||||
|
'';
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue