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

Add 'nix app' command #2909

Merged
merged 2 commits into from Jun 3, 2019
Merged

Add 'nix app' command #2909

merged 2 commits into from Jun 3, 2019

Conversation

edolstra
Copy link
Member

This is like nix run, except that the command to execute is defined in a flake output, e.g.

  defaultApp = {
    type = "app";
    program = "${packages.blender_2_80}/bin/blender";
  };

Thus you can do

  $ nix app blender-bin

to start Blender from the blender-bin flake.

In the future, we can extend this with sandboxing. (For example we would want to be able to specify that Blender should not have network access by default and should only have access to certain paths in the user's home directory.)

This is like 'nix run', except that the command to execute is defined
in a flake output, e.g.

  defaultApp = {
    type = "app";
    program = "${packages.blender_2_80}/bin/blender";
  };

Thus you can do

  $ nix app blender-bin

to start Blender from the 'blender-bin' flake.

In the future, we can extend this with sandboxing. (For example we
would want to be able to specify that Blender should not have network
access by default and should only have access to certain paths in the
user's home directory.)
@edolstra edolstra changed the base branch from subdir to flakes June 3, 2019 07:34
@edolstra edolstra merged commit 507c150 into flakes Jun 3, 2019
@edolstra edolstra deleted the flake-apps branch June 6, 2019 10:28
@JohnAZoidberg
Copy link
Member

No manual/doc update? Can this be used without flakes?

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/sandboxing-all-programs-by-default/7792/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants