From 3efe77360dde4a1733cecc6b5899d59bcf12ca32 Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Mon, 8 Nov 2021 17:16:37 -0500 Subject: [PATCH] Add brew into nix --- darwin/Brewfile | 43 ------------------- darwin/brew.nix | 89 ++++++++++++++++++++++++++++++++++++++++ darwin/configuration.nix | 7 +++- home/common.nix | 1 + 4 files changed, 95 insertions(+), 45 deletions(-) delete mode 100644 darwin/Brewfile create mode 100644 darwin/brew.nix diff --git a/darwin/Brewfile b/darwin/Brewfile deleted file mode 100644 index f3c0b7b..0000000 --- a/darwin/Brewfile +++ /dev/null @@ -1,43 +0,0 @@ -tap "ethereum/ethereum" -tap "goreleaser/tap" -tap "helix-editor/helix" -tap "homebrew/bundle" -tap "homebrew/cask" -tap "homebrew/core" -brew "python@3.9" -brew "glib" -brew "coreutils" -brew "elm" -brew "gcc" -brew "glew" -brew "unbound" -brew "gnutls" -brew "gnupg" -brew "gobject-introspection" -brew "gnuplot" -brew "haskell-language-server" -brew "kotlin" -brew "libotr" -brew "llvm" -brew "nghttp2" -brew "node" -brew "numpy" -brew "perl" -brew "pinentry-mac" -brew "pv" -brew "pybind11" -brew "ruby" -brew "ruby@2.7" -brew "scipy" -brew "sdl2" -brew "texlab" -brew "tinc" -brew "wimlib" -brew "zlib" -brew "ethereum/ethereum/ethereum@1.10.3" -cask "blackhole-2ch" -cask "eloston-chromium" -cask "finicky" -cask "inkscape" -cask "sage" -cask "yt-music" diff --git a/darwin/brew.nix b/darwin/brew.nix new file mode 100644 index 0000000..d6ef29c --- /dev/null +++ b/darwin/brew.nix @@ -0,0 +1,89 @@ +{ pkgs, config, lib, ... }: + +with lib; +{ + homebrew.enable = true; + homebrew.brewPrefix = + if pkgs.system == "aarch64-darwin" then "/opt/homebrew/bin" + else "/usr/local/bin"; + homebrew.cleanup = "zap"; + + # All needed taps + homebrew.taps = [ + "homebrew/bundle" + "homebrew/cask" + "homebrew/core" + ]; + + homebrew.brews = [ + # Base libraries + "coreutils" + + # Compilers and Language Interpreters + "elm" + "llvm" + "luajit-openresty" + "node" + "perl" + "ruby@2.7" + + # CLI tools + "pinentry-mac" # UI for Pin Entry on gpg Mac + ] ++ (optionals (pkgs.system == "aarch64-darwin") [ + # Because python on Nix is a bit abababa + "python@3.9" + "scipy" + ]); + + homebrew.casks = [ + "blackhole-2ch" + "eloston-chromium" + "finicky" + "inkscape" + "yt-music" + + # CLI, but doesn't yet work on Nix + "sage" + ]; + + homebrew.masApps = { + # Safari Extensions + "SponsorBlock port for YouTube - Skip Sponsorships" = 1532163541; + "Keepa - Price Tracker" = 1533805339; + "Vimari" = 1480933944; + "Bitwarden" = 1352778147; + "Save to Pocket" = 1477385213; + "AdGuard for Safari" = 1440147259; + "Refined GitHub" = 1519867270; + + # Productivity + "GoodNotes" = 1444383602; + "Amphetamine" = 937984704; # Turns off auto display dimming and sleep for some time + "Session Pal" = 1515213004; + "Flow" = 1423210932; + "Taskheat" = 1431995750; + "Hidden Bar" = 1452453066; + + # Development + "Developer" = 640199958; + "Xcode" = 497799835; + + # Chat + "Messenger" = 1480068668; + "LINE" = 539883307; + "Slack" = 803453959; + + # Office + "Keynote" = 409183694; + "Microsoft Excel" = 462058435; + "The Unarchiver" = 425424353; + "Numbers" = 409203825; + "Pages" = 409201541; + "Spark" = 1176895641; # Email client + ## Multimedia + "DaVinci Resolve" = 571213070; + "GarageBand" = 682658836; + "iMovie" = 408981434; + "Skitch" = 425955336; # Screenshot tool + }; +} diff --git a/darwin/configuration.nix b/darwin/configuration.nix index ef7e0bf..1e44cf8 100644 --- a/darwin/configuration.nix +++ b/darwin/configuration.nix @@ -1,7 +1,10 @@ { config, pkgs, ... }: { - imports = [ ../modules/personal/fonts ]; + imports = [ + ../modules/personal/fonts + ./brew.nix + ]; # List packages installed in system profile. To search by name, run: # $ nix-env -qaP | grep wget environment.systemPackages = @@ -16,7 +19,7 @@ nix.package = pkgs.nixUnstable; # Create /etc/bashrc that loads the nix-darwin environment. - programs.zsh.enable = true; # default shell on catalina + programs.zsh.enable = true; # default shell on catalina programs.fish.enable = true; ## Networking related settings diff --git a/home/common.nix b/home/common.nix index adc6eec..3b3c616 100644 --- a/home/common.nix +++ b/home/common.nix @@ -31,6 +31,7 @@ rnix-lsp ## Latex tectonic + texlab # Fonts fantasque-sans-mono