diff options
author | Rickard Nilsson <rickynils@gmail.com> | 2013-08-26 15:20:25 +0200 |
---|---|---|
committer | Rickard Nilsson <rickynils@gmail.com> | 2013-08-26 15:20:25 +0200 |
commit | b0b5e08e8662bf1d76463cd7300bba2f7d20ff7e (patch) | |
tree | b4f5bb96df43672deb1a3bb7c1be1455bb5a2f73 | |
parent | 7f7208663d18285838a674bda4eba9184a8f7db8 (diff) | |
download | nixpkgs-b0b5e08e8662bf1d76463cd7300bba2f7d20ff7e.tar nixpkgs-b0b5e08e8662bf1d76463cd7300bba2f7d20ff7e.tar.gz nixpkgs-b0b5e08e8662bf1d76463cd7300bba2f7d20ff7e.tar.bz2 nixpkgs-b0b5e08e8662bf1d76463cd7300bba2f7d20ff7e.tar.lz nixpkgs-b0b5e08e8662bf1d76463cd7300bba2f7d20ff7e.tar.xz nixpkgs-b0b5e08e8662bf1d76463cd7300bba2f7d20ff7e.tar.zst nixpkgs-b0b5e08e8662bf1d76463cd7300bba2f7d20ff7e.zip |
Add some more missing uids/gids
-rw-r--r-- | modules/misc/ids.nix | 16 | ||||
-rw-r--r-- | modules/services/amqp/activemq/default.nix | 27 | ||||
-rw-r--r-- | modules/services/amqp/rabbitmq.nix | 13 | ||||
-rw-r--r-- | modules/services/databases/mysql.nix | 11 | ||||
-rw-r--r-- | modules/services/databases/mysql55.nix | 11 | ||||
-rw-r--r-- | modules/services/networking/amuled.nix | 7 | ||||
-rw-r--r-- | modules/services/networking/gnunet.nix | 18 | ||||
-rw-r--r-- | modules/services/networking/minidlna.nix | 8 | ||||
-rw-r--r-- | modules/services/networking/oidentd.nix | 11 | ||||
-rw-r--r-- | modules/services/networking/quassel.nix | 6 | ||||
-rw-r--r-- | modules/services/x11/display-managers/lightdm.nix | 4 |
11 files changed, 83 insertions, 49 deletions
diff --git a/modules/misc/ids.nix b/modules/misc/ids.nix index 5b545b799a2..fd1aca26356 100644 --- a/modules/misc/ids.nix +++ b/modules/misc/ids.nix @@ -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. diff --git a/modules/services/amqp/activemq/default.nix b/modules/services/amqp/activemq/default.nix index 44bf8be5878..915d179e699 100644 --- a/modules/services/amqp/activemq/default.nix +++ b/modules/services/amqp/activemq/default.nix @@ -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" ]; diff --git a/modules/services/amqp/rabbitmq.nix b/modules/services/amqp/rabbitmq.nix index 4afbafdd085..696b5ad4379 100644 --- a/modules/services/amqp/rabbitmq.nix +++ b/modules/services/amqp/rabbitmq.nix @@ -51,11 +51,14 @@ in environment.systemPackages = [ pkgs.rabbitmq_server ]; - users.extraUsers = singleton - { name = "rabbitmq"; - description = "RabbitMQ server user"; - home = "/var/empty"; - }; + 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"; diff --git a/modules/services/databases/mysql.nix b/modules/services/databases/mysql.nix index ed9d03dc60f..663c2cc4505 100644 --- a/modules/services/databases/mysql.nix +++ b/modules/services/databases/mysql.nix @@ -146,10 +146,13 @@ in config = mkIf config.services.mysql.enable { - users.extraUsers = singleton - { name = "mysql"; - description = "MySQL server user"; - }; + 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]; diff --git a/modules/services/databases/mysql55.nix b/modules/services/databases/mysql55.nix index 1da182a0e59..46148d68f4c 100644 --- a/modules/services/databases/mysql55.nix +++ b/modules/services/databases/mysql55.nix @@ -139,10 +139,13 @@ in config = mkIf config.services.mysql55.enable { - users.extraUsers = singleton - { name = "mysql"; - description = "MySQL server user"; - }; + 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]; diff --git a/modules/services/networking/amuled.nix b/modules/services/networking/amuled.nix index 658d16af006..8652d0daf4c 100644 --- a/modules/services/networking/amuled.nix +++ b/modules/services/networking/amuled.nix @@ -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 = diff --git a/modules/services/networking/gnunet.nix b/modules/services/networking/gnunet.nix index e0c41dcb188..421c0d9bb69 100644 --- a/modules/services/networking/gnunet.nix +++ b/modules/services/networking/gnunet.nix @@ -118,17 +118,15 @@ in config = mkIf config.services.gnunet.enable { - users.extraUsers = singleton - { name = "gnunet"; - group = "gnunet"; - description = "GNUnet User"; - home = homeDir; - createHome = true; - }; + 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. diff --git a/modules/services/networking/minidlna.nix b/modules/services/networking/minidlna.nix index c240e87e059..55b553cafcc 100644 --- a/modules/services/networking/minidlna.nix +++ b/modules/services/networking/minidlna.nix @@ -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"; diff --git a/modules/services/networking/oidentd.nix b/modules/services/networking/oidentd.nix index d730e99af89..a2a555a8ad1 100644 --- a/modules/services/networking/oidentd.nix +++ b/modules/services/networking/oidentd.nix @@ -31,10 +31,13 @@ with pkgs.lib; exec = "${pkgs.oidentd}/sbin/oidentd -u oidentd -g nogroup"; }; - users.extraUsers = singleton - { name = "oidentd"; - description = "Ident Protocol daemon user"; - }; + users.extraUsers.oidentd = { + description = "Ident Protocol daemon user"; + group = "oidentd"; + uid = config.ids.uids.oidentd; + }; + + users.extraGroups.oidentd.gid = config.ids.gids.oidentd; }; diff --git a/modules/services/networking/quassel.nix b/modules/services/networking/quassel.nix index e8af4926f5c..f3a4e457ec8 100644 --- a/modules/services/networking/quassel.nix +++ b/modules/services/networking/quassel.nix @@ -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"; diff --git a/modules/services/x11/display-managers/lightdm.nix b/modules/services/x11/display-managers/lightdm.nix index 6659a2dec46..b4f026d8143 100644 --- a/modules/services/x11/display-managers/lightdm.nix +++ b/modules/services/x11/display-managers/lightdm.nix @@ -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; }; } |