-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
newbie help/documentation: what to do when switching to the unstable channel in nixos? #35411
Comments
Ad 5: You can actually use use the channel declaratively inside let
unstable =
let
cloned = pkgs.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs-channels";
rev = "5402412b97247bcc0d2b693e159d55d114d1327b";
sha256 = "03qx3iqj58ciwhh8yj44x05558yssiyrzk6ks9cr9807b72v4srp";
};
in import cloned { };
in {
environment.systemPackages = [
unstable.firefox
];
} |
Okay, so there is no way around using nix-channel (except the rebuild-twice solution you mention) except a local git repo, which honestly sounds reasonable to me. Can that option be added to the guide to be more clear? Thanks for the clarification on Regardless, can that information be placed more front-and-center in upgrading? Thanks a ton! |
Well, you can also set the
Then you would call
It is in
I do not see
|
👍 I like that because it also documents the discover-ability of configuration options. |
Hmm, it looks like it already does: nixpkgs/nixos/modules/installer/tools/nixos-generate-config.pl Lines 555 to 556 in 7d37688
|
Maybe refer to |
Wiki actually has a nice example How to fetch Nixpkgs with an empty NIX_PATH |
Have you check pure evaluation mode? |
This is mostly a bit of newbie confusion, hopefully this report can be used to improve the guides as well.
The NixOS manual for upgrading states that you should use
nix-channel --add {channel} nixos
followed bynixos-rebuild switch --upgrade
, which works great. It later states in the next sub-section that you should usesystem.autoUpgrade.channel = {channel};
andsystem.autoUpgrade.enable = true;
Here are my problems:
configuration.nix
. It is not obvious how to do this if I don't wantautoUpgrade
(see below).unstable
but not useautoUpgrade
. How do I do so? Do I setsystem.stateVersion = "unstable"
? Can I specify a "specific date" forunstable
?nix-channel --add
did not change mysystem.stateVersion
. Even worse, that statement has warnings in the automatically generatedconfiguration.nix
telling you not to change it until you are told to do so... but I was never told to do so. When/how should I change it for this case?autoUpgrade = true
should I deletesystem.stateVersion
when I useautoUpgrade
? What should be done? it is not clear how these configs interact.nix-channel --add
at all if possible and set the channels inconfiguration.nix
.Thanks!
The text was updated successfully, but these errors were encountered: