Nix: Add prefixed GNU coreutils on Mac

Necessary for some Emacs modes that expect a "gls" command.
This commit is contained in:
2024-04-11 16:23:42 -07:00
parent 08eb51a6bd
commit 56e838d183

View File

@@ -1,9 +1,10 @@
{ config, pkgs, lib, ... }:
{
home.stateVersion = "22.05";
# TODO - ask for sanity check
home.homeDirectory = if lib.strings.hasInfix "darwin" pkgs.system
then /Users/${config.home.username} else /home/${config.home.username};
home.homeDirectory = if pkgs.stdenv.hostPlatform.isDarwin
then /Users/${config.home.username}
else /home/${config.home.username};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
@@ -11,23 +12,29 @@
# Enable integration with generic Linux OSs
targets.genericLinux.enable = pkgs.stdenv.isLinux;
home.packages = with pkgs; [
# xonsh_with_plugins
# Better cat
bat
# Better find
fd
# Better df
duf
# Better top
htop
ncdu
ripgrep
tmux
fira-code
fira-code-nerdfont
roboto-mono
];
home.packages = with pkgs; let
isOnMac = stdenv.hostPlatform.isDarwin;
basePackages = [
# Better cat
bat
# Better find
fd
# Better df
duf
# Better top
htop
ncdu
ripgrep
tmux
fira-code
fira-code-nerdfont
roboto-mono
];
macPackages = basePackages ++ [
coreutils-prefixed
];
in
if isOnMac then macPackages else basePackages;
imports = [
./modules/fish