Commit graph

13852 commits

Author SHA1 Message Date
Andreas Rammhold 819e8bb35f
nixos/networkd: rename the networkd dhcpConfig option to dhcpV4Config
This follows upstreams change in documentation. While the `[DHCP]`
section might still work it is undocumented and we should probably not
be using it anymore. Users can just upgrade to the new option without
much hassle.

I had to create a bit of custom module deprecation code since the usual
approach doesn't support wildcards in the path.
2020-05-01 13:33:54 +02:00
Andreas Rammhold bb9b61e2b7
nixos/networkd: introduce the DHCPv6 network section eqivalent
You can now specify option for the `[DHCPv6]` section with
`systemd.network.<name>.dhcpV6Config.…`. Previously you could only use
the combined legacy DHCP configuration.
2020-05-01 13:33:54 +02:00
Andreas Rammhold fc960a0123
nixos/networkd: add MaxAttempts and SendRelease to the DHCP options 2020-05-01 13:33:54 +02:00
Andreas Rammhold 7b78f0f098
nixos/networkd: remove CriticalConnection= fields in favor of KeepConnection
Systemd upstream has deprecated CriticalConnection with v244 in favor of
KeepConnection as that seems to be more flexible:

  The CriticalConnection= setting in .network files is now deprecated,
  and replaced by a new KeepConfiguration= setting which allows more
  detailed configuration of the IP configuration to keep in place.
2020-05-01 13:33:53 +02:00
Florian Klink 4e14ff6eac
Merge pull request #84139 from misuzu/gitlab-runner-multi
nixos/gitlab-runner: support multiple services
2020-05-01 12:37:28 +02:00
Michele Guerini Rocco 6c142fddb1
Merge pull request #84330 from das-g/xonsh-source-nixos-env
nixos/xonsh: source NixOS environment
2020-05-01 12:26:13 +02:00
misuzu 3853c27111 nixos/gitlab-runner: support multiple services 2020-05-01 12:52:43 +03:00
zowoq b815de00f7 podman: use $out instead of $bin with buildGoPackage 2020-05-01 18:24:09 +10:00
Frederik Rietdijk 484ee79050 Merge staging-next into staging 2020-05-01 08:57:10 +02:00
Aaron Andersen 5445b8d8d0
Merge pull request #83436 from mmilata/mediawiki-default-extensions
nixos/mediawiki: allow using default extensions
2020-04-30 21:03:15 -04:00
Félix Baylac-Jacqué 353a8b58e6
nixos/prosody: leverage systemd sandbox features to harden service
We are leveraging the systemd sandboxing features to prevent the
service accessing locations it shouldn't do. Most notably, we are here
preventing the prosody service from accessing /home and providing it
with a private /dev and /tmp.

Please consult man systemd.exec for further informations.
2020-04-30 20:40:00 +02:00
Félix Baylac-Jacqué 8aea528872
nixos/prosody: make defaults comply with XEP-0423
Setting up a XMPP chat server is a pretty deep rabbit whole to jump in
when you're not familiar with this whole universe. Your experience
with this environment will greatly depends on whether or not your
server implements the right set of XEPs.

To tackle this problem, the XMPP community came with the idea of
creating a meta-XEP in charge of listing the desirable XEPs to comply
with. This meta-XMP is issued every year under an new XEP number. The
2020 one being XEP-0423[1].

This prosody nixos module refactoring makes complying with XEP-0423
easier. All the necessary extensions are enabled by default. For some
extensions (MUC and HTTP_UPLOAD), we need some input from the user and
cannot provide a sensible default nixpkgs-wide. For those, we guide
the user using a couple of assertions explaining the remaining manual
steps to perform.

We took advantage of this substential refactoring to refresh the
associated nixos test.

Changelog:
- Update the prosody package to provide the necessary community
  modules in order to comply with XEP-0423. This is a tradeoff, as
  depending on their configuration, the user might end up not using them
  and wasting some disk space. That being said, adding those will
  allow the XEP-0423 users, which I expect to be the majority of
  users, to leverage a bit more the binary cache.
- Add a muc submodule populated with the prosody muc defaults.
- Add a http_upload submodule in charge of setting up a basic http
  server handling the user uploads. This submodule is in is
  spinning up an HTTP(s) server in charge of receiving and serving the
  user's attachments.
- Advertise both the MUCs and the http_upload endpoints using mod disco.
- Use the slixmpp library in place of the now defunct sleekxmpp for
  the prosody NixOS test.
