Add some more missing uids/gids

This commit is contained in:
Rickard Nilsson 2013-08-26 15:20:25 +02:00
parent 7f7208663d
commit b0b5e08e86
11 changed files with 83 additions and 49 deletions

View File

@ -94,6 +94,14 @@ in
bacula = 81;
almir = 82;
deluge = 83;
mysql = 84;
rabbitmq = 85;
activemq = 86;
gnunet = 87;
oidentd = 88;
quassel = 89;
amule = 90;
minidlna = 91;
# When adding a uid, make sure it doesn't match an existing gid.
@ -173,6 +181,14 @@ in
bacula = 81;
almir = 82;
deluge = 83;
mysql = 84;
rabbitmq = 85;
activemq = 86;
gnunet = 87;
oidentd = 88;
quassel = 89;
amule = 90;
minidlna = 91;
# When adding a gid, make sure it doesn't match an existing uid.

View File

@ -89,32 +89,17 @@ in {
Java runtime when the broker service is started.
'';
};
user = {
create = mkOption {
type = types.bool;
default = true;
description = ''
If true, a system user with the specified name will be added
to the system configuration. If false, a user with the specified
name is expected to exist.
'';
};
name = mkOption {
type = types.string;
default = "activemq";
description = ''
The name of the user that should run the ActiveMQ process.
'';
};
};
};
};
config = mkIf cfg.enable {
users.extraUsers = mkIf cfg.user.create (singleton {
inherit (cfg.user) name;
users.extraUsers.activemq = {
description = "ActiveMQ server user";
});
group = "activemq";
uid = config.ids.uids.activemq;
};
users.extraGroups.activemq.gid = config.ids.gids.activemq;
systemd.services.activemq_init = {
wantedBy = [ "activemq.service" ];

View File

@ -51,12 +51,15 @@ in
environment.systemPackages = [ pkgs.rabbitmq_server ];
users.extraUsers = singleton
{ name = "rabbitmq";
users.extraUsers.rabbitmq = {
description = "RabbitMQ server user";
home = "/var/empty";
group = "rabbitmq";
uid = config.ids.uids.rabbitmq;
};
users.extraGroups.rabbitmq.gid = config.ids.gids.rabbitmq;
jobs.rabbitmq = {
description = "RabbitMQ server";

View File

@ -146,11 +146,14 @@ in
config = mkIf config.services.mysql.enable {
users.extraUsers = singleton
{ name = "mysql";
users.extraUsers.mysql = {
description = "MySQL server user";
group = "mysql";
uid = config.ids.uids.mysql;
};
users.extraGroups.mysql.gid = config.ids.gids.mysql;
environment.systemPackages = [mysql];
systemd.services.mysql =

View File

@ -139,11 +139,14 @@ in
config = mkIf config.services.mysql55.enable {
users.extraUsers = singleton
{ name = "mysql";
users.extraUsers.mysql = {
description = "MySQL server user";
group = "mysql";
uid = config.ids.uids.mysql;
};
users.extraGroups.mysql.gid = config.ids.gids.mysql;
environment.systemPackages = [mysql];
systemd.services.mysql =

View File

@ -48,6 +48,13 @@ in
users.extraUsers = mkIf (cfg.user == null) [
{ name = "amule";
description = "AMule daemon";
group = "amule";
uid = config.ids.uids.amule;
} ];
users.extraGroups = mkIf (cfg.user == null) [
{ name = "amule";
gid = config.ids.gids.amule;
} ];
jobs.amuled =

View File

@ -118,17 +118,15 @@ in
config = mkIf config.services.gnunet.enable {
users.extraUsers = singleton
{ name = "gnunet";
users.extraUsers.gnunet = {
group = "gnunet";
description = "GNUnet User";
home = homeDir;
createHome = true;
uid = config.ids.uids.gnunet;
};
users.extraGroups = singleton
{ name = "gnunet";
};
users.extraGroups.gnunet.gid = config.ids.gids.gnunet;
# The user tools that talk to `gnunetd' should come from the same source,
# so install them globally.

View File

@ -72,7 +72,13 @@ in
'') cfg.mediaDirs}
'';
users.extraUsers.minidlna.description = "MiniDLNA daemon user";
users.extraUsers.minidlna = {
description = "MiniDLNA daemon user";
group = "minidlna";
uid = config.ids.uids.minidlna;
};
users.extraGroups.minidlna.gid = config.ids.gids.minidlna;
systemd.services.minidlna =
{ description = "MiniDLNA Server";

View File

@ -31,11 +31,14 @@ with pkgs.lib;
exec = "${pkgs.oidentd}/sbin/oidentd -u oidentd -g nogroup";
};
users.extraUsers = singleton
{ name = "oidentd";
users.extraUsers.oidentd = {
description = "Ident Protocol daemon user";
group = "oidentd";
uid = config.ids.uids.oidentd;
};
users.extraGroups.oidentd.gid = config.ids.gids.oidentd;
};
}

View File

@ -65,8 +65,14 @@ in
users.extraUsers = mkIf (cfg.user == null) [
{ name = "quassel";
description = "Quassel IRC client daemon";
group = "quassel";
uid = config.ids.uids.quassel;
}];
users.extraGroups = mkIf (cfg.user == null) [
{ name = "quassel";
gid = config.ids.gids.quassel;
}];
jobs.quassel =
{ description = "Quassel IRC client daemon";

View File

@ -109,6 +109,10 @@ in
users.extraUsers.lightdm = {
createHome = true;
home = "/var/lib/lightdm";
group = "lightdm";
uid = config.ids.uids.lightdm;
};
users.extraGroups.lightdm.gid = config.ids.gids.lightdm;
};
}