summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-06-10 10:35:50 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2019-06-10 10:35:50 +0200
commite58f0f6c997ab6e1b62f30aea5d9c1fb8ec628ad (patch)
tree1e346767b4a6882a24fe41f73a9cfd283c007aea /nixos
parent4416712772fbd893413342a2b8e5064c0c174b77 (diff)
parent80b51d983ae77f47910ba26305023efbfdb62e91 (diff)
downloadnixpkgs-e58f0f6c997ab6e1b62f30aea5d9c1fb8ec628ad.tar
nixpkgs-e58f0f6c997ab6e1b62f30aea5d9c1fb8ec628ad.tar.gz
nixpkgs-e58f0f6c997ab6e1b62f30aea5d9c1fb8ec628ad.tar.bz2
nixpkgs-e58f0f6c997ab6e1b62f30aea5d9c1fb8ec628ad.tar.lz
nixpkgs-e58f0f6c997ab6e1b62f30aea5d9c1fb8ec628ad.tar.xz
nixpkgs-e58f0f6c997ab6e1b62f30aea5d9c1fb8ec628ad.tar.zst
nixpkgs-e58f0f6c997ab6e1b62f30aea5d9c1fb8ec628ad.zip
Merge master into staging-next
Diffstat (limited to 'nixos')
-rw-r--r--nixos/doc/manual/release-notes/rl-1909.xml5
-rw-r--r--nixos/modules/services/networking/bird.nix21
-rw-r--r--nixos/modules/system/boot/networkd.nix2
3 files changed, 17 insertions, 11 deletions
diff --git a/nixos/doc/manual/release-notes/rl-1909.xml b/nixos/doc/manual/release-notes/rl-1909.xml
index 7f0c1d21e37..d7ae05086ed 100644
--- a/nixos/doc/manual/release-notes/rl-1909.xml
+++ b/nixos/doc/manual/release-notes/rl-1909.xml
@@ -23,6 +23,11 @@
      End of support is planned for end of April 2020, handing over to 20.03.
     </para>
    </listitem>
+   <listitem>
+    <para>
+     PHP now defaults to PHP 7.3, updated from 7.2.
+    </para>
+   </listitem>
   </itemizedlist>
  </section>
 
diff --git a/nixos/modules/services/networking/bird.nix b/nixos/modules/services/networking/bird.nix
index 555733aab7c..4ae35875c0f 100644
--- a/nixos/modules/services/networking/bird.nix
+++ b/nixos/modules/services/networking/bird.nix
@@ -14,15 +14,6 @@ let
           bird6 = "1.9.x with IPv6 suport";
           bird2 = "2.x";
         }.${variant};
-      configFile = pkgs.stdenv.mkDerivation {
-        name = "${variant}.conf";
-        text = cfg.config;
-        preferLocalBuild = true;
-        buildCommand = ''
-          echo -n "$text" > $out
-          ${pkg}/bin/${birdBin} -d -p -c $out
-        '';
-      };
     in {
       ###### interface
       options = {
@@ -41,14 +32,24 @@ let
       ###### implementation
       config = mkIf cfg.enable {
         environment.systemPackages = [ pkg ];
+
+        environment.etc."bird/${variant}.conf".source = pkgs.writeTextFile {
+          name = "${variant}.conf";
+          text = cfg.config;
+          checkPhase = ''
+            ${pkg}/bin/${birdBin} -d -p -c $out
+          '';
+        };
+
         systemd.services.${variant} = {
           description = "BIRD Internet Routing Daemon (${descr})";
           wantedBy = [ "multi-user.target" ];
           reloadIfChanged = true;
+          restartTriggers = [ config.environment.etc."bird/${variant}.conf".source ];
           serviceConfig = {
             Type = "forking";
             Restart = "on-failure";
-            ExecStart = "${pkg}/bin/${birdBin} -c ${configFile} -u ${variant} -g ${variant}";
+            ExecStart = "${pkg}/bin/${birdBin} -c /etc/bird/${variant}.conf -u ${variant} -g ${variant}";
             ExecReload = "${pkg}/bin/${birdc} configure";
             ExecStop = "${pkg}/bin/${birdc} down";
             CapabilityBoundingSet = [ "CAP_CHOWN" "CAP_FOWNER" "CAP_DAC_OVERRIDE" "CAP_SETUID" "CAP_SETGID"
diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix
index 14a3832b0dc..f1aa9064bef 100644
--- a/nixos/modules/system/boot/networkd.nix
+++ b/nixos/modules/system/boot/networkd.nix
@@ -669,7 +669,7 @@ let
     };
   };
 
-  commonMatchText = def: ''
+  commonMatchText = def: optionalString (def.matchConfig != {}) ''
     [Match]
     ${attrsToSection def.matchConfig}
   '';