Loading lib/systems/inspect.nix +26 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,32 @@ rec { ]; }; # given two patterns, return a pattern which is their logical AND. # Since a pattern is a list-of-disjuncts, this needs to patternLogicalAnd = pat1_: pat2_: let # patterns can be either a list or a (bare) singleton; turn # them into singletons for uniform handling pat1 = lib.toList pat1_; pat2 = lib.toList pat2_; in lib.concatMap (attr1: map (attr2: lib.recursiveUpdateUntil (path: subattr1: subattr2: if (builtins.intersectAttrs subattr1 subattr2) == {} || subattr1 == subattr2 then true else throw '' pattern conflict at path ${toString path}: ${builtins.toJSON subattr1} ${builtins.toJSON subattr2} '') attr1 attr2 ) pat2) pat1; matchAnyAttrs = patterns: if builtins.isList patterns then attrs: any (pattern: matchAttrs pattern attrs) patterns else matchAttrs patterns; Loading nixos/modules/services/display-managers/greetd.nix +1 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ in security.pam.services.greetd = { allowNullPassword = true; startSession = true; enableGnomeKeyring = mkDefault config.services.gnome.gnome-keyring.enable; }; # This prevents nixos-rebuild from killing greetd by activating getty again Loading nixos/modules/services/matrix/appservice-discord.nix +2 −2 Original line number Diff line number Diff line Loading @@ -100,9 +100,9 @@ in { serviceDependencies = mkOption { type = with types; listOf str; default = optional config.services.matrix-synapse.enable "matrix-synapse.service"; default = optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit; defaultText = literalExpression '' optional config.services.matrix-synapse.enable "matrix-synapse.service" optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit ''; description = lib.mdDoc '' List of Systemd services to require and wait for when starting the application service, Loading nixos/modules/services/matrix/matrix-sliding-sync.nix +7 −2 Original line number Diff line number Diff line Loading @@ -80,8 +80,11 @@ in } ]; }; systemd.services.matrix-sliding-sync = { after = lib.optional cfg.createDatabase "postgresql.service"; systemd.services.matrix-sliding-sync = rec { after = lib.optional cfg.createDatabase "postgresql.service" ++ lib.optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit; wants = after; wantedBy = [ "multi-user.target" ]; environment = cfg.settings; serviceConfig = { Loading @@ -90,6 +93,8 @@ in ExecStart = lib.getExe cfg.package; StateDirectory = "matrix-sliding-sync"; WorkingDirectory = "%S/matrix-sliding-sync"; Restart = "on-failure"; RestartSec = "1s"; }; }; }; Loading nixos/modules/services/matrix/mautrix-facebook.nix +1 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,7 @@ in { wantedBy = [ "multi-user.target" ]; wants = [ "network-online.target" ] ++ optional config.services.matrix-synapse.enable "matrix-synapse.service" ] ++ optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit ++ optional cfg.configurePostgresql "postgresql.service"; after = wants; Loading Loading
lib/systems/inspect.nix +26 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,32 @@ rec { ]; }; # given two patterns, return a pattern which is their logical AND. # Since a pattern is a list-of-disjuncts, this needs to patternLogicalAnd = pat1_: pat2_: let # patterns can be either a list or a (bare) singleton; turn # them into singletons for uniform handling pat1 = lib.toList pat1_; pat2 = lib.toList pat2_; in lib.concatMap (attr1: map (attr2: lib.recursiveUpdateUntil (path: subattr1: subattr2: if (builtins.intersectAttrs subattr1 subattr2) == {} || subattr1 == subattr2 then true else throw '' pattern conflict at path ${toString path}: ${builtins.toJSON subattr1} ${builtins.toJSON subattr2} '') attr1 attr2 ) pat2) pat1; matchAnyAttrs = patterns: if builtins.isList patterns then attrs: any (pattern: matchAttrs pattern attrs) patterns else matchAttrs patterns; Loading
nixos/modules/services/display-managers/greetd.nix +1 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ in security.pam.services.greetd = { allowNullPassword = true; startSession = true; enableGnomeKeyring = mkDefault config.services.gnome.gnome-keyring.enable; }; # This prevents nixos-rebuild from killing greetd by activating getty again Loading
nixos/modules/services/matrix/appservice-discord.nix +2 −2 Original line number Diff line number Diff line Loading @@ -100,9 +100,9 @@ in { serviceDependencies = mkOption { type = with types; listOf str; default = optional config.services.matrix-synapse.enable "matrix-synapse.service"; default = optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit; defaultText = literalExpression '' optional config.services.matrix-synapse.enable "matrix-synapse.service" optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit ''; description = lib.mdDoc '' List of Systemd services to require and wait for when starting the application service, Loading
nixos/modules/services/matrix/matrix-sliding-sync.nix +7 −2 Original line number Diff line number Diff line Loading @@ -80,8 +80,11 @@ in } ]; }; systemd.services.matrix-sliding-sync = { after = lib.optional cfg.createDatabase "postgresql.service"; systemd.services.matrix-sliding-sync = rec { after = lib.optional cfg.createDatabase "postgresql.service" ++ lib.optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit; wants = after; wantedBy = [ "multi-user.target" ]; environment = cfg.settings; serviceConfig = { Loading @@ -90,6 +93,8 @@ in ExecStart = lib.getExe cfg.package; StateDirectory = "matrix-sliding-sync"; WorkingDirectory = "%S/matrix-sliding-sync"; Restart = "on-failure"; RestartSec = "1s"; }; }; }; Loading
nixos/modules/services/matrix/mautrix-facebook.nix +1 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,7 @@ in { wantedBy = [ "multi-user.target" ]; wants = [ "network-online.target" ] ++ optional config.services.matrix-synapse.enable "matrix-synapse.service" ] ++ optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit ++ optional cfg.configurePostgresql "postgresql.service"; after = wants; Loading