Nix Home Manager Has Forever Changed My Dotfiles

  Рет қаралды 27,607

DevOps Toolbox

DevOps Toolbox

Күн бұрын

Пікірлер: 84
@devopstoolbox
@devopstoolbox 29 күн бұрын
If you're watching this video, please know that I've since removed home manager as my dotfiles solution. It isn't necessarily bad, but I've shared my reasons here: kzbin.info/www/bejne/i2fVln2Mh5h5nKMsi=Yjeo2nukYLjF119U
@nokomoko8832
@nokomoko8832 4 ай бұрын
If only the nix documentation wasn't so trash
@Anonymous-vh9tc
@Anonymous-vh9tc 4 ай бұрын
Wait there is documentation?
@devopstoolbox
@devopstoolbox 4 ай бұрын
Totally. If it was only trash I'd be fine, it has like 3-4 different sources each with its own agenda 🤦
@itsrobelschwarz7248
@itsrobelschwarz7248 4 ай бұрын
@@devopstoolboxI’m setting up my config right now, and this has been genuinely one of the most frustrating experiences ever
@devopstoolbox
@devopstoolbox 3 ай бұрын
@kernelpanic_init1 😅
@swordofthemorning777
@swordofthemorning777 3 ай бұрын
True, but it is open source. You can contribute documentation and example configs.
@TheSast
@TheSast 4 ай бұрын
It should be mentioned you can make specific configs be symlinked instead of being pinned, this can be used together with a custom user option to switch rapid dotfile iteration on for a bit and then off again.
@maratgumerov3523
@maratgumerov3523 Ай бұрын
Wow, how do you do that?
@gracesonaufderheide4743
@gracesonaufderheide4743 9 күн бұрын
@@maratgumerov3523 I think the feature is called mkOutOfStoreSymlink
@devopstoolbox
@devopstoolbox 4 ай бұрын
Join 2000+ subscribers getting one dev/sec/ops tip every Friday: signup.omerxx.com
@matthias2447
@matthias2447 4 ай бұрын
Ah, you are getting there one step at a time. Welcome to the dark side. Once you go Nix, everything else feels not good enough anymore :)
@vaisakh_km
@vaisakh_km 4 ай бұрын
now i spend 3 days trying to make a working devshell instead of 2 second to boostrap a project language's package manager....
@adjbutler
@adjbutler 4 ай бұрын
NixOS !!! LETS GO!!!!
@emilnordgard5228
@emilnordgard5228 4 ай бұрын
Uhm ACKSHUALLY it's just nix.
@Flackon
@Flackon 4 ай бұрын
can you use just home manager in a flake for non-darwin, non-nixos systems? (e.g. WSL)
@dieduch
@dieduch 4 ай бұрын
That is how I use it for osx, home-manager in a flake. Should be possible in any linux distro too, both arm and x64
@TheGeorey
@TheGeorey 4 ай бұрын
I'm using all that in WSL
@pratyushpurohit
@pratyushpurohit 4 ай бұрын
How do I get such terminal?
@hn3m3s1s
@hn3m3s1s 2 ай бұрын
Hey! Any recommendation to create a macOS playground to quickly try your setup (kind of like VMs) to try out without ruining my current workspace? Can be also be great to test the config I would create.
@devopstoolbox
@devopstoolbox 2 ай бұрын
Hmm interesting concept, never thought of that.. you could potentially just clone my dotfiles and give them a go although it's not exactly the same, that's the idea
@hafizdkurniawan815
@hafizdkurniawan815 3 ай бұрын
Which terminal emulator are you using, and is the dotfiles available as well?
@casadogaspar
@casadogaspar 2 ай бұрын
Read the description
@Julien-rc1bi
@Julien-rc1bi 4 ай бұрын
Slowly but surely you are going to be on nixos 😊 Maybe in 10 videos. (It's great btw from a developer who was once on Mac as well).
@devopstoolbox
@devopstoolbox 4 ай бұрын
😅
@botondkalocsai5322
@botondkalocsai5322 4 ай бұрын
My only concern with nix is its resource requirements. Is it suitable for ancient machines, like xbps (on void linux)? Building and rebuilding immutable environment seems to have substantial resource requirements even with lightweight software on old machines. Is there nix expert who tried to use it on old machines (with 1GB - 2GB ram, for example), and testify its viability?
@caedis_
@caedis_ 4 ай бұрын
You can push the binaries from a beefier machine with the `--target-host` option
@botondkalocsai5322
@botondkalocsai5322 4 ай бұрын
@@caedis_ Is it suitable for daily driver on an old machine in such a way that only the old machine's resources are used for environment building? Probably it should be able to deal with a suckless desktop environment, but I'm not convinced about viability on more complex desktop environments, that can still run on that machine (like a Lubuntu-like user space).
@arunoruto
@arunoruto 4 ай бұрын
@@botondkalocsai5322 If you are running the stable version, most of the packages are already built and will be loaded from a cache, so no compilation is needed on your part. Folks are also using nixos on raspberry pis, so I do not think, that performance will be a limiting factor. If you are unsure, you can also run just the package manager and test home-manager. If you are not satisfied, just uninstall it :)
@TheSast
@TheSast 4 ай бұрын
I daily drive it with less than 5 GB RAM without major issues, my bottleneck is always my connection (mobile). I don't know how close this is to a 3GB system experience.
@perpl1618
@perpl1618 Ай бұрын
9:45 Mug tell use about the mug !
@devopstoolbox
@devopstoolbox Ай бұрын
This is a special one 😅
@kenichishibata2411
@kenichishibata2411 4 ай бұрын
what do you use to record your terminal and video overlay?
@devopstoolbox
@devopstoolbox 4 ай бұрын
A camera and a screen capture :)
@oussaber
@oussaber 4 ай бұрын
I found the video really hard to follow because it jumped around a lot and mixed different technologies together. It would be great if you could break it down into clearer sections or focus on one technology at a time to make it easier to understand
@devopstoolbox
@devopstoolbox 4 ай бұрын
I'm sorry for that, will take this feedback into consideration. Thanks for watching and sharing!
@jeslinmx22
@jeslinmx22 4 ай бұрын
The whole nix stack is fairly complex (even convoluted) - you have Nix the language, Nix the package manager, Nixpkgs, NixOS, Home Manager, nix-darwin, not to mention technologies/concepts like flakes, modules, derivations, and all of these things are thrown around by people experienced in them like they’re the most obvious things in the world either because they had a hand in developing them or spent so long reading the documentation to understand them that we no longer can relate to ordinary humans.
@arunoruto
@arunoruto 4 ай бұрын
Now its your time to configure (neo)vim using nix using nixvim ;) P.S. soon there will be lazy loading integrated into nixvim, so we have something similar to lazy!
@devopstoolbox
@devopstoolbox 4 ай бұрын
I can already feel the vortex sucking me in 😅
@viniciusmelquiades
@viniciusmelquiades 3 ай бұрын
I've tried that, and I'm considering moving away from it. It feels too limited and the options change a lot.
@nipunlakshank
@nipunlakshank 2 ай бұрын
The fact that I have to write lua in nix file as strings is a deal breaker for me 😕
@arunoruto
@arunoruto 2 ай бұрын
@@nipunlakshank you kinda don't have to actually You can configure the main things using nix, but for raw config file, you can keep a lua file and read that file into your config! I moved completely to nixvim (and then left it got helix, but that's another story 😂), haven't missed lua much tbh
@CZiNTrPT
@CZiNTrPT 4 ай бұрын
How is this better than just using a bare gitrepo?
@devopstoolbox
@devopstoolbox 4 ай бұрын
Not sure how a bare repo helps here (I'm assuming you don't mean a literal --bare) - and I've mentioned this in the video and other comments - Nix takes snapshots for you. Assuming you don't commit every single change you make locally, you can lost work quite easily.
@ingijonsson3466
@ingijonsson3466 4 ай бұрын
I gave up on flakes and home manager after starting an update and having to go watch a tv show while I waited for it to finish.
@alexstone691
@alexstone691 3 ай бұрын
Is there a way to make nix call bash script
@viniciusmelquiades
@viniciusmelquiades 3 ай бұрын
I guess it depends on what you want to do. Is it some command to generate a file to be symlinked, then yes. If it is a command to run when activating the generation, then probably, but you'd need to check the documentation
@peterhorton9063
@peterhorton9063 4 ай бұрын
I followed what you did for home.file, i had to use the --impure flag
@devopstoolbox
@devopstoolbox 4 ай бұрын
Yep same.
@maulanaakmal8261
@maulanaakmal8261 2 ай бұрын
It should be mentioned in the video
@droydi
@droydi 2 ай бұрын
This is actually killing me, tearing my hair out, and I have been on NixOS as my daily driver for a year now... Finally decided to adopt nix-darwin on the work laptop, and to temporarily addopt your dotfiles, but been stuck on this issue for hours now.
@intermarer9145
@intermarer9145 14 күн бұрын
3:10 aaaand you lost me...
@devopstoolbox
@devopstoolbox 13 күн бұрын
sorry..?
@intermarer9145
@intermarer9145 13 күн бұрын
@@devopstoolbox Nevermind me, I think I'm just too stupid for NixOS 😅
@StefanGenov-en7ti
@StefanGenov-en7ti 4 ай бұрын
The biggest problems with nix are 2 IMHO. 1. Linux and Mac unified setup... It's really hard to have one setup that works with both systems. 2. The way graphic applications are setup outside of nixos... They just don't work
@TheSast
@TheSast 4 ай бұрын
wdym? having a single flake to configure both systems is relatively common. And I have no idea what you mean by the second part.
@devopstoolbox
@devopstoolbox 4 ай бұрын
See the reply here, you can have a flake that holds both configurations. Kind of like a docker that serves multiple architectures if you're familiar. Not sure what you mean about GUIs, but I have both nix running brew installations, as well as GUIs from nix packages and both work fine
@Thundechile
@Thundechile 4 ай бұрын
Honestly I'm not all the way convinced that Nix is better than Stow. When you run dotfiles with Stow it requires 1 command, is version controlled and requires practically no configuration files at all. Maybe there's some complicated scenarios which require Nix, but haven't run to those yet.
@liamwoodleigh
@liamwoodleigh 4 ай бұрын
You may very well be right. I see part of the value that home-manager delivers is that it is an accessible way to get your feet wet with Nix. It provides a nice training ground that results in something useful (even though stow might be better) whilst getting familiar with Nix.
@devopstoolbox
@devopstoolbox 4 ай бұрын
You're right. It depends on whether the ability to rollback is appealing to you. That's the main benefit IMO.
@liamwoodleigh
@liamwoodleigh 4 ай бұрын
@@devopstoolbox I’d argue rolling back with git is easier than home-manager. Would you disagree?
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@liamwoodleigh Well, in theory you're right. In practice, I find myself change A LOT of stuff when testing / tweaking my config. I'll only push when I'm certain, making all the work in between a vortex of configuration changes. With home manager every change is snapshotted for you by design.
@benszabo
@benszabo 2 ай бұрын
Bit of a curve-ball, in the video, it is stated that a `home.nix` file will be created - except if nix-darwin is used. > Unlike the channel-based setup, home.nix will be evaluated when the flake is built, so it must be present before bootstrap of Home Manager from the flake.
@linbynd
@linbynd 4 ай бұрын
Are you using home manager and Nix Darwin together... ?
@Danielo515
@Danielo515 4 ай бұрын
I bet he does
@dieduch
@dieduch 4 ай бұрын
I do
@PauloFassina
@PauloFassina 4 ай бұрын
Why not? NixOS would be a better option, but he needs an audience.
@devopstoolbox
@devopstoolbox 4 ай бұрын
Yep. Started with one, progressed to the second but effectively I do have both
@underflowexception
@underflowexception 4 ай бұрын
I tried nix but I found it over complicated and not worth learning, I ended up just creating 1 bash script that installs all my packages and configs.. Even stow is kind of overkill tbh.. I just do the symlinks manually in my config
@devopstoolbox
@devopstoolbox 4 ай бұрын
At end of the day, if it works it works. There's no right or wrong here :) My goal here is to show options
@74Bagas
@74Bagas 4 ай бұрын
that's the point.
@comosaycomosah
@comosaycomosah 4 ай бұрын
but i like my rusty bike jk i hate it i want suron setup lol
@devopstoolbox
@devopstoolbox 4 ай бұрын
Can't argue with that! 😉
@Exowz
@Exowz 2 ай бұрын
After I put everything you said to put in my flake.nix, I run Darwin-rebuild and I get the following error : building the system configuration... error: … while evaluating the attribute 'value' at /nix/store/gg86rfp39vc7chqsszk32q7995hz4943-source/lib/modules.nix:816:9: 815| in warnDeprecation opt // 816| { value = addErrorContext "while evaluating the option `${showOption loc}':" value; | ^ 817| inherit (res.defsFinal') highestPrio; … while evaluating the option `system.build': … while evaluating the attribute 'mergedValue' at /nix/store/gg86rfp39vc7chqsszk32q7995hz4943-source/lib/modules.nix:851:5: 850| # Type-check the remaining definitions, and merge them. Or throw if no definitions. 851| mergedValue = | ^ 852| if isDefined then … while evaluating definitions from `/nix/store/5dax872b4gf9fm6v9nhbarfja0f45xaq-source/modules/environment': … while evaluating the option `environment.systemPath': … while evaluating definitions from `/nix/store/5dax872b4gf9fm6v9nhbarfja0f45xaq-source/modules/environment': … while evaluating the option `environment.profiles': … while evaluating definitions from `/nix/store/5dax872b4gf9fm6v9nhbarfja0f45xaq-source/modules/users': … while evaluating the option `users.users': … while evaluating definitions from `/nix/store/rffzp7ya96cg0ylw4q4lb65pxa8sydkk-source/nixos/common.nix': … while evaluating the option `home-manager.users': … while evaluating definitions from `': (stack trace truncated; use '--show-trace' to show the full, detailed trace) error: path '/nix/store/7xd8bakhn5bvcgr054av1hzmndclrqgg-source/home.nix' does not exist So I can't proceed with your tutorial when we go in home.nix... What should I do?
@codeitlikemiley
@codeitlikemiley 29 күн бұрын
Ive been on arch , I also have macos, but never used nix home manager... everything that would destroy mac normal behavior is a no go for me... maybe after i bought another macos laptop i will try this on that older laptop
Why I'm Ditching Nix Home Manager - And What I'm Using Instead
8:07
DevOps Toolbox
Рет қаралды 26 М.
Nix Darwin Turned My Mac into a Fully Automated Machine
9:48
DevOps Toolbox
Рет қаралды 54 М.
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
Is Nix Your New Terminal SUPERPOWER?
15:21
DevOps Toolbox
Рет қаралды 32 М.
How To Use Yazi: An Awesome Terminal File Manager Written In Rust
22:05
Stow has forever changed the way I manage my dotfiles
8:09
Dreams of Autonomy
Рет қаралды 277 М.
Ultimate Nix Flakes Guide
17:08
Vimjoyer
Рет қаралды 38 М.
Nix is my favorite package manager to use on macOS
28:08
Dreams of Autonomy
Рет қаралды 162 М.
5 Reasons I Ditched My Old Terminal for Ghostty
11:34
John McBride
Рет қаралды 16 М.
8 Command Line Tools that will Change Your Terminal Experience
18:46
I was WRONG! This is the BEST Package Manager.
10:25
Chris Titus Tech
Рет қаралды 147 М.
Matthew Croughan - Use flake.nix, not Dockerfile - MCH2022
17:25
Matthew Croughan
Рет қаралды 52 М.
Manage Your Dotfiles with Home Manager!
32:06
LibrePhoenix
Рет қаралды 72 М.