-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from michaelvanstraten/add-darwin-config-for-pe…
…rsonal-macbook Add darwin config for personal macbook
- Loading branch information
Showing
22 changed files
with
588 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ pkgs, ... }: | ||
{ | ||
imports = [ | ||
../modules/nix.nix | ||
../modules/skhd.nix | ||
../modules/system.nix | ||
../modules/yabai.nix | ||
../modules/shells.nix | ||
../modules/home-manager.nix | ||
../modules/packages.nix | ||
]; | ||
|
||
nixpkgs = { | ||
config.allowUnfree = true; | ||
}; | ||
|
||
users.users.michaelvanstraten = { | ||
createHome = true; | ||
description = "Michael van Straten"; | ||
home = "/Users/michaelvanstraten/"; | ||
name = "michaelvanstraten"; | ||
shell = pkgs.fish; | ||
}; | ||
|
||
system.stateVersion = 4; | ||
|
||
security.pam.enableSudoTouchIdAuth = true; | ||
|
||
home-manager.users.michaelvanstraten = import ../../dotfiles/michael; | ||
|
||
environment.systemPackages = with pkgs; [ darwin.trash ]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ pkgs, ... }: | ||
{ | ||
fonts.packages = [ pkgs.nerdfonts ]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ inputs, ... }: | ||
{ | ||
home-manager = { | ||
backupFileExtension = "before-home-manager"; | ||
extraSpecialArgs = { | ||
inherit inputs; | ||
}; | ||
useGlobalPkgs = true; | ||
useUserPackages = true; | ||
verbose = true; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
inputs, | ||
pkgs, | ||
lib, | ||
... | ||
}: | ||
{ | ||
nix = { | ||
distributedBuilds = true; | ||
linux-builder = { | ||
enable = true; | ||
systems = [ | ||
"aarch64-linux" | ||
"i686-linux" | ||
"x86_64-linux" | ||
]; | ||
}; | ||
settings = { | ||
experimental-features = [ | ||
"nix-command" | ||
"flakes" | ||
"repl-flake" | ||
]; | ||
trusted-users = [ "@admin" ]; | ||
}; | ||
extraOptions = lib.mkIf pkgs.stdenv.hostPlatform.isAarch64 '' | ||
extra-platforms = x86_64-darwin aarch64-darwin | ||
''; | ||
}; | ||
|
||
services.nix-daemon.enable = true; | ||
|
||
nixpkgs = { | ||
source = inputs.nixpkgs; | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ inputs, pkgs, ... }: | ||
{ | ||
nixpkgs = { | ||
overlays = with inputs; [ nixpkgs-firefox-darwin.overlay ]; | ||
}; | ||
|
||
environment.systemPackages = with pkgs; [ | ||
monitorcontrol | ||
unnaturalscrollwheels | ||
|
||
alacritty | ||
|
||
vscodium | ||
|
||
firefox-bin | ||
# chromium | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ config, lib, ... }: | ||
{ | ||
environment.shells = lib.mapAttrsToList (_: user: user.shell) config.users.users; | ||
|
||
programs.bash.enable = true; | ||
programs.fish.enable = true; | ||
programs.zsh.enable = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ ... }: | ||
{ | ||
services.skhd.enable = false; | ||
services.skhd.skhdConfig = '' | ||
# focus windows using hjkl | ||
alt + ctrl - h : yabai -m window --focus west | ||
alt + ctrl - l : yabai -m window --focus east | ||
alt + ctrl - k : yabai -m window --focus north | ||
alt + ctrl - j : yabai -m window --focus south | ||
# toggle float of window | ||
alt + ctrl - t : yabai -m window --toggle float | ||
# swap windows using hjkl | ||
shift + alt + ctrl - h : yabai -m window --swap west | ||
shift + alt + ctrl - l : yabai -m window --swap east | ||
shift + alt + ctrl - k : yabai -m window --swap north | ||
shift + alt + ctrl - j : yabai -m window --swap south | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ ... }: | ||
{ | ||
system.defaults = { | ||
# Automatically hide and show the Dock | ||
dock.autohide = true; | ||
# Set Dock auto hide time modifier | ||
dock.autohide-time-modifier = 0.7; | ||
# Disable most recently used spaces in Dock | ||
dock.mru-spaces = false; | ||
# Make Dock icons of hidden applications translucent | ||
dock.showhidden = true; | ||
# Don't show recent applications in the dock. | ||
dock.show-recents = false; | ||
dock.persistent-apps = [ | ||
"/System/Applications/Mail.app/" | ||
"/Applications/Bitwarden.app/" | ||
"/System/Applications/Messages.app/" | ||
"/Applications/WhatsApp.app/" | ||
"/System/Applications/Calendar.app/" | ||
"/System/Applications/Reminders.app/" | ||
"/Applications/Alacritty.app/" | ||
"/Applications/Firefox Nightly.app/" | ||
"/System/Applications/System Settings.app/" | ||
]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ ... }: | ||
{ | ||
services.yabai.config = { | ||
# use bsp layout | ||
layout = "bsp"; | ||
|
||
# put new windows always to the right of the current one | ||
window_placement = "second_child"; | ||
|
||
# window padding | ||
top_padding = 12; | ||
bottom_padding = 12; | ||
left_padding = 12; | ||
right_padding = 12; | ||
window_gap = 12; | ||
|
||
extraConfig = '' | ||
# apps to not manage by default | ||
yabai -m rule --add app!="^(Firefox|Skim|Firefox Nightly|Alacritty)$" manage=off | ||
''; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ inputs, ... }: | ||
{ | ||
programs.alacritty = { | ||
enable = true; | ||
settings = { | ||
import = [ "${inputs.cyberdream-theme}/extras/alacritty/cyberdream.toml" ]; | ||
font = { | ||
size = 14; | ||
normal = { | ||
family = "JetBrainsMono Nerd Font"; | ||
style = "Medium"; | ||
}; | ||
italic = { | ||
family = "JetBrainsMono Nerd Font"; | ||
style = "Medium Italic"; | ||
}; | ||
bold = { | ||
family = "JetBrainsMono Nerd Font"; | ||
style = "Heavy"; | ||
}; | ||
bold_italic = { | ||
family = "JetBrainsMono Nerd Font"; | ||
style = "Heavy Italic"; | ||
}; | ||
}; | ||
selection = { | ||
save_to_clipboard = true; | ||
}; | ||
window = { | ||
decorations = "Transparent"; | ||
dynamic_padding = true; | ||
opacity = 0.87; | ||
blur = true; | ||
|
||
dimensions = { | ||
columns = 128; | ||
lines = 38; | ||
}; | ||
padding = { | ||
x = 18; | ||
y = 16; | ||
}; | ||
}; | ||
keyboard.bindings = [ | ||
{ | ||
key = "A"; | ||
mods = "Command"; | ||
chars = "\\u0001"; | ||
} | ||
{ | ||
key = "S"; | ||
mods = "Command"; | ||
chars = "\\u0001S"; | ||
} | ||
]; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ inputs, pkgs, ... }: | ||
{ | ||
imports = [ | ||
./tmux | ||
./vscode.nix | ||
./starship.nix | ||
./poetry.nix | ||
./lazygit.nix | ||
./git.nix | ||
./alacritty.nix | ||
./sesh.nix | ||
./shells | ||
]; | ||
|
||
xdg.enable = true; | ||
|
||
home.packages = with pkgs; [ | ||
wget | ||
inputs.neovim-nightly-overlay.packages.${pkgs.system}.default | ||
nil | ||
stylua | ||
lua-language-server | ||
nixfmt-rfc-style | ||
firefox-bin | ||
ltex-ls | ||
podman | ||
podman-compose | ||
nodejs_22 | ||
tree-sitter | ||
]; | ||
|
||
home.sessionVariables = { | ||
EDITOR = "nvim"; | ||
}; | ||
|
||
programs.home-manager.enable = true; | ||
|
||
home.stateVersion = "24.05"; | ||
|
||
programs.git = { | ||
userName = "Michael van Straten"; | ||
userEmail = "[email protected]"; | ||
}; | ||
|
||
programs.eza.enable = true; | ||
|
||
programs.bat.enable = true; | ||
|
||
programs.zoxide.enable = true; | ||
programs.zoxide.options = [ "--cmd cd" ]; | ||
|
||
programs.thefuck.enable = true; | ||
|
||
programs.jq.enable = true; | ||
|
||
programs.sesh.enable = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ ... }: | ||
{ | ||
programs.git = { | ||
enable = true; | ||
|
||
ignores = [ | ||
".DS_Store" | ||
".vscode/" | ||
".venv/" | ||
]; | ||
|
||
extraConfig = { | ||
init.defaultBranch = "master"; | ||
core = { | ||
ignorecase = false; | ||
}; | ||
pull.rebase = true; | ||
push.default = "current"; | ||
fetch = { | ||
prune = true; | ||
writeCommitGraph = true; | ||
}; | ||
rerere = { | ||
enabled = true; | ||
}; | ||
branch = { | ||
sort = "-committerdate"; | ||
}; | ||
}; | ||
}; | ||
|
||
programs.git.lfs.enable = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ ... }: | ||
{ | ||
programs.lazygit = { | ||
enable = true; | ||
settings = { | ||
gui = { | ||
scrollPastBottom = false; | ||
expandFocusedSidePanel = true; | ||
showCommandLog = true; | ||
skipRewordInEditorWarning = true; | ||
}; | ||
|
||
git = { | ||
paging.useConfig = false; | ||
autoFetch = false; | ||
autoRefresh = true; | ||
fetchAll = true; | ||
parseEmoji = true; | ||
}; | ||
|
||
os = { | ||
editPreset = "nvim"; | ||
}; | ||
|
||
disableStartupPopups = true; | ||
notARepository = "skip"; | ||
promptToReturnFromSubprocess = false; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ ... }: | ||
{ | ||
programs.poetry = { | ||
enable = true; | ||
settings = { | ||
virtualenvs.create = true; | ||
virtualenvs.in-project = true; | ||
}; | ||
}; | ||
} |
Oops, something went wrong.