NixOS Is A Fascinating Linux Distribution

Поделиться
HTML-код
  • Опубликовано: 28 окт 2020
  • NixOS is a GNU/Linux distribution that employs a powerful package management system that allows you to build the system from a single configuration file. NixOS supports atomic upgrades and rolling back to previous generations. In theory, it should be an unbreakable system.
    REFERENCED:
    ► nixos.org/
    WANT TO SUPPORT THE CHANNEL?
    💰 Patreon: / distrotube
    💳 Paypal: www.paypal.com/cgi-bin/webscr...
    🛍️ Amazon: amzn.to/2RotFFi
    👕 Teespring: teespring.com/stores/distrotube
    SOCIAL PLATFORMS:
    🗨️ Mastodon: mastodon.technology/@distrotube
    💬 IRC: irc://freenode #distrotube
    👫 Reddit: / distrotube
    📽️ LBRY: lbry.tv/$/invite/@DistroTube:2
    DT ON THE WEB:
    🕸️ Website: distrotube.com/
    🐿️ Gopherhole: gopher://distro.tube
    📁 GitLab: gitlab.com/dwt1
    🔊 Audio Podcasts: www.buzzsprout.com/1263722
    FREE AND OPEN SOURCE SOFTWARE THAT I USE:
    🌐 Brave Browser - brave.com/dis872
    📽️ Open Broadcaster Software: obsproject.com/
    🎬 Kdenlive: kdenlive.org
    🎨 GIMP: www.gimp.org/
    🎵 Audacity: www.audacityteam.org/
    💻 VirtualBox: www.virtualbox.org/
    🗒️ Doom Emacs: github.com/hlissner/doom-emacs
    Your support is very much appreciated. Thanks, guys!
  • НаукаНаука

