From 9a4c8cacd976bca420dbadf39acd883a343b23f3 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Fri, 10 Jan 2025 15:13:51 -0500 Subject: [PATCH 1/5] Updated flake to get updated oh-my-posh theme configs --- flake.lock | 82 ++++++++++++++++++++---------------------------------- 1 file changed, 30 insertions(+), 52 deletions(-) diff --git a/flake.lock b/flake.lock index 32a8428..94c67e2 100644 --- a/flake.lock +++ b/flake.lock @@ -99,11 +99,11 @@ ] }, "locked": { - "lastModified": 1736199437, - "narHash": "sha256-TdU0a/x8048rbbJmkKWzSY1CtsbbGKNkIJcMdr8Zf4Q=", + "lastModified": 1736526728, + "narHash": "sha256-vb/ldbBHRbfT9U7SoCYmxh+h+PHuFqGjCBO0bPXsze4=", "owner": "nix-community", "repo": "disko", - "rev": "49f8aa791f81ff2402039b3efe0c35b9386c4bcf", + "rev": "b1a94497b1c27fe7f81e3e76990959f5051da18b", "type": "github" }, "original": { @@ -261,11 +261,11 @@ "genebean-omp-themes": { "flake": false, "locked": { - "lastModified": 1731071013, - "narHash": "sha256-alEp6FoFIroS0rkY06kd/uIH5YF1h6foKn4/dhWF5co=", + "lastModified": 1736539337, + "narHash": "sha256-TBq4+E6n3t3a85FyP/4sLYFf+644rkMZ+Cn+xAj9f0k=", "owner": "genebean", "repo": "my-oh-my-posh-themes", - "rev": "76fe6c603c06c9b7b7d27ea655ffbb5dbb719317", + "rev": "89fedccc7177301c0d5660af0f809d01a25ebf4e", "type": "github" }, "original": { @@ -303,11 +303,11 @@ ] }, "locked": { - "lastModified": 1735344290, - "narHash": "sha256-oJDtWPH1oJT34RJK1FSWjwX4qcGOBRkcNQPD0EbSfNM=", + "lastModified": 1736373539, + "narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=", "owner": "nix-community", "repo": "home-manager", - "rev": "613691f285dad87694c2ba1c9e6298d04736292d", + "rev": "bd65bc3cde04c16755955630b344bc9e35272c56", "type": "github" }, "original": { @@ -324,11 +324,11 @@ ] }, "locked": { - "lastModified": 1736085891, - "narHash": "sha256-bTl9fcUo767VaSx4Q5kFhwiDpFQhBKna7lNbGsqCQiA=", + "lastModified": 1736370755, + "narHash": "sha256-iWcjToBpx4PUd74uqvIGAfqqVfyrvRLRauC/SxEKIF0=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "ba9b3173b0f642ada42b78fb9dfc37ca82266f6c", + "rev": "57733bd1dc81900e13438e5b4439239f1b29db0e", "type": "github" }, "original": { @@ -339,11 +339,11 @@ }, "nix-flatpak": { "locked": { - "lastModified": 1735913600, + "lastModified": 1736334301, "narHash": "sha256-370z+WLVnD7LrN/SvTCZxPl/XPTshS5NS2dHN4iyK6o=", "owner": "gmodena", "repo": "nix-flatpak", - "rev": "78ed84ff81e8d8510926e7165d508bcacef49ff1", + "rev": "5f4ec93d432cd5288f6fe20d8842dceb5a065885", "type": "github" }, "original": { @@ -407,15 +407,14 @@ ], "nixpkgs-stable": [ "nixpkgs" - ], - "rust-overlay": "rust-overlay" + ] }, "locked": { - "lastModified": 1736214624, - "narHash": "sha256-Pi70vbASZ1O9cR8RO5d2hBiNjIJBKKLoABl4sxWyOgg=", + "lastModified": 1736513564, + "narHash": "sha256-eAKwqMdGWambTbuZvAp3YYhAoWjaIFWGvxDAxxyh/Tg=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "0830abeebf3b2d1bae44652ffb2c89cf0d56ddaa", + "rev": "0855bf33427209e4f5e3d2d0968a14784525e929", "type": "github" }, "original": { @@ -426,11 +425,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1736237814, - "narHash": "sha256-uTdscVaKjnRnBIMuu/oWwdiGhYd/JOQ4YZGHeCoroqs=", + "lastModified": 1736441705, + "narHash": "sha256-OL7leZ6KBhcDF3nEKe4aZVfIm6xQpb1Kb+mxySIP93o=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "ca30f8501ab452ca687a7fdcb2d43e1fb1732317", + "rev": "8870dcaff63dfc6647fb10648b827e9d40b0a337", "type": "github" }, "original": { @@ -561,11 +560,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1736166416, - "narHash": "sha256-U47xeACNBpkSO6IcCm0XvahsVXpJXzjPIQG7TZlOToU=", + "lastModified": 1736320768, + "narHash": "sha256-nIYdTAiKIGnFNugbomgBJR+Xv5F1ZQU+HfaBqJKroC0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b30f97d8c32d804d2d832ee837d0f1ca0695faa5", + "rev": "4bc9c909d9ac828a039f288cf872d16d38185db8", "type": "github" }, "original": { @@ -577,11 +576,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1736061677, - "narHash": "sha256-DjkQPnkAfd7eB522PwnkGhOMuT9QVCZspDpJJYyOj60=", + "lastModified": 1736200483, + "narHash": "sha256-JO+lFN2HsCwSLMUWXHeOad6QUxOuwe9UOAF/iSl1J4I=", "owner": "nixos", "repo": "nixpkgs", - "rev": "cbd8ec4de4469333c82ff40d057350c30e9f7d36", + "rev": "3f0a8ac25fb674611b98089ca3a5dd6480175751", "type": "github" }, "original": { @@ -674,27 +673,6 @@ "type": "github" } }, - "rust-overlay": { - "inputs": { - "nixpkgs": [ - "nixos-cosmic", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1736130662, - "narHash": "sha256-z+WGez9oTR2OsiUWE5ZhIpETqM1ogrv6Xcd24WFi6KQ=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "2f5d4d9cd31cc02c36e51cb2e21c4b25c4f78c52", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, "simple-nixos-mailserver": { "inputs": { "blobs": "blobs", @@ -729,11 +707,11 @@ ] }, "locked": { - "lastModified": 1736203741, - "narHash": "sha256-eSjkBwBdQk+TZWFlLbclF2rAh4JxbGg8az4w/Lfe7f4=", + "lastModified": 1736515725, + "narHash": "sha256-4P99yL8vGehwzytkpP87eklBePt6aqeEC5JFsIzhfUs=", "owner": "mic92", "repo": "sops-nix", - "rev": "c9c88f08e3ee495e888b8d7c8624a0b2519cb773", + "rev": "f214c1b76c347a4e9c8fb68c73d4293a6820d125", "type": "github" }, "original": { From 66ee3a3f67253449e4a1156265a22420017bea38 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Fri, 10 Jan 2025 15:14:18 -0500 Subject: [PATCH 2/5] Switch back to my theme now that I fixed the template --- modules/hosts/common/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/hosts/common/default.nix b/modules/hosts/common/default.nix index 8479b46..0697957 100644 --- a/modules/hosts/common/default.nix +++ b/modules/hosts/common/default.nix @@ -160,9 +160,9 @@ in { oh-my-posh = { enable = true; enableZshIntegration = true; - #settings = builtins.fromJSON (builtins.unsafeDiscardStringContext (builtins.readFile (inputs.genebean-omp-themes + "/beanbag.omp.json"))); + settings = builtins.fromJSON (builtins.unsafeDiscardStringContext (builtins.readFile (inputs.genebean-omp-themes + "/beanbag.omp.json"))); #useTheme = "amro"; - useTheme = "montys"; + #useTheme = "montys"; }; ripgrep.enable = true; tmux = { From e852cc501c9b1b83aa7798ab41d61f3a827ed4c9 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Fri, 10 Jan 2025 15:15:37 -0500 Subject: [PATCH 3/5] Make sure all custom zsh functions start with `function` --- modules/hosts/common/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/hosts/common/default.nix b/modules/hosts/common/default.nix index 0697957..5f3a110 100644 --- a/modules/hosts/common/default.nix +++ b/modules/hosts/common/default.nix @@ -271,7 +271,7 @@ in { fi export GPG_TTY=$(tty) - nv() { + function nv() { # Assumes all configs exist in directories named ~/.config/nvim-* local config=$(fd --max-depth 1 --glob 'nvim*' ~/.config | fzf --prompt="Neovim Configs > " --height=~50% --layout=reverse --border --exit-0) @@ -282,11 +282,11 @@ in { NVIM_APPNAME=$(basename $config) nvim $* } - svndiffless() { + function svndiffless() { svn diff "$@" |diff-so-fancy |less -R } - svndiffless-nows() { + function svndiffless-nows() { svn diff -x -w "$@" |diff-so-fancy |less -R } From aa619622a9aa2bfa150363e50335bacfd075b447 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Fri, 10 Jan 2025 15:16:20 -0500 Subject: [PATCH 4/5] Disable oh-my-zsh I don't think I really need it any more as a result of what I get from nix + oh-my-posh --- modules/hosts/common/default.nix | 36 ++++++++++++++++---------------- modules/hosts/darwin/home.nix | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/modules/hosts/common/default.nix b/modules/hosts/common/default.nix index 5f3a110..529ddc8 100644 --- a/modules/hosts/common/default.nix +++ b/modules/hosts/common/default.nix @@ -289,25 +289,25 @@ in { function svndiffless-nows() { svn diff -x -w "$@" |diff-so-fancy |less -R } - - # unset oh-my-zsh's gk so that gk can refer to the gitkraken-cli - unalias gk ''; - oh-my-zsh = { - enable = true; - plugins = [ - "bundler" - "gem" - "git" - "github" - "history" - "kubectl" - "pip" - "terraform" - "vagrant" - "vscode" - ]; - }; + # # unset oh-my-zsh's gk so that gk can refer to the gitkraken-cli + # unalias gk + # ''; + # oh-my-zsh = { + # enable = true; + # plugins = [ + # "bundler" + # "gem" + # "git" + # "github" + # "history" + # "kubectl" + # "pip" + # "terraform" + # "vagrant" + # "vscode" + # ]; + # }; shellAliases = { bcrr = "bolt command run --run-as root --sudo-password-prompt"; bcrrs = "bcrr --stream --no-verbose"; diff --git a/modules/hosts/darwin/home.nix b/modules/hosts/darwin/home.nix index fecd38b..205803e 100644 --- a/modules/hosts/darwin/home.nix +++ b/modules/hosts/darwin/home.nix @@ -14,7 +14,7 @@ export PATH=$PATH:/opt/puppetlabs/pdk/bin export PATH=$PATH:/opt/puppetlabs/puppet/bin ''; - oh-my-zsh.plugins = [ "macos" ]; + # oh-my-zsh.plugins = [ "macos" ]; shellAliases = { currentwifi = "networksetup -getairportnetwork en0 |cut -d ':' -f2- | cut -d ' ' -f2-"; nixdiff = "brew outdated && brew outdated --cask && mas outdated && cd ~/repos/dots && darwin-rebuild build --flake . && nvd diff /run/current-system result"; From 34882dccdffc36d80c86ed7caa189124f0db3be7 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Fri, 10 Jan 2025 15:18:43 -0500 Subject: [PATCH 5/5] The bug that caused me to need this has been fixed Bug report: https://github.com/zhaofengli/nix-homebrew/issues/14 Fix: https://github.com/zhaofengli/nix-homebrew/pull/39 --- modules/hosts/darwin/mightymac/home-gene.liverman.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/modules/hosts/darwin/mightymac/home-gene.liverman.nix b/modules/hosts/darwin/mightymac/home-gene.liverman.nix index 90b7af7..163b576 100644 --- a/modules/hosts/darwin/mightymac/home-gene.liverman.nix +++ b/modules/hosts/darwin/mightymac/home-gene.liverman.nix @@ -7,11 +7,6 @@ goPath = "go"; }; k9s.enable = true; - zsh = { - initExtra = '' - eval $(brew shellenv) - ''; - }; }; sops = {