diff options
author | Naïm Favier <n@monade.li> | 2020-12-15 16:01:40 +0100 |
---|---|---|
committer | Naïm Favier <n@monade.li> | 2020-12-15 16:14:44 +0100 |
commit | ae89eafb817f6c691cb0e97f9e67cd9204ada3a4 (patch) | |
tree | a2e64d1c337e2e28514a2244b966417cff3e0aaf /docs | |
parent | 7c06f610f15642e3664f01a51c08c64cc8835f51 (diff) |
add flake support
Diffstat (limited to 'docs')
-rw-r--r-- | docs/setup-guide.rst | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/docs/setup-guide.rst b/docs/setup-guide.rst index ef2a76b..cc53283 100644 --- a/docs/setup-guide.rst +++ b/docs/setup-guide.rst @@ -97,6 +97,34 @@ After a ``nixos-rebuild switch --upgrade`` your server should be good to go. If you want to use ``nixops`` to deploy the server, look in the subfolder ``nixops`` for some inspiration. +If you're using `flakes <https://nixos.wiki/wiki/Flakes>`__, you can use +the following minimal ``flake.nix`` as an example: + +.. code:: nix + + { + description = "NixOS configuration"; + + inputs.simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver"; + + outputs = { self, nixpkgs, simple-nixos-mailserver }: { + nixosConfigurations = { + hostname = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + simple-nixos-mailserver.nixosModule + { + mailserver = { + enable = true; + # ... + }; + } + ]; + }; + }; + }; + } + B) Setup everything else ~~~~~~~~~~~~~~~~~~~~~~~~ |