nix-darwin: make several changes to home and system configuration specific to darwin platform
This commit is contained in:
@@ -81,7 +81,10 @@
|
||||
|
||||
darwinConfigurations = {
|
||||
franks-macbook-pro = nix-darwin.lib.darwinSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
inherit self;
|
||||
};
|
||||
|
||||
modules = [
|
||||
home-manager.darwinModules.home-manager
|
||||
|
||||
+25
-1
@@ -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 = {
|
||||
enable = true;
|
||||
|
||||
@@ -43,7 +67,7 @@ in
|
||||
];
|
||||
|
||||
logo = {
|
||||
source = "nixos2";
|
||||
source = if pkgs.stdenv.hostPlatform.isDarwin then "macos" else "nixos2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -11,11 +11,17 @@ in
|
||||
../shared/darwin.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
bash-language-server
|
||||
nil
|
||||
devenv
|
||||
];
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
bash-language-server
|
||||
nil
|
||||
devenv
|
||||
];
|
||||
|
||||
shellAliases = {
|
||||
"nix-rebuild" = "sudo darwin-rebuild switch --flake /etc/nix-darwin/.#franks-macbook-pro";
|
||||
};
|
||||
};
|
||||
|
||||
homebrew.casks = [
|
||||
"zed"
|
||||
|
||||
+23
-2
@@ -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.
|
||||
security.pam.services.sudo_local.touchIdAuth = true;
|
||||
|
||||
programs = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
enableAutosuggestions = true;
|
||||
enableSyntaxHighlighting = true;
|
||||
|
||||
interactiveShellInit = ''
|
||||
eval "$(jump shell)"
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
environment = {
|
||||
variables = rec {
|
||||
XDG_CACHE_HOME = "$HOME/.cache";
|
||||
@@ -43,13 +63,14 @@
|
||||
ls = "ls --color=tty";
|
||||
ff = "clear;fastfetch";
|
||||
nb = "nix-build";
|
||||
nix-rebuild = "sudo darwin-rebuild switch";
|
||||
};
|
||||
|
||||
systemPackages = with pkgs; [
|
||||
wget
|
||||
fastfetch
|
||||
btop
|
||||
nerd-fonts.hack
|
||||
jump
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user