add some macos config

This commit is contained in:
Niccolo Borgioli 2025-01-15 19:04:48 +01:00
parent 84b5e059b9
commit 7000d01f6b
3 changed files with 25 additions and 5 deletions

View File

@ -13,5 +13,5 @@ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix
git clone https://github.com/cupcakearmy/nix-macos ~/.config/nix-darwin git clone https://github.com/cupcakearmy/nix-macos ~/.config/nix-darwin
# Installation # Installation
nix run nix-darwin -- switch --flake ~/.config/nix-darwin#sflx nix run nix-darwin -- switch --flake ~/.config/nix-darwin#mbp
``` ```

View File

@ -37,9 +37,25 @@
# https://daiderd.com/nix-darwin/manual/index.html # https://daiderd.com/nix-darwin/manual/index.html
environment.systemPackages = [ ]; environment.systemPackages = [ ];
# Security
system.defaults.screensaver.askForPassword = true;
system.defaults.screensaver.askForPasswordDelay = 0;
system.defaults.loginwindow.GuestEnabled = false;
# Dock
system.defaults.dock.autohide = true; system.defaults.dock.autohide = true;
system.defaults.dock.orientation = "left"; system.defaults.dock.orientation = "left";
system.defaults.finder.AppleShowAllExtensions = true; 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 = [ ];
# Input devices
system.keyboard.enableKeyMapping = true; system.keyboard.enableKeyMapping = true;
system.keyboard.remapCapsLockToEscape = true; system.keyboard.remapCapsLockToEscape = true;
system.defaults.NSGlobalDomain.InitialKeyRepeat = 25; system.defaults.NSGlobalDomain.InitialKeyRepeat = 25;
@ -48,6 +64,10 @@
system.defaults.NSGlobalDomain."com.apple.trackpad.scaling" = 0.875; system.defaults.NSGlobalDomain."com.apple.trackpad.scaling" = 0.875;
system.defaults.trackpad.Dragging = true; system.defaults.trackpad.Dragging = true;
# Finder
system.defaults.finder.AppleShowAllExtensions = true;
system.defaults.finder.ShowPathbar = true;
users.users."niccoloborgioli" = { users.users."niccoloborgioli" = {
home = "/Users/niccoloborgioli"; home = "/Users/niccoloborgioli";
shell = pkgs.fish; shell = pkgs.fish;
@ -67,7 +87,7 @@
{ {
# Build darwin flake using: # Build darwin flake using:
# $ darwin-rebuild build --flake .#Niccolo-Borgioli-s-MacBook-Pro # $ darwin-rebuild build --flake .#Niccolo-Borgioli-s-MacBook-Pro
darwinConfigurations."sflx" = nix-darwin.lib.darwinSystem { darwinConfigurations."mbp" = nix-darwin.lib.darwinSystem {
modules = [ modules = [
configuration configuration
home-manager.darwinModules.home-manager home-manager.darwinModules.home-manager
@ -80,6 +100,6 @@
}; };
# Expose the package set, including overlays, for convenience. # Expose the package set, including overlays, for convenience.
darwinPackages = self.darwinConfigurations."sflx".pkgs; darwinPackages = self.darwinConfigurations."mbp".pkgs;
}; };
} }

View File

@ -85,7 +85,7 @@
t = "tmux new-session -A -s main"; t = "tmux new-session -A -s main";
e = "nvim"; e = "nvim";
hms = "home-manager switch --flake ~/nix#root -b backup"; hms = "home-manager switch --flake ~/nix#root -b backup";
snd = "darwin-rebuild switch --flake ~/.config/nix-darwin#sflx"; snd = "darwin-rebuild switch --flake ~/.config/nix-darwin#mpb";
}; };
programs.fish = { programs.fish = {