]> git.taranathan.com Git - FRC2027.git/commitdiff
stuff
authorTaran Nathan <moogoesmeow123@gmail.com>
Sun, 31 May 2026 05:31:04 +0000 (22:31 -0700)
committerTaran Nathan <moogoesmeow123@gmail.com>
Sun, 31 May 2026 05:42:12 +0000 (22:42 -0700)
devenv.lock
devenv.nix
devenv.yaml

index 74abac4f8d65c3d34867f5a90e7129030820fd82..71d25d8a95c5c4b700723a7c93f73835a6720164 100644 (file)
         "type": "github"
       }
     },
+    "flake-compat": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1767039857,
+        "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
+        "owner": "NixOS",
+        "repo": "flake-compat",
+        "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
+        "type": "github"
+      },
+      "original": {
+        "owner": "NixOS",
+        "repo": "flake-compat",
+        "type": "github"
+      }
+    },
+    "git-hooks": {
+      "inputs": {
+        "flake-compat": "flake-compat",
+        "gitignore": "gitignore",
+        "nixpkgs": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1778507602,
+        "narHash": "sha256-kTwur1wV+01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs=",
+        "owner": "cachix",
+        "repo": "git-hooks.nix",
+        "rev": "61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a",
+        "type": "github"
+      },
+      "original": {
+        "owner": "cachix",
+        "repo": "git-hooks.nix",
+        "type": "github"
+      }
+    },
+    "gitignore": {
+      "inputs": {
+        "nixpkgs": [
+          "git-hooks",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1709087332,
+        "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
+        "owner": "hercules-ci",
+        "repo": "gitignore.nix",
+        "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
+        "type": "github"
+      },
+      "original": {
+        "owner": "hercules-ci",
+        "repo": "gitignore.nix",
+        "type": "github"
+      }
+    },
     "nixpkgs": {
       "inputs": {
         "nixpkgs-src": "nixpkgs-src"
     "root": {
       "inputs": {
         "devenv": "devenv",
+        "git-hooks": "git-hooks",
         "nixpkgs": "nixpkgs"
       }
     }
index e20324840dd37de2ee542c96171d567428bd2be5..57a71d906e90980bcae36d5cc1be16449a2f1d69 100644 (file)
@@ -6,9 +6,6 @@
   ...
 }:
 
-let
-  user = builtins.getEnv "USER";
-in
 {
   # https://devenv.sh/basics/
   env.GREET = "devenv";
@@ -17,6 +14,7 @@ in
   packages = with pkgs; [
     git
     jujutsu
+    google-java-format
   ];
 
   # https://devenv.sh/processes/
@@ -70,11 +68,19 @@ in
   };
 
   # for taran's computer, should not run for anyone else
-  # env.JAVA_HOME = lib.mkForce "/usr/lib/jvm/java-21-openjdk";
-  env.JAVA_HOME = if user == "moo" then lib.mkForce "/usr/lib/jvm/java-21-openjdk" else lib.mkDefault "";
+  profiles.user.moo.module = {
+    env.JAVA_HOME = lib.mkForce "/usr/lib/jvm/java-21-openjdk";
+  };
 
   # https://devenv.sh/git-hooks/
   # git-hooks.hooks.shellcheck.enable = true;
 
+  git-hooks.hooks.formatting = {
+    enable = true;
+    name = "Formatting";
+    entry = "google-java-format";
+    types = ["java"];
+  };
+
   # See full reference at https://devenv.sh/reference/options/
 }
index d5096d3cfc925aac2ab14931aa5490552e9c4249..d13611681a7a5504cccbc061ed71a2c1fd73291e 100644 (file)
@@ -1,18 +1,9 @@
-# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
 inputs:
+  git-hooks:
+    url: github:cachix/git-hooks.nix
+    inputs:
+      nixpkgs:
+        follows: nixpkgs
   nixpkgs:
     url: github:cachix/devenv-nixpkgs/rolling
-
-# If you're using non-OSS software, you can set allow_unfree to true.
 allow_unfree: true
-
-# If you're not willing to allow unsupported packages:
-# allow_unsupported_system: false
-
-# If you're willing to use a package that's vulnerable
-# permitted_insecure_packages:
-#  - "openssl-1.1.1w"
-
-# If you have more than one devenv you can merge them
-#imports:
-# - ./backend