You have to restart container for changes to apply. Also, check second part of http://lists.science.uu.nl/pipermail/nix-dev/2017-March/023069.html
Answering your question: the cause is because of an error in switch-to-configuration.pl script 2017-03-31 0:35 GMT+03:00 Guido Witmond <[email protected]>: > Hi All, > > I'm reasonably new to Nix, I have a server running NixOs with caddy and > transmission. Now I'm creating a declarative container to run Postfix > and Dovecot to keep the user-namespace separate from the host. > > I've noticed that the container get started and both postfix and dovecot > get started at 'nixos-rebuild test'. So far so good. > > Now when I change the configuration and run rebuild-test again, nothing > happens. The changes don't get propagated to the container. > > In fact, when taking out the complete container-specification from my > configuration.nix file, the container - and postfix and dovecot in it > keep running. > > I'd expect that the inside of the declarative container be updated > during nixos-rebuild test. > > > Simplest test case: > > configuration.nix: > containers."test" = { > autoStart = true; > config = > { config, pkgs, ... }: { > services.transmission.enable = true; > }; > }; > > # nixos-rebuild test -I nixpkgs=/home/guido/nixpkgs/ > > The nixpks is a clone of github.com/NixOS/nixpkgs.git at commit > 955b79f4 (Sun Mar 26 17:12:13 2017 +0200) and the channel is > https://nixos.org/channels/nixos-16.09 > > To test: uncomment the transmission service and rebuild. The process > remains running. I expect it to get stopped. > > Then delete the whole 'containers.test' section and rebuild again. The > entire container keeps running while I expect it gets stopped. > > > > What could be the cause that the container won't get updated? > What log files / systemd journals should I check for errors? > > Any help is appreciated. > > Regards, > Guido Witmond. > > _______________________________________________ > nix-dev mailing list > [email protected] > http://lists.science.uu.nl/mailman/listinfo/nix-dev > >
_______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
