thefossguy / nixos-needsreboot Goto Github PK
View Code? Open in Web Editor NEWDetermine if you need to reboot your NixOS machine
Determine if you need to reboot your NixOS machine
I finally came around to using this project, thanks for sharing it.
If i see it correctly, you always use /nix/var/nix/profiles/system
as the new system path. Won't this give wrong results if we were to use it during dry-activate (comparing the current system instead of the dry-activated one)? Others and myself try to use it this way.
I propose to use a cmdline argument as "new" path, if provided. Then the activation script can provide it with $systemConfig
(example). The old path always has to be /run/booted-system
for obvious reasons.
Hi!
I'm using your program in my nixos config.
I get a hash mismatch when I tried to build it:
error: hash mismatch in fixed-output derivation '/nix/store/mclbqnc6spncgpxcjk54lizns2h3s5pk-nixos-needsreboot-0.1.4-vendor.tar.gz.drv':
specified: sha256-jW2ul5dXWPQpdIL39yIYVNP7D65NAFZ8q40Zy6tYMj8=
got: sha256-Q6a0MGv7IWdwQvu83HxRYVzBvJRUcIl3rIXng7vRGmI=
error: 1 dependencies of derivation '/nix/store/xksbxccj4bpxc65s311cq4s4mmrjrmqf-nixos-needsreboot-0.1.4.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8qdxrsikr04zwnmcg3bzgq06ck2q64vc-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/2jpkya2cbv6vb5hrcnrxq8gvmbvpjjk5-nixos-system-Gulo-Laptop-23.11.20240411.51651a5.drv' failed to build
Then I took a look at the flake.nix and noticed that you forgot to bump the version after the releases. Might be good to check the rust lock files too, but I don't know how those work.
There's a typo, causing the binary to be called nixos-reedsreboot
rather than nixos-needsreboot
Line 2 in eec6546
Your code currently unconditionally tries to get the USER
environment variable which results in a program abort. That happens if you nixos-rebuild --target-machine [somewhere]
.
Full log:
thread 'main' panicked at src/main.rs:18:10:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.