I’m a long-time Linux user, and a first-time nixos user. (nixos-unstable, flakes enabled, multi-user but only 1 user for now, and no home-manager just yet)
I’m just exploring how the system works, and I’m confused by what I’m finding regarding profiles|environments. I have not knowingly created any profiles of any type. Here are some things that had me scratching my head. Any clarification would be fantastic.
-
When I look at my ~/.local/state/nix directory, it has a “channels” link to <nix store>/*-user-environment. The only file is manifest.nix which only contains: [ ] Even the name, “channels”, sort of surprised me. What creates the file? What is it for? Should it be empty?
-
When I look at /nix/var/nix/profiles/default it points to ./per-user/root/profile . That file/link doesn’t exist. Instead there are 8 to 10 links called “channels-##-link” that point to <nix store>/*-user-environment directories. I am guessing that this profile|channel is what is used in case the user’s is empty like mine, but the link is broken in this case. I don’t know what it should look like or if this is important.
-
I have only recently created a simple flake.nix. My understanding is that using flakes is an alternative to using channels. Yet, that name keeps coming up, and it appears that I need to run
nix-channels --update
in order to get new package versions. How are the channels and flake configuration connected?
Best regards!