summaryrefslogtreecommitdiff
path: root/archetypes/collections/development/default.nix
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2025-08-26 21:36:16 -0500
committerTim Keller <tjk@tjkeller.xyz>2025-08-26 21:36:16 -0500
commitc3c3d6f1fd19a5da015c9a9d3ae5c54f2d177be0 (patch)
tree559a0d9385df907f471b9bdd2bf708ec4650c718 /archetypes/collections/development/default.nix
parent125313aabedb17516d735a718968bfad1289f12b (diff)
downloadnixos-master.tar.xz
nixos-master.zip
reogranize files more only working on optiplex for now prepare for home manager refactoringHEADmaster
Diffstat (limited to 'archetypes/collections/development/default.nix')
-rw-r--r--archetypes/collections/development/default.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/archetypes/collections/development/default.nix b/archetypes/collections/development/default.nix
new file mode 100644
index 0000000..87fe2d2
--- /dev/null
+++ b/archetypes/collections/development/default.nix
@@ -0,0 +1,45 @@
+{ pkgs, lib, config, ... }: let
+ cfg = config._archetypes.collections.development;
+ hugoFirewallPort = 1313;
+in {
+ imports = [
+ ./docker.nix
+ ];
+
+ options._archetypes.collections.development = {
+ utilities.enable = lib.mkEnableOption "install basic dev utilities";
+ android.enable = lib.mkEnableOption "install android dev tools";
+ c.enable = lib.mkEnableOption "install c dev tools";
+ lua.enable = lib.mkEnableOption "install lua dev tools";
+ web = {
+ hugo = {
+ enable = lib.mkEnableOption "install hugo";
+ openFirewall = lib.mkEnableOption "open the port ${hugoFirewallPort} for viewing content from hugo serve on other devices";
+ };
+ node.enable = lib.mkEnableOption "install node";
+ };
+ };
+
+ config = {
+ environment.systemPackages = with pkgs; [
+ git
+ python3
+ ] ++ lib.optionals cfg.android.enable [
+ #adb-sync
+ android-tools
+ ] ++ lib.optionals cfg.c.enable [
+ gcc
+ git
+ gnumake
+ pkg-config
+ ] ++ lib.optionals cfg.lua.enable [
+ lua
+ ] ++ lib.optionals cfg.web.hugo.enable [
+ hugo
+ ] ++ lib.optionals cfg.web.node.enable [
+ nodejs
+ ];
+
+ networking.firewall.allowedTCPPorts = lib.mkIf cfg.web.hugo.openFirewall [ hugoFirewallPort ];
+ };
+}