Cheatsheet: Difference between revisions

Cdro (talk | contribs)
Cdro (talk | contribs)
Replace nixos with NixOS
Line 61: Line 61:
</syntaxHighlight>
</syntaxHighlight>


=== Build nixos from nixpkgs repo ===
=== 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 nixos services for a pull request to nixpkgs.
This method can be used when testing NixOS services for a pull request to nixpkgs.


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].
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-nixos (linux) systems the following command can be used instead:
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 nixos comes with a firewall enabled:
Don't forget that by default NixOS comes with a firewall enabled:


<syntaxHighlight lang="nix">
<syntaxHighlight lang="nix">