Unverified Commit e8ad057e authored by Lin Jian's avatar Lin Jian Committed by GitHub
Browse files

nixos/kmonad: make sure new config is used after nixos-rebuild switch (#369853)

parents 05bb7229 280715cf
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -154,6 +154,19 @@ let
          config.users.groups.uinput.name
        ] ++ keyboard.extraGroups;
      };
      # make sure the new config is used after nixos-rebuild switch
      # stopIfChanged controls[0] how a service is "restarted" during
      # nixos-rebuild switch.  By default, stopIfChanged is true, which stops
      # the old service and then starts the new service after config updates.
      # Since we use path-based activation[1] here, the service unit will
      # immediately[2] be started by the path unit.  Probably that start is
      # before config updates, whcih causes the service unit to use the old
      # config after nixos-rebuild switch.  Setting stopIfChanged to false works
      # around this issue by restarting the service after config updates.
      # [0]: https://nixos.org/manual/nixos/unstable/#sec-switching-systems
      # [1]: man 7 daemon
      # [2]: man 5 systemd.path
      stopIfChanged = false;
    };
in
{