diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-08-25 12:01:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-25 12:01:24 +0000 |
commit | 8680fe99a1c71d90cd8875da37d57b9f883de725 (patch) | |
tree | b461544206619acd3da5bf200e9b908db941e376 /nixos | |
parent | 0c973816f71ed2c8d521edb7f9c919f353ef125b (diff) | |
parent | e9e72a4b0dd54e4eb8953a2e64448aa37cea87b1 (diff) | |
download | nixlib-8680fe99a1c71d90cd8875da37d57b9f883de725.tar nixlib-8680fe99a1c71d90cd8875da37d57b9f883de725.tar.gz nixlib-8680fe99a1c71d90cd8875da37d57b9f883de725.tar.bz2 nixlib-8680fe99a1c71d90cd8875da37d57b9f883de725.tar.lz nixlib-8680fe99a1c71d90cd8875da37d57b9f883de725.tar.xz nixlib-8680fe99a1c71d90cd8875da37d57b9f883de725.tar.zst nixlib-8680fe99a1c71d90cd8875da37d57b9f883de725.zip |
Merge master into staging-next
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/editors/emacs.md | 24 | ||||
-rw-r--r-- | nixos/modules/services/monitoring/prometheus/exporters/nextcloud.nix | 19 |
2 files changed, 20 insertions, 23 deletions
diff --git a/nixos/modules/services/editors/emacs.md b/nixos/modules/services/editors/emacs.md index 72364b295144..9db1bd594175 100644 --- a/nixos/modules/services/editors/emacs.md +++ b/nixos/modules/services/editors/emacs.md @@ -286,11 +286,11 @@ The server should now be ready to serve Emacs clients. ### Starting the client {#module-services-emacs-starting-client} -Ensure that the emacs server is enabled, either by customizing the +Ensure that the Emacs server is enabled, either by customizing the {var}`server-mode` variable, or by adding `(server-start)` to {file}`~/.emacs`. -To connect to the emacs daemon, run one of the following: +To connect to the Emacs daemon, run one of the following: ``` emacsclient FILENAME emacsclient --create-frame # opens a new frame (window) @@ -339,24 +339,10 @@ This will add the symlink ## Configuring Emacs {#module-services-emacs-configuring} -The Emacs init file should be changed to load the extension packages at -startup: +If you want to only use extension packages from Nixpkgs, you can add +`(setq package-archives nil)` to your init file. -::: {.example #module-services-emacs-package-initialisation} -### Package initialization in `.emacs` - -``` -(require 'package) - -;; optional. makes unpure packages archives unavailable -(setq package-archives nil) - -(setq package-enable-at-startup nil) -(package-initialize) -``` -::: - -After the declarative emacs package configuration has been tested, +After the declarative Emacs package configuration has been tested, previously downloaded packages can be cleaned up by removing {file}`~/.emacs.d/elpa` (do make a backup first, in case you forgot a package). diff --git a/nixos/modules/services/monitoring/prometheus/exporters/nextcloud.nix b/nixos/modules/services/monitoring/prometheus/exporters/nextcloud.nix index 7808c8861a76..28add020f5cc 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/nextcloud.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/nextcloud.nix @@ -33,6 +33,15 @@ in Make sure that this file is readable by the exporter user. ''; }; + tokenFile = mkOption { + type = types.path; + example = "/path/to/token-file"; + default = ""; + description = lib.mdDoc '' + File containing the token for connecting to Nextcloud. + Make sure that this file is readable by the exporter user. + ''; + }; timeout = mkOption { type = types.str; default = "5s"; @@ -47,12 +56,14 @@ in ExecStart = '' ${pkgs.prometheus-nextcloud-exporter}/bin/nextcloud-exporter \ --addr ${cfg.listenAddress}:${toString cfg.port} \ - --username ${cfg.username} \ --timeout ${cfg.timeout} \ --server ${cfg.url} \ - --password ${escapeShellArg "@${cfg.passwordFile}"} \ - ${concatStringsSep " \\\n " cfg.extraFlags} - ''; + ${if cfg.tokenFile == "" then '' + --username ${cfg.username} \ + --password ${escapeShellArg "@${cfg.passwordFile}"} \ + '' else '' + --auth-token ${escapeShellArg "@${cfg.tokenFile}"} \ + ''} ${concatStringsSep " \\\n " cfg.extraFlags}''; }; }; } |