nixos-configs/homeManagerModules/shell/trash/default.nix
matt1432 66f415ff5f
All checks were successful
Discord / discord commits (push) Has been skipped
refactor: move common/home to nixosModules/shell
2024-11-22 17:58:24 -05:00

21 lines
435 B
Nix

self: {
config,
lib,
pkgs,
...
}: let
inherit (lib) elem mkIf;
cfg = config.programs.bash;
trashPkg = self.packages.${pkgs.system}.trash-d;
isCorrectPlatform = elem pkgs.system (trashPkg.meta.platforms or [pkgs.system]);
in {
config = mkIf (cfg.enable && isCorrectPlatform) {
home.packages = [trashPkg];
programs.bash.shellAliases.rm = "trash";
};
# For accurate stack trace
_file = ./default.nix;
}