mirror of
https://github.com/sbrow/nix.git
synced 2026-02-27 21:31:45 -05:00
feat(laravel): Added bash aliases.
This commit is contained in:
@@ -60,6 +60,7 @@ in
|
||||
'';
|
||||
}
|
||||
(lib.mkIf (cfg.enable == true) {
|
||||
services.laravel.bashAliases.enable = lib.mkDefault true;
|
||||
services.laravel.root = lib.mkDefault "/vagrant";
|
||||
# services.laravel.domain = lib.mkDefault (hostName + ".local");
|
||||
services.laravel.user = lib.mkDefault "vagrant";
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user