58 lines
1.8 KiB
Nix
58 lines
1.8 KiB
Nix
pkgs : {
|
|
allowUnfree = true;
|
|
packageOverrides = pkgs: with pkgs; rec {
|
|
nixUserProfile = writeText "nix-user-profile" ''
|
|
export PATH=$HOME/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
|
export MANPATH=$HOME/.nix-profile/share/man:/nix/var/nix/profiles/default/share/man:/usr/share/man
|
|
export FPATH=$HOME/.nix-profile/share/zsh/site-functions:$HOME/.nix-profile/share/zsh/$ZSH_VERSION/functions:$FPATH
|
|
export LOCALE_ARCHIVE=/usr/lib/locale/locale-archive
|
|
'';
|
|
|
|
userBasePkgs = pkgs.buildEnv {
|
|
name = "user-base";
|
|
paths = [
|
|
(runCommand "profile" {} ''
|
|
mkdir -p $out/etc/profile.d
|
|
cp ${nixUserProfile} $out/etc/profile.d/nix-user-profile.sh
|
|
'')
|
|
];
|
|
pathsToLink = [
|
|
"/share"
|
|
"/bin"
|
|
"/etc"
|
|
];
|
|
extraOutputsToInstall = [ "man" "doc" ];
|
|
};
|
|
|
|
userMacOSPkgs = pkgs.buildEnv {
|
|
name = "user-macos";
|
|
paths = [
|
|
userBasePkgs
|
|
bash
|
|
zsh
|
|
zsh-completions
|
|
podman
|
|
podman-compose
|
|
rsync
|
|
gnupg
|
|
curl
|
|
wget
|
|
alacritty
|
|
coreutils
|
|
direnv
|
|
ripgrep
|
|
fd
|
|
chezmoi
|
|
fzf
|
|
vim
|
|
git
|
|
];
|
|
pathsToLink = [
|
|
"/Applications"
|
|
] ++ (userBasePkgs.pathsToLink or []);
|
|
extraOutputsToInstall = []
|
|
++ (userBasePkgs.extraOutputsToInstall or []);
|
|
};
|
|
};
|
|
}
|