ChanServ changed the topic of #nixos-ruby to: Everything about using Nix & Ruby. Logs at https://logs.nix.samueldr.com/nixos-ruby/
{`-`} has joined #nixos-ruby
RickHull has joined #nixos-ruby
<RickHull> Hi manveru et al. I'm back and have forgotten most of what I've learned. I am trying to brush up on how to make other gems available to my project(s)
<RickHull> I learned a bit about direnv, lorri, and niv. I encapsulated that knowledge here: https://github.com/rickhull/hello-nix
<RickHull> but I understand that's kind of out-of-date now -- i think nix-shell now integrates a fair bit of that functionality?
<RickHull> I am mostly used to a chruby-based workflow on debian -- as far as isolating ruby project dependencies
<RickHull> basically, I wanted to learn nixos (and nix) and so I made a nixos vm and tried to plunge forward doing my normal ruby development things
<RickHull> I kind of dropped this activity for the last 6 months, and hence I'm feeling very rusty with nixos. Also, my VM has 12 GB disk, and /nix/store is already using 8 GB of it. That's after trying to upgrade and filling the disk, and then running every garbage collection command I could find
<RickHull> I successfully upgraded, but only have 1.8 GB free -- that's a concern, but not my main one
<RickHull> it's a very minimalist headless VM -- on debian I would expect to be using 3-5 GB. I'd like to figure out how to use less space -- but not a big concern right now
<RickHull> as it stands, I do have chruby installed in nix-store, but it's not in my user's PATH
<RickHull> I'd like to add a rubygems dependency to a ruby project, e.g. ~/git/my-ruby-project
<RickHull> i'm not currently using home-manager or whatever. my current approach is to put commonly used stuff into /etc/nixos/configuration.nix -- e.g. niv, lorri, direnv, busybox, git, emacs, gcc, chruby
<RickHull> Then, I expect to put project-specific dependencies and such into a lorri/niv/direnv thing
<RickHull> in the project dir, in git, and likely on github. Then, someone with nix/nixos could replicate the project dependencies?
<RickHull> Is that reasonable? On the right track?
<RickHull> this would be more for development. for production or whatever, just use rubygems to install ruby dependencies.... ?
<RickHull> one immediate problem I'd like to solve is how to use chruby as USER with PATH. and how that intersects with rubygems
RickHull has quit [Ping timeout: 245 seconds]
{\_\} has quit [Remote host closed the connection]
{\_\} has joined #nixos-ruby
nix-build has joined #nixos-ruby
{^_^} has quit [Remote host closed the connection]
{\_\} has quit [Remote host closed the connection]
{\_\}_ has joined #nixos-ruby
nix-build has quit [Remote host closed the connection]
{^_^} has joined #nixos-ruby
<{\_\}_> s​etheron[discord]: that was a big wall of text 🙂
<{\_\}_> s​etheron[discord]: You should avoid using chruby with Nix tbh.
<{\_\}_> s​etheron[discord]: The best approach you are going to have is to use bundix https://github.com/nix-community/bundix
<{\_\}_> s​etheron[discord]: This document (https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/ruby.section.md) has a pretty good handle on walking you through Nix-ifying a gem or an application
<simpson> As for cleaning up the local environment and getting settled back into a very-full Nix store, you'll want to not just embrace nix-shell, but also use nix-du and nix-collect-garbage, and you may have to remove old generations and build artifacts.
<{\_\}_> s​etheron[discord]: or spend 100$ and buy a huge HDD 😉
delawarekey has quit [Ping timeout: 258 seconds]
delawarekey has joined #nixos-ruby