Rearrange file structure
This commit is contained in:
parent
de1bfdcbe6
commit
530274e081
8 changed files with 20 additions and 29 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
../../../home/common.nix
|
||||
../home-default.nix
|
||||
];
|
||||
|
||||
# MacBook Air-specific home configuration
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
# Import common Darwin configuration
|
||||
imports = [
|
||||
../../../system
|
||||
../../../system/darwin
|
||||
../system-default.nix
|
||||
];
|
||||
}
|
||||
59
hosts/darwin/home-default.nix
Normal file
59
hosts/darwin/home-default.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{ config, pkgs, nixvim, claude-code, firefox-addons, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
nixvim.homeModules.nixvim
|
||||
../../modules/nvim.nix
|
||||
../../modules/tmux.nix
|
||||
../../modules/zsh.nix
|
||||
../../modules/ssh.nix
|
||||
../../modules/git.nix
|
||||
../../modules/lazygit.nix
|
||||
../../modules/papis.nix
|
||||
../../modules/termscp.nix
|
||||
../../modules/rsync.nix
|
||||
../../modules/btop.nix
|
||||
../../modules/firefox.nix
|
||||
../../modules/ghostty.nix
|
||||
../../modules/syncthing.nix
|
||||
../../config/fonts.nix
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
home.username = "yanlin";
|
||||
home.homeDirectory = "/Users/yanlin";
|
||||
home.stateVersion = "24.05";
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# Network and file transfer
|
||||
lftp
|
||||
httpie
|
||||
openssh
|
||||
gnumake
|
||||
|
||||
# Command-line utilities
|
||||
ncdu
|
||||
git-credential-oauth
|
||||
zoxide
|
||||
delta
|
||||
|
||||
# macOS-specific GUI applications
|
||||
maccy # Clipboard manager (macOS-only)
|
||||
iina # Media player (macOS-optimized)
|
||||
hidden-bar # Menu bar organizer (macOS-only)
|
||||
|
||||
# Development and build tools
|
||||
texlive.combined.scheme-full
|
||||
python312
|
||||
uv
|
||||
claude-code.packages.aarch64-darwin.claude-code
|
||||
lazysql
|
||||
sqlite
|
||||
|
||||
# Productivity apps
|
||||
keepassxc # Password manager (Linux/Windows/macOS)
|
||||
];
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
../../../home/common.nix
|
||||
../home-default.nix
|
||||
];
|
||||
|
||||
# iMac-specific home configuration
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
# Import common Darwin configuration
|
||||
imports = [
|
||||
../../../system
|
||||
../../../system/darwin
|
||||
../system-default.nix
|
||||
];
|
||||
}
|
||||
54
hosts/darwin/system-default.nix
Normal file
54
hosts/darwin/system-default.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{ config, pkgs, nix-homebrew, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../modules/homebrew.nix
|
||||
nix-homebrew.darwinModules.nix-homebrew
|
||||
];
|
||||
|
||||
# Nix configuration
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
nix.settings.substituters = [
|
||||
"https://cache.nixos.org/"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://devenv.cachix.org"
|
||||
];
|
||||
nix.settings.trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
|
||||
];
|
||||
|
||||
# System configuration
|
||||
system.stateVersion = 6;
|
||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||
programs.zsh.enable = true;
|
||||
|
||||
# Set primary user for system preferences
|
||||
system.primaryUser = "yanlin";
|
||||
|
||||
# Security configuration - passwordless sudo for yanlin
|
||||
security.sudo.extraConfig = ''
|
||||
yanlin ALL=(ALL) NOPASSWD: ALL
|
||||
'';
|
||||
|
||||
# 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 10
|
||||
sudo -u yanlin defaults -currentHost write -globalDomain NSStatusItemSelectionPadding -int 5
|
||||
|
||||
echo "Disabling Spotlight indexing..."
|
||||
# Disable Spotlight indexing for all volumes
|
||||
# WARNING: This will break Mail.app search, Time Machine, and other features
|
||||
# To re-enable: sudo mdutil -a -i on
|
||||
sudo mdutil -a -i off
|
||||
|
||||
# Erase existing Spotlight index to free up disk space
|
||||
echo "Erasing existing Spotlight index..."
|
||||
sudo mdutil -E /
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue