nixpkgs/nixos/modules/services
Jules Aguillon df590070b0 types.singleLineStr: strings that don't contain '\n'
Add a new type, inheriting 'types.str' but checking whether the value
doesn't contain any newline characters.

The motivation comes from a problem with the
'users.users.${u}.openssh.authorizedKeys' option.
It is easy to unintentionally insert a newline character at the end of a
string, or even in the middle, for example:

    restricted_ssh_keys = command: keys:
      let
        prefix = ''
          command="${command}",no-pty,no-agent-forwarding,no-port-forwarding,no-X11-forwarding
        '';
      in map (key: "${prefix} ${key}") keys;

The 'prefix' string ends with a newline, which ends up in the middle of
a key entry after a few manipulations.

This is problematic because the key file is built by concatenating all
the keys with 'concatStringsSep "\n"', with result in two entries for
the faulty key:

    ''
      command="...",options...
      MY_KEY
    ''

This is hard to debug and might be dangerous. This is now caught at
build time.
2022-01-18 22:06:34 +01:00
..
admin
amqp
audio Merge pull request #148785 from pennae/more-option-doc-staticizing 2021-12-17 11:14:08 -05:00
backup Merge pull request #149532 from pennae/split-docs-build 2022-01-04 22:33:23 +01:00
blockchain/ethereum
cluster Merge pull request #149532 from pennae/split-docs-build 2022-01-04 22:33:23 +01:00
computing Merge pull request #148785 from pennae/more-option-doc-staticizing 2021-12-17 11:14:08 -05:00
continuous-integration Merge pull request #148785 from pennae/more-option-doc-staticizing 2021-12-17 11:14:08 -05:00
databases nixos/couchdb: add missing defaultText 2021-12-29 20:12:02 +01:00
desktops Merge pull request #153426 from 4z3/systemwide-pipewire 2022-01-05 21:33:07 +00:00
development nixos/hoogle: Type the last option 2021-12-07 18:36:01 +01:00
display-managers
editors
finance
games nixos/minecraft-server: systemd unit hardening 2021-12-28 13:49:14 +01:00
hardware nixos/make-options-doc: turn relatedPackages into links 2022-01-02 19:46:13 +01:00
logging nixos/logrotate: rotate login/logout logs by default 2021-12-29 02:07:02 +01:00
mail nixos/maddy: Better description, user and group handling 2021-12-30 14:17:00 +01:00
matrix
misc Merge pull request #149532 from pennae/split-docs-build 2022-01-04 22:33:23 +01:00
monitoring prometheus: add authorization section 2022-01-03 12:04:08 +01:00
network-filesystems nixos/glusterfs: remove syslog.target from services 2021-12-11 22:43:02 +01:00
networking types.singleLineStr: strings that don't contain '\n' 2022-01-18 22:06:34 +01:00
printing
scheduling
search treewide: add defaultText for options with simple cfg.* expression defaults 2021-12-09 01:14:16 +01:00
security nixos/documentation: split options doc build 2022-01-02 19:46:13 +01:00
system
torrent Merge pull request #148785 from pennae/more-option-doc-staticizing 2021-12-17 11:14:08 -05:00
ttys
video Merge pull request #148785 from pennae/more-option-doc-staticizing 2021-12-17 11:14:08 -05:00
wayland nixos/cage: log to journal 2021-12-16 23:55:15 +00:00
web-apps Merge pull request #149532 from pennae/split-docs-build 2022-01-04 22:33:23 +01:00
web-servers Revert "nixos/nginx: disable rejectSSL activation when https is disabled" 2022-01-02 21:01:29 +01:00
x11 Merge pull request #153472 from romildo/upd.ecrire 2022-01-05 16:00:50 -03:00