diff options
author | pennae <github@quasiparticle.net> | 2021-12-05 20:40:24 +0100 |
---|---|---|
committer | pennae <github@quasiparticle.net> | 2021-12-09 01:12:13 +0100 |
commit | e24a8775a86905ad001c4c965a7d180b41c10c52 (patch) | |
tree | 62da74c469bec798898d88029919f2bbd9f01442 /nixos/modules/services/x11 | |
parent | 70b105d1d062369c7489b0045df5a8b86bac5dd6 (diff) | |
download | nixpkgs-e24a8775a86905ad001c4c965a7d180b41c10c52.tar nixpkgs-e24a8775a86905ad001c4c965a7d180b41c10c52.tar.gz nixpkgs-e24a8775a86905ad001c4c965a7d180b41c10c52.tar.bz2 nixpkgs-e24a8775a86905ad001c4c965a7d180b41c10c52.tar.lz nixpkgs-e24a8775a86905ad001c4c965a7d180b41c10c52.tar.xz nixpkgs-e24a8775a86905ad001c4c965a7d180b41c10c52.tar.zst nixpkgs-e24a8775a86905ad001c4c965a7d180b41c10c52.zip |
treewide: set defaultText for options using simple path defaults
adds defaultText for all options that set their default to a path expression using the ubiquitous `cfg` shortcut bindings.
Diffstat (limited to 'nixos/modules/services/x11')
-rw-r--r-- | nixos/modules/services/x11/hardware/synaptics.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nixos/modules/services/x11/hardware/synaptics.nix b/nixos/modules/services/x11/hardware/synaptics.nix index 22af869f1f8..93dd560bca4 100644 --- a/nixos/modules/services/x11/hardware/synaptics.nix +++ b/nixos/modules/services/x11/hardware/synaptics.nix @@ -1,8 +1,9 @@ -{ config, lib, pkgs, ... }: +{ config, lib, options, pkgs, ... }: with lib; let cfg = config.services.xserver.synaptics; + opt = options.services.xserver.synaptics; tapConfig = if cfg.tapButtons then enabledTapConfig else disabledTapConfig; enabledTapConfig = '' Option "MaxTapTime" "180" @@ -77,24 +78,28 @@ in { horizTwoFingerScroll = mkOption { type = types.bool; default = cfg.twoFingerScroll; + defaultText = literalExpression "config.${opt.twoFingerScroll}"; description = "Whether to enable horizontal two-finger drag-scrolling."; }; vertTwoFingerScroll = mkOption { type = types.bool; default = cfg.twoFingerScroll; + defaultText = literalExpression "config.${opt.twoFingerScroll}"; description = "Whether to enable vertical two-finger drag-scrolling."; }; horizEdgeScroll = mkOption { type = types.bool; default = ! cfg.horizTwoFingerScroll; + defaultText = literalExpression "! config.${opt.horizTwoFingerScroll}"; description = "Whether to enable horizontal edge drag-scrolling."; }; vertEdgeScroll = mkOption { type = types.bool; default = ! cfg.vertTwoFingerScroll; + defaultText = literalExpression "! config.${opt.vertTwoFingerScroll}"; description = "Whether to enable vertical edge drag-scrolling."; }; |