Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1579a5b9dfc3
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9d11c30cf962
Choose a head ref
  • 3 commits
  • 1 file changed
  • 1 contributor

Commits on Jun 6, 2019

  1. Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    e7872cd View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    b2fbbad View commit details
  3. Merge pull request #62779 from grahamc/containers-restart

    Restart declarative containers when their host environment configuration changes
    grahamc authored Jun 6, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    9d11c30 View commit details
Showing with 11 additions and 8 deletions.
  1. +11 −8 nixos/modules/virtualisation/containers.nix
19 changes: 11 additions & 8 deletions nixos/modules/virtualisation/containers.nix
Original file line number Diff line number Diff line change
@@ -689,7 +689,7 @@ in
[{ name = "container@"; value = unit; }]
# declarative containers
++ (mapAttrsToList (name: cfg: nameValuePair "container@${name}" (let
config = cfg // (
containerConfig = cfg // (
if cfg.enableTun then
{
allowedDevices = cfg.allowedDevices
@@ -700,18 +700,21 @@ in
else {});
in
unit // {
preStart = preStartScript config;
script = startScript config;
postStart = postStartScript config;
serviceConfig = serviceDirectives config;
preStart = preStartScript containerConfig;
script = startScript containerConfig;
postStart = postStartScript containerConfig;
serviceConfig = serviceDirectives containerConfig;
} // (
if config.autoStart then
if containerConfig.autoStart then
{
wantedBy = [ "machines.target" ];
wants = [ "network.target" ];
after = [ "network.target" ];
restartTriggers = [ config.path ];
reloadIfChanged = true;
restartTriggers = [
containerConfig.path
config.environment.etc."containers/${name}.conf".source
];
restartIfChanged = true;
}
else {})
)) config.containers)