sks,nixos/sks: Various minor improvements
Module:
- Add a webroot option (serve a website by default, makes the setup easier)
- Explicitly set a group (instead of using 65534/nogroup)
- Move pkgs.sks from environment.systemPackages to the "sks" user and add pkgs.db
Package:
- Adapt the output of "sks version" to NixOS
- Copy the example webpages to $webSamples
That way the built-in web server is usable by default but users can use
$HOME/web directly (instead of having to use a symlink), if they want to
customize the webpage.
Without a group the gid will default to 65534 (2^16 - 2) which maps to
"nogroup". IMO it makes more sense to explicitly set a valid group.
Adding pkgs.sks to environment.systemPackages is not required (IIRC we
want to avoid bloating environment.systemPackages). Instead it seems
like a better idea to make the relevant binaries available to the user
sks and enable useDefaultShell so that "su -l sks" can be used for
manual interaction (that way the files will always have the correct
owner).
See https://hydra.nixos.org/build/80999410
Without a sandbox the `checkPhase` breaks with the following error:
```
/nix/store/i6vl5lwlz5jbkg4r6p340dwmj6fha3xq-stdenv-linux/setup: bin/jbake: /usr/bin/env: bad interpreter: No such file or directory
jbake did not return correct version
```
Running `patchShebangs` before fixes the issue.
Addresses #45960
See https://hydra.nixos.org/build/80998335.
Upstream doesn't support QT 5.11 ATM which broke compilation:
```
src/dialogs/savedialog.cpp: In constructor ‘SaveDialog::SaveDialog(QWidget*, Qt::WindowFlags)’:
src/dialogs/savedialog.cpp:37:34: error: invalid use of incomplete type ‘class QButtonGroup’
group = new QButtonGroup(this);
```
The Arch community recommends to use an older QT version to fix
this (https://aur.archlinux.org/packages/chessx/).
Furthermore the `QT_PLUGIN_PATH` wasn't set properly which broke the
runtime since QT coudln't find the `xcb` plugin:
```
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized.
Reinstalling the application may fix this problem.
```
Finally, some minor style fixes were made for consistent indentation.
Addresses #45960