nix-darwin: make several changes to home and system configuration specific to darwin platform
This commit is contained in:
@@ -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
@@ -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,12 +11,18 @@ in
|
|||||||
../shared/darwin.nix
|
../shared/darwin.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment = {
|
||||||
|
systemPackages = with pkgs; [
|
||||||
bash-language-server
|
bash-language-server
|
||||||
nil
|
nil
|
||||||
devenv
|
devenv
|
||||||
];
|
];
|
||||||
|
|
||||||
|
shellAliases = {
|
||||||
|
"nix-rebuild" = "sudo darwin-rebuild switch --flake /etc/nix-darwin/.#franks-macbook-pro";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
homebrew.casks = [
|
homebrew.casks = [
|
||||||
"zed"
|
"zed"
|
||||||
"firefox"
|
"firefox"
|
||||||
|
|||||||
+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.
|
# 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
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user