Now that there are flakes (and the macOS installer is really good now), I can `git clone` my config and bootstrap a new machine with this
sh 121–130 of 153 posts
Now that there are flakes (and the macOS installer is really good now), I can `git clone` my config and bootstrap a new machine with this
sh Earlier quoted context omitted.
Nix seems like the perfect match for you.
You would think. But Nix and Guix are still very very new. Arch Linux has the best overall package management system, nothing else even comes close. Wrapping it is a way better option than trying to reinvent it from the ground up. If Arch didn't exist, I'd lean on Debian before going Nix.
Uhh nix has been around since 2003 [1]. I can definitely recommend taking a look at it if you are fine with running Arch.
I use Nix: https://bou.ke/blog/nix/ I'm able to have the same shell with all my Vim plugins across macOS and Linux with changes committed to git. It's been so good, setting up all my command-line tooling now takes about 15 minutes from scratch.
#!/usr/bin/env bash
readonly gitsha="..."
nix shell nixpkgs/${gitsha}#bash nixpkgs/${gitsha}#{foo-pkg} nixpkgs/${gitsha}#{bar-pkg} -c bash foo.sh $@Basically I use git for .local/dotfiles/ which are then symlinked to the relevant files like .zshrc or .emacs.d/init.el. Then I just keep that repo up to date with git pulls. Works across 2 macbooks, a Fedora workstation, and a Fedora headless server. Couple of bits from a guide I wrote recently: https://gist.github.com/aclarknexient/0ffcb98aa262c585c49d4b... # store stuff here that you don't want in github [[ -f $HO…
git clone .dotfiles && cd .dotfiles
stow --target=$HOME --dir=packages shell-config
stow --target=$HOME --dir=packages work-stuff
I've found this to be much more manageable than tools like yadm since I can pick-and-choose sets of configs/scripts based on the machine I'm using them on.https://github.com/danisztls/dotfiles
> primarily that I'd have to try to share it between professional and personal computers
My script has a recipes feature so you can store config at arbitrary places and have different recipes/configs for different situations.
I am mostly using NeoVim now but in the past VSCode with the remote extension worked great too. It's totally platform agnostic (I can even work straight from my iPad). It's also a single instance that I have to manage instead of syncing or making changes in more than one place.
With this setup I can still use docker containers or VM's to make it easy to spin up different types of dev environments but it's all on one computer so super easy to manage. Since I don't have to worry about managing multiple platforms I create simple bash scripts to install everything and create the necessary configs so if I need to wipe everything and start over it's no big deal.
Earlier quoted context omitted.
Yeah, my macOS set-up is simple enough it's not worth scripting or otherwise saving. Use the GUI settings panel to make CAPS LOCK an extra ctrl. Takes maybe 10 seconds. Use same to make dock auto-hide. 10 seconds if I'm slow about it. Install Homebrew. Maybe 15 seconds hands-on and a couple minutes in the background. Use Homebrew to install spectacle. Less than 5 seconds hands-on time, done less than a minute later.…
> CAPS LOCK an extra ctrl Another fine specimen, salute!
I use Nix to manage: - a desktop running NixOS (primary work machine) - a Macbook (secondary/travel work machine) - a Linux VM on WSL - two servers (a raspberrypi in my closet and a Hetzner vps) I keep my config on Github (latest branch https://github.com/alexghr/nix/tree/host/vader ). I'm still new to this so a lot of my config is duplicated across different hosts but I want to refactor it to eliminate duplication.…
Nix learning curve wouldn't be bad if the documentation wasn't so bad. I have had to put together my configuration based on couple of blogposts from randoms.
If you're trying to do something with Nix and it works, neat.
If you're trying to do something and can't get it to work, you'll have a very difficult time. (It demands a depth of understanding, and Nix is a bit weird).
Hopefully in future, "documentation", "blogposts from randoms", etc. help alleviate that pain as more people use it.
Earlier quoted context omitted.
You would think. But Nix and Guix are still very very new. Arch Linux has the best overall package management system, nothing else even comes close. Wrapping it is a way better option than trying to reinvent it from the ground up. If Arch didn't exist, I'd lean on Debian before going Nix.
> But Nix and Guix are still very very new Uhh nix has been around since 2003 [1]. I can definitely recommend taking a look at it if you are fine with running Arch. [1] - https://en.wikipedia.org/wiki/Nix_(package_manager)
But comparing Arch an NixOS:
- Arch requires more elbow grease than Ubuntu. NixOS requires more elbow grease than Ubuntu. I wouldn't recommend either to beginners.
- On the other hand: NixOS is immutable and pure, whereas Arch is a system that can be beaten into shape. - Or the Arch Linux wiki is fantastic, and Nix documentation is .. all over the place.
(Maybe AUR is better than Nixpkgs; but ultimately nix is a much more powerful tool than pacman strives to be).