It’s not about the destination, it’s about the journey.
…to get a working config, you need to learn a whole new programming language and figure out the tweaks for each package you want to install, so I’d argue the journey is just as long
NixOS sounds like a way to avoid learning Linux by learning an abstraction.
Systemd sounds like a way to avoid learning Linux by learning an abstraction.
You keep my init system (and resolver, and timekeeper, and task scheduler, and container manager, and …) out your f**king mouth!
Like everything with Nix, you pay a little more upfront to get a great experience later.
That’s why you go for GNU Guix instead, since it’s the same kind of concept but configured using the Guile Scheme you already know.
(You do already know Scheme, right?)
It comes with a working config.
Adding applications and rebuilding is generally trivial.
The problem becomes if you want to use flakes or home manager, which you probably should. The config for those is complicated and poorly documented.
I don’t know the programming language. I’ve been running it for about a month now. If you’re not doing anything complicated or doing any crazy conditionals or running one config for 27 boxes it’s no different than editing a yaml.
It took me about 2 days to get Nvidia working properly with offloading that was my hardest task so far.
Well, I “did it” for an evening once, it was fun. The next day it got annoying REAL fast. But I do keep the config around, so I guess I can just go back to it eventually to keep doing it.
I had no experience in nixOS, just went to the package website, it tells you exactly what to add to each section of the config.
Well not everything is packaged and when they aren’t it Can get more complicated to install since nixos doesn’t use the default file system layout. Another thing is that certain programs have assumptions about being able to do certain things like changing their own config files that don’t work well with the nixos way of doing things. (Looking at you fish(it works but you can’t manage your configuration for it(pretty sure?)with nix))
I haven’t tried that one but besides the package page there is the options pages that gives you the ability to define config info.
not to mention how many things they want to go through their system. getting vim set up “their way” while also trying to install python3 support, vimtex, and plug-vim was almost impossible. not to mention finding a way to store the vim configs separately from the rest of nixos. (i use vim on multiple operating systems so switching everything to the nixos wasn’t a viable option.)
maybe there was a better way to do it that i didn’t know about, but boy did i try to find it.
you can just include dotfiles and the like in a nix config, while it’s not the recommended way it usually works
in my experience installing support for most things is way easier on nix, as long as they’re already packaged well. I’m still scared of the eventual time when I’ll have to create my own package for the nix store to install from source
i think i would’ve probably had to package the specific kind of vim that i needed, because i wanted neovim and a gui too or something. this was also like 3-4 years ago so its possible the documentation for this kind of stuff has considerably improved since i tried, or that there are now packages that make this sort of thing easier. and it’s definitely possible everything existed at the time and i just couldn’t figure it out.
but i ended up with a similar feeling to the one you described: stuff is easy when you do it their way, using their tools; but things are very hard to do if you deviate from the path.
i know this is just sort of an inevitable part of the design paradigm they use, and that everything probably works very nicely if you learn their language and the various ins and outs of the operating system, but i just wasn’t willing to commit that much to it.
You still need to figure out the tweaks on other systems. Unless you want the Nvidia machine learning to complain that your C compiler is the wrong version and exit. Or maybe you’d prefer to deal with a package calling ps
and parsing its output (?!) but you have ps
that’s a different version so the output doesn’t parse the same
I mean, when have we ever had a system that is working without any tweaks? Once you install third party packages, there’s so many things that can go wrong
nix being 20 years old and still lacking decent documentation on the language it’s what hurts me the most, because the people who do know it works so some amazing things with it
Imagine if NixOS had as good a wiki as Arch. Personally, I wouldn’t bother with another distribution again.
They released their wiki apparently on April 1st.
So now we need just to fill it with the missing content. (which there is a lot). And it will be as good as the arch one… In 20 years.
Or smb made a bad April’s fool and actually their wiki is older.
The NixOS wiki’s been around for a few years at least, it just doesn’t get as much traffic from search engines since NixOS isn’t super popular.
nix is 20 years old?!? I thought it was relatively new like maybe 10 years old
The problem is that it’s all spread out, they do actually have really good documentation for the language, it’s just not easy to find. AND SPREAD OUT!
How often do you reinstall your OS? In practice never, I installed Arch around 8 years ago on one computer and that’s the install I have today still. I copied it twice to a bigger SSD but that’s kind of it.
There is a certain thrill when you nuke your disk to install a distro you never tried before. I actually just nuke one of my laptop last night to try void linux.
I was wondering if Void was still popular. It was kind of feeling like NixOS took all its hype
Every few months or so? There is always that one distro that sounds cool and maybe it’s better than what you are using atm. Yeah, sure. It’s mostly a waste of time and I keep coming back to Arch after a few days, but without this drive I would not have ever tried Arch in the first place. So because of this I found my favorite distro, but I can also never be 100% sure it’s the best distro. Pros and cons, I guess.
I didn’t reinstall my OS because I wanted to. Ubuntu messed up the upgrade from 20 LTS to 22 LTS. There was some message in the console, but an hour later I forgot about it and shut off the computer without checking the message again
When it came back it was a terminal and I had no working WiFi. I googled how to do WiFi on Ubuntu from the terminal, but the answers all told me about the previous WiFi on Ubuntu and I didn’t even have that daemon
Eventually I wiped the drive and installed NixOS because it backs up your previous configs. When an upgrade fails you just undo and go to the previous working version.
Main machine was last installed with Ubuntu 14.04 LTS. Running 22.04 now. Gonna celebrate a tin anniversary this year! 🎊
Or, they could learn Ansible and get 80% of the way, and be able to reproduce the result on more than one OS. 🥹
Nix is not something exclusive to NixOS, and people are already using it to make reproducible configs that work on more than one OS.
I’m even using Ansible in what I’m currently building with Nix, because it does one thing well that I need to do: distribute files and run commands on a lot of hosts at once.
That is, until a new Ansible version breaks playbooks again, or an OS is updated in a way that messes with you playbooks, or a package is removed from the playbook but not the installed system…
Ansible is good for ephemeral containers or VMs, but any more permanent system will eventually deviate from the set configuration.
I might just be basic but the only annoying part of reinstalling for me is setting up my browser again.
I’ve used Firefox for over a decade but still wouldn’t trust them to keep all my account info on their servers, Especially not nowadays.
I already started using KeypassXC to locally store my passwords, just importing bookmarks and add-ons I’ve left to do.
I use file syncing (Syncthing) and symlinks to keep configs for some apps synced between devices. I don’t for Firefox, but it might work.
Try this, friend
Tap for spoiler
{ config, pkgs, ... }:
let
lock-false = {
Value = false;
Status = "locked";
};
lock-true = {
Value = true;
Status = "locked";
};
in
{
/*
** ffextid
** Usage: `ffextid [install_url]`
** Description: simple script to find the extension id from an extension's manifest
** using the url found by right clicking the install add-on button and
** selecting "copy link"
*/
home.packages = with pkgs; [
(pkgs.writeShellScriptBin "ffextid" ''
#!/usr/bin/env bash
$(curl $1 > /tmp/ffext.xpi) 1> /dev/null
$(unzip /tmp/ffext.xpi -d /tmp/ffext) 1> /dev/null
# If ripgrep exists, use that. Otherwise default to grep
if ! command -v rg &> /dev/null;
then
rg id /tmp/ffext/manifest.json
else
grep id /tmp/ffext/manifest.json
fi
rm -rf /tmp/ffext*
'')
];
programs = {
firefox = {
enable = true;
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
extraPolicies = {
DisableTelemetry = true;
# add policies here...
/* ---- EXTENSIONS ---- */
ExtensionSettings = {
"*".installation_mode = "blocked"; # blocks all addons except the ones specified below
/*
Format:
"[Manifest id]" = {
installation_mode = "force_installed" # will install the extension for you!
install_url = "[url]" # found by right clicking the install button on the add-on page
};
*/
# uBlock Origin:
"uBlock0@raymondhill.net" = {
installation_mode = "force_installed";
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
};
# Privacy Badger:
"jid1-MnnxcxisBPnSXQ@jetpack" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/privacy-badger17/latest.xpi";
installation_mode = "force_installed";
};
# Bitwarden
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
installation_mode = "force_installed";
install_url = "https://addons.mozilla.org/firefox/downloads/file/4225453/bitwarden_password_manager-2024.1.1.xpi";
};
# XBrowserSync
"{019b606a-6f61-4d01-af2a-cea528f606da}" = {
installation_mode = "force_installed";
install_url = "https://addons.mozilla.org/firefox/downloads/file/3546070/xbs-1.5.2.xpi";
};
# Decentraleyes
"{jid1-BoFifL9Vbdl2zQ@jetpack}" = {
installation_mode = "force_installed";
install_url = "https://addons.mozilla.org/firefox/downloads/file/4158232/decentraleyes-2.0.18.xpi";
};
# Clear URLs
"{74145f27-f039-47ce-a470-a662b129930a}" = {
installation_mode = "force_installed";
install_url = "https://addons.mozilla.org/firefox/downloads/file/4064884/clearurls-1.26.1.xpi";
};
#Dark Reader
"addon@darkreader.org" = {
installation_mode = "force_installed";
install_url = "https://addons.mozilla.org/firefox/downloads/file/4223104/darkreader-4.9.76.xpi";
};
# Cookie AutoDelete
"CookieAutoDelete@kennydo.com" = {
installation_mode = "force_installed";
install_url = "https://addons.mozilla.org/firefox/downloads/file/4040738/cookie_autodelete-3.8.2.xpi";
};
# I don't care about cookies
"jid1-KKzOGWgsW3Ao4Q@jetpack" = {
installation_mode = "force_installed";
install_url = "https://addons.mozilla.org/firefox/downloads/file/4202634/i_dont_care_about_cookies-3.5.0.xpi";
};
# Youtube Sponsor Block
"sponsorBlocker@ajay.app" = {
installation_mode = "force_installed";
install_url = "https://addons.mozilla.org/firefox/downloads/file/4229442/sponsorblock-5.5.4.xpi";
};
# add extensions here...
/*
"" = {
installation_mode = "force_installed";
install_url = "";
};
*/
};
/* ---- PREFERENCES ---- */
# Set preferences shared by all profiles.
Preferences = {
"browser.contentblocking.category" = { Value = "strict"; Status = "locked"; };
### BOOLEANS
"extensions.pocket.enabled" = lock-false;
"extensions.screenshots.disabled" = lock-true;
"privacy.donottrack.heater.enable" = lock-true;
"browser.compactmode.show" = lock-true;
# add global preferences here...
};
};
};
/* ---- PROFILES ---- */
# Switch profiles via about:profiles page.
# For options that are available in Home-Manager see
# https://nix-community.github.io/home-manager/options.html#opt-programs.firefox.profiles
profiles ={
sunstoned = { # choose a profile name; directory is /home/<user>/.mozilla/firefox/profile_0
id = 0; # 0 is the default profile; see also option "isDefault"
name = "sunstoned"; # name as listed in about:profiles
isDefault = true; # can be omitted; true if profile ID is 0
settings = { # specify profile-specific preferences here; check about:config for options
"browser.newtabpage.activity-stream.feeds.section.highlights" = false;
"browser.startup.homepage" = "https://nixos.org";
"browser.newtabpage.pinned" = [{
title = "NixOS";
url = "https://nixos.org";
}];
# add preferences for profile_0 here...
};
};
# add profiles here...
};
};
};
}