summary refs log tree commit diff
path: root/nixos
Commit message (Collapse)AuthorAge
* nixos/prometheus-exporters: refactor imports, replace 'with lib;'WilliButz2019-07-22
| | | | | Pass through 'options' to exporter definitions and replace 'with lib;' by explicit function imports.
* nixos/test: fix prometheus-{bind,varnish}-exporter testsWilliButz2019-07-22
|
* Merge pull request #64268 from jameysharp/nscd-dynamicuserNikolay Amiantov2019-07-22
|\ | | | | nixos/nscd: DynamicUser and other cleanups
| * nixos/nscd: document why it is configured this wayJamey Sharp2019-07-12
| |
| * nixos/nscd: only drop privs after nss module initJamey Sharp2019-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NixOS usually needs nscd just to have a single place where LD_LIBRARY_PATH can be set to include all NSS modules, but nscd is also useful if some of the NSS modules need to read files which are only accessible by root. For example, nixos/modules/config/ldap.nix needs this when users.ldap.enable = true; users.ldap.daemon.enable = false; and users.ldap.bind.passwordFile exists. In that case, the module creates an /etc/ldap.conf which is only readable by root, but which the NSS module needs to read in order to find out what LDAP server to connect to and with what credentials. If nscd is started as root and configured with the server-user option in nscd.conf, then it gives each NSS module the opportunity to initialize itself before dropping privileges. The initialization happens in the glibc-internal __nss_disable_nscd function, which pre-loads all the configured NSS modules for passwd, group, hosts, and services (but not netgroup for some reason?) and, for each loaded module, calls an init function if one is defined. After that finishes, nscd's main() calls nscd_init() which ends by calling finish_drop_privileges(). There are provisions in systemd for using DynamicUser with a service which needs to drop privileges itself, so this patch does that.
| * nixos/nscd: don't need to specify usernameJamey Sharp2019-07-06
| | | | | | | | | | | | Thanks to @arianvp for pointing out that when DynamicUser is true, systemd defaults the value of User to be the name of the unit, which in this case is already "nscd".
| * nixos/nscd: delete redundant nscd.conf optionsJamey Sharp2019-07-03
| | | | | | | | | | | | | | | | | | | | | | These options were being set to the same value as the defaults that are hardcoded in nscd. Delete them so it's clear which settings are actually important for NixOS. One exception is `threads 1`, which is different from the built-in default of 4. However, both values are equivalent because nscd forces the number of threads to be at least as many as the number of kinds of databases it supports, which is 5.
| * nixos/nscd: run with a dynamic userJamey Sharp2019-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nscd doesn't create any files outside of /run/nscd unless the nscd.conf "persistent" option is used, which we don't do by default. Therefore it doesn't matter what UID/GID we run this service as, so long as it isn't shared with any other running processes. /run/nscd does need to be owned by the same UID that the service is running as, but systemd takes care of that for us thanks to the RuntimeDirectory directive. If someone wants to turn on the "persistent" option, they need to manually configure users.users.nscd and systemd.tmpfiles.rules so that /var/db/nscd is owned by the same user that nscd runs as. In an all-defaults boot.isContainer configuration of NixOS, this removes the only user which did not have a pre-assigned UID.
| * nixos/nscd: let systemd manage directoriesJamey Sharp2019-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously this module created both /var/db/nscd and /run/nscd using shell commands in a preStart script. Note that both of these paths are hard-coded in the nscd source. (Well, the latter is actually /var/run/nscd but /var/run is a symlink to /run so it works out the same.) /var/db/nscd is only used if the nscd.conf "persistent" option is turned on for one or more databases, which it is not in our default config file. I'm not even sure persistent mode can work under systemd, since `nscd --shutdown` is not synchronous so systemd will always unceremoniously kill nscd without reliably giving it time to mark the databases as unused. Nonetheless, if someone wants to use that option, they can ensure the directory exists using systemd.tmpfiles.rules. systemd can create /run/nscd for us with the RuntimeDirectory directive, with the added benefit of causing systemd to delete the directory on service stop or restart. The default value of RuntimeDirectoryMode is 755, the same as the mode which this module was using before. I don't think the `rm -f /run/nscd/nscd.pid` was necessary after NixOS switched to systemd and used its PIDFile directive, because systemd deletes the specified file after the service stops, and because the file can't persist across reboots since /run is a tmpfs. Even if the file still exists when nscd starts, it's only a problem if the pid it contains has been reused by another process, which is unlikely. Anyway, this change makes that deletion even less necessary, because now systemd deletes the entire /run/nscd directory when the service stops.
| * nixos/nscd: no longer need to wait for readinessJamey Sharp2019-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This postStart step was introduced on 2014-04-24 with the comment that "Nscd forks into the background before it's ready to accept connections." However, that was fixed upstream almost two months earlier, on 2014-03-03, with the comment that "This, along with setting the nscd service type to forking in its systemd configuration file, allows systemd to be certain that the nscd service is ready and is accepting connections." The fix was released several months later in glibc 2.20, which was merged in NixOS sometime before 15.09, so it certainly should be safe to remove this workaround by now.
* | boot tests: don't use globbingNikolay Amiantov2019-07-22
| | | | | | | | | | | | Turns out I broke all the boot tests except netboot. Instead of relying on build-time search for .iso we can use a proper attribute.
* | nixos-test-driver: allow configuration of net frontend and backendAndrew Childs2019-07-22
| | | | | | | | | | | | When IPXE tests were added, an option was added for configuring only the frontend, and the backend configuration was dropped entirely. This caused most installer tests to fail.
* | Merge pull request #64463 from Ma27/graylog-testFranz Pletz2019-07-21
|\ \ | | | | | | nixos/graylog: minor fixes, add test
| * | nixos/graylog: add testMaximilian Bosch2019-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basic test which confirms new inputs can be created and that messages can be sent to a UDP-GELF input using `netcat`. This test requires 4GB of RAM to avoid issues due insufficient memory (please refer to `nixos/tests/elk.nix` for a detailed explanation of the issue) for elasticsearch. Also it's ensured that elasticsearch has an open HTTP port for communication when starting `graylog`. This is a workaround to ensure that all services are started in proper order, even in test environments with less power. However this shouldn't be implemented in the `nixos/graylog` module as this might be harmful when using elasticsearch clusters that require e.g. authentication and/or run on different servers.
| * | nixos/graylog: fix startupMaximilian Bosch2019-07-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now the startup failed with an error like this: ``` com.github.joschi.jadconfig.ValidationException: Parent path /var/lib/graylog/server for Node ID file at /var/lib/graylog/server/node-id is not a directory ``` This happens since `graylog.service` ensures that `/var/lib/graylog` exists, however it doesn't take care of the directory for `cfg.nodeIdFile`.
* | | Merge pull request #60436 from nbardiuk/masterAaron Andersen2019-07-21
|\ \ \ | | | | | | | | nixos/tiddlywiki: init
| * | | nixos/tiddlywiki: initNazarii Bardiuk2019-07-16
| | | | | | | | | | | | | | | | Service that runs TiddlyWiki nodejs server
* | | | Merge pull request #65225 from Ma27/bump-prometheus-wireguard-exporterFranz Pletz2019-07-21
|\ \ \ \ | | | | | | | | | | prometheus-wireguard-exporter: 2.0.1 -> 3.0.0
| * | | | nixos/prometheus-exporters/wireguard: add support for `-s` switchMaximilian Bosch2019-07-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since version 3.0 all allowed IPs and subnets are exposed by the exporter. With `-s` set on the CLI, instead of a comma-separated list, each allowed IP and subnet will be in a single field with the schema `allowed_ip_<index>`.
| * | | | prometheus-wireguard-exporter: 2.0.1 -> 3.0.0Maximilian Bosch2019-07-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two new releases are available: * https://github.com/MindFlavor/prometheus_wireguard_exporter/releases/tag/3.0.0 * https://github.com/MindFlavor/prometheus_wireguard_exporter/releases/tag/2.0.2 The main new feature is that the exporter exposes all allowed ips and subnets.
* | | | | docs: update docs for postgresql plugins (#64899)Danylo Hlynskyi2019-07-21
|/ / / / | | | | | | | | | | | | | | | | docs: update docs for postgresql plugins Co-Authored-By: Mario Rodas <marsam@users.noreply.github.com>
* | | | Merge pull request #65188 from xvello/masterThomas Tuegel2019-07-20
|\ \ \ \ | | | | | | | | | | plasma5: allow to configure the default phonon backend
| * | | | nixos/plasma5: allow to configure the default phonon backendXavier Vello2019-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new .plasma5.phononBackend option. Default value "gstreamer" installs the same packages as before. "vlc" installs only the vlc phonon backend.
* | | | | nixos/tests: drop tomcat connector testSamuel Dionne-Riel2019-07-20
|/ / / / | | | | | | | | | | | | The httpd subservice was dropped in #64052.
* | | | Merge pull request #64741 from dasJ/gitea-smtp-pwAaron Andersen2019-07-20
|\ \ \ \ | | | | | | | | | | nixos/gitea: Support SMTP without pw in the store
| * | | | nixos/gitea: Support SMTP without pw in the storeJanne Heß2019-07-14
| | | | |
* | | | | Merge pull request #64365 from aanderse/tt-rssAaron Andersen2019-07-20
|\ \ \ \ \ | | | | | | | | | | | | nixos/tt-rss: remove deprecated usage of PermissionsStartOnly, specify a group to run service as, and fix local pgsql database creation
| * | | | | nixos/tt-rss: remove deprecated usage of PermissionsStartOnly, specify a ↵Aaron Andersen2019-07-05
| | | | | | | | | | | | | | | | | | | | | | | | group to run service as, and fix local pgsql database creation
* | | | | | nixos/xdg: default portal from xserver.enableworldofpeace2019-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | same affect as f84a4ef8924f9e21f653b895723ee75c93b56a27 but we won't need to enable the module independently for DE modules.
* | | | | | nixos/xdg: Disables portal by default...Samuel Dionne-Riel2019-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Left to do: re-enable as needed in the usual situations. This added ~286MiB to the base system closure, which is enough to bring the sd images over the limit allowed on Hydra.
* | | | | | Merge pull request #65079 from mmahut/typoGraham Christensen2019-07-19
|\ \ \ \ \ \ | | | | | | | | | | | | | | Renaming security.virtualization.flushL1DataCache to virtualisation
| * | | | | | Renaming security.virtualization.flushL1DataCache to virtualisationMarek Mahut2019-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #65044
* | | | | | | Merge pull request #64052 from aanderse/tomcat-connectorGraham Christensen2019-07-19
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | nixos/httpd: drop tomcat-connector httpd subservice
| * | | | | | nixos/httpd: drop tomcat-connector httpd subserviceAaron Andersen2019-07-11
| | | | | | |
* | | | | | | nixos/doc: fix buildworldofpeace2019-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjusts to options renamed in 90b1197301eb714e64a508c3be2dd073b24caed3
* | | | | | | nixos/pantheon: add gtk xdg desktop portalworldofpeace2019-07-18
| | | | | | |
* | | | | | | Merge pull request #64575 from pasqui23/portalworldofpeace2019-07-18
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | nixos/xdg: add portal option
| * | | | | | | nixos/xdg: add portal optionPasquale2019-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This factors the configuration out of the flatpak module.
* | | | | | | | Merge pull request #64794 from peti/t/postfix-modulePeter Simons2019-07-18
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | nixos: add 'localRecipients' config option for Postfix
| * | | | | | | | nixos: add 'localRecipients' config option for PostfixPeter Simons2019-07-15
| | |_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new option services.postfix.localRecipients allows configuring the postfix option 'local_recipient_maps'. When set to a list of user names (or patterns), that map effectively replaces the lookup in the system's user database that's used by default to determine which local users are valid. This option is useful to explicitly set local users that are allowed to receive e-mail from the outside world. For local injection i.e. via the 'sendmail' command this option has no effect.
* | | | | | | | nixos/tor: fix obfs4 packagefuwa2019-07-19
| | | | | | | |
* | | | | | | | Merge pull request #61312 from Yarny0/tsm-clientFlorian Klink2019-07-18
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | TSM client
| * | | | | | | | nixos/backup/tsm: init moduleYarny02019-07-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the programs/tsm-client module, this commit introduces a systemd service that uses the tsm-client to create regular backups of the machine.
| * | | | | | | | nixos/tsm-client: init moduleYarny02019-07-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit brings a module that installs the IBM Spectrum Protect (Tivoli Storage Manager) command-line client together with its system-wide client system-options file `dsm.sys`.
* | | | | | | | | Merge pull request #64550 from bgamari/gitlab-12.0Robin Gloster2019-07-17
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | gitlab: 11.10.8 -> 12.0.3
| * | | | | | | | | gitlab module: fix permissionsRobin Gloster2019-07-16
| | | | | | | | | |
| * | | | | | | | | gitlab-shell: better gitlab_shell_secret locationRobin Gloster2019-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So this won't be cleaned up by removing config/*
| * | | | | | | | | gitlab module: clean up permission handlingRobin Gloster2019-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is WIP to get rid of PermissionsStartOnly=true
* | | | | | | | | | nixos/openldap: fix assertionJamey Sharp2019-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit d43dc68db3f414a527cad632a3f1fb868fc1c902, @Mic92 split the rootpw option to allow specifying it in a file kept outside the Nix store, as an alternative to specifying the password directly in the config. Prior to that, rootpw's type was `str`, but in order to allow both alternatives, it had to become `nullOr str` with a default of `null`. So I can see why this assertion, that either rootpw or rootpwFile are specified, makes sense to add here. However, these options aren't used if the configDir option is set, so as written this assertion breaks valid configurations, including the configuration used by nixos/tests/ldap.nix. So this patch fixes the assertion so that it doesn't fire if configDir is set.
* | | | | | | | | | Merge pull request #62955 from abbradar/resolvconfNikolay Amiantov2019-07-17
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | resolvconf service: init