Cheatsheet: Difference between revisions
→Working with the nix store: Add section |
Replace nixos with NixOS |
||
Line 61: | Line 61: | ||
</syntaxHighlight> | </syntaxHighlight> | ||
=== Build | === Build NixOS from nixpkgs repo === | ||
The following snippet will build the system from a git checkout: | The following snippet will build the system from a git checkout: | ||
Line 69: | Line 69: | ||
</syntaxHighlight> | </syntaxHighlight> | ||
This method can be used when testing | This method can be used when testing NixOS services for a pull request to nixpkgs. | ||
Building | Building NixOS from a git is an alternative to using nix channels and set up permanent following this [https://web.archive.org/web/20160327190212/http://anderspapitto.com/posts/2015-11-01-nixos-with-local-nixpkgs-checkout.html blog article]. | ||
It has a couple of advantages over nixpkgs as it allows back-porting of packages/changes to stable versions | It has a couple of advantages over nixpkgs as it allows back-porting of packages/changes to stable versions | ||
as well as applying customization. | as well as applying customization. | ||
Line 142: | Line 142: | ||
where <code>-I nixpkgs=/path/to/nixpkgs</code> is optionally depending whether the vm should be build from git checkout or a channel. | where <code>-I nixpkgs=/path/to/nixpkgs</code> is optionally depending whether the vm should be build from git checkout or a channel. | ||
On non- | On non-NixOS (linux) systems the following command can be used instead: | ||
<syntaxHighlight lang="console"> | <syntaxHighlight lang="console"> | ||
Line 162: | Line 162: | ||
</syntaxHighlight> | </syntaxHighlight> | ||
Don't forget that by default | Don't forget that by default NixOS comes with a firewall enabled: | ||
<syntaxHighlight lang="nix"> | <syntaxHighlight lang="nix"> |