Commit Graph

25492 Commits

Author SHA1 Message Date
Naïm Favier
5ab62e17b5
nixos: move default module location logic to eval-config.nix 2022-01-27 22:13:35 +01:00
ajs124
47a2176ec8
Merge pull request #156998 from mweinelt/smartctl-exporter-fixups
prometheus.exporters.smartctl: fixes
2022-01-27 18:49:49 +01:00
Bernardo Meurer
5f9b470ff0
Merge pull request #154809 from helsinki-systems/feat/stc-proper-unit-file-parser
nixos/switch-to-configuration: Proper unit file parser and clean/fix lower part of the script
2022-01-27 09:35:34 -08:00
Martin Weinelt
12c26aca1f
prometheus.exporters.smartctl: Fix autodiscovery
When no devices are given the exporter tries to autodiscover available
disks. The previous DevicePolicy was however preventing the exporter
from accessing any device at all, since only explicitly mentioned ones
were allowed.

This commit adds an allow rule for several device classes that I could
find on my machines, that gets set when no devices are explicitly
configured.

There is an existing problem with nvme devices, that expose a character
device at `/dev/nvme0`, and a (namespaced) block device at
`/dev/nvme0n1`. The character device does not come with permissions that
we could give to the exporter without further impacting the hardening.

  crw------- 1 root root 247, 0 27. Jan 03:10 /dev/nvme0
  brw-rw---- 1 root disk 259, 0 27. Jan 03:10 /dev/nvme0n1

The autodiscovery only finds the character device, which the exporter
unfortunately does not have access to.

However a simple udev rule can be used to resolve this:

  services.udev.extraRules = ''
    SUBSYSTEM=="nvme", KERNEL=="nvme[0-9]*", GROUP="disk"
  '';

Unfortunately I'm not fully aware of the security implications this
change carries and we should question upstream (systemd) why they did
not include such a rule.
The disk group has no members on any of my machines.

  ❯ getent group disk
  disk6:
