Nix Home Manager Has Forever Changed My Dotfiles

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ม.ค. 2025

ความคิดเห็น • 84

  • @devopstoolbox
    @devopstoolbox  20 วันที่ผ่านมา +2

    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: th-cam.com/video/U6reJVR3FfA/w-d-xo.htmlsi=Yjeo2nukYLjF119U

  • @nokomoko8832
    @nokomoko8832 4 หลายเดือนก่อน +63

    If only the nix documentation wasn't so trash

    • @Anonymous-vh9tc
      @Anonymous-vh9tc 4 หลายเดือนก่อน +10

      Wait there is documentation?

    • @devopstoolbox
      @devopstoolbox  4 หลายเดือนก่อน +22

      Totally. If it was only trash I'd be fine, it has like 3-4 different sources each with its own agenda 🤦

    • @itsrobelschwarz7248
      @itsrobelschwarz7248 3 หลายเดือนก่อน

      @@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 2 หลายเดือนก่อน +3

      True, but it is open source. You can contribute documentation and example configs.

  • @TheSast
    @TheSast 4 หลายเดือนก่อน +6

    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

  • @matthias2447
    @matthias2447 4 หลายเดือนก่อน +16

    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....

  • @pratyushpurohit
    @pratyushpurohit 3 หลายเดือนก่อน +1

    How do I get such terminal?

  • @Flackon
    @Flackon 4 หลายเดือนก่อน +3

    can you use just home manager in a flake for non-darwin, non-nixos systems? (e.g. WSL)

    • @dieduch
      @dieduch 4 หลายเดือนก่อน +2

      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 หลายเดือนก่อน +5

      I'm using all that in WSL

  • @hafizdkurniawan815
    @hafizdkurniawan815 3 หลายเดือนก่อน +2

    Which terminal emulator are you using, and is the dotfiles available as well?

    • @casadogaspar
      @casadogaspar หลายเดือนก่อน

      Read the description

  • @oussaber
    @oussaber 4 หลายเดือนก่อน +12

    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 หลายเดือนก่อน +4

      I'm sorry for that, will take this feedback into consideration. Thanks for watching and sharing!

    • @jeslinmx22
      @jeslinmx22 4 หลายเดือนก่อน +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.

  • @hn3m3s1s
    @hn3m3s1s 2 หลายเดือนก่อน +1

    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

  • @Julien-rc1bi
    @Julien-rc1bi 4 หลายเดือนก่อน +1

    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).

  • @botondkalocsai5322
    @botondkalocsai5322 4 หลายเดือนก่อน +1

    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 หลายเดือนก่อน +2

      You can push the binaries from a beefier machine with the `--target-host` option

    • @botondkalocsai5322
      @botondkalocsai5322 4 หลายเดือนก่อน +1

      @@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 หลายเดือนก่อน +3

      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.

  • @devopstoolbox
    @devopstoolbox  3 หลายเดือนก่อน

    Join 2000+ subscribers getting one dev/sec/ops tip every Friday: signup.omerxx.com

  • @kenichishibata2411
    @kenichishibata2411 3 หลายเดือนก่อน

    what do you use to record your terminal and video overlay?

    • @devopstoolbox
      @devopstoolbox  3 หลายเดือนก่อน

      A camera and a screen capture :)

  • @adjbutler
    @adjbutler 4 หลายเดือนก่อน +7

    NixOS !!! LETS GO!!!!

    • @emilnordgard5228
      @emilnordgard5228 4 หลายเดือนก่อน +1

      Uhm ACKSHUALLY it's just nix.

  • @perpl1618
    @perpl1618 หลายเดือนก่อน +1

    9:45 Mug tell use about the mug !

    • @devopstoolbox
      @devopstoolbox  หลายเดือนก่อน

      This is a special one 😅

  • @StefanGenov-en7ti
    @StefanGenov-en7ti 4 หลายเดือนก่อน +8

    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 หลายเดือนก่อน +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 หลายเดือนก่อน +1

      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

  • @arunoruto
    @arunoruto 4 หลายเดือนก่อน +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 หลายเดือนก่อน +2

      I can already feel the vortex sucking me in 😅

    • @viniciusmelquiades
      @viniciusmelquiades 2 หลายเดือนก่อน +1

      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 หลายเดือนก่อน +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

  • @alexstone691
    @alexstone691 3 หลายเดือนก่อน

    Is there a way to make nix call bash script

    • @viniciusmelquiades
      @viniciusmelquiades 2 หลายเดือนก่อน

      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

  • @Thundechile
    @Thundechile 4 หลายเดือนก่อน +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 หลายเดือนก่อน +1

      You're right. It depends on whether the ability to rollback is appealing to you. That's the main benefit IMO.

    • @liamwoodleigh
      @liamwoodleigh 4 หลายเดือนก่อน +1

      @@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.

  • @CZiNTrPT
    @CZiNTrPT 3 หลายเดือนก่อน +1

    How is this better than just using a bare gitrepo?

    • @devopstoolbox
      @devopstoolbox  3 หลายเดือนก่อน

      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.

  • @peterhorton9063
    @peterhorton9063 4 หลายเดือนก่อน +2

    I followed what you did for home.file, i had to use the --impure flag

    • @devopstoolbox
      @devopstoolbox  4 หลายเดือนก่อน

      Yep same.

    • @maulanaakmal8261
      @maulanaakmal8261 2 หลายเดือนก่อน +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.

  • @ingijonsson3466
    @ingijonsson3466 3 หลายเดือนก่อน

    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.

  • @benszabo
    @benszabo 2 หลายเดือนก่อน +1

    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.

  • @intermarer9145
    @intermarer9145 5 วันที่ผ่านมา +1

    3:10 aaaand you lost me...

    • @devopstoolbox
      @devopstoolbox  4 วันที่ผ่านมา

      sorry..?

    • @intermarer9145
      @intermarer9145 4 วันที่ผ่านมา

      @@devopstoolbox Nevermind me, I think I'm just too stupid for NixOS 😅

  • @underflowexception
    @underflowexception 4 หลายเดือนก่อน +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 หลายเดือนก่อน +3

      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 หลายเดือนก่อน +3

    but i like my rusty bike jk i hate it i want suron setup lol

    • @devopstoolbox
      @devopstoolbox  4 หลายเดือนก่อน

      Can't argue with that! 😉

  • @linbynd
    @linbynd 4 หลายเดือนก่อน +1

    Are you using home manager and Nix Darwin together... ?

    • @Danielo515
      @Danielo515 4 หลายเดือนก่อน +1

      I bet he does

    • @dieduch
      @dieduch 4 หลายเดือนก่อน +1

      I do

    • @PauloFassina
      @PauloFassina 4 หลายเดือนก่อน +1

      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

  • @codeitlikemiley
    @codeitlikemiley 20 วันที่ผ่านมา

    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

  • @Exowz
    @Exowz หลายเดือนก่อน

    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?