Commit Graph

18556 Commits

Author SHA1 Message Date
Maximilian Bosch
60e731d1ce
nixos/qemu-vm: fix running VM with QEMU_NET_OPTS
I realized quite recently that running a test VM - as documented in the
manual - like

    QEMU_NET_OPTS='hostfwd=tcp::8080-:80'  ./result/bin/nixos-run-vms

doesn't work anymore on `master`. After bisecting I realized that the
introduction of a forward-port option[1] is the problem since it adds a
trailing comma even if no forwarding options are specified via
`virtualisation.forwardPorts`. In that case, the networking options
would look like `-netdev user,id=user.0,,hostfwd=tcp::8080-:80' which
confused QEMU and thus the VM refused to start.

Now, the trailing comma is only added if additional port forwards are
specified declaratively.

[1] b8bfc81d5b
2021-10-06 22:40:30 +02:00
ajs124
e3ac5e1502 nixos/varnish: add enableConfigCheck 2021-10-06 22:05:46 +02:00
Maximilian Bosch
9f37d6aee0
nixos/nextcloud: put secrets into the environment of nextcloud-setup.service
The `$(</path/to/file)`-expansion appears verbatim in the cmdline of
`nextcloud-occ` which means that an unprivileged user could find
sensitive values (i.e. admin password & database password) by monitoring
`/proc/<pid>/cmdline`.

Now, these values don't appear in a command line anymore, but will be
passed as environment variables to `nextcloud-occ`.
2021-10-06 18:18:18 +02:00
Maximilian Bosch
fb40526961
nixos/nextcloud: minor manual improvements
* Linkify documentation about objectstore-feature rather than only
  mentioning it.
* Use `<literal>` where it makes sense.
* Remove unnecessary `Whether to load` from `enableImagemagick` because
  `mkEnableOption` already prepends `Whether to enable` to the given
  description.
2021-10-06 17:33:31 +02:00
Bill Ewanick
cc3b147ed1 nixos/lemmy: init
Co-authored-by: Raphael Megzari <raphael@megzari.com>
2021-10-06 21:02:51 +09:00
Michele Guerini Rocco
66b6bd0072
Merge pull request #139765 from eyJhb/bitlbee-user-group
nixos/bitlbee: added bitlbee to bitlbee group
2021-10-06 08:57:33 +02:00
rnhmjoj
a27dc95e72
nixos/fontdir: always link the font directory
This fixes the fonts directory availability when not running an xserver,
such as headless machines.
2021-10-06 08:52:39 +02:00
Michele Guerini Rocco
e99b3f242c
Merge pull request #140359 from rnhmjoj/setgid-nobody
nixos: make setgid wrappers root-owned
2021-10-06 08:36:35 +02:00
Jake Woods
1af6417b86 nixos/joycond: init
NixOS should be able to support the Nintendo Switch Pro controller for
steam and non-steam at the same time. Currently there are two mutually
exclusive ways to support the Pro Controller: Steam and `hid-nintendo`.

Unfortunately these don't work together, but there's a workaround in
newer versions of `joycond` (described [here](https://wiki.archlinux.org/title/Gamepad#Using_hid-nintendo_pro_controller_with_Steam_Games_(with_joycond))). To use this
workaround `hid-nintendo` and `joycond` need to be updated, and the
systemd and udev configuration needs to be made available in NixOS.
2021-10-06 13:19:36 +11:00
Maximilian Bosch
b2e59bcf77 nixos/build-vms: fix eval 2021-10-05 14:38:48 -05:00
David Arnold
b0fc9da879 nixos/test/test-driver: Class-ify the test driver
This commit encapsulates the involved domain into classes and
defines explicit and typed arguments where untyped dicts where used.

It preserves backwards compatibility through legacy wrappers.
2021-10-05 14:38:48 -05:00
Maximilian Bosch
f8feb1ad27
Merge pull request #139604 from mitchmindtree/nextcloud-objectstore
nixos/nextcloud: Add option for using object storage as primary storage
2021-10-05 20:52:24 +02:00
Sandro
947fb3818f
Merge pull request #140604 from obadz/earlyoom-stderr 2021-10-05 17:16:59 +02:00
obadz
b4981eb8e1 earlyoom module: log stderr to journald
(Default is to do the same as stdout which is > /dev/null)
2021-10-05 12:03:24 +01:00
Naïm Favier
c53c69ab17
nixos: fixes after #136909 2021-10-05 12:48:43 +02:00
Yureka
2384362ca7 nixos/gitea: fix eval after #136909 2021-10-05 12:35:34 +02:00
Eelco Dolstra
f18bf9b9f1
Merge pull request #140519 from lovesegfault/no-auto-install
command-not-found: remove NIX_AUTO_INSTALL
2021-10-05 11:15:47 +02:00
Matt McHenry
a2a0a58f7c
less: improve default settings (#139988)
* less: enable by default and set LESS=-R via lesskey

* since we set PAGER=less, programs.less.enable should default to
  true.

* some programs, notably git, set a custom LESS environment if none is
  present.  using the lesskey mechanism to set LESS=-R lets such
  programs continue to run less as they see fit.

This reverts commit 0e7b4e60a8.

* less: remove use of deprecated lesskey binary format

* less: enable in environment.nix rather than less.nix

per discussion in #139988
2021-10-05 11:13:48 +02:00
Andreas Rammhold
0873980dc8
Merge pull request #139754 from eyJhb/networkd-iaid
nixos/networkd: added IAID, DUIDType and DUIDRawData to DHCPv6 section
2021-10-05 10:06:05 +02:00
eyjhb
f4c69e198c
nixos/bitlbee: switched to systemd DynamicUser 2021-10-05 09:52:09 +02:00
mitchmindtree
c5d08ebee1 nixos/nextcloud: Fix ambiguity in objectstoreConfig string
Previously this was a little tricky to read and had the potential to
cause some ambiguity in string parsing.
2021-10-05 17:07:44 +10:00
Maciej Krüger
20eeb1e09e
Merge pull request #138811 from mkg20001/htop 2021-10-05 06:33:40 +02:00
Maciej Krüger
a425421e28
nixos/htop: add module
This module allows setting global configuration for htop in /etc/htoprc,

for example to disable showing userland threads by default

Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>

Co-authored-by: Aaron Andersen <aaron@fosslib.net>
2021-10-05 06:00:43 +02:00
Kevin Cox
ed5403efc3
nixos.mautrix-facebook: init module
This is the first version of the mautrix-facebook module. Due to lack of secret support on NixOS as well as the requirement of a homeserver domain it requires some setup. For completeness here is my working config using NixOps secrets:

```nix
deployment.keys."mautrix-facebook-config.env" = {
	text = ''
		MAUTRIX_FACEBOOK_APPSERVICE_AS_TOKEN=${secrets.as_token}
		MAUTRIX_FACEBOOK_APPSERVICE_HS_TOKEN=${secrets.hs_token}
	'';
	destDir = "/var/keys";
};

