You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
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
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
Checklist
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: