mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-12 07:32:40 +02:00
feat: import all base configs in darwin
feat: change darwin's default shell to nushell feat: update starship's config
This commit is contained in:
@@ -10,6 +10,15 @@
|
|||||||
success_symbol = "[›](bold green)";
|
success_symbol = "[›](bold green)";
|
||||||
error_symbol = "[›](bold red)";
|
error_symbol = "[›](bold red)";
|
||||||
};
|
};
|
||||||
|
aws = {
|
||||||
|
symbol = "🅰 ";
|
||||||
|
};
|
||||||
|
gcloud = {
|
||||||
|
# do not show the account/project's info
|
||||||
|
# to avoid the leak of sensitive information when sharing the terminal
|
||||||
|
format = "on [$symbol$active(\($region\))]($style) ";
|
||||||
|
symbol = "🅶 ️";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -269,8 +269,8 @@ live_config_reload: true
|
|||||||
# Default:
|
# Default:
|
||||||
# - (Linux/BSD/macOS) `$SHELL` or the user's login shell, if `$SHELL` is unset
|
# - (Linux/BSD/macOS) `$SHELL` or the user's login shell, if `$SHELL` is unset
|
||||||
# - (Windows) powershell
|
# - (Windows) powershell
|
||||||
# shell:
|
shell:
|
||||||
# program: /bin/bash
|
program: /run/current-system/sw/bin/nu
|
||||||
# args:
|
# args:
|
||||||
# - --login
|
# - --login
|
||||||
|
|
||||||
|
|||||||
@@ -2,16 +2,11 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../base/nushell
|
../base
|
||||||
|
|
||||||
../base/core.nix
|
|
||||||
../base/git.nix
|
|
||||||
../base/development.nix
|
|
||||||
../base/media.nix
|
|
||||||
../base/starship.nix
|
|
||||||
|
|
||||||
./alacritty
|
./alacritty
|
||||||
./core.nix
|
./core.nix
|
||||||
|
./nushell.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Home Manager needs a bit of information about you and the
|
# Home Manager needs a bit of information about you and the
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{ ... }: {
|
||||||
|
# nushell's PATH do not include nix-darwin's PATH
|
||||||
|
# this is a workaround to add nix-darwin's PATH to nushell's PATH
|
||||||
|
programs.nushell.extraConfig = ''
|
||||||
|
let-env PATH = ([
|
||||||
|
|
||||||
|
"~/.nix-profile/bin"
|
||||||
|
"/etc/profiles/per-user/admin/bin"
|
||||||
|
"/run/current-system/sw/bin"
|
||||||
|
"/nix/var/nix/profiles/default/bin"
|
||||||
|
|
||||||
|
($env.PATH | split row (char esep))
|
||||||
|
] | flatten)
|
||||||
|
'';
|
||||||
|
}
|
||||||
+16
-3
@@ -1,3 +1,5 @@
|
|||||||
|
# all the configuration options are documented here:
|
||||||
|
# https://daiderd.com/nix-darwin/manual/index.html#sec-options
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
# # enable flakes globally
|
# # enable flakes globally
|
||||||
@@ -26,15 +28,13 @@
|
|||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Asia/Shanghai";
|
time.timeZone = "Asia/Shanghai";
|
||||||
|
|
||||||
# Create /etc/zshrc that loads the nix-darwin environment.
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
|
|
||||||
# Apps
|
# Apps
|
||||||
# `home-manager` currently has issues adding them to `~/Applications`
|
# `home-manager` currently has issues adding them to `~/Applications`
|
||||||
# Issue: https://github.com/nix-community/home-manager/issues/1341
|
# Issue: https://github.com/nix-community/home-manager/issues/1341
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
neovim
|
neovim
|
||||||
git
|
git
|
||||||
|
nushell # my custom shell
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.variables.EDITOR = "nvim";
|
environment.variables.EDITOR = "nvim";
|
||||||
@@ -65,5 +65,18 @@
|
|||||||
users.users.admin = {
|
users.users.admin = {
|
||||||
home = "/Users/admin";
|
home = "/Users/admin";
|
||||||
description = "admin";
|
description = "admin";
|
||||||
|
|
||||||
|
# set user's default shell to nushell
|
||||||
|
# this may not work, to change the default shell manually, use
|
||||||
|
# `chsh -s /run/current-system/sw/bin/nu`
|
||||||
|
shell = pkgs.nushell;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Create /etc/zshrc that loads the nix-darwin environment.
|
||||||
|
# this is required if you want to use darwin's default shell - zsh
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
environment.shells = [
|
||||||
|
pkgs.zsh
|
||||||
|
pkgs.nushell # my custom shell
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user