Skip to content

Commit

Permalink
treewide: use requires instead of after for most situations
Browse files Browse the repository at this point in the history
Signed-off-by: Sumner Evans <[email protected]>
  • Loading branch information
sumnerevans committed Apr 2, 2024
1 parent a8bbf43 commit e6c2fbb
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion nixos/hosts/mineshspc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ in {

systemd.services."mineshspc.com" = {
description = "Mines HSPC Website service";
after = [ "network-online.target" "mineshspc_env-key.service" ];
requires = [ "network-online.target" "mineshspc_env-key.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
WorkingDirectory = dataDir;
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/matrix/linkedin-matrix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ in {

systemd.services.linkedin-matrix = {
description = "LinkedIn Messaging <-> Matrix Bridge";
after = [ "appservice_login_shared_secret_yaml-key.service" ]
requires = [ "appservice_login_shared_secret_yaml-key.service" ]
++ optional cfg.useLocalSynapse "matrix-synapse.target";
wantedBy = [ "multi-user.target" ];
preStart = ''
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/matrix/matrix-chessbot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ in {
config = mkIf cfg.enable {
systemd.services.matrix-chessbot = {
description = "Matrix Chessbot";
after = [ "matrix-synapse.target" "chessbot_password-key.service" ];
requires = [ "matrix-synapse.target" "chessbot_password-key.service" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.imagemagick ];
serviceConfig = {
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/matrix/maubot-echo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ in {
config = mkIf cfg.enable {
systemd.services.maubot-echo = {
description = "Echo Maubot";
after =
requires =
[ "matrix-synapse.target" "echo_maubot_secrets_yaml-key.service" ];
wantedBy = [ "multi-user.target" ];
preStart = ''
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/matrix/maubot-github.nix
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ in {
config = mkIf cfg.enable {
systemd.services.maubot-github = {
description = "GitHub Maubot";
after = [
requires = [
"network.target"
"postgresql.service"
"matrix-synapse.target"
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/matrix/mautrix-discord.nix
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ in {
systemd.services.mautrix-discord = {
description = "Discord <-> Matrix Bridge";
wantedBy = [ "multi-user.target" ];
after = [ "appservice_login_shared_secret_yaml-key.service" ]
requires = [ "appservice_login_shared_secret_yaml-key.service" ]
++ optional cfg.useLocalSynapse "matrix-synapse.target";
preStart = ''
${pkgs.yq-go}/bin/yq ea '. as $item ireduce ({}; . * $item )' \
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/matrix/mautrix-signal.nix
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ in {
systemd.services.mautrix-signal = {
description = "Signal <-> Matrix Bridge";
wantedBy = [ "multi-user.target" ];
after = [ "appservice_login_shared_secret_yaml-key.service" ]
requires = [ "appservice_login_shared_secret_yaml-key.service" ]
++ optional cfg.useLocalSynapse "matrix-synapse.target";
preStart = ''
${pkgs.yq-go}/bin/yq ea '. as $item ireduce ({}; . * $item )' \
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/matrix/mautrix-slack.nix
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ in {
systemd.services.mautrix-slack = {
description = "Slack <-> Matrix Bridge";
wantedBy = [ "multi-user.target" ];
after = [ "appservice_login_shared_secret_yaml-key.service" ]
requires = [ "appservice_login_shared_secret_yaml-key.service" ]
++ optional cfg.useLocalSynapse "matrix-synapse.target";
preStart = ''
${pkgs.yq-go}/bin/yq ea '. as $item ireduce ({}; . * $item )' \
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/matrix/meetbot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ in {
config = mkIf cfg.enable {
systemd.services.meetbot = {
description = "Meetbot";
after = [ "matrix-synapse.target" "meetbot_secret_env-key.service" ];
requires = [ "matrix-synapse.target" "meetbot_secret_env-key.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = ''
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/matrix/mjolnir.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ in mkIf mjolnirCfg.enable {
};
};
systemd.services.mjolnir = {
after = [ "matrix-synapse.target" "marshal_password-key.service" ];
requires = [ "matrix-synapse.target" "marshal_password-key.service" ];
serviceConfig.SupplementaryGroups = [ "keys" ];
};
services.pantalaimon-headless.instances.mjolnir = {
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/matrix/msclinkbot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ in {
config = mkIf cfg.enable {
systemd.services.msclinkbot = {
description = "MSC Link Bot";
after = [ "matrix-synapse.target" "mscbot_password-key.service" ];
requires = [ "matrix-synapse.target" "mscbot_password-key.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = ''
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/matrix/standupbot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ in {
config = mkIf cfg.enable {
systemd.services.standupbot = {
description = "Standupbot";
after = [ "matrix-synapse.target" ];
requires = [ "matrix-synapse.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = ''
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/matrix/synapse/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ in {

systemd.targets.matrix-synapse = {
description = "Synapse processes";
after = [ "network.target" "postgresql.service" ];
requires = [ "network.target" "postgresql.service" ];
wantedBy = [ "multi-user.target" ];
};

Expand Down

0 comments on commit e6c2fbb

Please sign in to comment.