From c518e90a36499ecdc3b263bcf515421f1df36bf1 Mon Sep 17 00:00:00 2001 From: Tyler Mayoff Date: Mon, 6 Jan 2025 09:26:40 -0500 Subject: [PATCH] More macos changes --- dot_config/flake/flake.lock | 159 +++++++++++++++++++++---- dot_config/flake/flake.nix | 11 +- dot_config/flake/home/common.nix | 7 +- dot_config/flake/home/fish.nix | 20 ++-- dot_config/flake/home/hinge/darwin.nix | 8 ++ dot_config/flake/home/hinge/hinge.nix | 48 +++++--- 6 files changed, 189 insertions(+), 64 deletions(-) create mode 100644 dot_config/flake/home/hinge/darwin.nix diff --git a/dot_config/flake/flake.lock b/dot_config/flake/flake.lock index 437240d..f1dae77 100644 --- a/dot_config/flake/flake.lock +++ b/dot_config/flake/flake.lock @@ -1,6 +1,39 @@ { "nodes": { + "crane": { + "locked": { + "lastModified": 1727974419, + "narHash": "sha256-WD0//20h+2/yPGkO88d2nYbb23WMWYvnRyDQ9Dx4UHg=", + "owner": "ipetkov", + "repo": "crane", + "rev": "37e4f9f0976cb9281cd3f0c70081e5e0ecaee93f", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { "locked": { "lastModified": 1659877975, "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", @@ -15,6 +48,27 @@ "type": "github" } }, + "helix": { + "inputs": { + "crane": "crane", + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1734364874, + "narHash": "sha256-KfIjyrDcWWmCrS+XKw4ZeUnCjKLYZ1cZZ2F1NvG6m5Y=", + "owner": "helix-editor", + "repo": "helix", + "rev": "99fdbce566434a8fc823a28a8c1cccbb743a5ade", + "type": "github" + }, + "original": { + "owner": "helix-editor", + "repo": "helix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -22,11 +76,11 @@ ] }, "locked": { - "lastModified": 1733951607, - "narHash": "sha256-CN6q6iCzxI1gkNyk4xLdwaMKi10r7n+aJkRzWj8PXwQ=", + "lastModified": 1734344598, + "narHash": "sha256-wNX3hsScqDdqKWOO87wETUEi7a/QlPVgpC/Lh5rFOuA=", "owner": "nix-community", "repo": "home-manager", - "rev": "6e5b2d9e8014b5572e3367937a329e7053458d34", + "rev": "83ecd50915a09dca928971139d3a102377a8d242", "type": "github" }, "original": { @@ -37,8 +91,8 @@ }, "nixgl": { "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1713543440, @@ -55,6 +109,38 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1728018373, + "narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "bc947f541ae55e999ffdb4013441347d83b00feb", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1734119587, + "narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1660551188, "narHash": "sha256-a1LARMMYQ8DPx1BgoI/UN4bXe12hhZkCNqdxNi6uS0g=", @@ -69,29 +155,13 @@ "type": "github" } }, - "nixpkgs-unstable": { + "nixpkgs_3": { "locked": { - "lastModified": 1733759999, - "narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=", + "lastModified": 1734083684, + "narHash": "sha256-5fNndbndxSx5d+C/D0p/VF32xDiJCJzyOqorOYW4JEo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1733808091, - "narHash": "sha256-KWwINTQelKOoQgrXftxoqxmKFZb9pLVfnRvK270nkVk=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "a0f3e10d94359665dba45b71b4227b0aeb851f8e", + "rev": "314e12ba369ccdb9b352a4db26ff419f7c49fa84", "type": "github" }, "original": { @@ -103,11 +173,48 @@ }, "root": { "inputs": { + "helix": "helix", "home-manager": "home-manager", "nixgl": "nixgl", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nixpkgs-unstable": "nixpkgs-unstable" } + }, + "rust-overlay": { + "inputs": { + "nixpkgs": [ + "helix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1728268235, + "narHash": "sha256-lJMFnMO4maJuNO6PQ5fZesrTmglze3UFTTBuKGwR1Nw=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "25685cc2c7054efc31351c172ae77b21814f2d42", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/dot_config/flake/flake.nix b/dot_config/flake/flake.nix index 6b2de32..e8b3488 100644 --- a/dot_config/flake/flake.nix +++ b/dot_config/flake/flake.nix @@ -9,7 +9,8 @@ inputs.nixpkgs.follows = "nixpkgs"; }; nixgl.url = "github:nix-community/nixGL"; - # helix.url = "github:helix-editor/helix"; + helix.url = "github:helix-editor/helix"; + darwin.url = "github:lnl7/nix-darwin"; }; outputs = { @@ -17,6 +18,8 @@ nixpkgs, nixpkgs-unstable, home-manager, + darwin, + helix, ... } @ inputs: let inherit (self) outputs; @@ -41,6 +44,12 @@ }; }; + darwinConfigurations."MAC-C57KK2TC69" = darwin.lib.darwinSystem { + specialArgs = {inherit inputs outputs;}; + modules = [./home/hinge/darwin.nix]; + + }; + homeConfigurations = { "tyler@guidebolt" = home-manager.lib.homeManagerConfiguration { pkgs = allPkgs."x86_64-linux"; diff --git a/dot_config/flake/home/common.nix b/dot_config/flake/home/common.nix index c516063..f6c379c 100644 --- a/dot_config/flake/home/common.nix +++ b/dot_config/flake/home/common.nix @@ -28,11 +28,10 @@ outputs.overlays.modifications outputs.overlays.unstable-packages - # inputs.helix.overlays.default + inputs.helix.overlays.default ]; }; - home.packages = with pkgs; [ # Fonts #(nerdfonts.override {fonts = ["JetBrainsMono"];}) @@ -77,7 +76,7 @@ programs.helix = { enable = true; - # package = inputs.helix.packages.${pkgs.system}.default; + package = inputs.helix.packages.${pkgs.system}.default; }; programs.bat = { @@ -117,8 +116,6 @@ shellWrapperName = "y"; }; - - home.stateVersion = "23.11"; programs.home-manager.enable = true; } diff --git a/dot_config/flake/home/fish.nix b/dot_config/flake/home/fish.nix index 951b029..591945e 100644 --- a/dot_config/flake/home/fish.nix +++ b/dot_config/flake/home/fish.nix @@ -5,16 +5,18 @@ set -gx EDITOR hx set -gx GIT_EDITOR $EDITOR set -gx DEBEMAIL "tyler@tylermayoff.com" - + fish_add_path $HOME/.local/bin fish_add_path /opt/homebrew/bin - fish_add_path /opt/homebrew/opt/llvm/bin - + fish_add_path /opt/homebrew/opt/llvm@18/bin + if test -e $HOME/.config/fish/variables-$(hostname)fish source $HOME/.config/fish/variables-$(hostname).fish end bind \cz 'fg 2>/dev/null; commandline -f repaint' + export GPG_TTY=$(tty) + zoxide init fish | source ''; @@ -31,14 +33,6 @@ end ''; - # functions = { - # yupdate = { - # body = '' - # echo "Hello world" - # ''; - # }; - # }; - plugins = [ { name = "forgit"; @@ -66,8 +60,8 @@ # yac = "yadm add . && yadm commit"; # yacp = "yac && yadm push"; - yc = "pushd $HOME/.local/share/yadm/repo.git && git-forgit add && yadm commit && popd"; - yd = "pushd $HOME/.local/share/yadm/repo.git && git-forgit diff && popd"; + # yc = "pushd $HOME/.local/share/yadm/repo.git && git-forgit add && yadm commit && popd"; + # yd = "pushd $HOME/.local/share/yadm/repo.git && git-forgit diff && popd"; # nix flake = "nix flake"; diff --git a/dot_config/flake/home/hinge/darwin.nix b/dot_config/flake/home/hinge/darwin.nix new file mode 100644 index 0000000..7057040 --- /dev/null +++ b/dot_config/flake/home/hinge/darwin.nix @@ -0,0 +1,8 @@ +{ + inputs, + outputs, + lib, + ... +}: { + # services.aerospace.enable = true; +} diff --git a/dot_config/flake/home/hinge/hinge.nix b/dot_config/flake/home/hinge/hinge.nix index 16b5c8c..12a5880 100644 --- a/dot_config/flake/home/hinge/hinge.nix +++ b/dot_config/flake/home/hinge/hinge.nix @@ -15,26 +15,36 @@ in rec { # mac-app-util.homeManagerModules.default ]; - home.username = lib.mkForce "tyler.mayoff"; - home.homeDirectory = lib.mkForce "/Users/tyler.mayoff"; + home = { + username = lib.mkForce "tyler.mayoff"; + homeDirectory = lib.mkForce "/Users/tyler.mayoff"; - home.packages = with pkgs; [ - bazel_7 - cmake - # clang-tools - cmake-language-server - jdt-language-server - ffmpeg - sccache - just - yarn - cocoapods - # android-tools - jdk17 - ]; + packages = with pkgs; [ + bazel_7 + cmake - home.sessionVariables = { - ANDROID_HOME="/Users/tyler.mayoff/Library/Android/sdk"; - PATH="$PATH:/Users/tyler.mayoff/Library/Android/sdk/platform-tools"; + # clang + # biome + deno + swiftlint + unstable.helix-gpt + unstable.lsp-ai + python312Packages.python-lsp-server + typescript-language-server + cmake-language-server + jdt-language-server + ffmpeg + sccache + just + yarn + cocoapods + # android-tools + jdk17 + ]; + + sessionVariables = { + ANDROID_HOME = "/Users/tyler.mayoff/Library/Android/sdk"; + PATH = "$PATH:/Users/tyler.mayoff/Library/Android/sdk/platform-tools"; + }; }; }