feat(laravel): Added bash aliases.

This commit is contained in:
Spencer Brower
2022-11-02 20:24:54 -04:00
parent 8d533df068
commit 6a5a44981e
2 changed files with 18 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
# TODO: Install private shell key?
# TODO: git config via HomeManager?
{ config, hostName ? "nixos", lib, pkgs, nixpkgs, ... }:
{ config, hostName ? "nixos", lib, pkgs, ... }:
let
cfg = config.services.laravel;
@@ -69,6 +69,11 @@ in
type = lib.types.str;
default = "mysql";
};
bashAliases.enable = lib.mkOption {
description = "Whether to install aliases for bash";
default = false;
};
};
};
@@ -120,5 +125,16 @@ in
}
];
})
(lib.mkIf (cfg.bashAliases.enalbe == true) {
programs.bash.shellAliases = {
h = "php artisan horizon";
m = "php artisan migrate";
mfs = "php artisan migrate:fresh --seed";
mr = "php artisan migrate:rollback";
mr1 = "php artisan migrate:rollback --step=1";
standard-version = "yarn standard-version";
t = "php artisan tinker";
};
})
]);
}