From dc8500165ca456df4ea9c4e828ea6dfb85797feb Mon Sep 17 00:00:00 2001 From: Danylo Hlynskyi Date: Thu, 5 Oct 2017 00:42:50 +0000 Subject: [PATCH] declarative containers: improve example config Container config example code mentions `postgresql` service, but the correct use of that service involves setting `system.stateVersion` option (as discovered in https://github.com/NixOS/nixpkgs/issues/30056). The actual system state version is set randomly to 17.03 because I have no preferences here --- nixos/modules/virtualisation/containers.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/virtualisation/containers.nix b/nixos/modules/virtualisation/containers.nix index 82dfc1c9f1ce..2e91a62c74b2 100644 --- a/nixos/modules/virtualisation/containers.nix +++ b/nixos/modules/virtualisation/containers.nix @@ -596,6 +596,8 @@ in { config, pkgs, ... }: { services.postgresql.enable = true; services.postgresql.package = pkgs.postgresql96; + + system.stateVersion = "17.03"; }; }; }