deployment.keys."mautrix-facebook-registration.yaml" = {
	text = builtins.toJSON config.services.mautrix-facebook.registrationData;
	destDir = "/var/keys";
	user = "matrix-synapse";
};

users.users.matrix-synapse.extraGroups = ["keys"];

systemd.services.matrix-synapse.after = ["keys.service"];
systemd.services.matrix-synapse.wants = ["keys.service"];

services.mautrix-facebook = {
	enable = true;
	settings = {
		homeserver.domain = "bots.kevincox.ca";

		bridge = {
			displayname_template = "{displayname}";

			permissions = {
				"@kevincox:matrix.org" = "admin";
			};
		};
	};

	environmentFile = "/var/keys/mautrix-facebook-config.env";

	registrationData = {
		as_token = secrets.as_token;
		hs_token = secrets.hs_token;
	};
};

systemd.services.mautrix-facebook = rec {
	wants = ["keys.target"];
	after = wants;
};

services.matrix-synapse.app_service_config_files = [
	"/var/keys/mautrix-facebook-registration.yaml"
];
```
2021-10-04 18:40:28 -04:00
Bernardo Meurer
c301c1995e
command-not-found: remove NIX_AUTO_INSTALL 2021-10-04 12:43:39 -07:00
Robert Hensing
0699530f08
Merge pull request #136909 from ncfavier/cleanup-defaults-examples
nixos/doc: clean up defaults and examples
2021-10-04 20:37:42 +02:00
Naïm Favier
2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
Guillaume Girol
2b0a7ef8f2 nixos/hqplayerd: do not make manual depend on (unfree) hqplayerd 2021-10-03 12:00:00 +00:00
rnhmjoj
31790c81dc
nixos: make setgid wrappers root-owned 2021-10-03 11:44:57 +02:00
mitchmindtree
a539a82707 nixos/nextcloud: Account for nix_read_secret refactor in exception msg
Previously, the `nix_read_pwd` function was only used for reading the
`dbpassFile`, however it has since been refactored to handle reading
other secret files too. This fixes the message of the exception that is
thrown in the case that the file is not present so that it no longer
refers specifically to the `dbpass` file.
2021-10-03 17:29:13 +10:00
mitchmindtree
fbffaddefe nixos/nextcloud: Make objectstore.s3.useSsl explicitly true by default
This appears to match the nextcloud default behaviour observed here:

e2116e2fb2/lib/private/Files/ObjectStore/S3ConnectionTrait.php (L83)
2021-10-03 16:38:56 +10:00
mitchmindtree
b23d6a4113 nixos/nextcloud: Simplify objectstore.s3 options, remove submodule
Removes the submodule in favour of using an attrset.

Also:

- Makes better use of nix's laziness in config expansion.
- Makes use of `boolToString` where applicable.
2021-10-03 16:38:03 +10:00
Jörg Thalheim
0f5218878c
Merge pull request #140343 from Artturin/cfdynststartat
cfdyndns: fix startAt by setting it to *:0/5 instead of 5 minutes
2021-10-03 06:37:27 +01:00
Artturin
2e4938eb6a cfdyndns: fix startAt by setting it to *:0/5 instead of 5 minutes
5 minutes is invalid for startAt
2021-10-03 08:06:37 +03:00
mitchmindtree
03171ae31a nixos/nextcloud: Remove objectstore.s3.secret option
We should discourage users from adding secrets in a way that allows for
them to end up in the globally readable `/nix/store`. Users should use
the `objectstore.s3.secretFile` option instead.
2021-10-03 12:52:13 +10:00
mitchmindtree
1ed93ac4a1 nixos/nextcloud: Add option for using object storage as primary storage
This allows to declaratively configure an S3 class object storage as the
primary storage for the nextcloud service. Previously, this could only
be achieved by manually editing the `config.php`.

I've started testing this today with my own digitalocean nextcloud
instance, which now points to my digitalocean S3-compatible "Space" and
all appears to be working smoothly.

My motivation for this change is my recent discovery of how much cheaper
some S3-compatible object storage options are compared to digitalocean's
"Volume" options.

Implementation follows the "Simple Storage Service" instructions here:

https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html

I have neglected to implement a submodule for the OpenStack Swift
object storage as I don't personally have a use case for it or a method
to test it, however the new `nextcloud.objectstore.s3` submodule should
act as a useful guide for anyone who does wish to implement it.
2021-10-03 12:52:06 +10:00
Domen Kožar
21b1cfe684
Merge pull request #139451 from jansol/master
pipewire: 0.3.36 -> 0.3.38
2021-10-02 19:30:15 -05:00
Robert Hensing
c3bf08d1b0
Merge pull request #139431 from erikarvstedt/etc-simplify-source
nixos/etc: simplify source path handling
2021-10-03 00:50:39 +02:00
Thomas Tuegel
000e81bff6
Merge pull request #101725 from andir/master
nixos/plasma5: Install default KDE apps for music, images and documents
2021-10-02 15:56:12 -05:00
Sandro
50b79f0270
Merge pull request #140178 from SuperSandro2000/SuperSandro2000-patch-1 2021-10-01 23:59:04 +02:00
Maximilian Bosch
cdb48d75c0
Merge pull request #140159 from Ma27/nextcloud-misc
nextcloud: misc changes
2021-10-01 21:08:31 +02:00
Artturi
8296c4d226
Merge pull request #140096 from Artturin/gdmoptions 2021-10-01 21:27:19 +03:00
Maximilian Bosch
598ad679d8
Merge pull request #140045 from SebTM/add_tp-auto-kbbl
tp-auto-kbbl: init at 0.1.5
2021-10-01 19:59:06 +02:00
Artturin
33b7bd2675 nixos/gdm: switch to rfc42 style settings 2021-10-01 20:53:49 +03:00
Sandro
5d53e38d24
nixos/gitea: switch default log level to Info 2021-10-01 19:52:35 +02:00
Maximilian Bosch
d022b4987a
Merge pull request #140089 from yayayayaka/nextcloud-21.0.5
nextcloud: 20.0.12 -> 20.0.13, 21.0.4 -> 21.0.5, 22.1.1 -> 22.2.0
2021-10-01 18:40:06 +02:00
Lassulus
1b94d11c92
Merge pull request #102354 from erikarvstedt/extra-container
extra-container: init at 0.8
2021-10-01 17:57:47 +02:00
Maximilian Bosch
66edc1e846
nixos/nextcloud: use php8 where possible 2021-10-01 17:03:09 +02:00
Maximilian Bosch
675e262f5a
nixos/nextcloud: temp fix for MariaDB >=10.6
The MariaDB version 10.6 doesn't seem supported with current Nextcloud
versions and the test fails with the following error[1]:

    nextcloud # [   14.950034] nextcloud-setup-start[1001]: Error while trying to initialise the database: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 4047 InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.

According to a support-thread in upstream's Discourse[2] this is because
of a missing support so far.

Considering that we haven't received any bugreports so far - even though
the issue already exists on master - and the workaround[3] appears to
work fine, an evaluation warning for administrators should be
sufficient.

[1] https://hydra.nixos.org/build/155015223
[2] https://help.nextcloud.com/t/update-to-next-cloud-21-0-2-has-get-an-error/117028/15
[3] setting `innodb_read_only_compressed=0`
2021-10-01 15:25:31 +02:00
Sebastian Sellmeier
f0d1af9bd4
tp-auto-kbbl: init at 0.1.5 2021-10-01 13:12:58 +02:00
Jörg Thalheim
2aaf072d27
Merge pull request #138548 from queezle42/master
lirc: Set a writable lockdir
2021-10-01 08:23:51 +01:00
Raymond Gauthier
953bbc0d73
nixos/teamviewer: fix issue #44307
Move to a forefront launch of the daemon. Doing so allowed us
to move the service from forking to simple to avoid the
missing pid  error log.

Also:

 -  Make the dbus dependency explicit.
2021-09-30 19:36:45 -04:00
Erik Arvstedt
a807cd3a00
nixos/extra-container: init 2021-09-30 22:52:14 +02:00
Raymond Gauthier
200e959995
nixos/teamviewer: fix issue #96633
Add teamviewer package as a dbus package now that the
client / server communication depends on dbus.
2021-09-30 16:08:57 -04:00
happysalada
8346dc04b3 pict-rs: add initial module 2021-09-30 21:32:25 +09:00
Thomas Tuegel
bf84010052
Merge pull request #139537 from CertainLach/plasma5-load-kwayland-integration
plasma5: load kwayland-integration plugin
2021-09-29 20:32:02 -05:00
Samuel Dionne-Riel
eaf85fe8c7
Merge pull request #139957 from samueldr/fix/126289-regression
Provide submodule to `security.wrappers` for older kernels
2021-09-29 18:30:50 -04:00
Samuel Dionne-Riel
110165b784 Provide submodule to security.wrappers for older kernels
Fixes a regression from #126289
2021-09-29 16:10:27 -04:00
Michele Guerini Rocco
b73d851b30
Merge pull request #139844 from rnhmjoj/qemu-fixup
nixos/qemu: use set -e in shell script
2021-09-29 19:01:44 +02:00
Steve Purcell
4b518f4aa9 n8n: remove systemd option incompatible with nodejs
The MemoryDenyWriteExecute systemd option is widely known to be
incompatible with nodejs, and causes service crashes as reported in #119687.

Fixes #119687.
2021-09-29 14:21:13 +00:00
Michele Guerini Rocco
e68eba2dba
Merge pull request #134618 from rnhmjoj/wpa-safe
nixos/wpa_supplicant: add safe secret handling
2021-09-29 13:35:29 +02:00
Sandro
8c56eae689
Merge pull request #139823 from sorpaas/patch-3 2021-09-29 11:32:53 +02:00
rnhmjoj
52b9dd7bf6
nixos/wpa_supplicant: add safe secret handling 2021-09-29 09:10:39 +02:00
rnhmjoj
1497e8f5f5
nixos/qemu: use set -e in shell script
Also fix this: https://github.com/koalaman/shellcheck/wiki/SC2166
2021-09-29 08:46:03 +02:00
Jens Nolte
e66332826a lirc: Set a writable lockdir 2021-09-29 05:36:56 +02:00
Timothy DeHerrera
895f3956d2
Merge pull request #127933 from rnhmjoj/qemu-restoration
Qemu restoration
2021-09-28 21:35:23 -06:00
Wei Tang
3158087c78
tarsnap: always ping ipv4 address in preStart 2021-09-29 03:09:13 +02:00
Benjamin Staffin
5c7c38f61d
Merge pull request #139420 from Flakebi/dex
dex-oidc: 2.28.1 -> 2.30.0 and add module
2021-09-28 16:52:35 -04:00
Doron Behar
6cd8d67251
Merge pull request #117890 from milahu/patch-3
locate.nix: write /etc/updatedb.conf
2021-09-28 16:03:21 +00:00
eyjhb
4b8bd41060
nixos/networkd: added IAID, DUIDType and DUIDRawData to DHCPv6 section 2021-09-28 15:33:06 +02:00
Peter Hoeg
aed860f876 nixos/zoneminder: not using zoneminder any longer 2021-09-28 09:21:08 +08:00
Elis Hirwing
fb55c86904
Merge pull request #138742 from etu/zfs-syncoid-parent-permission-delegation
nixos/syncoid: Delegate permissions to parent dataset if target is missing
2021-09-27 19:55:32 +02:00
Elis Hirwing
f5f386d297
nixos/syncoid: Delegate permissions to parent dataset if target is missing
This is to address a regression introduced in #131118.

When syncing the first dataset, syncoid expects that the target
dataset doesn't exist to have a clean slate to work with. So during
runtime we'll check if the target dataset does exist and if it doesn't
- delegate the permissions to the parent dataset instead.

But then, on unallow, we do the unallow on both the target and the
parent since the target dataset should have been created at this
point, so the unallow can't know which dataset that got permissions
just by which datasets exists.
2021-09-27 19:29:14 +02:00
Graham Christensen
6c88e85807
Merge pull request #133726 from deshaw/fastly-exporter
prometheus-fastly-exporter: init at v6.1.0
2021-09-27 11:09:33 -04:00
markuskowa
e3e5fc9bf1
Merge pull request #136925 from Artturin/snapperfix
nixos/snapper: change timer wantedBy to timers.target & add snapshotOnBoot
2021-09-27 14:13:34 +02:00
Michele Guerini Rocco
d64827a3a1
Merge pull request #139594 from deviant/postfix-virtual-section
nixos/postfix: Fix virtual alias manpage section
2021-09-27 13:43:41 +02:00
Brecht Savelkoul
8a585fd5c5 nixos/lighttpd: support new authentication modules 2021-09-27 07:33:27 +02:00
V
cc49c13a6b nixos/postfix: Fix virtual alias manpage section
virtual(8) is for virtual mailboxes, not aliases.
2021-09-27 06:39:27 +02:00
Jörg Thalheim
59cb7a87d7
Merge pull request #137124 from helsinki-systems/feat/activation-script-restart
nixos/switch-to-configuration: Allow activation scripts to restart units
2021-09-26 15:46:38 +01:00
Yaroslav Bolyukin
de5ffe51f6
plasma5: load kwayland-integration plugin
Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
2021-09-26 17:26:23 +03:00
Aaron Andersen
57f1ee46e4
Merge pull request #136233 from MayNiklas/owncast
nixos/owncast: init at 0.0.8
2021-09-25 15:25:13 -04:00
Mikael Voss
5f9e069984
modules/nix-daemon: Explain nice level limitations 2021-09-25 20:43:06 +02:00
Jan Solanti
c12e8a63ba pipewire: 0.3.36 -> 0.3.37 2021-09-25 17:51:39 +03:00
Leo Maroni
e95a50a64b
nixos/networkd: add ActivationPolicy option 2021-09-25 16:03:42 +02:00
happysalada
0f9a1d70fa meilisearch: add docs 2021-09-25 21:45:52 +09:00
Erik Arvstedt
654f41435b
nixos/etc: simplify source path handling
This change is strictly functionally equivalent because we're just
lifting the transformation of `source` out of `mapAttrs` to the single point of
use (in escapeShellArgs).

This is also much faster because we can skip a map over all `etc` items.
2021-09-25 14:44:38 +02:00
Flakebi
6ca43a69cc
dex-oidc: add module 2021-09-25 13:12:51 +02:00
Michele Guerini Rocco
828a3b5d93
Merge pull request #139367 from andersk/gnome-shell-wrapped
nixos/gnome: Fix broken .gnome-shell-wrapped wrapper
2021-09-25 10:12:51 +02:00
Anders Kaseorg
98fe3260c6 nixos/gnome: Fix broken .gnome-shell-wrapped wrapper
The owner and group options are required after #126289.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2021-09-24 17:58:08 -07:00
Kim Lindberger
0686c40309
Merge pull request #139180 from ryantm/dev/ryantm/discourse-tmp
discourse: enable restoring backups bigger than RAM
2021-09-24 14:31:46 +02:00
Ryan Burns
40299257cc Merge branch 'master' into staging-next 2021-09-23 18:43:00 -07:00
Kim Lindberger
3d3b1a7039
Merge pull request #138852 from ryantm/dev/ryantm/discourse-skip-create
nixos/discourse: add discourse.admin.skipCreate option
2021-09-23 19:09:59 +02:00
Ryan Mulligan
f933c68374 discourse: enable restoring backups bigger than RAM
When restoring a backup, discourse decompresses the backup archive in
the /share/discourse/tmp dir. Before this change, it is linked to /run
which is typically backed by memory, so the backup will fail to
restore if you do not have enough memory on your system to contain the
backup. This has already happened to me on two small forums.

This moves tmp to the StateDirectory /var/lib/discourse/tmp which is
typically backed by disk.
2021-09-23 09:59:31 -07:00
Michele Guerini Rocco
51bcdc4cda
Merge pull request #139026 from rnhmjoj/kube-fix
nixos/kubernetes: fix containerd settings
2021-09-23 17:35:13 +02:00
rnhmjoj
5ca89402ee
nixos/trafficserver: avoid input from derivation
Using builtins.readFile to load upstream defaults is a clever trick, but
it's not allowed in restricted evaluation mode: which means it fails on
Hydra, for example. Besides - in Nixpkgs - depending on derivation as
inputs is considered bad practice and should be avoided.
2021-09-23 12:52:31 +02:00
MayNiklas
1f934dad30 nixos/owncast: init owncast service 2021-09-23 10:48:29 +02:00
Artturin
7001a46766 nixos/snapper: services.snapperd sync serviceConfig with upstream 2021-09-23 05:54:19 +03:00
Artturin
25d3e6d01f nixos/snapper: add snapshotRootOnBoot option 2021-09-23 05:54:11 +03:00
github-actions[bot]
796a5df129
Merge master into staging-next 2021-09-23 00:01:50 +00:00
rnhmjoj
6de529c64a
nixos/kubernetes: fix containerd settings
mkDefault must be applied to each setting individually, otherwise a
single change to `containerd.settings` replaces the whole attribute set.
2021-09-23 00:21:40 +02:00