nix-darwin: make several changes to home and system configuration specific to darwin platform

This commit is contained in:
2026-07-21 14:30:17 -04:00
parent 2ac6ab0dd5
commit 87fc9e3c01
4 changed files with 63 additions and 9 deletions
+4 -1
View File
@@ -81,7 +81,10 @@
darwinConfigurations = { darwinConfigurations = {
franks-macbook-pro = nix-darwin.lib.darwinSystem { franks-macbook-pro = nix-darwin.lib.darwinSystem {
specialArgs = { inherit inputs; }; specialArgs = {
inherit inputs;
inherit self;
};
modules = [ modules = [
home-manager.darwinModules.home-manager home-manager.darwinModules.home-manager
+25 -1
View File
@@ -17,6 +17,30 @@ in
''; '';
}; };
# Configure ZSH if using darwin (macOS).
zsh =
if pkgs.stdenv.hostPlatform.isDarwin then
{
enable = true;
initExtra = ''
clear;fastfetch
'';
}
else
{ };
starship = {
enable = true;
settings = {
character = {
success_symbol = "[λ](bold green)";
error_symbol = "[λ](bold red)";
};
};
};
fastfetch = { fastfetch = {
enable = true; enable = true;
@@ -43,7 +67,7 @@ in
]; ];
logo = { logo = {
source = "nixos2"; source = if pkgs.stdenv.hostPlatform.isDarwin then "macos" else "nixos2";
}; };
}; };
}; };
+11 -5
View File
@@ -11,11 +11,17 @@ in
../shared/darwin.nix ../shared/darwin.nix
]; ];
environment.systemPackages = with pkgs; [ environment = {
bash-language-server systemPackages = with pkgs; [
nil bash-language-server
devenv nil
]; devenv
];
shellAliases = {
"nix-rebuild" = "sudo darwin-rebuild switch --flake /etc/nix-darwin/.#franks-macbook-pro";
};
};
homebrew.casks = [ homebrew.casks = [
"zed" "zed"
+23 -2
View File
@@ -23,12 +23,32 @@
}; };
}; };
settings.experimental-features = "nix-command flakes"; settings = {
experimental-features = [
"nix-command"
"flakes"
];
use-xdg-base-directories = true;
};
}; };
# Enables Touch ID for sudo prompts. # Enables Touch ID for sudo prompts.
security.pam.services.sudo_local.touchIdAuth = true; security.pam.services.sudo_local.touchIdAuth = true;
programs = {
zsh = {
enable = true;
enableCompletion = true;
enableAutosuggestions = true;
enableSyntaxHighlighting = true;
interactiveShellInit = ''
eval "$(jump shell)"
'';
};
};
environment = { environment = {
variables = rec { variables = rec {
XDG_CACHE_HOME = "$HOME/.cache"; XDG_CACHE_HOME = "$HOME/.cache";
@@ -43,13 +63,14 @@
ls = "ls --color=tty"; ls = "ls --color=tty";
ff = "clear;fastfetch"; ff = "clear;fastfetch";
nb = "nix-build"; nb = "nix-build";
nix-rebuild = "sudo darwin-rebuild switch";
}; };
systemPackages = with pkgs; [ systemPackages = with pkgs; [
wget wget
fastfetch fastfetch
btop btop
nerd-fonts.hack
jump
]; ];
}; };