-
Notifications
You must be signed in to change notification settings - Fork 3
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
Don't hardcode PATH #7
Conversation
systemd # Provides loginctl, systemctl; loginctl required to run desktop | ||
xdg-utils # Provides xdg-open, required to open browser from notifications and menu bar app | ||
] | ||
++ optional (builtins.elem apt config.environment.systemPackages) apt |
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.e.: "if apt
is in system packages
, then append it to the path
list".
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.
To understand Nix syntax, this is the best/quickest overview I've found
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'm hoping we can autogen this from allowedcmd
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.
Yes, I am hoping we can do that eventually too. It's a bit of a pain to track down what nix package provides which commands, though, so it wasn't simple to do here.
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'm imagining we'll need to record those in allowdcmd
We don't want to rely on the static paths like
/run/current-system/sw/bin
because its contents will change if the user reinstalls anything. Instead, set the systemd service path to include all dependencies from allowedcmd. If we don't require the dependency, mark it as optional depending on install status, so that we don't e.g. install zerotier when it's not already there and in use.