diff --git a/nix/configuration/configuration.nix b/nix/configuration/configuration.nix index ccb9c5c..c0e8266 100644 --- a/nix/configuration/configuration.nix +++ b/nix/configuration/configuration.nix @@ -16,6 +16,7 @@ ./roles/boot ./roles/chromecast ./roles/chromium + ./roles/d2 ./roles/direnv ./roles/distributed_build ./roles/docker diff --git a/nix/configuration/hosts/odo/default.nix b/nix/configuration/hosts/odo/default.nix index e084b20..f67256d 100644 --- a/nix/configuration/hosts/odo/default.nix +++ b/nix/configuration/hosts/odo/default.nix @@ -65,6 +65,7 @@ me.bluetooth.enable = true; me.chromecast.enable = true; me.chromium.enable = true; + me.d2.enable = true; me.direnv.enable = true; me.docker.enable = true; me.ecc.enable = false; diff --git a/nix/configuration/hosts/quark/default.nix b/nix/configuration/hosts/quark/default.nix index bb5e86a..663151e 100644 --- a/nix/configuration/hosts/quark/default.nix +++ b/nix/configuration/hosts/quark/default.nix @@ -60,6 +60,7 @@ me.bluetooth.enable = true; me.chromecast.enable = true; me.chromium.enable = true; + me.d2.enable = true; me.direnv.enable = true; me.docker.enable = true; me.ecc.enable = true; diff --git a/nix/configuration/roles/d2/default.nix b/nix/configuration/roles/d2/default.nix new file mode 100644 index 0000000..3fda8aa --- /dev/null +++ b/nix/configuration/roles/d2/default.nix @@ -0,0 +1,29 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + imports = [ ]; + + options.me = { + d2.enable = lib.mkOption { + type = lib.types.bool; + default = false; + example = true; + description = "Whether we want to install d2."; + }; + }; + + config = lib.mkIf config.me.d2.enable ( + lib.mkMerge [ + { + environment.systemPackages = with pkgs; [ + d2 + ]; + } + ] + ); +}