- Update the nixos test to setup and test the MUC and http upload
  features.
- Add a couple of assertions triggered if the setup is not xep-0423
  compliant.

[1] https://xmpp.org/extensions/xep-0423.html
2020-04-30 20:39:54 +02:00
adisbladis 1a70e4ffa6
Merge pull request #86097 from zowoq/docker
nixos/podman: add assertion for dockerCompat
2020-04-30 19:26:05 +02:00
Florian Klink 4b71b6f8fa nixos/google-oslogin: Move nsswitch config into the module
Motivation: #86350
2020-04-30 17:51:13 +02:00
Peter Hoeg 0ae7a683b5
Merge pull request #86273 from matthewbauer/dont-require-network-online-for-boot
nixos/systemd.nix: don’t require online for multi-user.target
2020-04-30 12:53:06 +08:00
Andreas Rammhold 0bdc8d7a58 nixos/networkd: add RoutesToDNS to DHCP section 2020-04-30 01:15:40 +02:00
Lucas Savva 47da7aafdf
nixos/acme: update documentation 2020-04-29 20:31:17 +01:00
Elis Hirwing 27b9b7b3af
Merge pull request #85026 from talyz/php_buildenv_override
php.buildEnv: Make the exported php package overridable, improve handling of currently enabled extensions, etc
2020-04-29 19:57:37 +02:00
Jörg Thalheim b0196cacec
Merge pull request #84476 from jakobrs/installation-cd-base-terminus 2020-04-29 17:20:49 +01:00
adisbladis 78cba5ac1e
nixos.podman: Expose extraPackages from the podman wrapper 2020-04-29 11:53:06 +01:00
adisbladis b2a9a3e9cb
podman: Wrap packages required to run containers 2020-04-29 11:40:44 +01:00
Florian Klink f046de4210
Merge pull request #86168 from lblasc/sof-firmware
Sound Open Firmware support, sof-firmware: init at 1.4.2, update kernel config
2020-04-29 12:36:53 +02:00
talyz c3d5d92f4a
php.buildEnv: Add phpIni attribute for easy access to the php.ini 2020-04-29 12:12:59 +02:00
Jan Tojnar 2874eebfd2
Merge branch 'staging-next' into staging 2020-04-29 08:35:47 +02:00
worldofpeace a6dc21fa2d nixos/pantheon: fix doc typo 2020-04-29 01:20:03 -04:00
Pavel Goran c678d68cdb nixos/pykms: add SyslogIdentifier 2020-04-29 03:53:47 +00:00
Matthew Bauer 764c8203b8 nixos/systemd.nix: don’t require online for multi-user.target
Not all systems need to be online to boot up. So, don’t pull
network-online.target into multi-user.target. Services that need
online network can still require it.

