Modules/Fish: Add nix-darwin homebrew environment setup
This commit is contained in:
@ -45,6 +45,18 @@ in {
|
|||||||
programs.fish = lib.mkMerge [
|
programs.fish = lib.mkMerge [
|
||||||
# Darwin exclusive config
|
# Darwin exclusive config
|
||||||
(lib.mkIf pkgs.stdenv.isDarwin {
|
(lib.mkIf pkgs.stdenv.isDarwin {
|
||||||
|
shellInit = ''
|
||||||
|
set fish_greeting
|
||||||
|
yes | fish_config theme save "system-theme"
|
||||||
|
|
||||||
|
set --global --export HOMEBREW_PREFIX "/opt/homebrew"
|
||||||
|
set --global --export HOMEBREW_CELLAR "/opt/homebrew/Cellar"
|
||||||
|
set --global --export HOMEBREW_REPOSITORY "/opt/homebrew"
|
||||||
|
fish_add_path --global --move --path "/opt/homebrew/bin" "/opt/homebrew/sbin"
|
||||||
|
if test -n "$MANPATH[1]"; set --global --export MANPATH ''' $MANPATH; end;
|
||||||
|
if not contains "/opt/homebrew/share/info" $INFOPATH; set --global --export INFOPATH "/opt/homebrew/share/info" $INFOPATH; end;
|
||||||
|
'';
|
||||||
|
|
||||||
shellAbbrs = let
|
shellAbbrs = let
|
||||||
# These can be used for my config.homemodules and for HM config.programs,
|
# These can be used for my config.homemodules and for HM config.programs,
|
||||||
# as both of these add the package to home.packages
|
# as both of these add the package to home.packages
|
||||||
@ -66,6 +78,11 @@ in {
|
|||||||
(lib.mkIf pkgs.stdenv.isLinux {
|
(lib.mkIf pkgs.stdenv.isLinux {
|
||||||
generateCompletions = nixosConfig.programs.fish.generateCompletions;
|
generateCompletions = nixosConfig.programs.fish.generateCompletions;
|
||||||
|
|
||||||
|
shellInit = ''
|
||||||
|
set fish_greeting
|
||||||
|
yes | fish_config theme save "system-theme"
|
||||||
|
'';
|
||||||
|
|
||||||
functions = lib.mergeAttrsList [
|
functions = lib.mergeAttrsList [
|
||||||
(lib.optionalAttrs config.homemodules.nnn.enable {
|
(lib.optionalAttrs config.homemodules.nnn.enable {
|
||||||
nnncd = {
|
nnncd = {
|
||||||
@ -228,11 +245,6 @@ in {
|
|||||||
];
|
];
|
||||||
|
|
||||||
plugins = [];
|
plugins = [];
|
||||||
|
|
||||||
shellInit = ''
|
|
||||||
set fish_greeting
|
|
||||||
yes | fish_config theme save "system-theme"
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -61,8 +61,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
power = {
|
power = {
|
||||||
restartAfterFreeze = false;
|
# restartAfterFreeze = false;
|
||||||
restartAfterPowerFailure = false;
|
# restartAfterPowerFailure = false;
|
||||||
|
|
||||||
sleep = {
|
sleep = {
|
||||||
computer = 10; # 10 minutes until sleep
|
computer = 10; # 10 minutes until sleep
|
||||||
|
|||||||
Reference in New Issue
Block a user