commit 98400ab0dfbafdde33f75e19d5b6d1acc28a23ee Author: Spencer Brower Date: Tue Oct 28 11:54:35 2025 -0400 feat: initial commit. diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..48a5693 --- /dev/null +++ b/.envrc @@ -0,0 +1,3 @@ +use flake + +export PATH="$PATH:./vendor/bin" \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4a8461c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.direnv +node_modules +vendor diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..c6ee9fd --- /dev/null +++ b/flake.lock @@ -0,0 +1,113 @@ +{ + "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1760948891, + "narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1761594641, + "narHash": "sha256-sImk6SJQASDLQo8l+0zWWaBgg7TueLS6lTvdH5pBZpo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1666250dbe4141e4ca8aaf89b40a3a51c2e36144", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1754788789, + "narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "a73b9c743612e4244d865a2fdee11865283c04e6", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1761594641, + "narHash": "sha256-sImk6SJQASDLQo8l+0zWWaBgg7TueLS6lTvdH5pBZpo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1666250dbe4141e4ca8aaf89b40a3a51c2e36144", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "process-compose-flake": { + "locked": { + "lastModified": 1761063998, + "narHash": "sha256-l14CiQZM2ZpWp6leugJ5/GKU1aydT/xrvyKRMgYc0ak=", + "owner": "Platonic-Systems", + "repo": "process-compose-flake", + "rev": "d1839830cd4a814830a27b3cb58437306747bbd3", + "type": "github" + }, + "original": { + "owner": "Platonic-Systems", + "repo": "process-compose-flake", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable", + "process-compose-flake": "process-compose-flake", + "treefmt-nix": "treefmt-nix" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1761311587, + "narHash": "sha256-Msq86cR5SjozQGCnC6H8C+0cD4rnx91BPltZ9KK613Y=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "2eddae033e4e74bf581c2d1dfa101f9033dbd2dc", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..51f536c --- /dev/null +++ b/flake.nix @@ -0,0 +1,83 @@ +{ + description = "A dev environment"; + + inputs = { + # nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; + nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + + flake-parts.url = "github:hercules-ci/flake-parts"; + process-compose-flake.url = "github:Platonic-Systems/process-compose-flake"; + treefmt-nix.url = "github:numtide/treefmt-nix"; + treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = + inputs@{ self + , flake-parts + , nixpkgs + , nixpkgs-unstable + , process-compose-flake + , treefmt-nix + }: + flake-parts.lib.mkFlake { inherit inputs; } { + imports = [ + inputs.treefmt-nix.flakeModule + # inputs.process-compose-flake.flakeModule + ]; + systems = [ "x86_64-linux" ]; + + perSystem = + { pkgs, system, inputs', ... }: { + _module.args.pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + + overlays = [ + (final: prev: { unstable = inputs'.nixpkgs-unstable.legacyPackages; }) + ]; + }; + + treefmt = { + # Used to find the project root + projectRootFile = "flake.nix"; + settings.global.excludes = [ + ".direnv/**" + ".jj/**" + ".env" + ".envrc" + ".env.local" + ]; + + + # Format nix files + programs.nixpkgs-fmt.enable = true; + programs.deadnix.enable = true; + + # Format js, json, and yaml files + programs.prettier.enable = true; + settings.formatter.prettier = + { + excludes = [ + "public/**" + "resources/js/modernizr.js" + "storage/app/caniuse.json" + "*.md" + ]; + }; + }; + + devShells.default = pkgs.mkShell + { + buildInputs = with pkgs; [ + # TODO: Packages go here. + unstable.nushell + + # IDE + unstable.helix + typescript-language-server + vscode-langservers-extracted + ]; + }; + }; + }; +} diff --git a/mod.nu b/mod.nu new file mode 100755 index 0000000..f7673c3 --- /dev/null +++ b/mod.nu @@ -0,0 +1,19 @@ +#!/usr/bin/env nu + +# Manage your .env files with ease +def main [] { + +} + +def "main get" [ + file: path +] { + cd (dirname $file); + + { + path: $file + dir: (pwd) + remotes: (git remote | lines | each { git remote get-url $in }) + contents: (open $file --raw) + } +}