From 3c555f5594913109ad486a18165c127bc94d9acd Mon Sep 17 00:00:00 2001 From: mat ess Date: Wed, 31 Aug 2022 00:48:48 -0400 Subject: [PATCH] Tweaks and fixes --- darwin/homebrew.nix | 7 +++++-- home/shells.nix | 2 +- pkgs/dark-mode-notify.nix | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/darwin/homebrew.nix b/darwin/homebrew.nix index 3dfffa2..883ea58 100644 --- a/darwin/homebrew.nix +++ b/darwin/homebrew.nix @@ -2,7 +2,8 @@ let inherit (lib) mkIf; - mkIfCaskPresent = cask: mkIf (lib.any (x: x == cask) config.homebrew.casks); + caskIsPresent = cask: lib.any (x: x == cask) config.homebrew.casks; + mkIfCaskPresent = cask: mkIf (caskIsPresent cask); brewEnabled = config.homebrew.enable; gamesEnabled = config.games.enable; in @@ -25,6 +26,8 @@ in if test -d (brew --prefix)"/share/fish/vendor_completions.d" set -p fish_complete_path (brew --prefix)/share/fish/vendor_completions.d end + '' + lib.optionalString (caskIsPresent "miniforge") '' + eval /opt/homebrew/Caskroom/miniforge/base/bin/conda "shell.fish" "hook" $argv | source ''; homebrew.enable = pkgs.lib.homebrew-enabled; @@ -66,7 +69,7 @@ in "logitech-options" "lulu" "macsvg" - "miniconda" + "miniforge" # "mullvadvpn" "rectangle" "secretive" diff --git a/home/shells.nix b/home/shells.nix index 8270d87..ce7125c 100644 --- a/home/shells.nix +++ b/home/shells.nix @@ -222,7 +222,7 @@ ''; programs.fish.interactiveShellInit = '' - set -g fish_greeting "ヽ(´ᗜ`)ノ welcome ヽ(´ᗜ`)ノ" + set -g fish_greeting "(づ ̄ ³ ̄)づ hello (づ ̄ ³ ̄)づ" fish_vi_key_bindings set VIRTUAL_ENV_DISABLE_PROMPT true bind -M insert ! __history_previous_command diff --git a/pkgs/dark-mode-notify.nix b/pkgs/dark-mode-notify.nix index fb3d721..ad2bdb7 100644 --- a/pkgs/dark-mode-notify.nix +++ b/pkgs/dark-mode-notify.nix @@ -15,11 +15,11 @@ stdenv.mkDerivation { name = "dark-mode-notify"; src = dark-mode-notify-src; buildPhase = '' - ${xcode}/bin/xcrun swiftc dark-mode-notify.swift -o dark-mode-notify + ${xcode}/bin/xcrun swift build -c release --disable-sandbox ''; installPhase = '' mkdir -p $out/bin - cp dark-mode-notify $out/bin + cp .build/release/dark-mode-notify $out/bin ''; meta.platforms = lib.platforms.darwin; }