Комментарии • 334

  • @gryzor
    @gryzor 3 года назад +132

    The reason why you can use sudo without a password is explained in the manual: "The nixos user account has an empty password so you can use sudo without a password."

  • @sluxi
    @sluxi 3 года назад +89

    I've been using it for a long time and really love NixOS, I think it brings the idea of configuration management to the OS level.

    • @charliekahn4205
      @charliekahn4205 3 года назад +10

      I love the idea of configuration you can access directly from the filesystem. It makes it way easier to see what everything on your system is doing and what could be causing problems.

    • @thecashewtrader3328
      @thecashewtrader3328 3 года назад +3

      Yay uwu

  • @Bikdashing
    @Bikdashing 3 года назад +103

    Hey DT, just wanted to say thanks for reviewing NixOS. I never seen and used it. I will definitely get to know by this .

  • @tonnylins
    @tonnylins 3 года назад +14

    Man, thank you for getting into the woods of nixos. I saw this distro a few years back and even downloaded the iso and opened into a VM but I didn't go any further. I found its engineering very promising way back when. Well, I settled with arch for my machines for now, but seeing the awesomeness of nix package manager, it has triggered once again the interest on nixos.

  • @wilfridtaylor
    @wilfridtaylor 3 года назад +17

    Been using nixos for about a month now. So far pretty happy with it :).

    • @ribosomerocker
      @ribosomerocker 3 года назад +1

      I use Manjaro (which is kind of boring to me right now) and I'm wondering if NixOs sounds good to switch to from it? What were your experiences? I was also pretty interested in the package manager of it before hearing of the OS, so I'm glad it's being used in it by default

  • @caldersheagren
    @caldersheagren 3 года назад +106

    You should do a video on nixos packaging!

  • @b0ba_884
    @b0ba_884 3 года назад +9

    A part two would be great this was really interesting!

  • @user-wz3pi1vh7o
    @user-wz3pi1vh7o 3 года назад +1

    how have you not hit 100k yet? your content is so much better than many of the much larger channels

  • @ethanedwards8296
    @ethanedwards8296 3 года назад +24

    I'm actually installing NixOS right now! Good timing :)

  • @vpxc
    @vpxc 3 года назад +2

    Been waiting on you to give NixOS a second look. Glad you took the time! :)

  • @thingsiplay
    @thingsiplay 3 года назад +1

    I just recently found your channel and the content is great. Its not easy to find good Linux content RUclips channels with distribution infos.

  • @reisen1553
    @reisen1553 3 года назад +2

    Your video is very good! Thanks for the review, Derek!

  • @alonzoc537
    @alonzoc537 3 года назад +8

    If you don't wanna have to install everything systemwide you can use home-manager which allows you to configure your users environment individually. Reduces the total system bloat on a reinstall as the core system is made as small as possible. It also means you don't need to use sudo every time for adding new programs.

  • @iansterling9589
    @iansterling9589 3 года назад +6

    Thank you for this video. I'd been wanting to try nixos and have been intimidated by the config file. To that point, I'd tried in a VM before and was unable to boot, and your explanation of this got me past that.

  • @i.8530
    @i.8530 3 года назад +89

    Hey DT, you made a comment about not being able to recompile your suckless utilities and as a NixOS & suckless user i would like to clarify that you can pretty easily do that, you just need to specify the patches you want to use using an override of the (for example) st package. Here is a code snippet for using basic regular patches:
    "nixpkgs.config.st.patches = [ /path/to/diff.patch ];"
    here is an example from my personal config, the lazy persons build of st.
    """
    nixpkgs.config.packageOverrides = pkgs: {
    st = (pkgs.st.overrideAttrs (attrs: {
    pname = "luke-st";
    version = "unstable-2020-08-07";
    src = pkgs.fetchFromGitHub {
    owner = "LukeSmithxyz";
    repo = "st";
    rev = "de6fd85eeb544548ed5ad23a639eedd6af510036";
    sha256 = "1xyrbi857435dln7i6qb9ys2jizv43a2zq6fx4dr8z52ramxzyky";
    };
    buildInputs = attrs.buildInputs ++ [ pkgs.harfbuzz ];
    }));
    };
    """
    Hope this helped!

    •  3 года назад +4

      I was wondering about that. Pretty cool 🙂

    • @fritjoflarsson9817
      @fritjoflarsson9817 3 года назад +5

      I have the following:
      """
      environment.systemPackages = with pkgs; [
      ...
      (st.override {
      conf = builtins.readFile /home/aptrug/Programme/st/config.h;
      extraLibs = [ pkgs.harfbuzz ];
      patches = [
      (fetchurl {
      url = "st.suckless.org/patches/ligatures/0.8.3/st-ligatures-20200430-0.8.3.diff";
      sha256 = "02cg54k8g3kyb1r6zz8xbqkp7wcwrrb2c7h38bzwmgvpfv3nidk7";
      })
      ];
      })
      ...
      ];
      """"
      in configuration.nix and it works pretty good

    • @i.8530
      @i.8530 3 года назад +2

      @@fritjoflarsson9817 Looks good! Although I'd suggest you take a look at "home-manager" for managing your user packages.

    • @LinuxLuddite
      @LinuxLuddite Год назад

      How does it resolve merge conflicts ?
      Looks like a bit lengthy process if i edit my suckless programs often

  • @otavioschwanck6668
    @otavioschwanck6668 3 года назад +28

    The doom emacs creator uses Nix!

    • @halikular
      @halikular 3 года назад

      I've been trying to install his dotfiles but it always ends up not working because it says there are no configuration. nix. But that is what the setup script is supposed to do. If anyone of you gets it installed let me know.

    • @06kellyjac
      @06kellyjac 3 года назад +2

      @@halikular I might give it a go in a VM but keep in mind his config is bleeding edge, using Flakes which is an unreleased feature and moved from nixpkgs unstable to nixpkgs master the other day (1 day before your comment)

    • @minhajsixbyte
      @minhajsixbyte 3 года назад

      Yes

  • @halturin
    @halturin 3 года назад +4

    If you got 'Command not found' just run 'command-not-found '. very useful to find a package provides this command

  • @MonsterHunterDignity
    @MonsterHunterDignity 3 года назад +12

    Hey DT, would greatly appreciate more NixOS content, since there is not much on RUclips about it so far. I think NixOS is the closest thing that comes to a true revolution in operating systems in the last decades.

    • @vpxc
      @vpxc 3 года назад +4

      @@bigpod While machine state under Silverblue is managed atomically and it is reversible, it's not generated declaratively, but managed through more or less traditional imperative package management. This is very deliberately *less* revolutionary (read: disruptive, demanding) an approach than NixOS', which requires hacking and configuring every program to do things like, e.g., live on a read-only partition and build against a unique prefix.
      This is actually the strength of Silverblue, because it means less work is required to get custom or proprietary software onto the system, while retaining a subset of the benefits of a system like NixOS. But more revolutionary it is not.

  • @caseyhoward9101
    @caseyhoward9101 3 года назад +6

    Good video. I wanted to point out though that the "stateVersion" isn't "what point it is building from". It's actually more about the data that isn't part of nix. The kinds of things that are not recoverable and a rollback can't fix. It's pretty much a warning to back up anything with state like databases. There are many services that support many database versions, but you want to make sure to back up your data before they update.

  • @futt-bucker
    @futt-bucker 3 года назад

    Great informative vid!

  • @w1keee
    @w1keee 3 года назад +17

    7:04 you could use `sudo !!` there, it runs the previous command as superuser

    • @MichaelScalet72
      @MichaelScalet72 3 года назад

      Ohh. Never thought of that! The simplest things! 😅

    • @tedbybolf4616
      @tedbybolf4616 3 года назад +2

      or just do sudo su and became root and do the install as root because while installing you need to do basically everything as root

    • @jiyometrik
      @jiyometrik 2 года назад

      @@tedbybolf4616 that won’t work with ~/ directory operations, as the super user’s HOME directory is /root, while the regular user’s HOME is /home/username

    • @tedbybolf4616
      @tedbybolf4616 2 года назад

      @@jiyometrik you don't usually need these while installing

  • @enderger5308
    @enderger5308 3 года назад +12

    Actually, NixOS has a system to emulate the standard filesystem structure through symlinks. It should be able to use most standard executables.

    • @mgord9518
      @mgord9518 2 года назад

      How do you enable this?

    • @glowingone1774
      @glowingone1774 2 года назад

      @@mgord9518 steam-run seems to work for games, but I'm not sure if there is a configuration option. Honestly it's better to make a derivation for the script you are running so it can be tracked in git

  • @twb0109
    @twb0109 3 года назад +14

    DAAAAMN I can even "setxkbmap -option caps:swapescape" from that config, should give NixOS a try

    • @balsoft01
      @balsoft01 3 года назад +3

      You can do _everything_ through the config. All my desktops and laptops are fully configured from this repository: github.com/balsoft/nixos-config with one command (sudo nixos-rebuild switch --flake .) . I generate and set GTK theme, Qt theme, terminal emulator colorscheme, emacs configuration and packages, firefox theme and plugins, patch all the software I want patched (e.g. I change default colorscheme of Spectral, my matrix client, by patching the source), etc.

    • @twb0109
      @twb0109 3 года назад

      @@balsoft01 That's impressive. I'm downloading a minimal live iso to play with in a VM

  • @zoltantoth1566
    @zoltantoth1566 3 года назад +27

    NixOS is the best. Not only functional is the future of operating systems, but the distro is already mature enough mostly for practical use on the desktop. I have been using it for a while and it became my least problematic Linux desktop distro so far, which is good enough from a mature distro, let alone from a revolutionarily new one.

  • @reisen1553
    @reisen1553 3 года назад +62

    Another cool thing about Nix is the "nix-shell" command.
    It's trivial to test packages with it, you just need:
    $ nix-shell -p
    For example:
    $ nix-shell -p firefox --run firefox
    and you will have Firefox in a temporary environment (it can be garbage-collected later).
    Also, this isn't something exclusive to NixOS, it works on any GNU/Linux distro or macOS that has the Nix package manager installed.
    For those who are interested in knowing more about Nix, there's an excellent website maintained by a great contributor to the Nix ecosystem: nix.dev/

    • @MaxPrehl
      @MaxPrehl 3 года назад

      Yo

    • @Sinnersmight
      @Sinnersmight 3 года назад +2

      This is a gamechanger

    • @balsoft01
      @balsoft01 3 года назад +7

      You can also use nix-shell to get a reproducible development environment, we use this at my workplace and I also use this a lot for personal projects. It removes the notion of "dependency hell" almost entirely!

    • @mskiptr
      @mskiptr 3 года назад

      Btw, I always wondered what about dotfiles and other configs in this case. Won't they clash between different versions or even be left by these temporary installs?

    • @balsoft01
      @balsoft01 3 года назад +4

      @@mskiptr Yes, they would. We have home-manager and nixos-container for dealing with that.

  • @earnestredwood4694
    @earnestredwood4694 3 года назад +1

    This was great Thank I look forward to checking this out. Question how do you feel about the Virtual program "Boxs"

  • @cstephan7
    @cstephan7 3 года назад +7

    Wow! I do not think that this distribution is for me, but I am glad to have learned about it. I might give it a try in a VM even at some point, too.

    • @davidak_de
      @davidak_de 3 года назад +1

      you can learn, if you want. but it will take some time

  • @swapnil72
    @swapnil72 3 года назад +1

    ❤️ your setup in the bg

  • @moai834
    @moai834 3 года назад +10

    So you have finally revisited it, heh. Amazing.

  • @Weirdcko
    @Weirdcko 3 года назад +5

    Usually you can get a root shell with sudo -s, right? I do that on these live environments where su won't work but sudo does.

  • @Lestibournes
    @Lestibournes 3 года назад +1

    Please do more videos on nixos. I find it fascinating.

    • @davidak_de
      @davidak_de 3 года назад

      Maybe check out the talks from NixCon to go more into detail.

  • @rholouh7483
    @rholouh7483 2 года назад

    Great video! you can enter an elevated rights env (just like su) with sudo -s

  • @adamsenik2573
    @adamsenik2573 3 года назад +5

    Amazing... I will try NixOS when I have a bit more time. Easily explained..
    It takes literally few minutes to configure NixOS, whereas my Arch installation I have been configuring for almost 3 years:) Now, I have a dilemma.. should I ditch Arch for NixOS?

  • @FeedScrn
    @FeedScrn 3 года назад

    Nice vid and interesting OS.... Something to tinker with, as Jon Ringer says...

  • @xwinglover
    @xwinglover Год назад

    Such an interesting and unique distro. I like the thinking.

  • @DanielFitzpatrick03
    @DanielFitzpatrick03 3 года назад +43

    Funny how opinions change. He didn't like it the last time he tried it.

    • @halbgefressen9768
      @halbgefressen9768 3 года назад +27

      Yeah, people shit on him for not doing his research, he noticed it and fixed it.

    • @PabloAndresDealbera
      @PabloAndresDealbera 3 года назад +16

      @@halbgefressen9768 yep, at least he make an effort to re-review if he sees it was unfair.

    • @grimfpv292
      @grimfpv292 3 года назад +13

      Nothing wrong with changing ones mind. Everyone get stuff wrong sometimes.

    • @mullokakkarin
      @mullokakkarin 3 года назад +5

      Not so funny considering that when one gains experience, his opinions and tastes can easly change

    • @grimfpv292
      @grimfpv292 3 года назад +4

      Also, circumstances can change. In this case, the distro might have matured and evolved since he last looked at it.

  • @milohoffman274
    @milohoffman274 3 года назад +2

    Man this OS is cool. This could be a game changer in Linux in installing and managing systems. They seem to have almost every package available I ever considered running in their repos, so they are not lacking anything like some new distros. However, I am a little disappointed that a single company seems to be behind it all though.

  • @replikvltyoutube3727
    @replikvltyoutube3727 3 года назад

    Finally you were able to install it

  • @YannMetalhead
    @YannMetalhead 2 года назад

    Good video.

  • @Tala2n
    @Tala2n 2 года назад +2

    The recently released NixOS 22.05 features a graphical installer.

  • @rayanmazouz9542
    @rayanmazouz9542 2 года назад +2

    My school actually uses nixos, it's a really good option if you want to make a lot of identical installations

  • @EvanMisshula
    @EvanMisshula 3 года назад

    Thank you DT. I was having trouble finding working documentation on setting up xmonad inside of NIX (even though 1K dev's have it in NYC). Let me know if you want to collaborate on Haskell Nix, postgres, servant, reflex-frp full stack app series.

    • @davidak_de
      @davidak_de 3 года назад +1

      have you tried to get help on IRC or the forum and checked out the configs. of others? nixos.wiki/wiki/Configuration_Collection

  • @death-disco
    @death-disco 3 года назад +13

    Wow. I remember your last NixOS video. You skipped through it, said it was hard to install, seemed to not understand anything about its benefits or why it is set up so differently. I love your videos but that one made me lose a little bit of respect for your review process I guess (though I am biased; nix user here). It’s interesting to watch this turnaround. Well done! By the way, the process for this is the exact same as last release (with plasma), but you said the last one was overly difficult. I think perhaps your understanding of what it is trying to do has changed over time. I actually NEVER use this process. I either install from another operating system (which you can totally do) if there’s one on there, or I build my own iso with a simple .nix script.

    • @jozsefk9
      @jozsefk9 2 года назад

      What would be the best to read/watch for learning how to do those custom ISOs with scripts please?

  • @sharktooh76
    @sharktooh76 3 года назад +2

    You can type "sudo su" to become su instead of adding sudo to every command

  • @georgiosdoumas2446
    @georgiosdoumas2446 2 года назад

    8:20 , you are in the terminal of your laptop (no virtual machine yet is ready) so how do you have the command nixos-...... available?
    If you type : which nixos-generate-config
    what do you get?

  • @This-Is-The-End
    @This-Is-The-End 3 года назад

    Can't install it because I can't change keyboard layout from EN to FR during install in terminal. Can someone help me ?

  • @thestreamreader
    @thestreamreader 3 года назад +1

    Is it enough for you to switch from Arch?

  • @domenkozar3608
    @domenkozar3608 3 года назад +1

    For getting started tutorials see nix.dev/ and let me know what else to add! :)

  • @doctorsocrates4413
    @doctorsocrates4413 Год назад

    Is that your standard way of partitioning?..Personally i use a separate boot partition as well.

  • @rustyjames6131
    @rustyjames6131 3 года назад +2

    Hey DT (assuming you ever see this comment), what is your experience with config management generally? I think the benefits of Nix/NixOS become more obvious after you've worked with the likes of Puppet or Ansible for a while. We were using NixOS to run a bunch of services at my last job and it was SOOOO much better than doing it with Ansiblows.
    NixOS is a nice enough desktop OS (I used Arch for 12 years before switching and now I'm never looking back), but it's best strengths are in the realm of DevOps IMHO. And if you're a developer, Nix itself is also a very good build tool generally.
    Anyway, great video. Cheers.

    • @davidak_de
      @davidak_de 3 года назад

      I guess he is just a desktop user.

  • @vaivadavladimir
    @vaivadavladimir 3 года назад +4

    Hello DT, maybe OpenBSD review is about the time? ;) Sorry my English please...

  • @DannyMexen9
    @DannyMexen9 3 года назад

    Hi Derek, would you be willing to do a video on the top 5 distros with the best UI UX and LAF ? Not DEs but distros. I'm interested in you using them as the developers intended.

  • @migue7490
    @migue7490 3 года назад +3

    I tried for real this distro some time ago, and it was a really good experience, but I had some issues that I couldn't resolve. Now I'm happy with arch but if I distro hop again I will try nixos one more time.
    I wonder how good is this distro with xmonad, cause if I'm not wrong nixos has something of functional programming.

    • @wilfridtaylor
      @wilfridtaylor 3 года назад +4

      Yeah nixos is really big with the haskel crowd and there are packages for it in nixos.

    • @IGotACodingIdea
      @IGotACodingIdea 3 года назад

      I use nixos on 4 computers and use xmonad on all of them (shared config between the computers). Haskellists use nix and nixos a lot and since xmonad is written in haskell.. :)
      There often are some traps that I run into on the nixos but if you learn nix syntax a bit it's quite easy to make your own derivations and do stuff your way. It's definitely not a beginner friendly distro and you must kinda become the master of packaging. :))

  • @milohoffman274
    @milohoffman274 3 года назад

    BTW @DistroTube... the magic incantation you were looking for to su and become root, is this: "sudo su -". Most sysadmins in an enterprise environment don't even know the root password, and using sudo is the only way to become root.

  • @kras_mazov
    @kras_mazov 3 года назад +1

    Nice concept. But how well is it supported? What are chances that some needed programs are not in the repo?

    • @davidak_de
      @davidak_de 3 года назад +3

      It has the second most packages (1. is AUR) and the most up-to-date packages from all distros. repology.org/repositories/graphs
      You can check search.nixos.org/packages if it has the packages you need.
      You can request new packages on GitHub: github.com/NixOS/nixpkgs/issues
      You can also learn to create packages yourself. It's easier than for debian/Ubuntu in my experience. I maintain 20 packages now.

    • @wesleyjrz
      @wesleyjrz 2 года назад

      @@davidak_de thank you, I was thinking if I should try it and stop using Arch.

  • @thelovertunisia
    @thelovertunisia 3 года назад

    I watched your vid on True OS last time so you think BsD and these Unixes are not Desktop ready as Linux has become? I tried freebsd back in 2013 or so and well at the time Ubuntu was already mature.

  • @darkarie
    @darkarie 2 года назад

    Hey @DistroTube . For when a minimal installation of NixOS ??

  • @iLLt0m
    @iLLt0m 3 года назад +3

    "sudo -i" to drop into root. ctrl+alt+f1 for new tty to login root so no need for desktop root login. pkill is probably installed rather than killall.

    • @d4veg
      @d4veg 3 года назад

      Was going to post this if `sudo -i` hadn't been mentioned.

  • @dhruvrana4735
    @dhruvrana4735 3 года назад +1

    in terms of voice
    david attenborough : Planet Earth :: DT : Linux

  • @giovannisardisco4541
    @giovannisardisco4541 3 года назад +1

    It's an awsome distribution! Is it possible to install software by command line? configuration.nix would updated automatically?

    • @bew
      @bew 3 года назад +2

      No that's not possible, I wouldn't trust a program to auto update my config file.
      The configuration file is not just a list of thing, it's a whole programming language. It's not necessarily in one file either, you can split the config in many files, modules, grab some from the internet automatically, etc..
      I think it would be hard to do modifications to a config file like that.

    • @creator5454
      @creator5454 3 года назад +1

      Haven't done yet but ig you could make a bash script for appending to the configuration.nix and then running nixos-rebuild --switch automatically
      and with some alias add the script to your .bashrc /fish config so that you could directly call it.

  • @itdevops
    @itdevops Год назад

    Ty, but how many ressources use Nixos compare to over ??
    Little update with Htop welcome.
    Ty

  • @tryangle6152
    @tryangle6152 3 года назад +7

    I liked nixos at first but swapped back to Arch after some days because I ran into so many issues with nixos not finding config files or package descriptions being outdated etc. The community is so small sadly and I think that's also it's biggest issue.

    • @davidak_de
      @davidak_de 3 года назад

      have you created an issue for that, so it can be fixed? and asked for help in IRC or the forum? issues will be fixed, over time and you can learn to fix them yourself.
      nixos (unstable) has actually the most up-to-date packages of all distributions. repology.org/repositories/graphs and updating a package is in most cases just updating the version number and the hash. we even have a bot that does it

  • @AvindraGoolcharan
    @AvindraGoolcharan 3 года назад

    28:12 "killall: command not found"

  • @scottfranco1962
    @scottfranco1962 3 года назад

    You are in the sudoers file was an authorized user.

  • @perseusarkouda
    @perseusarkouda 3 года назад +1

    7:10 sudo and su are two different programs. sudo can be configured to have a passwordless user with an entry like: nixos ALL=(ALL:ALL) ALL. While su tries to access root.

    • @evalyer
      @evalyer 2 года назад

      For any Windows Admins, think as sudo is "run as admin" where SU is "Run as other user" and that user just happens to be admin.

  • @sasilathashajimon
    @sasilathashajimon 2 года назад

    Nixos now has added a GUI installer in their 22.05 releases

  • @myszkaagresorka3506
    @myszkaagresorka3506 3 года назад +3

    5:21 With GRUB bootloader installed to MBR (as you did it later) you don't need set a "boot" flag to partition.

    • @vladigr1
      @vladigr1 3 года назад +1

      Hi can you explain plz, I never understood why

  • @napapuridoktora7717
    @napapuridoktora7717 2 года назад

    DT you have a do video , about to how to install Gentoo linux with Live CD with calamares installer:)

  • @SkyyySi
    @SkyyySi 3 года назад +3

    The reason su needed a password but sudo didn't is because they likely put a line like "%wheel ALL=(ALL) NOPASSWD : ALL" (without quotes) in /etc/sudoers. su is kinda "dumb" and since it is basically like logging in as root, it needs root's password. sudo on the othet hand is much "smarter" and it needs the users password as long as the user (or one of the groups he's in) is specified as not needing a password, it won't ask for one. If you want to run a root shell, you can
    1) Run sudo su. This will run the su command with sudo.
    2) Run sudo -s. This will run the current shell as root in the current directory.
    3) Run sudo -i. Thus will spawn an interactive shell. This will give you root's environment (variables) as well.

    • @TheKrister2
      @TheKrister2 3 года назад

      Question. I'm used to sudo or su requiring the root password, but as far as I've found NixOs asks for the user password instead of the root one. Is there a reason for this? Or can it be changed to require the root password instead? I thought one of the points of doing it that way is that even if you somehow know the user password, you _don't_ have the ability to do anything because root access requires another password.

    • @SkyyySi
      @SkyyySi 3 года назад

      @@TheKrister2 Su needs the root password. Sudo needs the user password. That's the whole point of sudo ;)
      But, perhaps sudo not actually running su. Although I find that extremely unlikely, but perhaps it's either a symlink (which I personally like to test with "ls -lAhskF --color=auto /usr/bin/sudo" (or just /bin/sudo)), or it's an alias.

  • @swartze
    @swartze 3 года назад +1

    "sudo -i" will change the user to root if you're looking to enter a large number of commands as root.
    Also while this is very cool, most linux distros have a way to install to a specific configuration, such as kickstart for redhat.

    • @duzuns
      @duzuns 2 года назад

      I use to run `sudo su` :)

  • @Tn5421Me
    @Tn5421Me 2 года назад

    For a moment I was very confused when you didn't make a 550MB EFI partition.

  • @khaldrogo9451
    @khaldrogo9451 2 года назад

    Wow, i was sleeping on this.

  • @sweep-
    @sweep- 3 года назад +1

    It would be cool if they take their config based installer and make it work as a simple installer for other Linux branches like Arch or Debian.

    • @bew
      @bew 3 года назад +1

      Well, you can use `nix` from arch or debian, to install packages declaratively like this! You just won't have nixos stuff which manages the OS.
      In addition to nix, you can use the home-manager project from arch, debian, macos,.. to manage your dotfiles with Nix :)

    • @davidak_de
      @davidak_de 3 года назад

      Would that not be NixOS again, with the packages from debian or Arch? Maybe a different Wallpaper and Theme.
      I don't see any value in that and might not understand what you mean.

  • @Tattersail
    @Tattersail 8 месяцев назад

    the config file looks like one big magic string made from random distributed knowledge.
    Is there any sort of autocomplete, suggestions or linting available to assist in configuration and/or catch obvious errors?

  • @PearComputingDevices
    @PearComputingDevices 3 года назад +1

    . I wasn't familiar but I've had this idea for years as I believe that system recoveries are a necessary space hog, especially in unstable Windows world. This could at least in theory reduce that recovery space by a lot. At least enough of a system to get you to an upgrade manager. It's pretty neat. Seems to be lighting fast. What would be handy to have is a way to save that script for later builds and you could at least in theory easily port builds from machine to machine. Almost.. but not quite a universal installer. It's certainly a lot more work then say Ubuntu.. but that could be remedied with a little work.

    • @Jorge-xf9gs
      @Jorge-xf9gs 3 года назад

      BTrFS?

    • @davidak_de
      @davidak_de 3 года назад +1

      You can just put your config in git and reuse it on multiple systems.
      Here is my config. for example codeberg.org/davidak/nixos-config/
      When your system is destroyed, you just install NixOS on a new one, apply your config and restore user files from backup. And you have the exact same system as before.

  • @JamieAlban
    @JamieAlban 3 года назад +1

    This is really nice.....

  • @greatsaid5271
    @greatsaid5271 3 года назад +1

    if you didn't know how to logout, just restart display manager

  • @gabriellevesque2185
    @gabriellevesque2185 3 года назад +3

    Using "sudo su" would give you a root shell! :)

    • @de-is
      @de-is 3 года назад

      As well as "sudo -i"

  • @zedrobot5864
    @zedrobot5864 3 года назад

    It 5 am here and That huge white terminal pop up 😭😭😭

  • @AbduleeFtw
    @AbduleeFtw 3 года назад

    Can u check out Anatrix Linux?

  • @talkysassis
    @talkysassis Год назад

    The power to install more than 1 version of the same package alone makes NIX better than 90% of all Linux distros

  • @fuseteam
    @fuseteam 3 года назад

    i was going to say there no way something like discord would be in there but nope it's right there in the repos, even google chrome o.O and steam
    quite fascinating indeed
    that they managed to package proprietary software makes this very very fascinating as those packages install things where they want them to be installed

    • @SoundToxin
      @SoundToxin 3 года назад

      You have to enable nonfree stuff manually to install those. Pretty much the same as other distros like Void or Debian in that regard.

    • @fuseteam
      @fuseteam 3 года назад

      @@SoundToxin sure but considering the install location for the nix package manager it means it installing proprietary software in a custom location, which is very interesting.

  • @znation4434
    @znation4434 3 года назад

    Why not use sudo -i?

  • @censoredterminalautism4073
    @censoredterminalautism4073 3 года назад +1

    They should make links to the default directories unless you specifically say that you don't want that. That way you could have both structures at the same time.

    • @davidak_de
      @davidak_de 3 года назад

      You mean in nixos-generate-config?
      You can also run it after the install to update the hardware-configuration.nix. So it's nice to not have to specify it there.
      But maybe it's more often used in install and we should change that.

    • @censoredterminalautism4073
      @censoredterminalautism4073 3 года назад

      @@davidak_de Something like that. A setting that can be changed so that people can compile things, or use any software that expects dependencies to be in the normal directories. Though thinking about it better, it definitely shouldn't be the default behavior for every program, because that could create conflicts if people have multiple versions of the same program installed, which is one advantage of Nix from what I understand.

  • @NielsGx
    @NielsGx 2 года назад

    interesting distro for sure

  • @ramongonzalezfernandez8904
    @ramongonzalezfernandez8904 2 года назад +1

    Make sure to make a FAT32 boot partition if you're doing UEFI and mount it at /mnt/boot

  • @ZagrajmyTwisteRRtp
    @ZagrajmyTwisteRRtp 3 года назад

    In that su/sudo situation you could just "sudo su" :)

  • @luciengrondin5802
    @luciengrondin5802 Год назад

    7:35 He could have typed 'sudo su'

  • @DarkLotusInc
    @DarkLotusInc 3 года назад

    I've been thinking about trying NixOS for almost a week now but then I saw in their page they don't include Foliate and since you cannot compile and install custom apps it kind of kill my enthusiasm. I didn't know that till i watched this video... eis ç'est la vie. Good video btw

    • @davidak_de
      @davidak_de 3 года назад +1

      I see Foliate has Flatpak and Snap available. NixOS supports both.
      When you look on GitHub, you see that there was an attempt to package it. There is now a package in NUR (similar to AUR, for Nix).
      github.com/NixOS/nixpkgs/pull/64536
      You can compile and install custom programs, but you have to create a proper Nix package. The good thing is, at that point, you can also contribute it to nixpkgs for others to use. When you know how to compile programs manually, you should be able to learn how to do it on NixOS.

    • @DarkLotusInc
      @DarkLotusInc 3 года назад

      @@davidak_de Thanks man, I really appreciate your feedback.

  • @robinkaku
    @robinkaku 3 года назад

    7:25 you can just sudo su -

  • @neokovacs187
    @neokovacs187 3 года назад

    Why do you use MBR? Is there any advantage/disadvantage with using either MBR or UEFI?

    • @davidak_de
      @davidak_de 3 года назад

      I think in a VM it makes no difference. MBR is just the default.
      UEFI is more modern and might be faster on haldware?

  • @BrenoSilveira94
    @BrenoSilveira94 3 года назад

    Xfe > pcmanfm
    OpenRC && Runit > SystemD
    Gentoo && OpenBSD > All
    Portage > Pkg > Ports > Pacman > Nix > xbps > Slackware User > Git > ... > Apt
    Great video mate, complements from Brazil.

    • @masterchief1520
      @masterchief1520 3 года назад +1

      Thanks for the opinion. Really made my day

    • @BrenoSilveira94
      @BrenoSilveira94 3 года назад

      @@masterchief1520 You are very welcome, Sir.

  • @jasonlindsay5031
    @jasonlindsay5031 Год назад

    If you have sudo privileges on a system with no root password, you can use 'sudo -i' to get a root prompt rather than typing sudo before every command.

  • @ramongonzalezfernandez8904
    @ramongonzalezfernandez8904 2 года назад

    7:20 You can just `sudo su`

  • @jamesm5192
    @jamesm5192 3 года назад +1

    Can you review Darch which brings the same reproducibility to OSs like Arch?

  • @logangraham2956
    @logangraham2956 3 года назад +3

    if you do
    sudo su
    it should work for those times where you don't know the password but can still run sudo without the password.

  • @re.liable
    @re.liable 2 года назад

    "reproducible distribution" kind of reminds me of Docker images/containers

  • @tainjulio6206
    @tainjulio6206 3 года назад +4

    FYI: Guix and NixOS doesn't share the same philosophy or design, instead Guix uses Nix inside and put Scheme API on top of it , so Guix is a derive implementation of NixOS but with Schema and Linux-libre
    Edit: A few corrections:
    1) There is utilities like buildFHSUserEnv to allow normal linux user directory mapping via linux user namespace , (though normally you would just do a bare nix derivation for make/make install based tools)
    2) For prebuild binaries, there is also utilities like autoPatchelfHook, which uses patchelf(created by the nix team themself), that would allow auto wiring(no requirement of manually rediting the elf binary) of nix deps to the binary itself, that is the common appraoch for prebuild binary
    2.1) There is also utilities like appimageTools which allow usage of appImage(which is also a type of prebuild binary)

    • @SoundToxin
      @SoundToxin 3 года назад

      AFAIK there's basically no code in common between Guix and Nix at this time. It's unfair to call it a derivative. There are also efforts unique to Guix like what they've been doing with their bootstrap seed.

    • @tainjulio6206
      @tainjulio6206 3 года назад

      @@SoundToxin you might want to take a read AUTHORS and nix/AUTHORS in the guix repo then
      also I specifically said as in Guix is nix system(deployment model, daemon code, etc) with schema instead, since the video described Guix as inspired by Nix, which no, inspired mean similar ideology or approach, not so much when it does reuse portion of code and even interact with nix daemon in some manner (nix/nix-daemon/nix-daemon.cc)

  • @bermudi
    @bermudi 2 года назад

    uhm... `sudo su`
    exact same way you root in debian if you don't enter root password

  • @nixonx7
    @nixonx7 3 года назад

    what kernel version does it ship with?

    • @06kellyjac
      @06kellyjac 3 года назад +1

      By default it's currently an older one but you can swap it for a newer one. On nixos-unstable using the latest kernel in nixpkgs im on something like 5.9.14. If you want to know for sure I can check later & post the config changes youd need, is only like 1 line

    • @nixonx7
      @nixonx7 3 года назад

      @@06kellyjac thanks, i'd appreciate that

    • @SarahBrofeldt
      @SarahBrofeldt 3 года назад +1

      The default for any stable release of NixOS is the latest LTS kernel, currently 5.4.x for NixOS 20.09. You can pick a different branch using the `boot.kernelPackages` option (search.nixos.org/options?channel=20.09&show=boot.kernelPackages&from=0&size=30&sort=relevance&query=kernelPackages).

    • @06kellyjac
      @06kellyjac 3 года назад

      ^ what Sarah posted is on point
      Here's some more detail
      nixos.wiki/wiki/Linux_kernel
      you've also got options for hardened or libre kernels, or you could pick a really old one if you wanted to for some reason. Very easy
      (IIRC I was actually on 5.9.1 the other day)

    • @06kellyjac
      @06kellyjac 3 года назад +1

      Yeah so nixos's latest is 5.9.1: search.nixos.org/packages?channel=unstable&from=0&size=30&sort=relevance&query=linuxPackages_latest-libre.kernel
      (For some reason `linuxPackages_latest.kernel` isnt showing up on search but the -libre one is the same version)
      Thats only slightly behind arch on 5.9.2: www.archlinux.org/packages/core/x86_64/linux/