-
-
Notifications
You must be signed in to change notification settings - Fork 12.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
Add option to notify users about channel updates #126987
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is missing an entry in https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/module-list.nix
path = with pkgs; [ coreutils curl gnused ]; | ||
|
||
script = '' | ||
current=$(cat /nix/var/nix/profiles/system/nixos-version | sed 's/.*\.\([0-9a-f]*\)$/\1/') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also why are we not using bash?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file in the nixstore seems to have automatically placed a shebang for bash at the top of the script. Should I explicitly add the shebang and add bash to the path?
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
description = '' | ||
Whether to notify the user when there are NixOS updates available. | ||
If enabled, the user service is made available and can be manually | ||
enabled to activated with a user timer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence doesn't feel right, but I'm not a native English speaker.
channel = mkOption { | ||
type = types.str; | ||
example = "https://nixos.org/channels/nixos-unstable"; | ||
description = '' | ||
The URI of the NixOS channel to use for checking updates. | ||
''; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider also adding a flake
option, to check for flake updates.
I marked this as stale due to inactivity. → More info |
Motivation for this change
Currently, updating the system requires manually checking the nixos version, found at
/nix/var/nix/profiles/system/nixos-version
, against the channel at /git-revision. This pull request would add an option for a systemd timer which would notify users when their current system version is not the same as the channel.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)