darwin/core: apply fix for $PATH orders

This commit is contained in:
Guanran Wang 2024-02-26 13:31:57 +08:00
parent ca7cd9dffb
commit a6c0afbf24
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8
3 changed files with 18 additions and 12 deletions

View file

@ -1,6 +1,8 @@
{
inputs,
pkgs,
config,
lib,
...
}: {
### Options
@ -31,4 +33,19 @@
useUserPackages = true;
extraSpecialArgs = {inherit inputs;}; # ??? isnt specialArgs imported by default ???
};
# Create /etc/zshrc that loads the nix-darwin environment.
programs.zsh.enable = true; # default shell on catalina
programs.fish.enable = true;
# fucking horrible
# https://github.com/LnL7/nix-darwin/issues/122#issuecomment-1659465635
programs.fish.loginShellInit = let
dquote = str: "\"" + str + "\"";
makeBinPathList = map (path: path + "/bin");
in ''
fish_add_path --move --prepend --path ${lib.concatMapStringsSep " " dquote (makeBinPathList config.environment.profiles)}
set fish_user_paths $fish_user_paths
'';
}

View file

@ -1,7 +1,7 @@
{...}: {
imports = [
./core.nix
./fonts.nix
./homebrew.nix
./window-manager.nix
];
}

View file

@ -1,15 +1,4 @@
{pkgs, ...}: {
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
#environment.systemPackages = with pkgs; [
# neovim
# vscode
#];
# Create /etc/zshrc that loads the nix-darwin environment.
programs.zsh.enable = true; # default shell on catalina
programs.fish.enable = true;
services = {
yabai = {
enable = true;