From e33af285671d595adaaa259987c9ce13c00bdf17 Mon Sep 17 00:00:00 2001 From: Pascal Wittmann Date: Fri, 29 Mar 2013 12:37:06 +0100 Subject: [PATCH] Bitlbee: hardcode username and configdir; homedir == configdir --- modules/services/networking/bitlbee.nix | 33 ++++--------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/modules/services/networking/bitlbee.nix b/modules/services/networking/bitlbee.nix index 2f67fe5f1e3e..44434d7ed8cf 100644 --- a/modules/services/networking/bitlbee.nix +++ b/modules/services/networking/bitlbee.nix @@ -47,13 +47,6 @@ in ''; }; - user = mkOption { - default = "bitlbee"; - description = '' - The user that executes the BitlBee daemon. - ''; - }; - authMode = mkOption { default = "Open"; check = authModeCheck; @@ -65,13 +58,6 @@ in ''; }; - configDir = mkOption { - default = "/var/lib/bitlbee"; - description = '' - Specifyies the directory that stores all the per-user configuration files. - ''; - }; - extraSettings = mkOption { default = ""; description = '' @@ -96,14 +82,14 @@ in config = mkIf config.services.bitlbee.enable { users.extraUsers = singleton - { name = "${cfg.user}"; + { name = "bitlbee"; uid = bitlbeeUid; description = "BitlBee user"; - home = "/var/empty"; + home = "/var/lib/bitlbee"; }; users.extraGroups = singleton - { name = "${cfg.user}"; + { name = "bitlbee"; gid = config.ids.gids.bitlbee; }; @@ -111,15 +97,6 @@ in { description = "BitlBee IRC to other chat networks gateway"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; - preStart = - '' - if ! test -d ${cfg.configDir} - then - mkdir -p ${cfg.configDir} - chown ${cfg.user}:${cfg.user} ${cfg.configDir} - chmod 750 ${cfg.configDir} - fi - ''; serviceConfig.ExecStart = "${pkgs.bitlbee}/sbin/bitlbee -F -n -c /etc/bitlbee.conf"; }; @@ -131,11 +108,11 @@ in '' [settings] RunMode = Daemon - User = ${cfg.user} + User = bitlbee + ConfigDir = /var/lib/bitlbee DaemonInterface = ${cfg.interface} DaemonPort = ${toString cfg.portNumber} AuthMode = ${cfg.authMode} - ConfigDir = ${cfg.configDir} ${cfg.extraSettings} [defaults] ${cfg.extraDefaults}