From ec0f5e8e55f9004613902fded943a8afa1b02a7f Mon Sep 17 00:00:00 2001 From: Tyler Mayoff Date: Tue, 3 Dec 2024 16:05:21 -0500 Subject: [PATCH 1/7] Trying to get macos to work --- dot_config/flake/flake.nix | 8 +++- dot_config/flake/home/common.nix | 42 +-------------------- dot_config/flake/home/hinge/hinge.nix | 13 +++++++ run_once_before_decrypt-private-key.sh.tmpl | 4 +- 4 files changed, 24 insertions(+), 43 deletions(-) create mode 100644 dot_config/flake/home/hinge/hinge.nix diff --git a/dot_config/flake/flake.nix b/dot_config/flake/flake.nix index 063169c..839f39e 100644 --- a/dot_config/flake/flake.nix +++ b/dot_config/flake/flake.nix @@ -21,7 +21,7 @@ } @ inputs: let inherit (self) outputs; - system = "x86_64-linux"; + system = "aarch64-darwin"; in rec { pkgs = import nixpkgs { inherit system; @@ -57,6 +57,12 @@ extraSpecialArgs = {inherit inputs outputs;}; modules = [./home/mal/mal.nix]; }; + + "tyler.mayoff@MAC-C57KK2TC69" = home-manager.lib.homeManagerConfiguration{ + inherit pkgs; + extraSpecialArgs = {inherit inputs outputs; }; + modules = [./home/hinge/hinge.nix]; + }; }; }; } diff --git a/dot_config/flake/home/common.nix b/dot_config/flake/home/common.nix index e528254..459d7a4 100644 --- a/dot_config/flake/home/common.nix +++ b/dot_config/flake/home/common.nix @@ -32,11 +32,10 @@ ]; }; - fonts.fontconfig.enable = true; home.packages = with pkgs; [ # Fonts - (nerdfonts.override {fonts = ["JetBrainsMono"];}) + #(nerdfonts.override {fonts = ["JetBrainsMono"];}) unstable.nix-output-monitor @@ -48,15 +47,7 @@ restic libnotify - distrobox - - wl-clipboard - usbutils - - yadm - # Shell - bash starship btop ripgrep @@ -125,36 +116,7 @@ shellWrapperName = "y"; }; - services.darkman = { - enable = true; - package = pkgs.unstable.darkman; - settings = { - lat = 45.408; - lng = -74.159; - }; - - darkModeScripts = { - helix-editor = '' - sed -i 's/theme = ".*"/theme = "catppuccin_macchiato"/' $HOME/.config/helix/config.toml - ''; - - alacritty = '' - ln -fs ~/.config/alacritty/themes/catppuccin_macchiato.toml ~/.config/alacritty/themes/_active.toml - touch ~/.config/alacritty/alacritty.toml - ''; - }; - - lightModeScripts = { - helix-editor = '' - sed -i 's/theme = ".*"/theme = "catppuccin_latte"/' $HOME/.config/helix/config.toml - ''; - - alacritty = '' - ln -fs ~/.config/alacritty/themes/catppuccin_latte.toml ~/.config/alacritty/themes/_active.toml - touch ~/.config/alacritty/alacritty.toml - ''; - }; - }; + home.stateVersion = "23.11"; programs.home-manager.enable = true; diff --git a/dot_config/flake/home/hinge/hinge.nix b/dot_config/flake/home/hinge/hinge.nix new file mode 100644 index 0000000..4a283eb --- /dev/null +++ b/dot_config/flake/home/hinge/hinge.nix @@ -0,0 +1,13 @@ +{ + inputs, + outputs, + lib, + config, + pkgs, + ... +}: { + # imports = [../common.nix]; + + home.packages = with pkgs; [ + ]; +} diff --git a/run_once_before_decrypt-private-key.sh.tmpl b/run_once_before_decrypt-private-key.sh.tmpl index f5e65fb..e968e5b 100644 --- a/run_once_before_decrypt-private-key.sh.tmpl +++ b/run_once_before_decrypt-private-key.sh.tmpl @@ -1,7 +1,7 @@ #!/bin/sh if [ ! -f "/home/tyler/.config/chezmoi/key.txt" ]; then - mkdir -p "/home/tyler/.config/chezmoi" + mkdir -p "${HOME}/.config/chezmoi" chezmoi age decrypt --output "${HOME}/.config/chezmoi/key.txt" --passphrase "{{ .chezmoi.sourceDir }}/key.txt.age" - chmod 600 "/home/tyler/.config/chezmoi/key.txt" + chmod 600 "${HOME}/.config/chezmoi/key.txt" fi From 7ed15206d0548d57a6be7d0a4cc3331830c9230a Mon Sep 17 00:00:00 2001 From: Tyler Mayoff Date: Wed, 4 Dec 2024 11:27:18 -0500 Subject: [PATCH 2/7] Getting this working on macos --- dot_config/flake/flake.lock | 24 ++++++++++++------------ dot_config/flake/home/fish.nix | 11 ++++++++--- dot_config/flake/home/hinge/hinge.nix | 8 +++++++- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/dot_config/flake/flake.lock b/dot_config/flake/flake.lock index eb65265..d67a10b 100644 --- a/dot_config/flake/flake.lock +++ b/dot_config/flake/flake.lock @@ -56,11 +56,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1732284611, - "narHash": "sha256-SH7WRJnFSXDJ6f9UzMUdaa6cS5Fc2kACSW8wB9BA8WU=", + "lastModified": 1733238479, + "narHash": "sha256-o5BT2ziQJzoXrqBz/iOIOGoxDTXYd5KiNF/7ncN81ao=", "owner": "helix-editor", "repo": "helix", - "rev": "cbbeca6c5227e65bebdbe9abbadbd2202ffc1005", + "rev": "fa68bac391e576e659e306ce3fb2758d3ec68538", "type": "github" }, "original": { @@ -76,11 +76,11 @@ ] }, "locked": { - "lastModified": 1732482255, - "narHash": "sha256-GUffLwzawz5WRVfWaWCg78n/HrBJrOG7QadFY6rtV8A=", + "lastModified": 1733175814, + "narHash": "sha256-zFOtOaqjzZfPMsm1mwu98syv3y+jziAq5DfWygaMtLg=", "owner": "nix-community", "repo": "home-manager", - "rev": "a9953635d7f34e7358d5189751110f87e3ac17da", + "rev": "bf23fe41082aa0289c209169302afd3397092f22", "type": "github" }, "original": { @@ -126,11 +126,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1732014248, - "narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=", + "lastModified": 1733212471, + "narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "23e89b7da85c3640bbc2173fe04f4bd114342367", + "rev": "55d15ad12a74eb7d4646254e13638ad0c4128776", "type": "github" }, "original": { @@ -157,11 +157,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1731797254, - "narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=", + "lastModified": 1733016324, + "narHash": "sha256-8qwPSE2g1othR1u4uP86NXxm6i7E9nHPyJX3m3lx7Q4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59", + "rev": "7e1ca67996afd8233d9033edd26e442836cc2ad6", "type": "github" }, "original": { diff --git a/dot_config/flake/home/fish.nix b/dot_config/flake/home/fish.nix index 339a62e..cd68386 100644 --- a/dot_config/flake/home/fish.nix +++ b/dot_config/flake/home/fish.nix @@ -7,8 +7,11 @@ set -gx DEBEMAIL "tyler@tylermayoff.com" fish_add_path $HOME/.local/bin - - source $HOME/.config/fish/variables-$(hostname).fish + fish_add_path /opt/homebrew/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' zoxide init fish | source @@ -22,7 +25,9 @@ set -xg XDG_DATA_DIRS "$HOME/.nix-profile/share:$XDG_DATA_DIRS" fish_add_path $HOME/.local/bin - source $HOME/.config/fish/variables-$(hostname).fish + if test -e $HOME/.config/fish/variables-$(hostname)fish + source $HOME/.config/fish/variables-$(hostname).fish + end ''; # functions = { diff --git a/dot_config/flake/home/hinge/hinge.nix b/dot_config/flake/home/hinge/hinge.nix index 4a283eb..a21a4d8 100644 --- a/dot_config/flake/home/hinge/hinge.nix +++ b/dot_config/flake/home/hinge/hinge.nix @@ -6,8 +6,14 @@ pkgs, ... }: { - # imports = [../common.nix]; + imports = [../common.nix]; + + home.username =lib.mkForce "tyler.mayoff"; + home.homeDirectory = lib.mkForce "/Users/tyler.mayoff"; home.packages = with pkgs; [ ]; + + # home.stateVersion = "23.11"; + } From c616fb2570ccdf1832c76b240bbb724e03c36d3f Mon Sep 17 00:00:00 2001 From: Tyler Mayoff Date: Thu, 5 Dec 2024 08:42:33 -0500 Subject: [PATCH 3/7] Added git and bazel --- dot_config/flake/home/common.nix | 1 + dot_config/flake/home/hinge/hinge.nix | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dot_config/flake/home/common.nix b/dot_config/flake/home/common.nix index 459d7a4..acaf427 100644 --- a/dot_config/flake/home/common.nix +++ b/dot_config/flake/home/common.nix @@ -56,6 +56,7 @@ glow gitoxide lnav + git fzf zoxide diff --git a/dot_config/flake/home/hinge/hinge.nix b/dot_config/flake/home/hinge/hinge.nix index a21a4d8..fe612ed 100644 --- a/dot_config/flake/home/hinge/hinge.nix +++ b/dot_config/flake/home/hinge/hinge.nix @@ -12,7 +12,8 @@ home.homeDirectory = lib.mkForce "/Users/tyler.mayoff"; home.packages = with pkgs; [ - ]; + + bazel ]; # home.stateVersion = "23.11"; From f35f2a877c0f3895c2caa27e3fc0e714c5610995 Mon Sep 17 00:00:00 2001 From: Tyler Mayoff Date: Fri, 6 Dec 2024 14:53:06 -0500 Subject: [PATCH 4/7] Reorg and updates to support macos - Split kitty to it's own file - Updated flake.nix to support multiple systems - Updated flake.lock --- dot_config/flake/flake.lock | 48 +++++++++++++++++++++++---- dot_config/flake/flake.nix | 32 +++++++++--------- dot_config/flake/home/gui.nix | 16 +-------- dot_config/flake/home/hinge/hinge.nix | 28 +++++++++------- dot_config/flake/home/kitty.nix | 16 +++++++++ 5 files changed, 91 insertions(+), 49 deletions(-) create mode 100644 dot_config/flake/home/kitty.nix diff --git a/dot_config/flake/flake.lock b/dot_config/flake/flake.lock index d67a10b..d613a21 100644 --- a/dot_config/flake/flake.lock +++ b/dot_config/flake/flake.lock @@ -19,6 +19,24 @@ "inputs": { "systems": "systems" }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, "locked": { "lastModified": 1726560853, "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", @@ -33,7 +51,7 @@ "type": "github" } }, - "flake-utils_2": { + "flake-utils_3": { "locked": { "lastModified": 1659877975, "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", @@ -51,7 +69,7 @@ "helix": { "inputs": { "crane": "crane", - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "nixpkgs": "nixpkgs", "rust-overlay": "rust-overlay" }, @@ -91,7 +109,7 @@ }, "nixgl": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "nixpkgs": "nixpkgs_2" }, "locked": { @@ -157,22 +175,23 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1733016324, - "narHash": "sha256-8qwPSE2g1othR1u4uP86NXxm6i7E9nHPyJX3m3lx7Q4=", + "lastModified": 1733412085, + "narHash": "sha256-FillH0qdWDt/nlO6ED7h4cmN+G9uXwGjwmCnHs0QVYM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "7e1ca67996afd8233d9033edd26e442836cc2ad6", + "rev": "4dc2fc4e62dbf62b84132fe526356fbac7b03541", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-24.05", + "ref": "nixos-24.11", "repo": "nixpkgs", "type": "github" } }, "root": { "inputs": { + "flake-utils": "flake-utils", "helix": "helix", "home-manager": "home-manager", "nixgl": "nixgl", @@ -215,6 +234,21 @@ "repo": "default", "type": "github" } + }, + "systems_2": { + "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 839f39e..a9f5f3e 100644 --- a/dot_config/flake/flake.nix +++ b/dot_config/flake/flake.nix @@ -2,7 +2,7 @@ description = "Home manager flake"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager = { url = "github:nix-community/home-manager"; @@ -21,16 +21,18 @@ } @ inputs: let inherit (self) outputs; - system = "aarch64-darwin"; - in rec { - pkgs = import nixpkgs { - inherit system; - config.allowUnfree = true; - }; + systems = [ + "x86_64-linux" + "aarch64-darwin" + ]; + forAllSystems = nixpkgs.lib.genAttrs systems; + + allPkgs = forAllSystems (system: import nixpkgs {inherit system;}); + in { overlays = import ./overlays {inherit inputs;}; - defaultPackage.${system} = home-manager.defaultPackage.${system}; + defaultPackage = forAllSystems (system: home-manager.defaultPackage.${system}); nixosConfigurations = { mal = nixpkgs.lib.nixosSystem { @@ -41,27 +43,27 @@ homeConfigurations = { "tyler@guidebolt" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; + pkgs = allPkgs."x86_64-linux"; extraSpecialArgs = {inherit inputs outputs;}; modules = [./home/guidebolt/guidebolt.nix]; }; "tyler@wash" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; + pkgs = allPkgs."x86_64-linux"; extraSpecialArgs = {inherit inputs outputs;}; modules = [./home/wash/wash.nix]; }; "tyler@mal" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; + pkgs = allPkgs; extraSpecialArgs = {inherit inputs outputs;}; modules = [./home/mal/mal.nix]; }; - "tyler.mayoff@MAC-C57KK2TC69" = home-manager.lib.homeManagerConfiguration{ - inherit pkgs; - extraSpecialArgs = {inherit inputs outputs; }; - modules = [./home/hinge/hinge.nix]; + "tyler.mayoff@MAC-C57KK2TC69" = home-manager.lib.homeManagerConfiguration { + pkgs = allPkgs."aarch64-darwin"; + extraSpecialArgs = {inherit inputs outputs;}; + modules = [./home/hinge/hinge.nix]; }; }; }; diff --git a/dot_config/flake/home/gui.nix b/dot_config/flake/home/gui.nix index 7873710..38172ae 100644 --- a/dot_config/flake/home/gui.nix +++ b/dot_config/flake/home/gui.nix @@ -5,6 +5,7 @@ ... }: { imports = [ + ./kitty.nix ]; nixGL.packages = inputs.nixgl.packages; @@ -24,21 +25,6 @@ # programs.vscode.enable = true; - programs.kitty = { - enable = true; - package = config.lib.nixGL.wrap pkgs.kitty; - font = { - name = "JetBrainsMono Nerd Font"; - # package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}; - }; - - settings = { - disable_ligatures = "cursor"; - }; - - themeFile = "Catppuccin-Macchiato"; - }; - programs.alacritty = { enable = true; package = config.lib.nixGL.wrap pkgs.alacritty; diff --git a/dot_config/flake/home/hinge/hinge.nix b/dot_config/flake/home/hinge/hinge.nix index fe612ed..e61c563 100644 --- a/dot_config/flake/home/hinge/hinge.nix +++ b/dot_config/flake/home/hinge/hinge.nix @@ -1,20 +1,24 @@ { - inputs, - outputs, lib, - config, pkgs, ... -}: { - imports = [../common.nix]; - - home.username =lib.mkForce "tyler.mayoff"; +}: let + # mac-app-util-src = builtins.fetchTarball { + # url = "https://github.com/hraban/mac-app-util/archive/master.tar.gz"; + # sha256 = "1w80vjcnaysjlzxsp3v4pxq4yswbjvxs8ann2bk0m7rkjljnzz6m"; + # }; + # mac-app-util = import mac-app-util-src {}; +in { + imports = [ + ../common.nix + ../kitty.nix + # mac-app-util.homeManagerModules.default + ]; + + home.username = lib.mkForce "tyler.mayoff"; home.homeDirectory = lib.mkForce "/Users/tyler.mayoff"; home.packages = with pkgs; [ - - bazel ]; - - # home.stateVersion = "23.11"; - + bazel_7 + ]; } diff --git a/dot_config/flake/home/kitty.nix b/dot_config/flake/home/kitty.nix new file mode 100644 index 0000000..6730cec --- /dev/null +++ b/dot_config/flake/home/kitty.nix @@ -0,0 +1,16 @@ +{pkgs, config, ...}: { + programs.kitty = { + enable = true; + package = config.lib.nixGL.wrap pkgs.kitty; + font = { + name = "JetBrainsMono Nerd Font"; + package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}; + }; + + settings = { + disable_ligatures = "cursor"; + }; + + themeFile = "Catppuccin-Macchiato"; + }; +} From 06f054fc3c14fd32b9bbd7124ae62a50fb2a0484 Mon Sep 17 00:00:00 2001 From: Tyler Mayoff Date: Thu, 12 Dec 2024 09:39:39 -0500 Subject: [PATCH 5/7] Updated things --- dot_config/flake/flake.lock | 64 +++++++-------------------- dot_config/flake/flake.nix | 2 +- dot_config/flake/home/common.nix | 4 +- dot_config/flake/home/fish.nix | 1 + dot_config/flake/home/hinge/hinge.nix | 18 +++++++- dot_config/flake/home/kitty.nix | 19 +++++++- 6 files changed, 54 insertions(+), 54 deletions(-) diff --git a/dot_config/flake/flake.lock b/dot_config/flake/flake.lock index d613a21..87959c8 100644 --- a/dot_config/flake/flake.lock +++ b/dot_config/flake/flake.lock @@ -19,24 +19,6 @@ "inputs": { "systems": "systems" }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, "locked": { "lastModified": 1726560853, "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", @@ -51,7 +33,7 @@ "type": "github" } }, - "flake-utils_3": { + "flake-utils_2": { "locked": { "lastModified": 1659877975, "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", @@ -69,16 +51,16 @@ "helix": { "inputs": { "crane": "crane", - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1733238479, - "narHash": "sha256-o5BT2ziQJzoXrqBz/iOIOGoxDTXYd5KiNF/7ncN81ao=", + "lastModified": 1733858674, + "narHash": "sha256-u5IFTMAd/z9xJLizanF+HPpYOppS+eLgsLgDr2oalL8=", "owner": "helix-editor", "repo": "helix", - "rev": "fa68bac391e576e659e306ce3fb2758d3ec68538", + "rev": "89a7cde2f05fbf2eae212d9301301a8377432be5", "type": "github" }, "original": { @@ -94,11 +76,11 @@ ] }, "locked": { - "lastModified": 1733175814, - "narHash": "sha256-zFOtOaqjzZfPMsm1mwu98syv3y+jziAq5DfWygaMtLg=", + "lastModified": 1733873195, + "narHash": "sha256-dTosiZ3sZ/NKoLKQ++v8nZdEHya0eTNEsaizNp+MUPM=", "owner": "nix-community", "repo": "home-manager", - "rev": "bf23fe41082aa0289c209169302afd3397092f22", + "rev": "f26aa4b76fb7606127032d33ac73d7d507d82758", "type": "github" }, "original": { @@ -109,7 +91,7 @@ }, "nixgl": { "inputs": { - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_2", "nixpkgs": "nixpkgs_2" }, "locked": { @@ -144,11 +126,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1733212471, - "narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=", + "lastModified": 1733759999, + "narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "55d15ad12a74eb7d4646254e13638ad0c4128776", + "rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56", "type": "github" }, "original": { @@ -175,11 +157,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1733412085, - "narHash": "sha256-FillH0qdWDt/nlO6ED7h4cmN+G9uXwGjwmCnHs0QVYM=", + "lastModified": 1733808091, + "narHash": "sha256-KWwINTQelKOoQgrXftxoqxmKFZb9pLVfnRvK270nkVk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "4dc2fc4e62dbf62b84132fe526356fbac7b03541", + "rev": "a0f3e10d94359665dba45b71b4227b0aeb851f8e", "type": "github" }, "original": { @@ -191,7 +173,6 @@ }, "root": { "inputs": { - "flake-utils": "flake-utils", "helix": "helix", "home-manager": "home-manager", "nixgl": "nixgl", @@ -234,21 +215,6 @@ "repo": "default", "type": "github" } - }, - "systems_2": { - "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 a9f5f3e..6b2de32 100644 --- a/dot_config/flake/flake.nix +++ b/dot_config/flake/flake.nix @@ -9,7 +9,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; nixgl.url = "github:nix-community/nixGL"; - helix.url = "github:helix-editor/helix"; + # helix.url = "github:helix-editor/helix"; }; outputs = { diff --git a/dot_config/flake/home/common.nix b/dot_config/flake/home/common.nix index acaf427..c516063 100644 --- a/dot_config/flake/home/common.nix +++ b/dot_config/flake/home/common.nix @@ -28,7 +28,7 @@ outputs.overlays.modifications outputs.overlays.unstable-packages - inputs.helix.overlays.default + # inputs.helix.overlays.default ]; }; @@ -77,7 +77,7 @@ programs.helix = { enable = true; - package = inputs.helix.packages.${pkgs.system}.default; + # package = inputs.helix.packages.${pkgs.system}.default; }; programs.bat = { diff --git a/dot_config/flake/home/fish.nix b/dot_config/flake/home/fish.nix index cd68386..951b029 100644 --- a/dot_config/flake/home/fish.nix +++ b/dot_config/flake/home/fish.nix @@ -8,6 +8,7 @@ fish_add_path $HOME/.local/bin fish_add_path /opt/homebrew/bin + fish_add_path /opt/homebrew/opt/llvm/bin if test -e $HOME/.config/fish/variables-$(hostname)fish source $HOME/.config/fish/variables-$(hostname).fish diff --git a/dot_config/flake/home/hinge/hinge.nix b/dot_config/flake/home/hinge/hinge.nix index e61c563..16b5c8c 100644 --- a/dot_config/flake/home/hinge/hinge.nix +++ b/dot_config/flake/home/hinge/hinge.nix @@ -8,7 +8,7 @@ # sha256 = "1w80vjcnaysjlzxsp3v4pxq4yswbjvxs8ann2bk0m7rkjljnzz6m"; # }; # mac-app-util = import mac-app-util-src {}; -in { +in rec { imports = [ ../common.nix ../kitty.nix @@ -20,5 +20,21 @@ in { home.packages = with pkgs; [ bazel_7 + cmake + # clang-tools + cmake-language-server + jdt-language-server + ffmpeg + sccache + just + yarn + cocoapods + # android-tools + jdk17 ]; + + home.sessionVariables = { + ANDROID_HOME="/Users/tyler.mayoff/Library/Android/sdk"; + PATH="$PATH:/Users/tyler.mayoff/Library/Android/sdk/platform-tools"; + }; } diff --git a/dot_config/flake/home/kitty.nix b/dot_config/flake/home/kitty.nix index 6730cec..a26480c 100644 --- a/dot_config/flake/home/kitty.nix +++ b/dot_config/flake/home/kitty.nix @@ -1,4 +1,8 @@ -{pkgs, config, ...}: { +{ + pkgs, + config, + ... +}: { programs.kitty = { enable = true; package = config.lib.nixGL.wrap pkgs.kitty; @@ -11,6 +15,19 @@ disable_ligatures = "cursor"; }; + extraConfig = '' + map super+1 goto_tab 1 + map super+2 goto_tab 2 + map super+3 goto_tab 3 + map super+4 goto_tab 4 + map super+5 goto_tab 5 + map super+6 goto_tab 6 + map super+7 goto_tab 7 + map super+8 goto_tab 8 + map super+9 goto_tab 9 + map super+0 goto_tab 10 + ''; + themeFile = "Catppuccin-Macchiato"; }; } From 18d2005f0e4c1f14769ee899181e292b3245abce Mon Sep 17 00:00:00 2001 From: Tyler Mayoff Date: Thu, 12 Dec 2024 09:40:17 -0500 Subject: [PATCH 6/7] Flake update --- dot_config/flake/flake.lock | 125 +++--------------------------------- 1 file changed, 9 insertions(+), 116 deletions(-) diff --git a/dot_config/flake/flake.lock b/dot_config/flake/flake.lock index 87959c8..437240d 100644 --- a/dot_config/flake/flake.lock +++ b/dot_config/flake/flake.lock @@ -1,39 +1,6 @@ { "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=", @@ -48,27 +15,6 @@ "type": "github" } }, - "helix": { - "inputs": { - "crane": "crane", - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs", - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1733858674, - "narHash": "sha256-u5IFTMAd/z9xJLizanF+HPpYOppS+eLgsLgDr2oalL8=", - "owner": "helix-editor", - "repo": "helix", - "rev": "89a7cde2f05fbf2eae212d9301301a8377432be5", - "type": "github" - }, - "original": { - "owner": "helix-editor", - "repo": "helix", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -76,11 +22,11 @@ ] }, "locked": { - "lastModified": 1733873195, - "narHash": "sha256-dTosiZ3sZ/NKoLKQ++v8nZdEHya0eTNEsaizNp+MUPM=", + "lastModified": 1733951607, + "narHash": "sha256-CN6q6iCzxI1gkNyk4xLdwaMKi10r7n+aJkRzWj8PXwQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "f26aa4b76fb7606127032d33ac73d7d507d82758", + "rev": "6e5b2d9e8014b5572e3367937a329e7053458d34", "type": "github" }, "original": { @@ -91,8 +37,8 @@ }, "nixgl": { "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_2" + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" }, "locked": { "lastModified": 1713543440, @@ -110,16 +56,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1728018373, - "narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=", + "lastModified": 1660551188, + "narHash": "sha256-a1LARMMYQ8DPx1BgoI/UN4bXe12hhZkCNqdxNi6uS0g=", "owner": "nixos", "repo": "nixpkgs", - "rev": "bc947f541ae55e999ffdb4013441347d83b00feb", + "rev": "441dc5d512153039f19ef198e662e4f3dbb9fd65", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -141,21 +86,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1660551188, - "narHash": "sha256-a1LARMMYQ8DPx1BgoI/UN4bXe12hhZkCNqdxNi6uS0g=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "441dc5d512153039f19ef198e662e4f3dbb9fd65", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1733808091, "narHash": "sha256-KWwINTQelKOoQgrXftxoqxmKFZb9pLVfnRvK270nkVk=", @@ -173,48 +103,11 @@ }, "root": { "inputs": { - "helix": "helix", "home-manager": "home-manager", "nixgl": "nixgl", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "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", From c518e90a36499ecdc3b263bcf515421f1df36bf1 Mon Sep 17 00:00:00 2001 From: Tyler Mayoff Date: Mon, 6 Jan 2025 09:26:40 -0500 Subject: [PATCH 7/7] 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"; + }; }; }