Manage Your NixOS Config with Git

Поділитися
Вставка
  • Опубліковано 21 вер 2024

КОМЕНТАРІ • 37

  • @capataina5087
    @capataina5087 6 місяців тому +28

    This might be a stretch but it would be amazing if you made a video where you set up a fresh "modular" system from a minimal installation of nixos to show the steps you personally take when setting up flakes, home manager and maybe a couple of modular files like some terminals and maybe browsers in separate files, all from a fresh install of minimal nixos with just config and hardware config files. I feel like that would be the single most helpful video made of nix yet

    • @Beerai
      @Beerai 3 місяці тому +1

      This. I've recently started getting into NixOS and this would be super useful. I've watched a lot of Vimjoyer's videos but his configs look different to the docs in lots of places so it's hard to know what's outdated.

    • @DrewryPope
      @DrewryPope 2 місяці тому

      Basically Mysterio77 config

  • @spencerallen323
    @spencerallen323 6 місяців тому +36

    Love the video. I really appreciate what you're doing with this channel. Here's a little feedback. The nix features and explanations are why I'm here. But I've use git professionally for several years so it would be helpful if you put chapters in your videos so people like me can skip over the git explanations and go directly to the portions we're interested in.

    • @SimplyWondering
      @SimplyWondering 6 місяців тому +1

      I think there are some AI tools that will auto generate sections for you if you want to try that.

    • @spencerallen323
      @spencerallen323 6 місяців тому +2

      @@SimplyWondering Perhaps, but I can't think of one that's as entertaining as this guy.

    • @notactuallyarealperson2267
      @notactuallyarealperson2267 6 місяців тому +7

      @@spencerallen323I think they meant an AI that would automatically figure out the time stamps based on the video content

  • @StefanoPompa
    @StefanoPompa 6 місяців тому +3

    Every time i watch a video on this channel i get surprised on how much this guy is deep in his knowledge and clear in his explanation! Two rare skills in one that makes a granmaster teacher. In my opinion the first one

  • @123fourU
    @123fourU 6 місяців тому +1

    Just joined your group Emmet. Thanks for sharing your knowledge about NixOS. Hoping I could learn more NixOS things from your excellent tutorials. Cheers.

  • @heysebi_
    @heysebi_ 5 місяців тому +4

    I am looking into Nix (mostly the package management) from a software development perspective. It would be very interesting to learn from you about creating & deploying packages - if that’s something you have experience in.
    Anyways thank you for the awesome tutorial series ❤

  •  4 місяці тому +3

    This is GREAT content.
    But there are other things to consider, like the mix of multi-user and multi-machine installations and secret management. The later requires some key infrastructure pre-installed, which is sort of a pain for someone who just wants to install a system directly from a GitHub repo.

  • @griffinb2008
    @griffinb2008 3 місяці тому +1

    git add -p is a game changer. Stage portions of a file at a time. I've never stopped using it since the day I learned about it.

  • @tllvllp
    @tllvllp 2 місяці тому

    great video, thanks for the detailed explanation!

  • @Gilded_Seraphim
    @Gilded_Seraphim 6 місяців тому +3

    great video as always!

  • @Desmodious
    @Desmodious 6 місяців тому +1

    Great video, the making your own installer bit soundsuseful for bridging the gap between basic linux and more declaritive style linux.

  • @griffinb2008
    @griffinb2008 3 місяці тому

    Great video! I'm pretty sure if you accidentally remove files from a git repo you can just git checkout and get it back without having to clone the repository all over again. But either way works!

  • @noriller
    @noriller 6 місяців тому +6

    Trying to get into NixOS... tried the pkg manager in another distro, but quite limited, so I'll just hop to NixOS.
    But, how do you handle keys and secrets in your setup?

  • @timseguine2
    @timseguine2 6 місяців тому +2

    And then you manage your git config with NixOS. It's like a snake eating its own tail.

  • @wave_s6782
    @wave_s6782 6 місяців тому +1

    hey boss, love your stuff. i recently switched over to nixOS and the tutorials have been super useful getting off the ground. one thing i can't wrap my head around is getting doom emacs to build. i've looked at your config and tried to emulate it as closely as possible, but it always gets stuck installing emacs-straight-packages.json. would you consider making a vid walking through getting a barebones doom emacs installation up and working?

  • @asahfikir
    @asahfikir 2 місяці тому

    Very well explained. Btw, Do you plan to have a tutorial on how to setup your emacs client?

  • @coline6152
    @coline6152 Місяць тому

    Great explanation but I think you missed out a key detail. Your "git push origin main" (at 22:40) "just worked", which I think means you not only had your SSH key set up in the remote, BUT ALSO had an SSH agent running and configured locally to do the key authentication without needing to enter a username and password for the remote site,
    I was following along until I got to that point and hit a password prompt. It seems NixOS does not enable a key agent by default, and the online documentation is not easy to follow, so there is a whole chunk of setup missing here, to provision and start a key agent, and import the users private key, before the Git push "just works".

  • @BrazenNL
    @BrazenNL 6 місяців тому +2

    With regards to Git, I need to use different identities to push to different repos. I'm not familiar with NixOS, but this way to configure looks cool. I use a main conf file, and then different conf files per identity/directory. Is such a setup possible with maybe extraConfig? If Home Manager could defer to use an existing config that would be fine for me, too.

  • @the_schreiber
    @the_schreiber Місяць тому

    one sec, chmoding the .git directory in /etc/nixos essentially grants the low user full control on the workstation which can be dangerous in multi user environments

  • @droydi
    @droydi 6 місяців тому

    Great detailed explanations like always, I am curious to know your opinion on Snowfall as flake framework, would be great to have a video covering it from your perspective.

  • @NilEoe
    @NilEoe 3 місяці тому

    Hey emmet! Thank you so much for your tutorials. Quick question: How would you put a file on your .gitgnore, but still use it in your system and get around the "file does not exist" error that happens because the file is not technically tracked by git? I've got a few settings that include personal information and I'd rather not have them on Github (especially if I'm setting the repo on publc some day)

  • @sascha1461
    @sascha1461 6 місяців тому

    great video!

  • @adrianscarlett
    @adrianscarlett 3 місяці тому

    2:35, considering the heavy dependency on git, it really seems odd that git is not a prerequisite installed package for nixos...

  • @DooMWhite
    @DooMWhite 2 місяці тому

    11:07 I'm having an issue in this part, cuz I want to add more than one safe rep, but it's giving me an error saying safe.directory already exists, cuz the attribute set doesn't allow 2 values with the same name.

  • @nahueljj
    @nahueljj 16 днів тому

    this is an home-manager standalone? how u link /etc/nixos to take changes on /home/user/.dotfiles?

  • @marcuswest4572
    @marcuswest4572 6 місяців тому

    Great content. @10 mins: I needed to "chown -R" for the subdirectories of .git. Are there advantages to displacing the config? I think you have to specify the path if you do do this....(?).

    • @1Caja
      @1Caja 4 місяці тому

      You could just leave your config folder and containing .git folder outside of /etc/nixos/ like /home/username/ and symlink from there with `ln -s ...`
      Used that for a year without problems an that way you don't have to worry about ownership.

  • @summerWTFE
    @summerWTFE 6 місяців тому

    How can I omit hardware-configuration.nix so I can use the setup on multiple computers?

  • @shadowelite-sec
    @shadowelite-sec 4 місяці тому

    Which software your using for virtual machines, please reply

  • @karthikeyanbalasubramanian7305
    @karthikeyanbalasubramanian7305 4 місяці тому

    im following from your first video and out of nowhere your home.nix file now contains 'config' section and bunch others. Unable to find home.nix in your repo too

  • @nahueljj
    @nahueljj 17 днів тому

    defaultBranch still not working

  • @Naton
    @Naton 17 днів тому

    adding hardware-configuration.nix into git defeats the purpose of nix

  • @arinovo
    @arinovo 4 місяці тому

    The safe directory part did not work for me:
    /etc/nixos
    ❯ git add *
    error: open("configuration.nix"): Permission denied
    error: unable to index file 'configuration.nix'
    fatal: adding files failed