Commit graph

25 commits

Author SHA1 Message Date
sorki 7a6c5213ce nixos/moonraker: set default machine.provider to none if system control is disabled
This suppresses warnings about missing PolicyKit rules.
2025-04-19 08:21:49 +02:00
K900 550696628c nixos/moonraker: allow configuring analysis 2025-02-19 11:11:31 +03: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 e00ab2106a nixos/services.moonraker: remove with lib; 2024-08-30 23:00:53 +02: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
Bernardo Meurer 392b32b2af
nixos/moonraker: fix update_manager.enable_system_updates being [bool] and not bool 2024-01-29 11:31:12 -05:00
Bernardo Meurer a09b1c12fb
nixos/moonraker: don't warn about harmless update_manager settings
The only setting we care to warn about is `enable_system_updates`,
there's no reason to issue warnings when folks set, for example,
`enable_auto_refresh`.
2024-01-18 13:52:50 -05:00
eyjhb 0fc323eeef
moonraker: disable check_klipper_config if klipper is immutable 2023-12-19 15:36:01 +01:00
h7x4 0a37316d6c
treewide: use mkPackageOption
This commit replaces a lot of usages of `mkOption` with the package
type, to be `mkPackageOption`, in order to reduce the amount of code.
2023-11-27 01:28:36 +01:00
Vladimir Serov 5edabf7c0b
moonraker: add useGpiod 2023-10-02 06:09:58 +04:00
Bernardo Meurer 4804f7a09b
nixos/mainsail: init 2023-05-07 01:41:03 -04:00
Zhaofeng Li 385081693e nixos/moonraker: Don't allow Moonraker to validate its systemd service
Our service files are managed by NixOS and different from
the upstream setup. If this is not disabled, Moonraker will
want sudo access to modify the service files directly.
2022-11-19 13:37:37 -07:00
Zhaofeng Li 9411ea9214 nixos/moonraker: Remove database_path
The database_path setting has been deprecated upstream. The database
now lives in `database` under the unified data path. It's same as the
path we've been forcing:

<362bc1a3d3/moonraker/components/database.py (L83)>
2022-11-19 13:37:37 -07:00
Zhaofeng Li 7856ac79ac nixos/moonraker: Deprecate configDir
The config_path setting has been deprecated upstream. Mutable
config files are now supposed to live under the unified data path.
2022-11-19 13:37:37 -07:00
Zhaofeng Li 7658372185 nixos/moonraker: Pass -d (data-path) to moonraker
Moonraker now stores a few more paths under data-path which defaults
to $HOME.
2022-11-19 13:37:37 -07:00
Zhaofeng Li ce86df4a21 nixos/moonraker: Add zhaofengli as maintainer 2022-11-19 13:37:37 -07:00
cab e46430d503
nixos.moonraker: version change fixes
Old config locations were deprecated
https://moonraker.readthedocs.io/en/latest/configuration/#option-moved-deprecations.

Also, added PrivateTmp to accomodate for logs being unconditionally
written there.
2022-09-23 11:17:54 +04: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
Zhaofeng Li 0527ccaca7 nixos/moonraker: Grant polkit permissions for system-level operations 2022-03-22 15:35:38 -07:00
Zhaofeng Li 787aaea68e nixos/moonraker: Add iproute2 to path 2022-03-22 15:35:38 -07:00
Graham Christensen 06edb74413
Merge pull request #148785 from pennae/more-option-doc-staticizing
treewide: more defaultText for options
2021-12-17 11:14:08 -05:00
pennae ed673a69db treewide: add defaultText for options with simple cfg.* expression defaults
adds defaultText for options with defaults that use only literals, full config.*
paths, and the cfg shortcut binding.
2021-12-09 01:14:16 +01:00
pennae 2512455639 nixos/*: add trivial defaultText for options with simple defaults 2021-12-02 22:35:04 +01:00
Zhaofeng Li 5fbdf2ef1f nixos/moonraker: init 2021-08-04 19:48:58 -07:00