Nix home-manager tutorial: Declare your entire home directory

Sdílet
Vložit
  • čas přidán 14. 07. 2023
  • Nix-colors:
    github.com/Misterio77/nix-colors
    Nix configuration examples:
    nixos.wiki/wiki/Configuration...
    Thank you for watching!

Komentáře • 75

  • @vimjoyer
    @vimjoyer  Před 10 měsíci +95

    These videos take a ton of time to make, but you guys deserve the best. If you'd like me to improve something just say it.

    • @Gabifuertes
      @Gabifuertes Před 10 měsíci +2

      I find some of the text to be quite tiny on mobile, like 2:57. Keep it up!

    • @vimjoyer
      @vimjoyer  Před 10 měsíci +9

      @@Gabifuertes oh, here I just wanted to demonstrate that the comments are here, I didn't mean that you should read them during the video. Still, next time I'll add scrolling text, thanks!

    • @unknown-otter
      @unknown-otter Před 10 měsíci +2

      Once again, thank you!

    • @RedneckPythagorean-ms9ox
      @RedneckPythagorean-ms9ox Před 5 měsíci +2

      MOAR MOAR MOAR
      Please sir, just do the needful and provide more content to help me learn to leverage nixOS for my dev envs and daily driving. Some feedback, perhaps, is that you probably could spend 10% of the time editing your videos, and I would still watch every minute. There's just so little useful recent content providing walkthroughs a dummy like myself can follow productively. Thank you, God bless.

    • @motus_terra3435
      @motus_terra3435 Před 11 dny

      you show an example configuration for gtk.
      As a someone totally new to nix i copy pasted it to try it out but it doesnt work for me
      i assume one problem is the missing semicolon at the end of the gtk block. But after adding it home-manager still wont start.

  • @mykra2939
    @mykra2939 Před 5 měsíci +15

    You are the GOAT, Vimjoyer. You have smoothened my NixOS onboarding in such a radical manner you can't imagine.
    I appreciate your work a lot! Keep it up!

  • @sibbeh
    @sibbeh Před měsícem +4

    You sir are a scholar and gentleman. Thank you for the great videos and clear explanations

  • @ethanevans8909
    @ethanevans8909 Před 10 měsíci +11

    This operating system has changed everything for me. Thanks for the wonderful introduction

  • @joshelliott2577
    @joshelliott2577 Před 10 měsíci +2

    Your videos seem to be coming out right as I need them. Thank you sir!

  • @justaguyalive6762
    @justaguyalive6762 Před 10 měsíci +2

    you are making my perfect nixos journey, thank you

  • @lil_peepka
    @lil_peepka Před 10 měsíci +4

    Thanks for all this NixOS videos, just switched to it and your videos are realllllly helpful since there is basically no good tutorials, even written ones

  • @krupkat
    @krupkat Před 10 měsíci +3

    Thanks for the quick overview! Since your last video I started using nixos daily and it is absolutely fantastic, I'm already fully converted :) even made a PR to nixpkgs with one of my projects

  • @onelazynoob15
    @onelazynoob15 Před 3 měsíci +1

    been thinking of switching and finding this channel is a god send, ty for laying out everything I need, you're a real one

  • @danielwieser8493
    @danielwieser8493 Před 10 měsíci

    Thank you so much for your vids bro! They have been a great help. Super compact and exactly with the stuff i was looking for.

  • @Aditya-ny8ur
    @Aditya-ny8ur Před 10 měsíci

    Thank you very much for covering home-manager.

  • @BenSycha
    @BenSycha Před 10 měsíci

    Great video, will be giving it a go over the next few days I expect

  • @BehradJi
    @BehradJi Před 8 měsíci

    Thank you very much, tonight I am building my nix configuration file and tomorrow I'll switch to it!

  • @Anonymous4045
    @Anonymous4045 Před 3 měsíci +1

    I also find it helpful to put some program configurations in their own file, so I have /modules/home-manager/program-name.nix. This way, I can manage which users and hosts have which modules.

  • @wyfyj
    @wyfyj Před 10 měsíci

    Thanks for the video. Another banger

  • @pabloqp7929
    @pabloqp7929 Před 10 měsíci +9

    Your videos are being so helpful! Maybe in the future you can cover Neovim?
    My current neovim config requires packer, npm and a few extra packages in order to install the plugins and LSPs.
    I'm new to NixOS so I'm still trying to find a proper way to *declare* the config I need. Maybe in configuration.nix, maybe I should now learn home-manager?
    Hope vimjoyer pops off soon 💥
    Btw loved your Hyprland video, also that's what I'm trying to set up as it was quite a headache on Arch (also with Nvidia gpu). Kinda weird tho some NixOS stuff with Wayland, namely waybar and waylock are behaving weird. If you have time maybe you could also dive into your config and some connoisseur tweaks 🚀

    • @vimjoyer
      @vimjoyer  Před 10 měsíci

      I'm planning to do some neovim videos in the future, maybe even some Nix + neovim ones. Home-manager is great and quite simple, I have a video about it. Thanks!

  • @user-wl6up8fb5h
    @user-wl6up8fb5h Před 10 měsíci +1

    Many Thanks!

  • @wanmixc2968
    @wanmixc2968 Před 10 měsíci

    I found something good, for explain nix OS....
    Keep it up ..

  • @csilipo
    @csilipo Před 2 měsíci +2

    I'm sorry, but I really enjoy yr videos. But! You need to address the 'Novice' in the room! Maybe include Line Numbers in yr videos, so we know where the configuration is placed in the configuration.nix file. Or maybe just do a Series just for Novices. Keep up the good work. I'm using Nixos on Win11 WSL2 machine & old Mackbook AIr 2019. WOW WOW. Carlo

  • @chrisobrien7531
    @chrisobrien7531 Před 7 měsíci +1

    Will you be making a video on the flake variation of home-manager? Cheers

  • @xydru9206
    @xydru9206 Před 4 měsíci +1

    Great video, quick question tho:
    I‘m running on macOS and I saw another video (for macOS) where a guy was declaring everything you are declaring in home-manager in his flake.nix via something along the lines of darwinConfiguration. I‘m wondering now which approach makes more sense, since it does seem to make sense to use this darwin stuff for macOS as it seems to be better suited for macOS but at the same time I also watched your video for nvim+home-manager and set up my nvim configuration the same way and I would have no clue how to achieve that if I stick to flakes and use darwinConfiguration instead. Is one approach better than the other one, can one do more than the other one? Or would it maybe even make sense to use a mix of both (or maybe not because maybe with home-manager I can do the same stuff)?

    • @vimjoyer
      @vimjoyer  Před 4 měsíci

      I haven't tried nix-darwin, so I can't tell you which one is better suited for your use case. Try both and see which one you prefer.

  • @orebi1914
    @orebi1914 Před 10 měsíci +1

    Awesome video! Thank you for your time in making these videos. They are very helpful! You don't mind sharing your configuration files for the flakes and home-manager? Thank You in advance!

    • @vimjoyer
      @vimjoyer  Před 10 měsíci

      I'll probably share my configs later, right now they are a mess.

    • @orebi1914
      @orebi1914 Před 10 měsíci

      @@vimjoyer No worries! Probably, it looks like mine! HaHa... Thank you for your quick reply!

  • @AliasFR-
    @AliasFR- Před 3 měsíci +1

    Thanks u !

  • @kenrtx
    @kenrtx Před 9 měsíci +1

    Awesome job, I'm a NixOS noob and learning a lot from your videos. Question though, I'm using the stable channel on my system and I accidentally added the unstable channel in my flake. So when I used the flake to build it seems like it moved me to the unstable channel. Does the flake channel override the channel defined in nix-channel? And if so does that mean it auto updates when running the flake?

    • @vimjoyer
      @vimjoyer  Před 9 měsíci

      Your channel is still there, and Flake does not touch it. Flake has it's own set of dependencies, and they are updated only when you run `nix flake update`.

    • @kenrtx
      @kenrtx Před 9 měsíci +1

      @@vimjoyer gotcha, yea I see that. But I guess I just want to clarify that when I am using my flake to build my config it's ignoring what is set in nix-channel and using the channel in the flake config. Do I have that right?
      It's been a bit of a transition distinguishing what all of these all of these systems are using and how they're tied together. I love it though. :D

    • @vimjoyer
      @vimjoyer  Před 9 měsíci

      @@kenrtx yes, it is using flake's nixpkgs if you call this function from flake.

  • @reality-drift122
    @reality-drift122 Před 8 měsíci +1

    would you be willing to do a video on deploying your config to a new machine?
    your videos are awesome and have helped so much!

    • @vimjoyer
      @vimjoyer  Před 8 měsíci +1

      Probably, that is a good idea

    • @reality-drift122
      @reality-drift122 Před 8 měsíci +1

      @@vimjoyer i tend to be a hands on learner (in tech that can be difficult to deal with) but being able to roll something out then manipulate it from a "final" point has always made learning how the whole thing interacts, a more pleasant experience to me.

  • @lel5747
    @lel5747 Před 10 měsíci +1

    gigachad youtuber 😎

  • @octopusonfire100
    @octopusonfire100 Před 3 měsíci +1

    I was trying to follow this but I got lost. When doing `sudo nixos-rebuid switch --flake ~/path/to/flake`, what flake are we talking about? The one we previously created in Projects? All the files look just like in the guide, but I am getting "error: function 'outputs' called with unexpected argument: 'home-manager'"

    • @vimjoyer
      @vimjoyer  Před 3 měsíci +1

      "outputs called with unexpected argument home-manager error" is caused by outputs function not accepting your home-manager input. Make sure to add both `...` and `@inputs` to your flake's output parameter.

    • @octopusonfire100
      @octopusonfire100 Před 3 měsíci

      @@vimjoyer Thanks for the quick reply. I'm making a mess between the flakes in .config/home-manager and the Projects directory. I'll try to get back later to this and start over from scratch.

  • @mjcc_
    @mjcc_ Před 10 měsíci +2

    Hello could you make a tutorial video or playlist with nixos fresh installation + flake + home-manager config, please ? This would be great ! Thanks for your videos

    • @vimjoyer
      @vimjoyer  Před 10 měsíci

      I already have a fresh installation tutorial (pretty bad one, but popular), and 2 flake videos.

  • @luigitech3169
    @luigitech3169 Před 10 měsíci +1

    Thanks, I like NixOS for system configuration but for me home-manager is too much, another weak abstraction to maintain

  • @alexxitoprivacy5189
    @alexxitoprivacy5189 Před 6 měsíci +1

    at 2:26, is that file the one inside /path-of-the-flake/nixos? I don't understand, when i import ./home.nix it throws an error cause indeed there's no such file inside of the flake/nixos folder

    • @vimjoyer
      @vimjoyer  Před 6 měsíci

      Are you using git? stage all files before rebuilding, flakes don't see unstaged files.
      If you are not using git, make sure the path is correct. It should be relative with . meaning current opened file, so if your home.nix is in a subdirectory, write ./subdirectory/home.nix

    • @John-Dennehy
      @John-Dennehy Před 2 měsíci +1

      @@vimjoyerwhere in the video does it cover this home.nix file? Been going back forth across whole playlist, but getting really confused. The only home.nix file was in .config/home-manager as far as I can tell, but assume I missed something??

  • @Grizzlywer
    @Grizzlywer Před 2 měsíci +1

    721 subscribers? more like: over 9000!!

    • @vimjoyer
      @vimjoyer  Před 2 měsíci +1

      In less than a year!

  • @th3mon
    @th3mon Před 8 měsíci +4

    I'm confused at 2:34. What file is it?!?

    • @vimjoyer
      @vimjoyer  Před 8 měsíci

      Module is imported in the imports array, and everything under it is the module itself. could not put an arrow there, because everything is the module.

    • @John-Dennehy
      @John-Dennehy Před 2 měsíci

      @@vimjoyerI am stuck at exact same point. It says "path/to/flake" but which flake??

  • @getHornbied
    @getHornbied Před 8 měsíci +1

    Do you also do binkovs battlegrounds?

  • @fire17102
    @fire17102 Před 10 měsíci

    Following your channel , I've recently started using nixOS on wsl. I love the fact that everything is declerative, but I'm having big issues when installing new things. For example I can't get numpy working cause of some lib.so.6 thing which I couldn't solve for the life of me...

    • @vimjoyer
      @vimjoyer  Před 10 měsíci +1

      It happens sometimes, python is generally not the best experience on NixOS. What I've been doing is: if python package is available in nixpkgs - I add it to a shell, otherwise install with venv.

  • @elatedbento
    @elatedbento Před 6 měsíci +1

    Excellent video. Font and color scheme, pls?

    • @vimjoyer
      @vimjoyer  Před 6 měsíci

      JetBrainsMono and gruvbox

  • @kirashufflerful
    @kirashufflerful Před 9 měsíci +1

    I don't fully understand how importing ./home.nix in configuration.nix works, because I tried to repeat everything after you, but getting error during build that home.nix is not found. Great vid btw

    • @vimjoyer
      @vimjoyer  Před 9 měsíci +1

      home.nix file has to be in the same directory, and you need to have home-manager in your flake inputs

    • @kirashufflerful
      @kirashufflerful Před 9 měsíci +2

      @@vimjoyer I fixed this problem by adding home.nix to my flake git repo. Maybe you mentioned it in the video, but I missed it.

    • @vimjoyer
      @vimjoyer  Před 9 měsíci +4

      @@kirashufflerful I mentioned it in the flakes video. Anyway, good job!

  • @lel5747
    @lel5747 Před 10 měsíci +5

    Could you make a discord server ?

    • @vimjoyer
      @vimjoyer  Před 10 měsíci +2

      Hmm, do you think there will be enough people?

    • @lel7531
      @lel7531 Před 10 měsíci +5

      @@vimjoyer Enough yeah, no need to have tons anyway

    • @ocimandiaspepe5137
      @ocimandiaspepe5137 Před 10 měsíci

      I'd recommend using a matrix instead, but whatever suits @vimjoyer

    • @vimjoyer
      @vimjoyer  Před 10 měsíci

      @@ocimandiaspepe5137 matrix is great, and I've tried it a couple of times, but I still find it quite unintuitive. I think discord is decent, so let's try that for now. I'll probably announce it in the next vid.

  • @gnupph
    @gnupph Před 2 měsíci +1

    damn u sounds like this dude www.youtube.com/@Binkov

  • @jenniferdarline
    @jenniferdarline Před 4 měsíci +1

    Not helpful to someone who does not want to use flakes

    • @vimjoyer
      @vimjoyer  Před 4 měsíci +8

      But helpful to someone who does