flake/modules/home/terminal/hr/default.nix
2026-01-21 13:36:25 +00:00

46 lines
1.2 KiB
Nix

{
pkgs,
lib,
config,
...
}: let
cfg = config.mods.terminal;
hr = pkgs.writeShellScriptBin "hr" (builtins.readFile ./hr.sh);
in {
options.mods.terminal.hr.enable = lib.mkEnableOption "Hefring (Work Tooling)";
config = lib.mkIf cfg.hr.enable {
home.packages = [hr];
systemd.user.services = {
google-db-proxy-test = {
Unit = {
Description = "Google Cloud SQL Proxy (Test)";
After = ["network.target"];
};
Service = {
ExecStart = "${pkgs.google-cloud-sql-proxy}/bin/cloud-sql-proxy mk2-test:europe-west1:mk2-test-sql-instance -p 5436";
Restart = "always";
};
Install = {
WantedBy = ["default.target"];
};
};
google-db-proxy-prod = {
Unit = {
Description = "Google Cloud SQL Proxy (Prod)";
After = ["network.target"];
};
Service = {
ExecStart = "${pkgs.google-cloud-sql-proxy}/bin/cloud-sql-proxy mk2-prod:europe-west1:mk2-prod-sql-instance -p 5437";
Restart = "always";
};
Install = {
WantedBy = ["default.target"];
};
};
};
};
}