Skip to content
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

invoking nix build from an interactive shell should inhibit sleep #12469

Open
2 tasks done
mschwaig opened this issue Feb 13, 2025 · 0 comments
Open
2 tasks done

invoking nix build from an interactive shell should inhibit sleep #12469

mschwaig opened this issue Feb 13, 2025 · 0 comments
Labels
cli The old and/or new command line interface feature Feature request or proposal UX The way in which users interact with Nix. Higher level than UI.

Comments

@mschwaig
Copy link
Member

mschwaig commented Feb 13, 2025

Is your feature request related to a problem?

I'm running NixOS with KDE on my development machines, which by default is configured to go to to sleep after some idle time.
The problem is that invoking some long-running nix commands like nix build does not prevent the machine from going to sleep, so for longer running operations like builds and downloads, it will do part of it and then go to sleep forcing me to manually turn off the sleep on idle feature in less targeted ways.

Proposed solution

Invoking Nix to build something on an interactive terminal should invoke some API like the systemd-inhibit command, to mark the start and end of such long running applications.

Alternative solutions

I think the proposed behavior is always more desirable and should happen by default, but

  • If people find some use case where this is unwanted we could make it configurable instead.
  • If we do nothing users will still be able to configure the nix binary on their system to behave like this with other tools somehow - but to me that looks really tedious.

Checklist


Add 👍 to issues you find important.

@mschwaig mschwaig added the feature Feature request or proposal label Feb 13, 2025
@roberth roberth changed the title invoking nix bulid from an interactive shell should inhibit sleep invoking nix build from an interactive shell should inhibit sleep Feb 20, 2025
@roberth roberth added UX The way in which users interact with Nix. Higher level than UI. cli The old and/or new command line interface labels Feb 20, 2025
@roberth roberth added this to Nix team Feb 20, 2025
@github-project-automation github-project-automation bot moved this to To triage in Nix team Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli The old and/or new command line interface feature Feature request or proposal UX The way in which users interact with Nix. Higher level than UI.
Projects
Status: To triage
Development

No branches or pull requests

2 participants