1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-21 17:01:10 +03:00
Commit graph

20 commits

Author SHA1 Message Date
Felix Singer
36c5aed6d3 nixos/weechat: Allow switching between TUI and headless mode
weechat can run in TUI or headless mode. Introduce the option
`headless` for specifying that. Based on the setting, it configures
the appropriate binary in the `binary` option and it also configures the
systemd unit accordingly. `headless` is disabled by default.

This doesn't change the current behaviour.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
2025-02-05 02:49:21 +01:00
Felix Singer
8ef264f0a9 nixos/weechat: Introduce package option
Allow specifying a custom weechat package.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
2025-02-05 02:49:21 +01:00
Felix Singer
e66ee6f45f nixos/weechat: Drop user home directory configuration
Configuring an user home directory also enables several invocations and
mechanisms, e.g. SSH authorized_keys or bashrc, which is bad from a
security perspective. The service doesn't need that at all and the
environment is set up over different ways now. So drop it.

This doesn't change the current behaviour.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
2025-02-05 02:49:21 +01:00
Felix Singer
f70547debc nixos/weechat: Set up state directory
In preparation for dropping the user home directory, set up the state
directory manually. Use the systemd unit options when /var/lib/weechat
is used and use systemd-tmpfiles for all other locations. Not sure if it
makes any difference. However, it seems systemd tends to control its
directories in /var/lib and so it might make more sense to use the
existing options of the systemd unit.

This doesn't change the current behaviour.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
2025-02-05 02:49:21 +01:00
Felix Singer
35e7219c0b nixos/weechat: Retype root option to lib.types.path
This option represents a path. So use the corresponding type.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
2025-02-05 02:49:20 +01:00
Felix Singer
0def76f96c nixos/weechat: Use parameter instead of env variable for state dir
The environment variable hides the actual state directory of weechat in
systemctl. To make it more obvious, use the equivalent CLI parameter.

This doesn't change the current behaviour.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
2025-02-05 02:49:20 +01:00
Felix Singer
fab596794b nixos/weechat: Add and remove some blank lines for consistency
Signed-off-by: Felix Singer <felixsinger@posteo.net>
2025-02-05 02:49:20 +01:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Felix Buehler
fe175fe575 nixos/services.weechat: remove with lib; 2024-11-28 19:08:35 +01:00
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
pennae
0a6e6cf7e6 nixos/manual: render module chapters with nixos-render-docs
this converts meta.doc into an md pointer, not an xml pointer. since we
no longer need xml for manual chapters we can also remove support for
manual chapters from md-to-db.sh

since pandoc converts smart quotes to docbook quote elements and our
nixos-render-docs does not we lose this distinction in the rendered
output. that's probably not that bad, our stylesheet didn't make use of
this anyway (and pre-23.05 versions of the chapters didn't use quote
elements either).

also updates the nixpkgs manual to clarify that option docs support all
extensions (although it doesn't support headings at all, so heading
anchors don't work by extension).
2023-01-27 20:07:34 +01:00
Naïm Favier
363158603a nixos: fix backticks in Markdown descriptions 2023-01-21 18:08:38 +01:00
pennae
ef176dcf7e nixos/*: automatically convert option descriptions
conversions were done using https://github.com/pennae/nix-doc-munge
using (probably) rev f34e145 running

    nix-doc-munge nixos/**/*.nix
    nix-doc-munge --import nixos/**/*.nix

the tool ensures that only changes that could affect the generated
manual *but don't* are committed, other changes require manual review
and are discarded.
2022-08-31 16:32:53 +02:00
pennae
2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00
Naïm Favier
2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
rnhmjoj
fedd7cd690
nixos: explicitely set security.wrappers ownership
This is slightly more verbose and inconvenient, but it forces you
to think about what the wrapper ownership and permissions will be.
2021-09-13 13:48:13 +02:00
Fritz Otlinghaus
1bf9ebc8b2
nixos/weechat: add binary 2021-01-31 12:59:04 +01:00
Maximilian Bosch
018573b757
nixos/weechat: add setuid wrapper for `screen' to ensure true multiuser capabilities
Previously you either had to set the setuid bit yourself or workaround
`isSystemUser = true` (for a loginable shell) to access the weechat
screen.

`programs.screen` shouldn't do this by default to avoid taking too much
assumptions about the setup, however `services.weechat` explicitly
requires tihs.

See #45728
2018-10-10 11:11:34 +02:00
Maximilian Bosch
18d419141d
nixos/weechat: cleanup module, add module documentation
This adds several improvements the previously introduced
`services.weechat` module:

* Dropped `services.weechat.init` as the initialization script can now
  be done on package-level since 2af41719bc using the `configure`
  function.

* Added `sessionName` option to explicitly configure a name for the
  `screen` session (by default: weechat-screen).

* Added `binary` option to configure the binary name (e.g.
  `weechat-headless`).

* Added docs regarding `screen` session and `weechat.service`.
2018-09-07 13:45:13 +02:00
Yegor Timoshenko
b54987715b
weechat: add NixOS module 2018-09-07 13:09:08 +02:00