about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-08-07 15:15:01 -0700
committerFranck Cuny <franck@fcuny.net>2022-08-08 17:10:45 -0700
commitb102cd5cb27e46b5b4035046bade1bb3d43a83dd (patch)
treeabb22bc38f38d10ccd2dae813172cc2b98784e6e
parentfeat(ops/buildkite): use terraform to manage buildkite (diff)
downloadworld-b102cd5cb27e46b5b4035046bade1bb3d43a83dd.tar.gz
feat(home/terraform): install terraform when needed
Change-Id: Ie87672629ff23eeb93f5308898014cc737490b7c
Reviewed-on: https://cl.fcuny.net/c/world/+/708
Tested-by: CI
Reviewed-by: Franck Cuny <franck@fcuny.net>
-rw-r--r--home/default.nix1
-rw-r--r--home/terraform/default.nix10
-rw-r--r--hosts/aptos/home.nix1
3 files changed, 12 insertions, 0 deletions
diff --git a/home/default.nix b/home/default.nix
index f2111db..7972470 100644
--- a/home/default.nix
+++ b/home/default.nix
@@ -30,6 +30,7 @@
     ./ssh
     ./sublime-music
     ./terminal
+    ./terraform
     ./tmux
     ./transmission-remote
     ./vlc
diff --git a/home/terraform/default.nix b/home/terraform/default.nix
new file mode 100644
index 0000000..0358ca9
--- /dev/null
+++ b/home/terraform/default.nix
@@ -0,0 +1,10 @@
+{ lib, config, pkgs, ... }:
+let cfg = config.my.home.terraform;
+in
+{
+  options.my.home.terraform = with lib; {
+    enable = mkEnableOption "terraform configuration";
+  };
+
+  config.home.packages = with pkgs; lib.mkIf cfg.enable ([ terraform ]);
+}
diff --git a/hosts/aptos/home.nix b/hosts/aptos/home.nix
index 9f7cb0a..7fedd9d 100644
--- a/hosts/aptos/home.nix
+++ b/hosts/aptos/home.nix
@@ -26,6 +26,7 @@
     shell.name = "fish";
     ssh.enable = true;
     terminal.program = "alacritty";
+    terraform.enable = true;
     tmux.enable = true;
     xdg.enable = true;