aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/modules/services/misc
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/modules/services/misc')
-rw-r--r--nixpkgs/nixos/modules/services/misc/beanstalkd.nix10
-rw-r--r--nixpkgs/nixos/modules/services/misc/gammu-smsd.nix2
-rw-r--r--nixpkgs/nixos/modules/services/misc/gitea.nix144
-rw-r--r--nixpkgs/nixos/modules/services/misc/gitlab.nix75
-rw-r--r--nixpkgs/nixos/modules/services/misc/gitlab.xml6
-rw-r--r--nixpkgs/nixos/modules/services/misc/gollum.nix9
-rw-r--r--nixpkgs/nixos/modules/services/misc/jellyfin.nix15
-rw-r--r--nixpkgs/nixos/modules/services/misc/mathics.nix54
-rw-r--r--nixpkgs/nixos/modules/services/misc/matrix-synapse.nix2
-rw-r--r--nixpkgs/nixos/modules/services/misc/mesos-master.nix125
-rw-r--r--nixpkgs/nixos/modules/services/misc/mesos-slave.nix220
-rw-r--r--nixpkgs/nixos/modules/services/misc/nix-daemon.nix21
-rw-r--r--nixpkgs/nixos/modules/services/misc/octoprint.nix4
-rw-r--r--nixpkgs/nixos/modules/services/misc/pinnwand.nix78
-rw-r--r--nixpkgs/nixos/modules/services/misc/redmine.nix102
-rw-r--r--nixpkgs/nixos/modules/services/misc/siproxd.nix8
-rw-r--r--nixpkgs/nixos/modules/services/misc/ssm-agent.nix6
-rw-r--r--nixpkgs/nixos/modules/services/misc/sssd.nix4
-rw-r--r--nixpkgs/nixos/modules/services/misc/tzupdate.nix4
19 files changed, 354 insertions, 535 deletions
diff --git a/nixpkgs/nixos/modules/services/misc/beanstalkd.nix b/nixpkgs/nixos/modules/services/misc/beanstalkd.nix
index bcd133c9741..1c674a5b23b 100644
--- a/nixpkgs/nixos/modules/services/misc/beanstalkd.nix
+++ b/nixpkgs/nixos/modules/services/misc/beanstalkd.nix
@@ -28,6 +28,12 @@ in
example = "0.0.0.0";
};
};
+
+ openFirewall = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Whether to open ports in the firewall for the server.";
+ };
};
};
@@ -35,6 +41,10 @@ in
config = mkIf cfg.enable {
+ networking.firewall = mkIf cfg.openFirewall {
+ allowedTCPPorts = [ cfg.listen.port ];
+ };
+
environment.systemPackages = [ pkg ];
systemd.services.beanstalkd = {
diff --git a/nixpkgs/nixos/modules/services/misc/gammu-smsd.nix b/nixpkgs/nixos/modules/services/misc/gammu-smsd.nix
index 3057d7fd1a0..552725f1384 100644
--- a/nixpkgs/nixos/modules/services/misc/gammu-smsd.nix
+++ b/nixpkgs/nixos/modules/services/misc/gammu-smsd.nix
@@ -172,7 +172,7 @@ in {
};
database = mkOption {
- type = types.str;
+ type = types.nullOr types.str;
default = null;
description = "Database name to store sms data";
};
diff --git a/nixpkgs/nixos/modules/services/misc/gitea.nix b/nixpkgs/nixos/modules/services/misc/gitea.nix
index f8bcedc94fe..af80e99746b 100644
--- a/nixpkgs/nixos/modules/services/misc/gitea.nix
+++ b/nixpkgs/nixos/modules/services/misc/gitea.nix
@@ -162,6 +162,45 @@ in
<manvolnum>7</manvolnum></citerefentry>.
'';
};
+
+ backupDir = mkOption {
+ type = types.str;
+ default = "${cfg.stateDir}/dump";
+ description = "Path to the dump files.";
+ };
+ };
+
+ ssh = {
+ enable = mkOption {
+ type = types.bool;
+ default = true;
+ description = "Enable external SSH feature.";
+ };
+
+ clonePort = mkOption {
+ type = types.int;
+ default = 22;
+ example = 2222;
+ description = ''
+ SSH port displayed in clone URL.
+ The option is required to configure a service when the external visible port
+ differs from the local listening port i.e. if port forwarding is used.
+ '';
+ };
+ };
+
+ lfs = {
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Enables git-lfs support.";
+ };
+
+ contentDir = mkOption {
+ type = types.str;
+ default = "${cfg.stateDir}/data/lfs";
+ description = "Where to store LFS files.";
+ };
};
appName = mkOption {
@@ -200,6 +239,12 @@ in
description = "HTTP listen port.";
};
+ enableUnixSocket = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Configure Gitea to listen on a unix socket instead of the default TCP port.";
+ };
+
cookieSecure = mkOption {
type = types.bool;
default = false;
@@ -300,14 +345,34 @@ in
ROOT = cfg.repositoryRoot;
};
- server = {
- DOMAIN = cfg.domain;
- HTTP_ADDR = cfg.httpAddress;
- HTTP_PORT = cfg.httpPort;
- ROOT_URL = cfg.rootUrl;
- STATIC_ROOT_PATH = cfg.staticRootPath;
- LFS_JWT_SECRET = "#jwtsecret#";
- };
+ server = mkMerge [
+ {
+ DOMAIN = cfg.domain;
+ STATIC_ROOT_PATH = cfg.staticRootPath;
+ LFS_JWT_SECRET = "#jwtsecret#";
+ ROOT_URL = cfg.rootUrl;
+ }
+ (mkIf cfg.enableUnixSocket {
+ PROTOCOL = "unix";
+ HTTP_ADDR = "/run/gitea/gitea.sock";
+ })
+ (mkIf (!cfg.enableUnixSocket) {
+ HTTP_ADDR = cfg.httpAddress;
+ HTTP_PORT = cfg.httpPort;
+ })
+ (mkIf cfg.ssh.enable {
+ DISABLE_SSH = false;
+ SSH_PORT = cfg.ssh.clonePort;
+ })
+ (mkIf (!cfg.ssh.enable) {
+ DISABLE_SSH = true;
+ })
+ (mkIf cfg.lfs.enable {
+ LFS_START_SERVER = true;
+ LFS_CONTENT_PATH = cfg.lfs.contentDir;
+ })
+
+ ];
session = {
COOKIE_NAME = "session";
@@ -357,12 +422,26 @@ in
};
systemd.tmpfiles.rules = [
- "d '${cfg.stateDir}' - ${cfg.user} gitea - -"
- "d '${cfg.stateDir}/conf' - ${cfg.user} gitea - -"
- "d '${cfg.stateDir}/custom' - ${cfg.user} gitea - -"
- "d '${cfg.stateDir}/custom/conf' - ${cfg.user} gitea - -"
- "d '${cfg.stateDir}/log' - ${cfg.user} gitea - -"
- "d '${cfg.repositoryRoot}' - ${cfg.user} gitea - -"
+ "d '${cfg.dump.backupDir}' 0750 ${cfg.user} gitea - -"
+ "z '${cfg.dump.backupDir}' 0750 ${cfg.user} gitea - -"
+ "Z '${cfg.dump.backupDir}' - ${cfg.user} gitea - -"
+ "d '${cfg.lfs.contentDir}' 0750 ${cfg.user} gitea - -"
+ "z '${cfg.lfs.contentDir}' 0750 ${cfg.user} gitea - -"
+ "Z '${cfg.lfs.contentDir}' - ${cfg.user} gitea - -"
+ "d '${cfg.repositoryRoot}' 0750 ${cfg.user} gitea - -"
+ "z '${cfg.repositoryRoot}' 0750 ${cfg.user} gitea - -"
+ "Z '${cfg.repositoryRoot}' - ${cfg.user} gitea - -"
+ "d '${cfg.stateDir}' 0750 ${cfg.user} gitea - -"
+ "d '${cfg.stateDir}/conf' 0750 ${cfg.user} gitea - -"
+ "d '${cfg.stateDir}/custom' 0750 ${cfg.user} gitea - -"
+ "d '${cfg.stateDir}/custom/conf' 0750 ${cfg.user} gitea - -"
+ "d '${cfg.stateDir}/log' 0750 ${cfg.user} gitea - -"
+ "z '${cfg.stateDir}' 0750 ${cfg.user} gitea - -"
+ "z '${cfg.stateDir}/.ssh' 0700 ${cfg.user} gitea - -"
+ "z '${cfg.stateDir}/conf' 0750 ${cfg.user} gitea - -"
+ "z '${cfg.stateDir}/custom' 0750 ${cfg.user} gitea - -"
+ "z '${cfg.stateDir}/custom/conf' 0750 ${cfg.user} gitea - -"
+ "z '${cfg.stateDir}/log' 0750 ${cfg.user} gitea - -"
"Z '${cfg.stateDir}' - ${cfg.user} gitea - -"
# If we have a folder or symlink with gitea locales, remove it
@@ -431,28 +510,39 @@ in
User = cfg.user;
Group = "gitea";
WorkingDirectory = cfg.stateDir;
- ExecStart = "${gitea}/bin/gitea web";
+ ExecStart = "${gitea}/bin/gitea web --pid /run/gitea/gitea.pid";
Restart = "always";
-
- # Filesystem
+ # Runtime directory and mode
+ RuntimeDirectory = "gitea";
+ RuntimeDirectoryMode = "0755";
+ # Access write directories
+ ReadWritePaths = [ cfg.dump.backupDir cfg.repositoryRoot cfg.stateDir cfg.lfs.contentDir ];
+ UMask = "0027";
+ # Capabilities
+ CapabilityBoundingSet = "";
+ # Security
+ NoNewPrivileges = true;
+ # Sandboxing
+ ProtectSystem = "strict";
ProtectHome = true;
+ PrivateTmp = true;
PrivateDevices = true;
+ PrivateUsers = true;
+ ProtectHostname = true;
+ ProtectClock = true;
ProtectKernelTunables = true;
ProtectKernelModules = true;
+ ProtectKernelLogs = true;
ProtectControlGroups = true;
- ReadWritePaths = cfg.stateDir;
- # Caps
- CapabilityBoundingSet = "";
- NoNewPrivileges = true;
- # Misc.
+ RestrictAddressFamilies = [ "AF_UNIX AF_INET AF_INET6" ];
LockPersonality = true;
+ MemoryDenyWriteExecute = true;
RestrictRealtime = true;
+ RestrictSUIDSGID = true;
PrivateMounts = true;
- PrivateUsers = true;
- MemoryDenyWriteExecute = true;
- SystemCallFilter = "~@clock @cpu-emulation @debug @keyring @memlock @module @mount @obsolete @raw-io @reboot @resources @setuid @swap";
+ # System Call Filtering
SystemCallArchitectures = "native";
- RestrictAddressFamilies = "AF_UNIX AF_INET AF_INET6";
+ SystemCallFilter = "~@clock @cpu-emulation @debug @keyring @memlock @module @mount @obsolete @raw-io @reboot @resources @setuid @swap";
};
environment = {
@@ -504,7 +594,7 @@ in
Type = "oneshot";
User = cfg.user;
ExecStart = "${gitea}/bin/gitea dump";
- WorkingDirectory = cfg.stateDir;
+ WorkingDirectory = cfg.dump.backupDir;
};
};
diff --git a/nixpkgs/nixos/modules/services/misc/gitlab.nix b/nixpkgs/nixos/modules/services/misc/gitlab.nix
index be59b53e5ce..9896b8023e4 100644
--- a/nixpkgs/nixos/modules/services/misc/gitlab.nix
+++ b/nixpkgs/nixos/modules/services/misc/gitlab.nix
@@ -54,7 +54,7 @@ let
'') gitlabConfig.production.repositories.storages))}
'';
- gitlabShellConfig = {
+ gitlabShellConfig = flip recursiveUpdate cfg.extraShellConfig {
user = cfg.user;
gitlab_url = "http+unix://${pathUrlQuote gitlabSocket}";
http_settings.self_signed_cert = false;
@@ -517,6 +517,12 @@ in {
'';
};
+ extraShellConfig = mkOption {
+ type = types.attrs;
+ default = {};
+ description = "Extra configuration to merge into shell-config.yml";
+ };
+
extraConfig = mkOption {
type = types.attrs;
default = {};
@@ -618,26 +624,38 @@ in {
enable = true;
ensureUsers = singleton { name = cfg.databaseUsername; };
};
+
# The postgresql module doesn't currently support concepts like
# objects owners and extensions; for now we tack on what's needed
# here.
- systemd.services.postgresql.postStart = mkAfter (optionalString databaseActuallyCreateLocally ''
- set -eu
-
- $PSQL -tAc "SELECT 1 FROM pg_database WHERE datname = '${cfg.databaseName}'" | grep -q 1 || $PSQL -tAc 'CREATE DATABASE "${cfg.databaseName}" OWNER "${cfg.databaseUsername}"'
- current_owner=$($PSQL -tAc "SELECT pg_catalog.pg_get_userbyid(datdba) FROM pg_catalog.pg_database WHERE datname = '${cfg.databaseName}'")
- if [[ "$current_owner" != "${cfg.databaseUsername}" ]]; then
- $PSQL -tAc 'ALTER DATABASE "${cfg.databaseName}" OWNER TO "${cfg.databaseUsername}"'
- if [[ -e "${config.services.postgresql.dataDir}/.reassigning_${cfg.databaseName}" ]]; then
- echo "Reassigning ownership of database ${cfg.databaseName} to user ${cfg.databaseUsername} failed on last boot. Failing..."
- exit 1
- fi
- touch "${config.services.postgresql.dataDir}/.reassigning_${cfg.databaseName}"
- $PSQL "${cfg.databaseName}" -tAc "REASSIGN OWNED BY \"$current_owner\" TO \"${cfg.databaseUsername}\""
- rm "${config.services.postgresql.dataDir}/.reassigning_${cfg.databaseName}"
- fi
- $PSQL '${cfg.databaseName}' -tAc "CREATE EXTENSION IF NOT EXISTS pg_trgm"
- '');
+ systemd.services.gitlab-postgresql = let pgsql = config.services.postgresql; in mkIf databaseActuallyCreateLocally {
+ after = [ "postgresql.service" ];
+ wantedBy = [ "multi-user.target" ];
+ path = [ pgsql.package ];
+ script = ''
+ set -eu
+
+ PSQL="${pkgs.utillinux}/bin/runuser -u ${pgsql.superUser} -- psql --port=${toString pgsql.port}"
+
+ $PSQL -tAc "SELECT 1 FROM pg_database WHERE datname = '${cfg.databaseName}'" | grep -q 1 || $PSQL -tAc 'CREATE DATABASE "${cfg.databaseName}" OWNER "${cfg.databaseUsername}"'
+ current_owner=$($PSQL -tAc "SELECT pg_catalog.pg_get_userbyid(datdba) FROM pg_catalog.pg_database WHERE datname = '${cfg.databaseName}'")
+ if [[ "$current_owner" != "${cfg.databaseUsername}" ]]; then
+ $PSQL -tAc 'ALTER DATABASE "${cfg.databaseName}" OWNER TO "${cfg.databaseUsername}"'
+ if [[ -e "${config.services.postgresql.dataDir}/.reassigning_${cfg.databaseName}" ]]; then
+ echo "Reassigning ownership of database ${cfg.databaseName} to user ${cfg.databaseUsername} failed on last boot. Failing..."
+ exit 1
+ fi
+ touch "${config.services.postgresql.dataDir}/.reassigning_${cfg.databaseName}"
+ $PSQL "${cfg.databaseName}" -tAc "REASSIGN OWNED BY \"$current_owner\" TO \"${cfg.databaseUsername}\""
+ rm "${config.services.postgresql.dataDir}/.reassigning_${cfg.databaseName}"
+ fi
+ $PSQL '${cfg.databaseName}' -tAc "CREATE EXTENSION IF NOT EXISTS pg_trgm"
+ '';
+
+ serviceConfig = {
+ Type = "oneshot";
+ };
+ };
# Use postfix to send out mails.
services.postfix.enable = mkDefault true;
@@ -684,7 +702,6 @@ in {
"L+ /run/gitlab/shell-config.yml - - - - ${pkgs.writeText "config.yml" (builtins.toJSON gitlabShellConfig)}"
"L+ ${cfg.statePath}/config/unicorn.rb - - - - ${./defaultUnicornConfig.rb}"
- "L+ ${cfg.statePath}/config/initializers/extra-gitlab.rb - - - - ${extraGitlabRb}"
];
systemd.services.gitlab-sidekiq = {
@@ -766,8 +783,25 @@ in {
};
};
+ systemd.services.gitlab-mailroom = mkIf (gitlabConfig.production.incoming_email.enabled or false) {
+ description = "GitLab incoming mail daemon";
+ after = [ "network.target" "redis.service" "gitlab.service" ]; # gitlab.service creates configs
+ wantedBy = [ "multi-user.target" ];
+ environment = gitlabEnv;
+ serviceConfig = {
+ Type = "simple";
+ TimeoutSec = "infinity";
+ Restart = "on-failure";
+
+ User = cfg.user;
+ Group = cfg.group;
+ ExecStart = "${cfg.packages.gitlab.rubyEnv}/bin/bundle exec mail_room -c ${cfg.packages.gitlab}/share/gitlab/config.dist/mail_room.yml";
+ WorkingDirectory = gitlabEnv.HOME;
+ };
+ };
+
systemd.services.gitlab = {
- after = [ "gitlab-workhorse.service" "gitaly.service" "network.target" "postgresql.service" "redis.service" ];
+ after = [ "gitlab-workhorse.service" "gitaly.service" "network.target" "gitlab-postgresql.service" "redis.service" ];
requires = [ "gitlab-sidekiq.service" ];
wantedBy = [ "multi-user.target" ];
environment = gitlabEnv;
@@ -804,6 +838,7 @@ in {
rm -f ${cfg.statePath}/lib
cp -rf --no-preserve=mode ${cfg.packages.gitlab}/share/gitlab/config.dist/* ${cfg.statePath}/config
cp -rf --no-preserve=mode ${cfg.packages.gitlab}/share/gitlab/db/* ${cfg.statePath}/db
+ ln -sf ${extraGitlabRb} ${cfg.statePath}/config/initializers/extra-gitlab.rb
${cfg.packages.gitlab-shell}/bin/install
diff --git a/nixpkgs/nixos/modules/services/misc/gitlab.xml b/nixpkgs/nixos/modules/services/misc/gitlab.xml
index b6171a9a194..19a3df0a5f6 100644
--- a/nixpkgs/nixos/modules/services/misc/gitlab.xml
+++ b/nixpkgs/nixos/modules/services/misc/gitlab.xml
@@ -98,6 +98,12 @@ services.gitlab = {
</para>
<para>
+ When <literal>icoming_mail.enabled</literal> is set to <literal>true</literal>
+ in <link linkend="opt-services.gitlab.extraConfig">extraConfig</link> an additional
+ service called <literal>gitlab-mailroom</literal> is enabled for fetching incoming mail.
+ </para>
+
+ <para>
Refer to <xref linkend="ch-options" /> for all available configuration
options for the
<link linkend="opt-services.gitlab.enable">services.gitlab</link> module.
diff --git a/nixpkgs/nixos/modules/services/misc/gollum.nix b/nixpkgs/nixos/modules/services/misc/gollum.nix
index f4a9c72b154..0c9c7548305 100644
--- a/nixpkgs/nixos/modules/services/misc/gollum.nix
+++ b/nixpkgs/nixos/modules/services/misc/gollum.nix
@@ -50,6 +50,12 @@ in
description = "Parse and interpret emoji tags";
};
+ h1-title = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Use the first h1 as page title";
+ };
+
branch = mkOption {
type = types.str;
default = "master";
@@ -98,10 +104,11 @@ in
${pkgs.gollum}/bin/gollum \
--port ${toString cfg.port} \
--host ${cfg.address} \
- --config ${builtins.toFile "gollum-config.rb" cfg.extraConfig} \
+ --config ${pkgs.writeText "gollum-config.rb" cfg.extraConfig} \
--ref ${cfg.branch} \
${optionalString cfg.mathjax "--mathjax"} \
${optionalString cfg.emoji "--emoji"} \
+ ${optionalString cfg.h1-title "--h1-title"} \
${optionalString (cfg.allowUploads != null) "--allow-uploads ${cfg.allowUploads}"} \
${cfg.stateDir}
'';
diff --git a/nixpkgs/nixos/modules/services/misc/jellyfin.nix b/nixpkgs/nixos/modules/services/misc/jellyfin.nix
index 6ecdfb57dc3..0493dadea94 100644
--- a/nixpkgs/nixos/modules/services/misc/jellyfin.nix
+++ b/nixpkgs/nixos/modules/services/misc/jellyfin.nix
@@ -16,6 +16,14 @@ in
description = "User account under which Jellyfin runs.";
};
+ package = mkOption {
+ type = types.package;
+ example = literalExample "pkgs.jellyfin";
+ description = ''
+ Jellyfin package to use.
+ '';
+ };
+
group = mkOption {
type = types.str;
default = "jellyfin";
@@ -35,11 +43,16 @@ in
Group = cfg.group;
StateDirectory = "jellyfin";
CacheDirectory = "jellyfin";
- ExecStart = "${pkgs.jellyfin}/bin/jellyfin --datadir '/var/lib/${StateDirectory}' --cachedir '/var/cache/${CacheDirectory}'";
+ ExecStart = "${cfg.package}/bin/jellyfin --datadir '/var/lib/${StateDirectory}' --cachedir '/var/cache/${CacheDirectory}'";
Restart = "on-failure";
};
};
+ services.jellyfin.package = mkDefault (
+ if versionAtLeast config.system.stateVersion "20.09" then pkgs.jellyfin
+ else pkgs.jellyfin_10_5
+ );
+
users.users = mkIf (cfg.user == "jellyfin") {
jellyfin = {
group = cfg.group;
diff --git a/nixpkgs/nixos/modules/services/misc/mathics.nix b/nixpkgs/nixos/modules/services/misc/mathics.nix
deleted file mode 100644
index c588a30d76c..00000000000
--- a/nixpkgs/nixos/modules/services/misc/mathics.nix
+++ /dev/null
@@ -1,54 +0,0 @@
-{ pkgs, lib, config, ... }:
-
-with lib;
-
-let
- cfg = config.services.mathics;
-
-in {
- options = {
- services.mathics = {
- enable = mkEnableOption "Mathics notebook service";
-
- external = mkOption {
- type = types.bool;
- default = false;
- description = "Listen on all interfaces, rather than just localhost?";
- };
-
- port = mkOption {
- type = types.int;
- default = 8000;
- description = "TCP port to listen on.";
- };
- };
- };
-
- config = mkIf cfg.enable {
-
- users.users.mathics = {
- group = config.users.groups.mathics.name;
- description = "Mathics user";
- home = "/var/lib/mathics";
- createHome = true;
- uid = config.ids.uids.mathics;
- };
-
- users.groups.mathics.gid = config.ids.gids.mathics;
-
- systemd.services.mathics = {
- description = "Mathics notebook server";
- wantedBy = [ "multi-user.target" ];
- after = [ "network.target" ];
- serviceConfig = {
- User = config.users.users.mathics.name;
- Group = config.users.groups.mathics.name;
- ExecStart = concatStringsSep " " [
- "${pkgs.mathics}/bin/mathicsserver"
- "--port" (toString cfg.port)
- (if cfg.external then "--external" else "")
- ];
- };
- };
- };
-}
diff --git a/nixpkgs/nixos/modules/services/misc/matrix-synapse.nix b/nixpkgs/nixos/modules/services/misc/matrix-synapse.nix
index e982eb16fa7..3eb1073387f 100644
--- a/nixpkgs/nixos/modules/services/misc/matrix-synapse.nix
+++ b/nixpkgs/nixos/modules/services/misc/matrix-synapse.nix
@@ -675,7 +675,7 @@ in {
}
];
- users.users.matrix-synapse = {
+ users.users.matrix-synapse = {
group = "matrix-synapse";
home = cfg.dataDir;
createHome = true;
diff --git a/nixpkgs/nixos/modules/services/misc/mesos-master.nix b/nixpkgs/nixos/modules/services/misc/mesos-master.nix
deleted file mode 100644
index 572a9847e46..00000000000
--- a/nixpkgs/nixos/modules/services/misc/mesos-master.nix
+++ /dev/null
@@ -1,125 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with lib;
-
-let
- cfg = config.services.mesos.master;
-
-in {
-
- options.services.mesos = {
-
- master = {
- enable = mkOption {
- description = "Whether to enable the Mesos Master.";
- default = false;
- type = types.bool;
- };
-
- ip = mkOption {
- description = "IP address to listen on.";
- default = "0.0.0.0";
- type = types.str;
- };
-
- port = mkOption {
- description = "Mesos Master port";
- default = 5050;
- type = types.int;
- };
-
- advertiseIp = mkOption {
- description = "IP address advertised to reach this master.";
- default = null;
- type = types.nullOr types.str;
- };
-
- advertisePort = mkOption {
- description = "Port advertised to reach this Mesos master.";
- default = null;
- type = types.nullOr types.int;
- };
-
- zk = mkOption {
- description = ''
- ZooKeeper URL (used for leader election amongst masters).
- May be one of:
- zk://host1:port1,host2:port2,.../mesos
- zk://username:password@host1:port1,host2:port2,.../mesos
- '';
- type = types.str;
- };
-
- workDir = mkOption {
- description = "The Mesos work directory.";
- default = "/var/lib/mesos/master";
- type = types.str;
- };
-
- extraCmdLineOptions = mkOption {
- description = ''
- Extra command line options for Mesos Master.
-
- See https://mesos.apache.org/documentation/latest/configuration/
- '';
- default = [ "" ];
- type = types.listOf types.str;
- example = [ "--credentials=VALUE" ];
- };
-
- quorum = mkOption {
- description = ''
- The size of the quorum of replicas when using 'replicated_log' based
- registry. It is imperative to set this value to be a majority of
- masters i.e., quorum > (number of masters)/2.
-
- If 0 will fall back to --registry=in_memory.
- '';
- default = 0;
- type = types.int;
- };
-
- logLevel = mkOption {
- description = ''
- The logging level used. Possible values:
- 'INFO', 'WARNING', 'ERROR'
- '';
- default = "INFO";
- type = types.str;
- };
-
- };
-
-
- };
-
-
- config = mkIf cfg.enable {
- systemd.tmpfiles.rules = [
- "d '${cfg.workDir}' 0700 - - - -"
- ];
- systemd.services.mesos-master = {
- description = "Mesos Master";
- wantedBy = [ "multi-user.target" ];
- after = [ "network.target" ];
- serviceConfig = {
- ExecStart = ''
- ${pkgs.mesos}/bin/mesos-master \
- --ip=${cfg.ip} \
- --port=${toString cfg.port} \
- ${optionalString (cfg.advertiseIp != null) "--advertise_ip=${cfg.advertiseIp}"} \
- ${optionalString (cfg.advertisePort != null) "--advertise_port=${toString cfg.advertisePort}"} \
- ${if cfg.quorum == 0
- then "--registry=in_memory"
- else "--zk=${cfg.zk} --registry=replicated_log --quorum=${toString cfg.quorum}"} \
- --work_dir=${cfg.workDir} \
- --logging_level=${cfg.logLevel} \
- ${toString cfg.extraCmdLineOptions}
- '';
- Restart = "on-failure";
- };
- };
- };
-
-}
-
diff --git a/nixpkgs/nixos/modules/services/misc/mesos-slave.nix b/nixpkgs/nixos/modules/services/misc/mesos-slave.nix
deleted file mode 100644
index 170065d0065..00000000000
--- a/nixpkgs/nixos/modules/services/misc/mesos-slave.nix
+++ /dev/null
@@ -1,220 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with lib;
-
-let
- cfg = config.services.mesos.slave;
-
- mkAttributes =
- attrs: concatStringsSep ";" (mapAttrsToList
- (k: v: "${k}:${v}")
- (filterAttrs (k: v: v != null) attrs));
- attribsArg = optionalString (cfg.attributes != {})
- "--attributes=${mkAttributes cfg.attributes}";
-
- containerizersArg = concatStringsSep "," (
- lib.unique (
- cfg.containerizers ++ (optional cfg.withDocker "docker")
- )
- );
-
- imageProvidersArg = concatStringsSep "," (
- lib.unique (
- cfg.imageProviders ++ (optional cfg.withDocker "docker")
- )
- );
-
- isolationArg = concatStringsSep "," (
- lib.unique (
- cfg.isolation ++ (optionals cfg.withDocker [ "filesystem/linux" "docker/runtime"])
- )
- );
-
-in {
-
- options.services.mesos = {
- slave = {
- enable = mkOption {
- description = "Whether to enable the Mesos Slave.";
- default = false;
- type = types.bool;
- };
-
- ip = mkOption {
- description = "IP address to listen on.";
- default = "0.0.0.0";
- type = types.str;
- };
-
- port = mkOption {
- description = "Port to listen on.";
- default = 5051;
- type = types.int;
- };
-
- advertiseIp = mkOption {
- description = "IP address advertised to reach this agent.";
- default = null;
- type = types.nullOr types.str;
- };
-
- advertisePort = mkOption {
- description = "Port advertised to reach this agent.";
- default = null;
- type = types.nullOr types.int;
- };
-
- containerizers = mkOption {
- description = ''
- List of containerizer implementations to compose in order to provide
- containerization. Available options are mesos and docker.
- The order the containerizers are specified is the order they are tried.
- '';
- default = [ "mesos" ];
- type = types.listOf types.str;
- };
-
- imageProviders = mkOption {
- description = "List of supported image providers, e.g., APPC,DOCKER.";
- default = [ ];
- type = types.listOf types.str;
- };
-
- imageProvisionerBackend = mkOption {
- description = ''
- Strategy for provisioning container rootfs from images,
- e.g., aufs, bind, copy, overlay.
- '';
- default = "copy";
- type = types.str;
- };
-
- isolation = mkOption {
- description = ''
- Isolation mechanisms to use, e.g., posix/cpu,posix/mem, or
- cgroups/cpu,cgroups/mem, or network/port_mapping, or `gpu/nvidia` for nvidia
- specific gpu isolation.
- '';
- default = [ "posix/cpu" "posix/mem" ];
- type = types.listOf types.str;
- };
-
- master = mkOption {
- description = ''
- May be one of:
- zk://host1:port1,host2:port2,.../path
- zk://username:password@host1:port1,host2:port2,.../path
- '';
- type = types.str;
- };
-
- withHadoop = mkOption {
- description = "Add the HADOOP_HOME to the slave.";
- default = false;
- type = types.bool;
- };
-
- withDocker = mkOption {
- description = "Enable the docker containerizer.";
- default = config.virtualisation.docker.enable;
- type = types.bool;
- };
-
- dockerRegistry = mkOption {
- description = ''
- The default url for pulling Docker images.
- It could either be a Docker registry server url,
- or a local path in which Docker image archives are stored.
- '';
- default = null;
- type = types.nullOr (types.either types.str types.path);
- };
-
- workDir = mkOption {
- description = "The Mesos work directory.";
- default = "/var/lib/mesos/slave";
- type = types.str;
- };
-
- extraCmdLineOptions = mkOption {
- description = ''
- Extra command line options for Mesos Slave.
-
- See https://mesos.apache.org/documentation/latest/configuration/
- '';
- default = [ "" ];
- type = types.listOf types.str;
- example = [ "--gc_delay=3days" ];
- };
-
- logLevel = mkOption {
- description = ''
- The logging level used. Possible values:
- 'INFO', 'WARNING', 'ERROR'
- '';
- default = "INFO";
- type = types.str;
- };
-
- attributes = mkOption {
- description = ''
- Machine attributes for the slave instance.
-
- Use caution when changing this; you may need to manually reset slave
- metadata before the slave can re-register.
- '';
- default = {};
- type = types.attrsOf types.str;
- example = { rack = "aa";
- host = "aabc123";
- os = "nixos"; };
- };
-
- executorEnvironmentVariables = mkOption {
- description = ''
- The environment variables that should be passed to the executor, and thus subsequently task(s).
- '';
- default = {
- PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
- };
- type = types.attrsOf types.str;
- };
- };
-
- };
-
- config = mkIf cfg.enable {
- systemd.tmpfiles.rules = [
- "d '${cfg.workDir}' 0701 - - - -"
- ];
- systemd.services.mesos-slave = {
- description = "Mesos Slave";
- wantedBy = [ "multi-user.target" ];
- after = [ "network.target" ] ++ optionals cfg.withDocker [ "docker.service" ] ;
- path = [ pkgs.runtimeShellPackage ];
- serviceConfig = {
- ExecStart = ''
- ${pkgs.mesos}/bin/mesos-slave \
- --containerizers=${containerizersArg} \
- --image_providers=${imageProvidersArg} \
- --image_provisioner_backend=${cfg.imageProvisionerBackend} \
- --isolation=${isolationArg} \
- --ip=${cfg.ip} \
- --port=${toString cfg.port} \
- ${optionalString (cfg.advertiseIp != null) "--advertise_ip=${cfg.advertiseIp}"} \
- ${optionalString (cfg.advertisePort != null) "--advertise_port=${toString cfg.advertisePort}"} \
- --master=${cfg.master} \
- --work_dir=${cfg.workDir} \
- --logging_level=${cfg.logLevel} \
- ${attribsArg} \
- ${optionalString cfg.withHadoop "--hadoop-home=${pkgs.hadoop}"} \
- ${optionalString cfg.withDocker "--docker=${pkgs.docker}/libexec/docker/docker"} \
- ${optionalString (cfg.dockerRegistry != null) "--docker_registry=${cfg.dockerRegistry}"} \
- --executor_environment_variables=${lib.escapeShellArg (builtins.toJSON cfg.executorEnvironmentVariables)} \
- ${toString cfg.extraCmdLineOptions}
- '';
- };
- };
- };
-
-}
diff --git a/nixpkgs/nixos/modules/services/misc/nix-daemon.nix b/nixpkgs/nixos/modules/services/misc/nix-daemon.nix
index 924a007efc6..2680b1cc0d3 100644
--- a/nixpkgs/nixos/modules/services/misc/nix-daemon.nix
+++ b/nixpkgs/nixos/modules/services/misc/nix-daemon.nix
@@ -500,13 +500,6 @@ in
config = {
- assertions = [
- {
- assertion = config.nix.distributedBuilds || config.nix.buildMachines == [];
- message = "You must set `nix.distributedBuilds = true` to use nix.buildMachines";
- }
- ];
-
nix.binaryCachePublicKeys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ];
nix.binaryCaches = [ "https://cache.nixos.org/" ];
@@ -594,16 +587,10 @@ in
nix.systemFeatures = mkDefault (
[ "nixos-test" "benchmark" "big-parallel" "kvm" ] ++
- optionals (pkgs.stdenv.isx86_64 && pkgs.hostPlatform.platform ? gcc.arch) (
- # a x86_64 builder can run code for `platform.gcc.arch` and minor architectures:
- [ "gccarch-${pkgs.hostPlatform.platform.gcc.arch}" ] ++ {
- sandybridge = [ "gccarch-westmere" ];
- ivybridge = [ "gccarch-westmere" "gccarch-sandybridge" ];
- haswell = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" ];
- broadwell = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" "gccarch-haswell" ];
- skylake = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" "gccarch-haswell" "gccarch-broadwell" ];
- skylake-avx512 = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" "gccarch-haswell" "gccarch-broadwell" "gccarch-skylake" ];
- }.${pkgs.hostPlatform.platform.gcc.arch} or []
+ optionals (pkgs.hostPlatform.platform ? gcc.arch) (
+ # a builder can run code for `platform.gcc.arch` and inferior architectures
+ [ "gccarch-${pkgs.hostPlatform.platform.gcc.arch}" ] ++
+ map (x: "gccarch-${x}") lib.systems.architectures.inferiors.${pkgs.hostPlatform.platform.gcc.arch}
)
);
diff --git a/nixpkgs/nixos/modules/services/misc/octoprint.nix b/nixpkgs/nixos/modules/services/misc/octoprint.nix
index 7a71d2c8c6a..e2fbd3b401c 100644
--- a/nixpkgs/nixos/modules/services/misc/octoprint.nix
+++ b/nixpkgs/nixos/modules/services/misc/octoprint.nix
@@ -68,8 +68,8 @@ in
plugins = mkOption {
default = plugins: [];
defaultText = "plugins: []";
- example = literalExample "plugins: [ m3d-fio ]";
- description = "Additional plugins.";
+ example = literalExample "plugins: with plugins; [ m33-fio stlviewer ]";
+ description = "Additional plugins to be used. Available plugins are passed through the plugins input.";
};
extraConfig = mkOption {
diff --git a/nixpkgs/nixos/modules/services/misc/pinnwand.nix b/nixpkgs/nixos/modules/services/misc/pinnwand.nix
new file mode 100644
index 00000000000..aa1ee5cfaa7
--- /dev/null
+++ b/nixpkgs/nixos/modules/services/misc/pinnwand.nix
@@ -0,0 +1,78 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.services.pinnwand;
+
+ format = pkgs.formats.toml {};
+ configFile = format.generate "pinnwand.toml" cfg.settings;
+in
+{
+ options.services.pinnwand = {
+ enable = mkEnableOption "Pinnwand";
+
+ port = mkOption {
+ type = types.port;
+ description = "The port to listen on.";
+ default = 8000;
+ };
+
+ settings = mkOption {
+ type = format.type;
+ description = ''
+ Your <filename>pinnwand.toml</filename> as a Nix attribute set. Look up
+ possible options in the <link xlink:href="https://github.com/supakeen/pinnwand/blob/master/pinnwand.toml-example">pinnwand.toml-example</link>.
+ '';
+ default = {
+ # https://github.com/supakeen/pinnwand/blob/master/pinnwand.toml-example
+ database_uri = "sqlite:///var/lib/pinnwand/pinnwand.db";
+ preferred_lexeres = [];
+ paste_size = 262144;
+ paste_help = ''
+ <p>Welcome to pinnwand, this site is a pastebin. It allows you to share code with others. If you write code in the text area below and press the paste button you will be given a link you can share with others so they can view your code as well.</p><p>People with the link can view your pasted code, only you can remove your paste and it expires automatically. Note that anyone could guess the URI to your paste so don't rely on it being private.</p>
+ '';
+ footer = ''
+ View <a href="//github.com/supakeen/pinnwand" target="_BLANK">source code</a>, the <a href="/removal">removal</a> or <a href="/expiry">expiry</a> stories, or read the <a href="/about">about</a> page.
+ '';
+ };
+ };
+ };
+
+ config = mkIf cfg.enable {
+ systemd.services.pinnwand = {
+ description = "Pinnwannd HTTP Server";
+ after = [ "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+
+ unitConfig.Documentation = "https://pinnwand.readthedocs.io/en/latest/";
+ serviceConfig = {
+ ExecStart = "${pkgs.pinnwand}/bin/pinnwand --configuration-path ${configFile} http --port ${toString(cfg.port)}";
+ StateDirectory = "pinnwand";
+ StateDirectoryMode = "0700";
+
+ AmbientCapabilities = [];
+ CapabilityBoundingSet = "";
+ DevicePolicy = "closed";
+ DynamicUser = true;
+ LockPersonality = true;
+ MemoryDenyWriteExecute = true;
+ PrivateDevices = true;
+ PrivateUsers = true;
+ ProtectClock = true;
+ ProtectControlGroups = true;
+ ProtectKernelLogs = true;
+ ProtectHome = true;
+ ProtectHostname = true;
+ ProtectKernelModules = true;
+ ProtectKernelTunables = true;
+ RestrictAddressFamilies = [ "AF_UNIX" "AF_INET" "AF_INET6" ];
+ RestrictNamespaces = true;
+ RestrictRealtime = true;
+ SystemCallArchitectures = "native";
+ SystemCallFilter = "@system-service";
+ UMask = "0077";
+ };
+ };
+ };
+}
diff --git a/nixpkgs/nixos/modules/services/misc/redmine.nix b/nixpkgs/nixos/modules/services/misc/redmine.nix
index 0e71cf92569..1313bdaccc4 100644
--- a/nixpkgs/nixos/modules/services/misc/redmine.nix
+++ b/nixpkgs/nixos/modules/services/misc/redmine.nix
@@ -1,12 +1,12 @@
{ config, lib, pkgs, ... }:
let
- inherit (lib) mkDefault mkEnableOption mkIf mkOption types;
+ inherit (lib) mkBefore mkDefault mkEnableOption mkIf mkOption mkRemovedOptionModule types;
inherit (lib) concatStringsSep literalExample mapAttrsToList;
- inherit (lib) optional optionalAttrs optionalString singleton versionAtLeast;
+ inherit (lib) optional optionalAttrs optionalString;
cfg = config.services.redmine;
-
+ format = pkgs.formats.yaml {};
bundle = "${cfg.package}/share/redmine/bin/bundle";
databaseYml = pkgs.writeText "database.yml" ''
@@ -20,24 +20,8 @@ let
${optionalString (cfg.database.type == "mysql2" && cfg.database.socket != null) "socket: ${cfg.database.socket}"}
'';
- configurationYml = pkgs.writeText "configuration.yml" ''
- default:
- scm_subversion_command: ${pkgs.subversion}/bin/svn
- scm_mercurial_command: ${pkgs.mercurial}/bin/hg
- scm_git_command: ${pkgs.gitAndTools.git}/bin/git
- scm_cvs_command: ${pkgs.cvs}/bin/cvs
- scm_bazaar_command: ${pkgs.breezy}/bin/bzr
- scm_darcs_command: ${pkgs.darcs}/bin/darcs
-
- ${cfg.extraConfig}
- '';
-
- additionalEnvironment = pkgs.writeText "additional_environment.rb" ''
- config.logger = Logger.new("${cfg.stateDir}/log/production.log", 14, 1048576)
- config.logger.level = Logger::INFO
-
- ${cfg.extraEnv}
- '';
+ configurationYml = format.generate "configuration.yml" cfg.settings;
+ additionalEnvironment = pkgs.writeText "additional_environment.rb" cfg.extraEnv;
unpackTheme = unpack "theme";
unpackPlugin = unpack "plugin";
@@ -56,8 +40,13 @@ let
pgsqlLocal = cfg.database.createLocally && cfg.database.type == "postgresql";
in
-
{
+ imports = [
+ (mkRemovedOptionModule [ "services" "redmine" "extraConfig" ] "Use services.redmine.settings instead.")
+ (mkRemovedOptionModule [ "services" "redmine" "database" "password" ] "Use services.redmine.database.passwordFile instead.")
+ ];
+
+ # interface
options = {
services.redmine = {
enable = mkEnableOption "Redmine";
@@ -93,21 +82,24 @@ in
description = "The state directory, logs and plugins are stored here.";
};
- extraConfig = mkOption {
- type = types.lines;
- default = "";
+ settings = mkOption {
+ type = format.type;
+ default = {};
description = ''
- Extra configuration in configuration.yml.
-
- See <link xlink:href="https://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration"/>
+ Redmine configuration (<filename>configuration.yml</filename>). Refer to
+ <link xlink:href="https://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration"/>
for details.
'';
example = literalExample ''
- email_delivery:
- delivery_method: smtp
- smtp_settings:
- address: mail.example.com
- port: 25
+ {
+ email_delivery = {
+ delivery_method = "smtp";
+ smtp_settings = {
+ address = "mail.example.com";
+ port = 25;
+ };
+ };
+ }
'';
};
@@ -186,16 +178,6 @@ in
description = "Database user.";
};
- password = mkOption {
- type = types.str;
- default = "";
- description = ''
- The password corresponding to <option>database.user</option>.
- Warning: this is stored in cleartext in the Nix store!
- Use <option>database.passwordFile</option> instead.
- '';
- };
-
passwordFile = mkOption {
type = types.nullOr types.path;
default = null;
@@ -226,11 +208,12 @@ in
};
};
+ # implementation
config = mkIf cfg.enable {
assertions = [
- { assertion = cfg.database.passwordFile != null || cfg.database.password != "" || cfg.database.socket != null;
- message = "one of services.redmine.database.socket, services.redmine.database.passwordFile, or services.redmine.database.password must be set";
+ { assertion = cfg.database.passwordFile != null || cfg.database.socket != null;
+ message = "one of services.redmine.database.socket or services.redmine.database.passwordFile must be set";
}
{ assertion = cfg.database.createLocally -> cfg.database.user == cfg.user;
message = "services.redmine.database.user must be set to ${cfg.user} if services.redmine.database.createLocally is set true";
@@ -243,6 +226,22 @@ in
}
];
+ services.redmine.settings = {
+ production = {
+ scm_subversion_command = "${pkgs.subversion}/bin/svn";
+ scm_mercurial_command = "${pkgs.mercurial}/bin/hg";
+ scm_git_command = "${pkgs.gitAndTools.git}/bin/git";
+ scm_cvs_command = "${pkgs.cvs}/bin/cvs";
+ scm_bazaar_command = "${pkgs.breezy}/bin/bzr";
+ scm_darcs_command = "${pkgs.darcs}/bin/darcs";
+ };
+ };
+
+ services.redmine.extraEnv = mkBefore ''
+ config.logger = Logger.new("${cfg.stateDir}/log/production.log", 14, 1048576)
+ config.logger.level = Logger::INFO
+ '';
+
services.mysql = mkIf mysqlLocal {
enable = true;
package = mkDefault pkgs.mariadb;
@@ -338,7 +337,7 @@ in
# handle database.passwordFile & permissions
- DBPASS=$(head -n1 ${cfg.database.passwordFile})
+ DBPASS=${optionalString (cfg.database.passwordFile != null) "$(head -n1 ${cfg.database.passwordFile})"}
cp -f ${databaseYml} "${cfg.stateDir}/config/database.yml"
sed -e "s,#dbpass#,$DBPASS,g" -i "${cfg.stateDir}/config/database.yml"
chmod 440 "${cfg.stateDir}/config/database.yml"
@@ -379,17 +378,6 @@ in
redmine.gid = config.ids.gids.redmine;
};
- warnings = optional (cfg.database.password != "")
- ''config.services.redmine.database.password will be stored as plaintext
- in the Nix store. Use database.passwordFile instead.'';
-
- # Create database passwordFile default when password is configured.
- services.redmine.database.passwordFile =
- (mkDefault (toString (pkgs.writeTextFile {
- name = "redmine-database-password";
- text = cfg.database.password;
- })));
-
};
}
diff --git a/nixpkgs/nixos/modules/services/misc/siproxd.nix b/nixpkgs/nixos/modules/services/misc/siproxd.nix
index ae7b27de8e7..0e87fc461d3 100644
--- a/nixpkgs/nixos/modules/services/misc/siproxd.nix
+++ b/nixpkgs/nixos/modules/services/misc/siproxd.nix
@@ -38,7 +38,7 @@ in
type = types.bool;
default = false;
description = ''
- Whether to enable the Siproxd SIP
+ Whether to enable the Siproxd SIP
proxy/masquerading daemon.
'';
};
@@ -111,7 +111,7 @@ in
type = types.int;
default = 300;
description = ''
- Timeout for an RTP stream. If for the specified
+ Timeout for an RTP stream. If for the specified
number of seconds no data is relayed on an active
stream, it is considered dead and will be killed.
'';
@@ -122,7 +122,7 @@ in
default = 46;
description = ''
DSCP (differentiated services) value to be assigned
- to RTP packets. Allows QOS aware routers to handle
+ to RTP packets. Allows QOS aware routers to handle
different types traffic with different priorities.
'';
};
@@ -132,7 +132,7 @@ in
default = 0;
description = ''
DSCP (differentiated services) value to be assigned
- to SIP packets. Allows QOS aware routers to handle
+ to SIP packets. Allows QOS aware routers to handle
different types traffic with different priorities.
'';
};
diff --git a/nixpkgs/nixos/modules/services/misc/ssm-agent.nix b/nixpkgs/nixos/modules/services/misc/ssm-agent.nix
index f7c05deeecb..00e806695fd 100644
--- a/nixpkgs/nixos/modules/services/misc/ssm-agent.nix
+++ b/nixpkgs/nixos/modules/services/misc/ssm-agent.nix
@@ -29,13 +29,15 @@ in {
config = mkIf cfg.enable {
systemd.services.ssm-agent = {
+ users.extraUsers.ssm-user = {};
+
inherit (cfg.package.meta) description;
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
- path = [ fake-lsb-release ];
+ path = [ fake-lsb-release pkgs.coreutils ];
serviceConfig = {
- ExecStart = "${cfg.package}/bin/agent";
+ ExecStart = "${cfg.package}/bin/amazon-ssm-agent";
KillMode = "process";
Restart = "on-failure";
RestartSec = "15min";
diff --git a/nixpkgs/nixos/modules/services/misc/sssd.nix b/nixpkgs/nixos/modules/services/misc/sssd.nix
index 3da99a3b38c..386281e2b7c 100644
--- a/nixpkgs/nixos/modules/services/misc/sssd.nix
+++ b/nixpkgs/nixos/modules/services/misc/sssd.nix
@@ -69,7 +69,7 @@ in {
mode = "0400";
};
- system.nssModules = pkgs.sssd;
+ system.nssModules = [ pkgs.sssd ];
system.nssDatabases = {
group = [ "sss" ];
passwd = [ "sss" ];
@@ -92,4 +92,6 @@ in {
services.openssh.authorizedKeysCommand = "/etc/ssh/authorized_keys_command";
services.openssh.authorizedKeysCommandUser = "nobody";
})];
+
+ meta.maintainers = with maintainers; [ bbigras ];
}
diff --git a/nixpkgs/nixos/modules/services/misc/tzupdate.nix b/nixpkgs/nixos/modules/services/misc/tzupdate.nix
index 570982ced29..eac1e1112a5 100644
--- a/nixpkgs/nixos/modules/services/misc/tzupdate.nix
+++ b/nixpkgs/nixos/modules/services/misc/tzupdate.nix
@@ -11,7 +11,7 @@ in {
default = false;
description = ''
Enable the tzupdate timezone updating service. This provides
- a one-shot service which can be activated with systemctl to
+ a one-shot service which can be activated with systemctl to
update the timezone.
'';
};
@@ -21,7 +21,7 @@ in {
# We need to have imperative time zone management for this to work.
# This will give users an error if they have set an explicit time
# zone, which is better than silently overriding it.
- time.timeZone = null;
+ time.timeZone = null;
# We provide a one-shot service which can be manually run. We could
# provide a service that runs on startup, but it's tricky to get