33 ms·
> nix run nixpkgs#cowsay > This is a game-changer, you don’t have to pollute your system to run a one-off command, or you can try a package out before committi
by frankjr 3y ago
> nix run nixpkgs#cowsay
> This is a game-changer, you don’t have to pollute your system to run a one-off command, or you can try a package out before committing to installing it.
Is there a way to run the command isolated from the rest of the system? Because while this is nice it will still leave behind whatever configuration files / caches the program created on start up.
- sigmonsays 3y agoyou can run nix in a container It's tricky because said program probably needs to access the original $HOME
- dlyons 3y agoNot on macOS, but if you want run NixOS in a VM or on bare metal you can use nix-impermanence. Recreates your system/state from scratch on each reboot. https://nixos.wiki/wiki/Impermanence https://nixos.wiki/wiki/Impermanence
- n8henrie 3y agoNothing nix specific but you may be interested in https://github.com/containers/bubblewrap https://github.com/containers/bubblewrap
- frankjr 3y agoYeah I'm familiar, I was hoping for something more integrated, it seems like it would be a pretty good fit.