2022-01-27 17:33:27 +01:00
Daniel Olsen
5288bcab0a nixos/mx-puppet-discord: Change systemd unit description to avoid newline 2022-01-27 16:49:40 +01:00
Robert Hensing
d0947df006
Merge pull request #156992 from hercules-ci/revert-153594-doc-optimization
Revert 153594 doc optimization
2022-01-27 15:46:36 +01:00
Martin Weinelt
f860b289d4
prometheus.exporters.smartctl: Allow RAWIO
This allows the exporter to perform SCSI commands and interact with hpsa
and cciss devices.
2022-01-27 13:49:25 +01:00
Janne Heß
1f3b1a9067
Merge pull request #139075 from polykernel/nix-structural-settings-patch-1
nixos/nix-daemon: use structural settings
2022-01-27 13:38:41 +01:00
Robert Hensing
6b9ef93b98 Revert "flake.nix: Set nixpkgs.config.path"
This reverts commit 0b222173db.
2022-01-27 12:53:29 +01:00
Robert Hensing
aa877346f8 Revert "nixos/documentation: avoid copying nixpkgs subpaths, iteration 2"
This reverts commit 15a00be189.
2022-01-27 12:35:16 +01:00
Robert Hensing
647b304306 Revert "nixos/documentation.nix: Only use store non-flake pkgs.path directly when already copied"
This reverts commit fecf325059.
2022-01-27 12:35:16 +01:00
Robert Hensing
a732a8de1c Revert "nixos/documentation.nix: Use builtins.storePath when appropriate"
This reverts commit 5d29853c38.
2022-01-27 12:33:10 +01:00
olegkapitonov
ae5361fa1b
fix MTP support on KDE Plasma and Dolphin (#155405)
* fix MTP support on KDE Plasma and Dolphin

* Update pkgs/applications/kde/kio-extras.nix

Co-authored-by: ElXreno <elxreno@gmail.com>

Co-authored-by: Peter Hoeg <peter@hoeg.com>
Co-authored-by: ElXreno <elxreno@gmail.com>
2022-01-27 11:29:32 +08:00
polykernel
4a9d9928dc nixos/nix-daemon: use structural settings
The `nix.*` options, apart from options for setting up the
daemon itself, currently provide a lot of setting mappings
for the Nix daemon configuration. The scope of the mapping yields
convience, but the line where an option is considered essential
is blurry. For instance, the `extra-sandbox-paths` mapping is
provided without its primary consumer, and the corresponding
`sandbox-paths` option is also not mapped.

The current system increases the maintenance burden as maintainers have to
closely follow upstream changes. In this case, there are two state versions
of Nix which have to be maintained collectively, with different options
avaliable.

This commit aims to following the standard outlined in RFC 42[1] to
implement a structural setting pattern. The Nix configuration is encoded
at its core as key-value pairs which maps nicely to attribute sets, making
it feasible to express in the Nix language itself. Some existing options are
kept such as `buildMachines` and `registry` which present a simplified interface
to managing the respective settings. The interface is exposed as `nix.settings`.

Legacy configurations are mapped to their corresponding options under `nix.settings`
for backwards compatibility.

Various options settings in other nixos modules and relevant tests have been
updated to use structural setting for consistency.

The generation and validation of the configration file has been modified to
use `writeTextFile` instead of `runCommand` for clarity. Note that validation
is now mandatory as strict checking of options has been pushed down to the
derivation level due to freeformType consuming unmatched options. Furthermore,
validation can not occur when cross-compiling due to current limitations.

A new option `publicHostKey` was added to the `buildMachines`
submodule corresponding to the base64 encoded public host key settings
exposed in the builder syntax. The build machine generation was subsequently
rewritten to use `concatStringsSep` for better performance by grouping
concatenations.

[1] - https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md
2022-01-26 21:04:50 -05:00
Patrick Hilhorst
071dbeb56d
Merge pull request #156910 from NixOS/output-build-artefacts 2022-01-27 01:00:46 +01:00
Martin Weinelt
b3b17c3885
Merge pull request #156787 from helsinki-systems/drop/racoon 2022-01-26 23:30:20 +01:00
Patrick Hilhorst
23c87e7991
nixos/testing-python: actually copy build artefacts
This broke in #156858.
2022-01-26 22:26:19 +01:00
Martin Weinelt
bcbeaa003b
Merge pull request #156205 from B4dM4n/nixos-tests-teeworlds 2022-01-26 21:13:37 +01:00
Patrick Hilhorst
2774f31f40
Merge pull request #156697 from marijanp/fix-146169 2022-01-26 20:24:57 +01:00
Jan Tojnar
d843a692ae
Merge pull request #148344 from pasqui23/portals
nixos/xdg-portals: add portals to systemPackages
2022-01-26 19:22:49 +01:00
Pasquale
e9c4910524
nixos/xdg-portals: add portals' desktop files to XDG_DATA_DIRS 2022-01-26 18:45:42 +01:00
Sandro
89de95e632
Merge pull request #138439 from kjeremy/tmux-plugins-master 2022-01-26 17:17:19 +01:00
Martin Puppe
6a96992fe0 Fix invalid regular expression #156861
Empty parantheses are not supported in regular expressions on
Darwin/macOS. The old regular expression produces an error during
evaluation. This commit fixes that.

Nix‘s `builtins.match` works with extend POSIX regular expressions. The
specification for these regular expression states[^1] that the result
for a left paranthesis immediately followed by a right paranthesis
outside of a bracket expression is undefined.

[^1]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04_03
2022-01-26 16:23:14 +01:00
Pascal Bach
5374a4a005
Merge pull request #156220 from B4dM4n/nixos-tests-geth
nixos/tests/geth: fix api check
2022-01-26 13:31:17 +01:00
Marijan Petričević
411bb3c35f add --no-interactive flag 2022-01-26 11:27:01 +01:00
Marijan Petričević
d590556d5c update docs 2022-01-26 10:46:46 +01:00
Marijan Petričević
44830dc048 use lib.optionalString 2022-01-26 10:46:46 +01:00
Marijan Petričević
75de3397fd nixos/tests: fix #146169 2022-01-26 10:46:45 +01:00
Jacek Galowicz
ab4e5af009
Merge pull request #153854 from marijanp/test-driver-out-dir
nixos/test-driver: use an argument instead of the out env-var
2022-01-26 10:13:39 +01:00
ajs124
ef8280914f nixos/openvswitch: remove ipsec 2022-01-26 01:12:40 +01:00
ajs124
737de29e11 nixos/racoon: drop 2022-01-26 01:12:39 +01:00
Martin Weinelt
89e18a19cd
Merge pull request #156738 from mweinelt/hass-ping 2022-01-26 00:08:47 +01:00
Jeremy Kolb
7be304a543 nixos/programs/tmux: specify wanted plugins
Currently it's rather difficult to install tmux plugins. The process involves two steps:
  1. Specify the correct `pkg.tmuxPlugins` package in `environment.systemPackages`
  2. Adding to the configuration file to instantiate the plugin.

This commit allows the user to specify a list of plugins under `programs.tmux.plugins`.

Update nixos/modules/programs/tmux.nix

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2022-01-25 17:12:44 -05:00
Pascal Bach
ee59b97045
Merge pull request #155473 from yayayayaka/matrix-synapse-administration
nixos/matrix-synapse: Wrap register_new_matrix_user
2022-01-25 22:10:03 +01:00
Pascal Bach
c0ad24ee1d
Merge pull request #155703 from dali99/synapse-webclient
nixos/matrix-synapse: Remove webclient from default listener
2022-01-25 22:03:34 +01:00
Jonathan Ringer
e74ccf2d72
Merge pull request #154708 from NixOS/staging-next
Staging next 2022-01-12
2022-01-25 11:54:52 -08:00
Lara
04560b9163 nixos/gitlab: Add additional paths to systemd.tmpfiles.rules
This fixes the NixOS gitlab test failure since gitlab 14.7.0.
2022-01-25 19:05:49 +01:00
github-actions[bot]
bf793f213d
Merge master into staging-next 2022-01-25 18:01:20 +00:00
Martin Weinelt
d9ad2b40f1
nixos/tests/home-assistant: test ping via wake_on_lan component
Let the home-assistant instance linger around for 30s so it can run
regular jobs and trigger more code paths that could result in errors.
2022-01-25 18:30:45 +01:00
Martin Weinelt
d4061dcc6e
nixos/home-assistant: allow capset with components using ping command 2022-01-25 18:29:16 +01:00
Franz Pletz
5940ac847f
Merge pull request #156718 from B4dM4n/bird-pre-check-config 2022-01-25 16:43:44 +01:00
Martin Weinelt
48f17360d9 Merge remote-tracking branch 'origin/master' into staging-next 2022-01-25 15:53:19 +01:00
Fabian Möller
520383dd0b
nixos/tests/bird: init 2022-01-25 15:15:52 +01:00
Luflosi
c6bd1eea71
nixos/tor: fix tor getting killed by systemd when shuttding down
Tor waits ShutdownWaitLength seconds (30s by default) before actually shutting down. Since the systemd timeout is also set to 30 seconds, this results in a race condition that ends up killing Tor most of the time on my machine during shutdown.
To fix this, add the ShutdownWaitLength setting and tell systemd to wait 30 seconds more than that.
Arch Linux also has `TimeoutSec` set to 60 seconds: 6df716fe19/trunk/tor.service.
2022-01-25 15:02:18 +01:00
Fabian Möller
ba27a0aaed
nixos/bird: add option to modify config check environment 2022-01-25 14:58:26 +01:00
Anderson Torres
48743a4f17
Merge pull request #156571 from AndersonTorres/new-misc
mpc: install Bash shell completion (and more)
2022-01-25 10:20:29 -03:00
Robert Hensing
8919495cac
Merge pull request #156503 from hercules-ci/nixos-add-system.build-options
nixos: Add `system.build.`{`toplevel`,`installBootLoader`}, improve error message
2022-01-25 14:13:24 +01:00
github-actions[bot]
86301be1a5
Merge master into staging-next 2022-01-25 12:01:13 +00:00
Jacek Galowicz
ac44b27bab
Merge pull request #153077 from Madouura/dev/bcachefs-test
nixos/tests/bcachefs: use multi-disk
2022-01-25 11:53:44 +01:00
Marijan Petričević
446c21fdc7 factor out tmp-dir checks 2022-01-25 11:31:25 +01:00