Commit graph

15579 commits

Author SHA1 Message Date
Lassulus 86102ebe5e
Merge pull request #107127 from qzle/nixos-container-extraVeth-fix
Fix: nixos-container does not always apply extraVeth ips
2020-12-29 19:19:46 +01:00
WilliButz 6739d17f34
Merge pull request #99180 from 0x4A6F/master-prometheus-service
nixos/prometheus: remote_{read,write} support
2020-12-29 16:08:29 +01:00
0x4A6F c53a0c16e4
nixos/prometheus: remote_{read,write}
- add [remote_write](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write) and [remote_read](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_read) support

Co-authored-by: Yorick van Pelt <yorickvanpelt@gmail.com>
2020-12-29 14:48:57 +00:00
Florian Klink 316862f72b
Merge pull request #102106 from tadfisher/throttled-msr-warning
nixos/throttled: disable kernel msr warning
2020-12-29 01:28:09 +01:00
Peter Hoeg 7d07645cba nixos/sddm: use attrs instead of plain text
Instead of treating the sddm config a wall of text that doesn't allow us
to override anything, turn it into an attribute set.

We dump `extraConfig` and instead introduce `settings` that is merged
with the module defaults to provide the final configuration.

There is some additional noise in here due to nixpkgs-fmt.
2020-12-29 05:06:38 +08:00
Ivan b90c5cb703
XMonad: configured recompile (#107696)
* nixos/xmonad: xmonad config w/ghc+xmessage

When the "config" option isn't set, we use xmonad-with-packages to
provide xmonad with runtime access to an isolated ghc, ensuring it can
recompile and exec a user's local config (e.g. $HOME/.xmonad/xmonad.hs)
regardless of which ghc (if any) is on PATH.

When the "config" option is set, however, we compile a configured xmonad
executable upfront (during nixos-rebuild), and prior to this commit, it
was not provided with runtime access to an isolated ghc.

As a result, with the "config" option set, it was not possible
to recompile and exec a user's local config unless there was a
compatible version of ghc on PATH with the necessary packages (xmonad,
xmonad-contrib, etc.) in its package database. Adding such a ghc to
environment.systemPackages, e.g.

  (haskellPackages.ghcWithPackages (ps: with ps; [xmonad xmonad-contrib]))

is problematic because it adds both ghc and an unconfigured xmonad to
PATH, e.g.

  $ ls -l $(which xmonad ghc)
  lrwxrwxrwx ... /run/current-system/sw/bin/ghc -> /nix/store/...-ghc-8.10.2-with-packages/bin/ghc
  lrwxrwxrwx ... /run/current-system/sw/bin/xmonad -> /nix/store/...-ghc-8.10.2-with-packages/bin/xmonad

Having the unconfigured xmonad on PATH is particularly bad because
restarting xmonad will dump the user into the unconfigured version, and
if no local config exists (e.g. in $HOME/.xmonad/xmonad.hs), they'll be
left in this unconfigured state.

In this commmit, we give the configured xmonad runtime access to ghc
like xmonad-with-packages does for the unconfigured version. The aim
is to allow the user to switch between the nixos module's config and a
local config (e.g. $HOME/.xmonad/xmonad.hs) at will, so they can try out
config changes without performing a nixos-rebuild.

Since the xmonad on PATH is the configured executable, there's no
danger a user could unwittingly restart into the unconfigured version,
and because xmonad will refuse to recompile when no local config
exists, there's no danger a user could unwittingly recompile into an
unconfigured version.

Given that a local config exists, the recompile/restart behavior depends
on two factors:
- which entry point is used
  * 'XMonad.xmonad' (default)
  * 'XMonad.launch' (recommended in "config" option description)
- what operation is triggered (i.e. via mod+q)
  * `spawn "xmonad --recompile && xmonad --restart"` (default)
  * `restart "xmonad" True`
  * custom function

If the default 'XMonad.xmonad' entrypoint and default mod+q operation
are used, hitting mod+q will compile and exec the local config, which
will remain in use until next time the display manager is restarted.

If the entrypoint is changed to 'XMonad.launch' but mod+q left with its
default operation, hitting mod+q will have no visible effect. The logs
(as seen by running `journalctl --identifier xmonad --follow`) will show
an error,
  X Error of failed request:  BadAccess (attempt to access private resource denied)
which indicates that the shell was unable to start xmonad because
another window manager is already running (namely, the nixos-configured
xmonad).
https://wiki.haskell.org/Xmonad/Frequently_asked_questions#X_Error_of_failed_request:_BadAccess_.28attempt_to_access_private_resource_denied.29

Changing the mod+q operation to `restart "xmonad" True` (as recommended
in the "config" option's description) will allow a restart of the
nixos-configured xmonad to be triggeredy by hitting mod+q.

Finally, if the entrypoint is 'XMonad.launch', mod+q has been
bound to `restart "xmonad" True` and another key bound to a custom
recompile/restart function (e.g. `compileRestart` as shown in the
"config" option example), the user can switch between the nixos module's
config and their local config, with the custom key switching to the
local config and mod+q switching back.

* nixos/xmonad: refactor let binding

* nixos/xmonad: refactor (eliminate duplicate code)

* nixos/xmonad: install man pages

Prior to this commit, man pages were not installed if the "config"
option was set.

* nixos/xmonad: comment grammar fixups

* nixos/xmonad: writeStateToFile in example config

Calling writeStateToFile prior to recompiling and restarting allows
state (workspaces, etc.) to be preserved across the restart.

* nixos/xmonad: add ivanbrennan to maintainers

* nixos/xmonad: adjust compileRestart example

* nixos/xmonad: add missing import to example config
2020-12-28 17:27:36 +01:00
Florian Klink f71e439688 nixos/acme: fix typo in docs 2020-12-28 13:19:15 +01:00
Aaron Andersen a08ed097c9
Merge pull request #107064 from aanderse/nixos/zabbixWeb
nixos/zabbixWeb: include DOUBLE_IEEE754 directive
2020-12-28 00:22:35 -05:00
Pavol Rusnak b0121fcb03 trezord: TREZOR -> Trezor 2020-12-27 19:48:09 +01:00
Anderson Torres 086946df11
Merge pull request #91203 from davidak/zsa
nixos/zsa: init at unstable-2020-12-16
2020-12-26 23:53:48 -03:00
Jeff Slight 4bc2573a15
nixos/gitlab: move custom_hooks_dir into gitaly config (#107174) 2020-12-26 22:44:36 +01:00
Bernardo Meurer c4c899d3ef
Merge pull request #107613 from davidak/bcachefs-sha256
bcachefs: add sha256 kernel module
2020-12-26 21:37:26 +00:00
davidak 0d0ff21f2f nixos/zsa: init at unstable-2020-12-16
add support for ZSA keyboards

Co-authored-by: Julien Debon <julien.debon@pm.me>
2020-12-26 09:56:34 +01:00
Daniel Nagy f2ca4c8f1d
nixos/httpd: set lua paths
We conditionally set the lua paths for the Apache mod_lua module. This
allows executing Lua script handlers to require modules, that have been
packaged with the supplied Lua derivation of Apache.

For more information, see:

  https://httpd.apache.org/docs/2.4/mod/mod_lua.html#luapackagecpath
  https://httpd.apache.org/docs/2.4/mod/mod_lua.html#luapackagepath
2020-12-25 22:54:05 +01:00
davidak d42e2cc24e bcachefs: add sha256 kernel module
needed to mount as root fs
2020-12-25 21:28:50 +01:00
Florian Klink c674a51382 nixos/systemd: provide libidn2 for systemd-resolved
systemd started using dlopen() for some of their "optional"
dependencies.

Apparently, `libidn2` isn't so optional, and systemd-resolved doesn't
work without libidn2 present, breaking DNS resolution.

Fixes https://github.com/NixOS/nixpkgs/issues/107537

Upstream bug: https://github.com/systemd/systemd/issues/18078
2020-12-25 13:45:25 +01:00
Gabriel Ebner ce8c83623d
Merge pull request #107263 from edibopp/patch-rtl8761b
Firmware and kernel patch for Realtek RTL8761b
2020-12-25 11:08:32 +01:00
Vladimír Čunát 2b131c97bb
nixos/kresd: set .stopIfChanged = false
Since version 5.2.0 there's non-empty stop phase:
    ExecStopPost=/usr/bin/env rm -f "/run/knot-resolver/control/%i"
but it's perfectly OK to run that from a different version
(and typically it's no-op anyway).  Real-life example where this helps:
https://github.com/NixOS/nixpkgs/issues/49528#issuecomment-747723198
2020-12-25 09:54:04 +01:00
Robbert Gurdeep Singh caa725a6fd nixos/nextcloud: fix missing quotes arround $* in occ wrapper and replace with $@
This will allow this to work:
    nextcloud-occ config:app:set theming slogan --value="A place for testing"
2020-12-24 21:02:05 +01:00
Vladimír Čunát 57a787c9fa
Revert Merge #107275: nixos: fix "nixos-rebuild ...
... build-vm-with-bootloader" for EFI systems

This reverts commit 20257280d9, reversing
changes made to 926a1b2094.
It broke nixosTests.installer.simpleUefiSystemdBoot
and right now channel is lagging behing for two weeks.
2020-12-23 21:24:24 +01:00
Florian Klink e7659b6288
Merge pull request #107086 from NixOS/staging-next
Staging next with systemd privacy fix
2020-12-23 15:32:32 +01:00
Maximilian Bosch ae48d62bb8
Merge pull request #107410 from Ma27/bump-grocy
grocy: 2.7.1 -> 3.0.0
2020-12-23 15:06:30 +01:00
github-actions[bot] 28fd8e0d59
Merge master into staging-next 2020-12-23 00:48:29 +00:00
José Romildo Malaquias a1c004725b
Merge pull request #107027 from romildo/upd.lxqt
lxqt: update to version 0.16.0
2020-12-22 20:50:10 -03:00
Silvan Mosberger 4a8ea93127
Merge pull request #65609 from jslight90/patch-2
nixos/sd-image-aarch64: update deprecated option
2020-12-23 00:19:09 +01:00
Maximilian Bosch 123f953c98
grocy: 2.7.1 -> 3.0.0
https://github.com/grocy/grocy/releases/tag/v3.0.0
2020-12-22 16:00:33 +01:00
github-actions[bot] 3aac2c14a8
Merge master into staging-next 2020-12-22 12:25:40 +00:00
Florian Klink 80b0997499 nixos/udev: harmonize extraRules example
Use the same sample as in https://wiki.debian.org/NetworkInterfaceNames,
which includes the `ACTION=="add"` condition.
2020-12-22 11:16:29 +01:00
rnhmjoj 9f52d1f234
Revert "nixos/wireless: fix failure with no interfaces"
This reverts commit 8f177612b1.

Attempting to start any service from udev when systemd-udev-settle is
used at all hangs the boot for 2min. See issue #107341.
2020-12-22 10:17:32 +01:00
Tom Fitzhenry 9d92c9d0a7 iso-image: add 'serial console' boot entry
Prior to this commit, installation over serial console would requiring
manually having to modify the kernel modeline, as described in
https://github.com/NixOS/nixpkgs/issues/58198 .

This is unnecessarily fiddly, so this commit adds a syslinux boot
entry that has serial enabled.

GRUB already has a serial console entry:
2c07a0800a/nixos/modules/installer/cd-dvd/iso-image.nix (L311-L317)

Why 115200 bps? This is already used in other places, e.g. https://github.com/NixOS/nixpkgs/pull/58196

I tested this change by building the image, booting the image, and
observing the boot process over serial:

    $ cd nixos/
    $ nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix default.nix
    $ sudo cp /nix/store/arcl702c3z8xlndlvnfplq9yhixjvs9k-nixos-20.09pre-git-x86_64-linux.iso/iso/nixos-20.09pre-git-x86_64-linux.iso /dev/sdb

    $ picocom -b 115200 /dev/ttyUSB0
2020-12-22 16:16:15 +08:00
github-actions[bot] f1ccef3fd4
Merge master into staging-next 2020-12-22 00:46:39 +00:00
WilliButz 1c55621706
nixos/codimd: rename to hedgedoc
CodiMD was renamed to HedgeDoc. The user, group and state directory,
will be named hedgedoc instead of codimd, starting with stateVersion
"21.03".
2020-12-22 01:39:03 +01:00
WilliButz 8fc05f7a19
Merge pull request #107292 from mguentner/nginxlog_exporter
nginxlog_exporter:  1.3.0 -> 1.8.1 + module w/ tests
2020-12-21 21:40:16 +01:00
John Ericson 9a6d2ba1c5
Merge pull request #107338 from Ericson2314/thermald-allow-custom-package
nixos/thermald: Allow switching package
2020-12-21 15:23:53 -05:00
Maximilian Güntner 65fd031277
nixos: add prometheus_nginxlog_exporter module + test 2020-12-21 21:23:39 +01:00
Timo Kaufmann 8aaf788e34
Merge pull request #99037 from mohe2015/fix-mongodb
nixos/mongodb: fix running initialScript without a set root password
2020-12-21 19:41:51 +01:00
John Ericson 4bded92554 nixos/thermald: Allow switching package
Sometimes newer versions than what nixpkgs provides is needed for
certain hardware, especially for stable releases where I will backport
this commit.
2020-12-21 18:14:53 +00:00
github-actions[bot] d442b912ae
Merge master into staging-next 2020-12-21 12:23:05 +00:00
Bjørn Forsman 39fad297fd nixos: fix "nixos-rebuild build-vm-with-bootloader" for EFI systems
`nixos-rebuild build-vm-with-bootloader` currently fails with the
default NixOS EFI configuration:

  $ cat >configuration.nix <<EOF
  {
    fileSystems."/".device = "/dev/sda1";
    boot.loader.systemd-boot.enable = true;
    boot.loader.efi.canTouchEfiVariables = true;
  }
  EOF

  $ nixos-rebuild build-vm-with-bootloader -I nixos-config=$PWD/configuration.nix -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixos-20.09.tar.gz
  [...]
  insmod: ERROR: could not insert module /nix/store/1ibmgfr13r8b6xyn4f0wj115819f359c-linux-5.4.83/lib/modules/5.4.83/kernel/fs/efivarfs/efivarfs.ko.xz: No such device
  mount: /sys/firmware/efi/efivars: mount point does not exist.
  [    1.908328] reboot: Power down
  builder for '/nix/store/dx2ycclyknvibrskwmii42sgyalagjxa-nixos-boot-disk.drv' failed with exit code 32
  [...]

Fix it by setting virtualisation.useEFIBoot = true in qemu-vm.nix, when
efi is needed.

And remove the now unneeded configuration in
./nixos/tests/systemd-boot.nix, since it's handled globally.

Before:
* release-20.03: successful build, unsuccessful run
* release-20.09 (and master): unsuccessful build

After:
* Successful build and run.

Fixes https://github.com/NixOS/nixpkgs/issues/107255
2020-12-21 08:55:13 +01:00
Eduard Bopp 81f4bca15c rtl8761b-firmware: init at rtk1395
Also included the firmware under enableRedistributableFirmware.
2020-12-21 00:22:53 +01:00
github-actions[bot] 92db8d3c26
Merge master into staging-next 2020-12-20 12:22:10 +00:00
Florian Klink e45d9000b5
Merge pull request #107112 from Izorkin/samba-wsdd-fix
nixos/samba-wsdd: fix starting
2020-12-20 13:16:17 +01:00
Florian Klink 49853c69f5
Merge pull request #101482 from m1cr0man/jwsfix
nixos/acme: lego run when account is missing
2020-12-20 11:06:19 +01:00
github-actions[bot] 9f677fc6b8
Merge master into staging-next 2020-12-19 18:19:27 +00:00
mohe2015 ecb0291e1a
nixos/mongodb: fix running initialScript without a set root password
Co-authored-by: Timo Kaufmann <timokau@zoho.com>
2020-12-19 18:14:29 +01:00
Silvan Mosberger e52f705248
Merge pull request #84324 from Emantor/init/icecc_icemon
Icecream support
2020-12-19 17:54:28 +01:00
Jens Nolte ad6c2dea6a nixos/nixos-container: Always apply extraVeth ip configuration
Fixes that `containers.<name>.extraVeths.<name>` configuration was not
always applied.

When configuring `containers.<name>.extraVeths.<name>` and not
configuring one of `containers.<name>.localAddress`, `.localAddress6`,
`.hostAddress`, `.hostAddress6` or `.hostBridge` the veth was created,
but otherwise no configuration (i.e. no ip) was applied.

nixos-container always configures the primary veth (when `.localAddress`
or `.hostAddress` is set) to be the containers default gateway, so
this fix is required to create a veth in containers that use a different
default gateway.

To test this patch configure the following container and check if the
addresses are applied:
```
  containers.testveth = {
    extraVeths.testveth = {
      hostAddress = "192.168.13.2";
      localAddress = "192.168.13.1";
    };
    config = {...}:{};
  };
```
2020-12-19 04:32:05 +01:00
github-actions[bot] 79de6598b7
Merge master into staging-next 2020-12-18 18:23:04 +00:00
Aaron Andersen 0a20166ca1 nixos/zabbixWeb: include DOUBLE_IEEE754 directive 2020-12-18 13:15:55 -05:00
Linus Heckemann b1fc183639
Merge pull request #97145 from lheckemann/initrd-improvements
Initrd improvements
2020-12-18 18:15:27 +01:00