Git Product home page Git Product logo

nixos-needsreboot's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

srounce korfuri

nixos-needsreboot's Issues

Support dry activation

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.

Bump version in flake

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.

Panic if no `USER` variable is set

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.