I recommend that you move the "fileSystems" options to "/etc/nixos/hardware-configuration.nix" to separate a reproducible configuration from the hardware currently in use. Then, instead of referencing "/run/current-system/sw/bin/bash" just use "/usr/bin/env bash" and it works like a charm.
Kind of wish there was a NixOS symlinking module that you could define symlinks in your config like you can for environment variables. Then you could just symlink a "/bin/bash" so you don't have to change all your scripts.
I like the idea of being able to grab a program on the fly without permanently installing it. I’ve had moments where I tested multiple tools and once I settled on one felt like I had needlessly bloated my OS. Yes I know I can do ‘apt purge’ and equivalents but I don’t trust that to be completely effective and moreover it doesn’t always torch dependencies and so on, so just an isolated area to play seems like a nice idea.
All the shell scripts need to be changed to have `/usr/bin/env bash` instead of `/bin/bash`. That's how people do it in Guix as well. Also if you wanna change anything about the system you don't edit any files manually you do it via the configuration.nix file and all the hardware related configs like including file-system goes in hardware-configuration.nix file in /etc/nixos. Also to avoid rebuilding system configuration all the time, the idea in both Guix in Nix is to only include important package in system config and all the rest in home config. File system hierarchy is different in both Guix in Nix and will take time to fully wrap your head around it, you just have to understand the mindset behind it.
Would love to see him do a Guix install. As for the bash scripting I'm kind of curious how involved it would be to make dash the one to execute scripts. Maybe there's already a module to help with that. Since the system already has so many symlinks I wish there was a more dedicated symlink manager tool that would let you make a "/bin/bash" symlink if you wanted to. I'm sure you could do it manually with some of the available tooling but I'm sure there's a better way to do it.
I use VirtManager. It was super easy to setup. I gave it its own configuration file to include to make it a little more transportable. I am virtualizing Windows 11 quite nicely in it.
With nixos, you can easily switch from GNOME and KDE to DWM via the config And you can be 100% sure that all the bloat is removed via garbage collection afterward
he also didn't use the services that grab the packages and dependencies for you. haven't watched the whole thing yet but i hope he finds out for his own sake lol.
Complete noob here So you can install kde and then modify the nix conf file and change it to remove kde and install gnome let's say? Wow, that's awesome
@@AileonMyrael I have a list of configs for a bunch of DEs/WMs. I comment and uncomment as desired to have them installed when I want. The configs are typically one or two lines like services.xserver.desktopManager.plasma5.enable = true; If I comment that out, KDE will uninstall next time running nixos-rebuild.
@@AileonMyrael Just keep in mind that your home folder is still messy. Switching from KDE to Gnome would still be a problem since KDE modifies a lot of Gnome settings. You would need to manually revert those changes by deleting stuff.
that's a great video. the drama that just based on action & reaction(like making things break a little bet then reaction n to fix is teaching me a lot configuring the distro (if it was unintentional it's very good and i suggest you make IT educational videos based on this methodology (getting your hands dirty and put your self in the newbie shoes because I'm now at the 45 minute and didn't get bored. the drama is perfect
One small clarification - when trying to build dwm initially using make, it wasn't a dependency issue, you didn't have a compiler installed (cc: No such file or directory). Not a nixos user, so not sure if installing clang would even work, although I can say, it's not the "right" way to do it in NixOS. Better to go at it similar to how portage can apply patches before building.
In the finding packages section Titus talks a lot about dependencies, but my understanding is Nix does not do dependencies. The QEMU package is not going interact with the Vert-manager package. Presumably, any dependencies DWM installs will similarly be sandboxed in with the DWM that is installed and will be inaccessible to any custom DWM you build????
The main reason for swap partitions instead of swap files is that there's known linux kernel errors with swap files on hibernation set ups. You will need to use swap partitions to avoid those with a hibernation set up.
You go over adding packages, but how about removing them, specifically ones included in larger packages. Like removing Geary from the Cinnamon GUI install?
shebang references to bash (or any other shell script) should use the standard `/usr/bin/env bash` abstraction or else you'll run into issues. I did notice that the `env` symbolic link is in place so it should just work if you use this.
in fact, you can change fstab and stuff in /etc !!! nix supposed to makes things easier if you want to change stuff just change it, just remember to translate it to conf/flakes files later on
Hay look: Debian 12 "bookworm" released June 10th, 2023 After 1 year, 9 months, and 28 days of development, the Debian project is proud to present its new stable version 12 (code name "bookworm"). "bookworm" will be supported for the next 5 years thanks to the combined work of the Debian Security team and the Debian Long Term Support team. Following the 2022 General Resolution about non-free firmware, we have introduced a new archive area making it possible to separate non-free firmware from the other non-free packages: non-free-firmware Most non-free firmware packages have been moved from non-free to non-free-firmware. This separation makes it possible to build a variety of official installation images. Debian 12 "bookworm" ships with several desktop environments, such as: Gnome 43, KDE Plasma 5.27, LXDE 11, LXQt 1.2.0, MATE 1.26, Xfce 4.18 This release contains over 11,089 new packages for a total count of 64,419 packages, while over 6,296 packages have been removed as "obsolete". 43,254 packages were updated in this release. The overall disk usage for "bookworm" is 365,016,420 kB (365 GB), and is made up of 1,341,564,204 lines of code.[copy]
at 1:46:00, who puts a shebang in their .bashrc? It's only run by bash when bash starts and isn't intended to be run interactively. However, the nix shebang is `#!/usr/bin/env bash`
NixOS: "Everything is configured in your configuration.nix file." Chris: Why can't I change this? NixOS: "Everything is configured in your configuration.nix file." Chris: Huh... why doesn't this work? NixOS: "Everything is configured in your configuration.nix file." Chris: I don't get it, that should've done that.... NixOS: "Everything is configured in your configuration.nix file." Chris: OH! Everything is configured in your configuration.nix file! NixOS: .........
For the bash Problem are multiple ways to solve it, you can change every script to use #!/usr/env/bin/bash (I hope it is the correct path). I‘ve created a symlink to /bin/bash, that points to /run/current-system/sw/bin/bash, So I didn‘t need to change every Script
You learn things faster if you do them yourself, and that's the type of thing you want on a operating system like NixOS, which has an extremely steep learning curve. Also, it's more fun to do things manually
Debian's minimal installer is so much easier. What's wrong with them forcing you to do the parting stuff on your own. I'd like to try NixOS with a LUKS encrypted LVM volume partition, but I don't like the fact that I have to go through this mess again.
I would have thought the nix approach for dwm would be settings that describe what you want, then it fetches the source and does the build accordingly. (Maybe that's what you end up doing, I'm not that far into the video yet)
1. You're ignoring errors in your build output like the syntax error in your .profile. 2. You waste an awful lot of time experimenting rather than going directly to the documentation. 3. You then compound your problems by trying to guess your way out of the messes that you find yourself in. 4. You think tinkering around in the dark and breaking things is faster than reading documentation and watching a few videos before you start. 5 You think that things you built in other distros is good enough to get you where you want to go with Nix. 6 You have an overly developed perspective of your own skill sets. 🤣 7 You waste the viewer's time making them watch you try to guess your way through virtually everything you do. 🤦
Idk I'm enjoying watching him fool around that's part of the appeal of Linux and command line, sure he could have more thoroughly read the documentation or watched a video or even used the graphical installer and then just removed the desktop environments if he wanted to but he's getting there his own way
You're a great example of the kind of person that would scare any newb from even dipping their toe into the Linux world. It's not a tutorial, it's just a livestream
Realistically.... Nix is getting Way Way more attention than its worthy of. Most.... The great majority of Linux users - install on one or two computers. Therefore - reproducible - is completely overkill. Unnecessary. The only way NixOS - is useful for me - is IF I install it and completely leave it alone. .
had the same problem with scripts. so i remove #!/usr/bin/bash using sed. using a find and exec sed '/ffasjfafa/d' {} +. in two minutes the problem went away
this kind of system will never work on newer hardware, way too old on the kernel. Arch is too new and caused stability issues across the board. Ubuntu had minor issues. Fedora just worked.