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: ecb99304ff36
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f23c110692c6
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on May 30, 2019

  1. murmur service: log to journald by default

    Save an option to log to file with new `logFile` option.
    
    As a side effect deprecate `pidfile` option and instead use systemd's
    RuntimeDirectory.
    abbradar committed May 30, 2019
    Copy the full SHA
    f23c110 View commit details
Showing with 14 additions and 17 deletions.
  1. +2 −1 nixos/modules/rename.nix
  2. +12 −16 nixos/modules/services/networking/murmur.nix
3 changes: 2 additions & 1 deletion nixos/modules/rename.nix
Original file line number Diff line number Diff line change
@@ -113,9 +113,10 @@ with lib;

# murmur
(mkRenamedOptionModule [ "services" "murmur" "welcome" ] [ "services" "murmur" "welcometext" ])
(mkRemovedOptionModule [ "services" "murmur" "pidfile" ] "Hardcoded to /run/murmur/murmurd.pid now")

# parsoid
(mkRemovedOptionModule [ "services" "parsoid" "interwikis" ] [ "services" "parsoid" "wikis" ])
(mkRemovedOptionModule [ "services" "parsoid" "interwikis" ] "Use services.parsoid.wikis instead")

# plexpy / tautulli
(mkRenamedOptionModule [ "services" "plexpy" ] [ "services" "tautulli" ])
28 changes: 12 additions & 16 deletions nixos/modules/services/networking/murmur.nix
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ with lib;

let
cfg = config.services.murmur;
forking = cfg.logFile != null;
configFile = pkgs.writeText "murmurd.ini" ''
database=/var/lib/murmur/murmur.sqlite
dbDriver=QSQLITE
@@ -12,8 +13,8 @@ let
autobanTimeframe=${toString cfg.autobanTimeframe}
autobanTime=${toString cfg.autobanTime}
logfile=/var/log/murmur/murmurd.log
pidfile=${cfg.pidfile}
logfile=${optionalString (cfg.logFile != null) cfg.logFile}
${optionalString forking "pidfile=/run/murmur/murmurd.pid"}
welcometext="${cfg.welcometext}"
port=${toString cfg.port}
@@ -78,10 +79,11 @@ in
description = "The amount of time an IP ban lasts (in seconds).";
};

pidfile = mkOption {
type = types.path;
default = "/run/murmur/murmurd.pid";
description = "Path to PID file for Murmur daemon.";
logFile = mkOption {
type = types.nullOr types.path;
default = null;
example = "/var/log/murmur/murmurd.log";
description = "Path to the log file for Murmur daemon. Empty means log to journald.";
};

welcometext = mkOption {
@@ -251,19 +253,13 @@ in
after = [ "network-online.target "];

serviceConfig = {
Type = "forking";
RuntimeDirectory = "murmur";
PIDFile = cfg.pidfile;
Restart = "always";
# murmurd doesn't fork when logging to the console.
Type = if forking then "forking" else "simple";
PIDFile = mkIf forking "/run/murmur/murmurd.pid";
RuntimeDirectory = mkIf forking "murmur";
User = "murmur";
ExecStart = "${pkgs.murmur}/bin/murmurd -ini ${configFile}";
PermissionsStartOnly = true;
};

preStart = ''
mkdir -p /var/log/murmur
chown -R murmur /var/log/murmur
'';
};
};
}