This increases my boot time from ~9s to ~5s.
2020-04-28 18:59:48 -05:00
Florian Klink c01ac3ed12
Merge pull request #85998 from helsinki-systems/make-nsswitch-more-flexible
nixos/nsswitch: Make databases more configurable
2020-04-29 01:28:33 +02:00
worldofpeace 10bf212b4f
Merge pull request #85589 from emilazy/add-acme-maintainers-team
Add ACME maintainers team
2020-04-28 18:38:12 -04:00
worldofpeace a0ebabf60a
Merge pull request #80896 from clkamp/pam-unix-add-nodelay
nixos/security/pam: Add nodelay option
2020-04-28 17:50:42 -04:00
Janne Heß edddc7c82a
nixos/sss: Move nsswitch config into the module 2020-04-28 17:02:46 +02:00
adisbladis 4a8a2145d7
Merge pull request #86202 from hyperfekt/fish_prevent_completions
nixos/fish: prevent fish from generating completions on first run
2020-04-28 15:17:40 +02:00
Jörg Thalheim a110c227a3
Merge pull request #86180 from Mic92/prey-bash-client 2020-04-28 14:01:47 +01:00
hyperfekt c0fe9d609d nixos/fish: prevent fish from generating completions on first run 2020-04-28 14:05:28 +02:00
zowoq c59c4e3589 nixos/*: use $out instead of $bin with buildGoPackage 2020-04-28 20:30:29 +10:00
Jörg Thalheim 72773b9c97
prey-bash-client: remove
prey-bash-client is deprecated since 2018
2020-04-28 09:44:55 +01:00
talyz c0a838df38
nixos/gitlab: Fix services.gitlab.enableStartTLSAuto
'toString false' results in an empty string, which, in this context,
is a syntax error. Use boolToString instead.

Fixes #86160
2020-04-28 09:05:26 +02:00
Luka Blaskovic fe7f770666 sof-firmware: init at 1.4.2 2020-04-28 05:25:38 +00:00
Maximilian Bosch 1f6d33ef26
Merge pull request #86013 from Ma27/cups-allow-from
nixos/printing: make access to web-interface configurable
2020-04-28 02:56:16 +02:00
worldofpeace a7ca287ecb nixos/qemu-vm: don't set -vga std
This has been default since QEMU 2.2, it also prevents using a different
-vga
2020-04-27 20:04:03 +02:00
Jörg Thalheim e92b11d964
Merge pull request #86104 from xaverdh/options-types 2020-04-27 11:03:43 +01:00
Dominik Xaver Hörl c10d82358f treewide: add types to boolean / enable options or make use of mkEnableOption 2020-04-27 09:32:01 +02:00
zowoq 3c83386c6b nixos/podman: add assertion for dockerCompat 2020-04-27 14:08:19 +10:00
talyz 2ba7926959
php.buildEnv: Provide a list of currently enabled extensions
Rework withExtensions / buildEnv to handle currently enabled
extensions better and make them compatible with override. They now
accept a function with the named arguments enabled and all, where
enabled is a list of currently enabled extensions and all is the set
of all extensions. This gives us several nice properties:

 - You always get the right version of the list of currently enabled
   extensions

 - Invocations chain

 - It works well with overridden PHP packages - you always get the
   correct versions of extensions

As a contrived example of what's possible, you can add ImageMagick,
then override the version and disable fpm, then disable cgi, and
lastly remove the zip extension like this:

{ pkgs ? (import <nixpkgs>) {} }:
with pkgs;

let
  phpWithImagick = php74.withExtensions ({ all, enabled }: enabled ++ [ all.imagick ]);

  phpWithImagickWithoutFpm743 = phpWithImagick.override {
    version = "7.4.3";
    sha256 = "wVF7pJV4+y3MZMc6Ptx21PxQfEp6xjmYFYTMfTtMbRQ=";
    fpmSupport = false;
  };

  phpWithImagickWithoutFpmZip743 = phpWithImagickWithoutFpm743.withExtensions (
    { enabled, all }:
      lib.filter (e: e != all.zip) enabled);

  phpWithImagickWithoutFpmZipCgi743 = phpWithImagickWithoutFpmZip743.override {
    cgiSupport = false;
  };
in
  phpWithImagickWithoutFpmZipCgi743
2020-04-26 16:43:05 +02:00
AmineChikhaoui 9cf9e66e6f
ec2-amis.nix: add NixOS 20.03 images
Fixes #85857.
2020-04-26 09:54:10 -04:00
Janne Heß bc2a4b341a
nixos/nsswitch: Make databases more configurable
Instead of hardcoding all nss modules that are added into nsswitch,
there are now options exposed.
This allows users to add own nss modules (I had this issue with
winbindd, for example).
Also, nss modules could be moved to their NixOS modules which would
make the nsswitch module slimmer.

As the lists are now handled by the modules system, we can use mkOrder
to ensure a proper order as well as mkForce to override one specific
database type instead of the entire file.
2020-04-26 03:16:57 +02:00
Aaron Andersen 16ab83760f
Merge pull request #85043 from aanderse/httpd-2020
nixos/httpd: modernize module standards
2020-04-25 20:04:05 -04:00
Graham Christensen a2e9965d74
Merge pull request #82414 from AmineChikhaoui/update-ec2-amis-19-09
ec2 amis: update 19.09 AMIs
2020-04-25 18:15:41 -04:00
Florian Klink 02b57e72bb
Merge pull request #86010 from flokli/nscd-disable
nixos/nscd: be more specific in the nscd.enable description on what breaks
2020-04-26 00:05:25 +02:00
Maximilian Bosch 4062592f3a
nixos/printing: make access to web-interface configurable
Otherwise you'd always get a 403 when hosting the web-interface of cups
at a different location than `localhost`.
2020-04-25 19:48:34 +02:00
Florian Klink 2ececf1ed9 nixos/nscd: be more specific in the nscd.enable description on what breaks 2020-04-25 18:11:10 +02:00
adisbladis 1ca6909514
Merge pull request #74378 from ttuegel/lxc-container
docker-container: Remove /etc symlink
2020-04-25 16:25:15 +02:00
lewo fcf547d0e2
Merge pull request #85813 from johnae/fix-k3s-systemd-units
The systemd unit for k3s should differ between agents and servers
2020-04-25 09:45:49 +02:00
worldofpeace ee5cba24c3
Revert "ibus: fix dconf db installation" 2020-04-24 18:22:59 -04:00
worldofpeace 78a9359b2a
Merge pull request #85892 from symphorien/ibus-db
ibus: fix dconf db installation
2020-04-24 15:49:01 -04:00
worldofpeace 90e16f7ed6
Merge pull request #84242 from gnidorah/qt
nixos/qt5: support adwaita-dark theme
2020-04-24 08:47:21 -04:00
Symphorien Gibol a71dc0b27e ibus: fix installation of dconf database
Fixes this warning at ibus-daemon startup:

(ibus-dconf:15691): dconf-WARNING **: 21:49:24.018: unable to open file '/etc/dconf/db/ibus': Failed to open file ?/etc/dconf/db/ibus?: open() failed: No such file or directory; expect degraded performance
2020-04-24 13:15:56 +02:00
zowoq b464d76126 nixos/cri-o: share registries with nixos/containers 2020-04-24 20:53:36 +10:00
adisbladis 5a3b818368
Merge pull request #85894 from zowoq/podman-crio
podman team: add cri-o packages/module
2020-04-24 11:34:07 +02:00
zowoq 0944d77fc0 nixos/containers: move libpod to nixos/podman 2020-04-24 15:34:05 +10:00
Aaron Andersen 218049c5c2 nixos/gitea: add settings option 2020-04-23 21:06:26 -04:00
zowoq 4484e7981e nixos/cri-o: update maintainers 2020-04-24 08:08:27 +10:00
Florian Klink 25605d2e3f
Merge pull request #85735 from nh2/journald-storage-limit-logs
journald service docs: Add helpful comments about the journal getting full
2020-04-23 13:35:12 +02:00
adisbladis 0dc3e485a1
Merge pull request #85822 from zowoq/cni-collision
nixos/{cri-o,podman}: remove cni-plugins from environment.systemPackages
2020-04-23 11:22:01 +02:00
Florian Klink 04e308a496
Merge pull request #85815 from arianvp/fix-85800
Fix networkd not restarting on unit changes
2020-04-23 10:36:57 +02:00
Arian van Putten f332109ebf nixos/datadog-agent: Fix restartTriggers
Fixes #85800

1d61efb7f1 accidentially changed the
restartTriggers of `datadog-agent.service` to point to the attribute
name (in this case, a location relative to `/etc`), instead of the
location of the config files in the nix store.

This caused datadog to not get restarted on activation of new
config, if the file name hasn't changed.

Fix this, by pointing this back to the location in the nix store.
2020-04-23 09:58:18 +02:00
Arian van Putten 14395cc687 nixos/networkd: Fix restartTriggers
1d61efb7f1 accidentially changed the
restartTriggers of systemd-networkd.service` to point to the attribute
name (in this case, a location relative to `/etc`), instead of the
location of the network-related unit files in the nix store.

This caused systemd-networkd to not get restarted on activation of new
networking config, if the file name hasn't changed.

Fix this, by pointing this back to the location in the nix store.
2020-04-23 09:53:44 +02:00
Frederik Rietdijk cff0669a48 Merge master into staging-next 2020-04-23 08:11:16 +02:00
John Axel Eriksson 41a95b1b7d
The systemd unit for k3s should differ between agents and servers 2020-04-23 07:55:23 +02:00
zowoq 4102db2127 nixos/podman: remove cni-plugins from environment.systemPackages 2020-04-23 10:29:17 +10:00
zowoq 54b59dd6c0 nixos/cri-o: remove cni-plugins from environment.systemPackages 2020-04-23 10:29:11 +10:00
Niklas Hambüchen 811411db6e journald service: Add helpful comments about the journal getting full 2020-04-23 02:24:50 +02:00
Piotr Bogdan 830733db24 nixos/manual: fix build 2020-04-22 16:56:44 +01:00
Frederik Rietdijk 8374a2a0ee Merge master into staging-next 2020-04-22 17:20:20 +02:00
Bas van Dijk 784aa2913a
Merge pull request #79840 from knl/update-oauth2_proxy-to-5.0.0
oauth2_proxy: 3.2.0 -> 5.1.0
2020-04-22 12:15:07 +02:00
Ingo Blechschmidt 2e2da182fe
nixos-containers: add docs about nested containers 2020-04-22 05:30:48 +02:00
Jan Tojnar b231ac2101
Merge pull request #85402 from jtojnar/httpd-php 2020-04-22 04:23:24 +02:00
Aaron Andersen d0de970279 nixos/httpd: some mod_php cleanup 2020-04-21 20:33:18 -04:00
Aaron Andersen ee030b121b nixos/httpd: set modern default values for mpm and http2 2020-04-21 20:33:18 -04:00
Aaron Andersen 20f37a4430 nixos/httpd: run as non root user 2020-04-21 20:33:18 -04:00
worldofpeace af2009a800
Merge pull request #85710 from worldofpeace/gnome-iso-wayland-default
installation-cd-graphical-gnome: don't run xorg default
2020-04-21 18:19:44 -04:00
davidak 6a7e0562de
Update link in /etc/os-release (#85723) 2020-04-22 00:16:22 +02:00
adisbladis 2d91da909e
Merge pull request #85604 from adisbladis/podman-module
nixos/virtualisation.podman: Init module
2020-04-21 23:48:48 +02:00
Raphael Borun Das Gupta 347e251261 nixos/xonsh: source NixOS environment
Without doing that, xonsh is unusable as login shell
2020-04-21 23:43:37 +02:00
Florian Klink c1a6e60335
Merge pull request #85598 from danderson/tailscale-fix-cachedir
nixos/tailscale: set a CacheDir in the systemd unit.
2020-04-21 22:38:32 +02:00
Florian Klink 6ba4ef6580
Merge pull request #85708 from Beskhue/fix-documentation
nixos/phpfpm: fix erroneous pools example
2020-04-21 22:16:15 +02:00
worldofpeace 1f12a07179 installation-cd-graphical-gnome: don't run xorg default
If for some reason the Wayland session fails to start
it will just start the Xorg session.
2020-04-21 15:26:25 -04:00
Florian Klink 91e3358f62
Merge pull request #85692 from nh2/systemd-update-default-rate-limit
journald service: Increase default rate limit 1000 -> 10000.
2020-04-21 21:06:48 +02:00
Thomas Churchman 8880957042 nixos/phpfpm: fix erroneous pools example 2020-04-21 20:59:52 +02:00
Frederik Rietdijk 23be4a8b4d Merge master into staging-next 2020-04-21 19:59:56 +02:00
worldofpeace 9b20a24d4d
Merge pull request #85643 from petabyteboy/feature/generate-config
nixos/tools: adapt for renamed console options
2020-04-21 12:50:55 -04:00
Niklas Hambüchen d16d34732c journald service: Increase default rate limit 1000 -> 10000.
Follows the upstream change of this default:

https://github.com/systemd/systemd/pull/8660
2020-04-21 18:29:03 +02:00
adisbladis 43f383c464
nixos.virtualisation.containers: Init common /etc/containers configuration module
What's happening now is that both cri-o and podman are creating
/etc/containers/policy.json.

By splitting out the creation of configuration files we can make the
podman module leaner & compose better with other container software.
2020-04-21 10:38:39 +01:00
adisbladis 650df709fb
nixos.virtualisation: Move containers.nix to nixos-containers.nix
In anticipation of the new containers module.
2020-04-21 10:36:56 +01:00
adisbladis f0a92ef1d9
nixos/podman: Add maintainer team & add myself to podman team 2020-04-21 10:03:22 +01:00
adisbladis b512a788a4
nixos/virtualisation.podman: Init module 2020-04-21 10:03:18 +01:00
Dominik Xaver Hörl 0412bde942 treewide: add bool type to enable options, or make use of mkEnableOption
Add missing type information to manually specified enable options or replace them by mkEnableOption where appropriate.
2020-04-21 08:55:36 +02:00
Frederik Rietdijk 803b3d296c Merge staging-next into staging 2020-04-21 08:29:51 +02:00
Milan Pässler d19089e1e7 nixos/tools: adapt for renamed console options 2020-04-21 02:07:53 +02:00
David Anderson cee5ddbb28 nixos/tailscale: set a CacheDir in the systemd unit.
Fixes a bug where tailscaled drops some files into / when CacheDir
is unset.

Signed-off-by: David Anderson <dave@natulte.net>
2020-04-20 15:35:55 -07:00