summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2017-10-19 22:16:09 +0200
committerDaiderd Jordan <daiderd@gmail.com>2017-10-19 22:16:09 +0200
commit78d426940a1da0ccddcaf5919cedc04ebb65b778 (patch)
tree70283ce4dc71ce506ff5f6cfa0a6b23cb9d5c8c0 /modules
parent061232c6dbd82f49ca0782c36825cd1c2c0aa3fe (diff)
improve descriptions for a bunch of modules
Diffstat (limited to 'modules')
-rw-r--r--modules/programs/tmux.nix27
-rw-r--r--modules/services/chunkwm.nix52
-rw-r--r--modules/services/khd/default.nix7
-rw-r--r--modules/services/kwm/default.nix5
-rw-r--r--modules/services/mopidy.nix47
5 files changed, 60 insertions, 78 deletions
diff --git a/modules/programs/tmux.nix b/modules/programs/tmux.nix
index 9b5898c..9ad9d63 100644
--- a/modules/programs/tmux.nix
+++ b/modules/programs/tmux.nix
@@ -3,7 +3,6 @@
with lib;
let
-
inherit (pkgs) stdenv;
cfg = config.programs.tmux;
@@ -36,52 +35,42 @@ let
session=$(tmux list-sessions -F '#{session_name}' | fzf --query="$1" --exit-0)
tmux switch-client -t "$session"
'';
+in
-in {
+{
options = {
-
programs.tmux.enable = mkOption {
type = types.bool;
default = false;
- description = ''
- Whether to configure tmux.
- '';
+ description = "Whether to configure tmux.";
};
programs.tmux.enableSensible = mkOption {
type = types.bool;
default = false;
example = true;
- description = ''
- Enable sensible configuration options for tmux.
- '';
+ description = "Enable sensible configuration options for tmux.";
};
programs.tmux.enableMouse = mkOption {
type = types.bool;
default = false;
example = true;
- description = ''
- Enable mouse support for tmux.
- '';
+ description = "Enable mouse support for tmux.";
};
programs.tmux.enableFzf = mkOption {
type = types.bool;
default = false;
example = true;
- description = ''
- Enable fzf keybindings for selecting tmux sessions and panes.
- '';
+ description = "Enable fzf keybindings for selecting tmux sessions and panes.";
};
programs.tmux.enableVim = mkOption {
type = types.bool;
default = false;
example = true;
- description = ''
- Enable vim style keybindings for copy mode, and navigation of tmux panes.
- '';
+ description = "Enable vim style keybindings for copy mode, and navigation of tmux panes.";
};
programs.tmux.tmuxOptions = mkOption {
@@ -93,8 +82,8 @@ in {
programs.tmux.tmuxConfig = mkOption {
type = types.lines;
default = "";
+ description = "Extra configuration to add to <filename>tmux.conf</filename>.";
};
-
};
config = mkIf cfg.enable {
diff --git a/modules/services/chunkwm.nix b/modules/services/chunkwm.nix
index b3ed698..27c6797 100644
--- a/modules/services/chunkwm.nix
+++ b/modules/services/chunkwm.nix
@@ -19,51 +19,59 @@ in {
services.chunkwm.package = mkOption {
type = types.package;
- example = pkgs.chunkwm;
- description = "This option specifies the chunkwm package to use";
+ example = literalExample "pkgs.chunkwm";
+ description = "This option specifies the chunkwm package to use.";
};
services.chunkwm.hotload = mkOption {
type = types.bool;
default = true;
- description = "Whether to enable hotload";
+ description = "Whether to enable hotload.";
};
services.chunkwm.extraConfig = mkOption {
type = types.lines;
- example = ''
- chunkc tiling::rule --owner Emacs --state tile
- '';
- description = "Additional commands for chunkwmrc";
+ default = "";
+ example = ''chunkc tiling::rule --owner Emacs --state tile'';
+ description = "Additional commands for <filename>chunkwmrc</filename>.";
};
services.chunkwm.plugins.dir = mkOption {
type = types.path;
default = "/run/current-system/sw/lib/chunkwm/plugins";
- description = "Chunkwm Plugins directory";
+ description = "Chunkwm Plugins directory.";
};
services.chunkwm.plugins.list = mkOption {
type = types.listOf (types.enum plugins);
default = plugins;
example = ["tiling"];
- description = "Chunkwm Plugins to enable";
+ description = "Chunkwm Plugins to enable.";
};
services.chunkwm.plugins."border".config = mkOption {
type = types.lines;
- default = ''
- chunkc set focused_border_color 0xffc0b18b
- chunkc set focused_border_width 4
- chunkc set focused_border_radius 0
- chunkc set focused_border_skip_floating 0
- '';
- description = "Optional border plugin configuration";
+ default = ''chunkc set focused_border_color 0xffc0b18b'';
+ description = "Optional border plugin configuration.";
};
services.chunkwm.plugins."tiling".config = mkOption {
type = types.lines;
- default = ''
+ example = ''chunkc set global_desktop_mode bsp'';
+ description = "Optional tiling plugin configuration.";
+ };
+ };
+
+ config = mkIf cfg.enable {
+
+ services.chunkwm.plugins."border".config = mkDefault ''
+ chunkc set focused_border_color 0xffc0b18b
+ chunkc set focused_border_width 4
+ chunkc set focused_border_radius 0
+ chunkc set focused_border_skip_floating 0
+ '';
+
+ services.chunkwm.plugins."tiling".config = mkDefault ''
chunkc set global_desktop_mode bsp
chunkc set 2_desktop_mode monocle
chunkc set 5_desktop_mode float
@@ -100,13 +108,7 @@ in {
chunkc set window_float_next 0
chunkc set window_float_center 1
chunkc set window_region_locked 1
- '';
- };
-
-
- };
-
- config = mkIf cfg.enable {
+ '';
security.accessibilityPrograms = [ "${cfg.package}/bin/chunkwm" ];
@@ -126,8 +128,6 @@ in {
serviceConfig.RunAtLoad = true;
serviceConfig.KeepAlive = true;
serviceConfig.ProcessType = "Interactive";
- # serviceConfig.StandardOutPath = "/tmp/chunkwm.out";
- # serviceConfig.StandardErrorPath = "/tmp/chunkwm.err";
};
};
diff --git a/modules/services/khd/default.nix b/modules/services/khd/default.nix
index 8a322fb..f3f8e92 100644
--- a/modules/services/khd/default.nix
+++ b/modules/services/khd/default.nix
@@ -3,11 +3,9 @@
with lib;
let
-
cfg = config.services.khd;
i3Config = import ./i3.nix { inherit pkgs; };
-
in
{
@@ -15,7 +13,7 @@ in
services.khd.enable = mkOption {
type = types.bool;
default = false;
- description = "Whether to enable the khd hototkey daemon.";
+ description = "Whether to enable the khd hotkey daemon.";
};
services.khd.package = mkOption {
@@ -28,7 +26,8 @@ in
services.khd.khdConfig = mkOption {
type = types.lines;
default = "";
- example = "alt + shift - r : kwmc quit";
+ example = "alt + shift - r : kwmc quit";
+ description = "Config to use for <filename>khdrc</filename>.";
};
services.khd.i3Keybindings = mkOption {
diff --git a/modules/services/kwm/default.nix b/modules/services/kwm/default.nix
index e6231b2..f9fe4a2 100644
--- a/modules/services/kwm/default.nix
+++ b/modules/services/kwm/default.nix
@@ -3,9 +3,7 @@
with lib;
let
-
cfg = config.services.kwm;
-
in
{
@@ -20,13 +18,14 @@ in
type = types.path;
default = pkgs.kwm;
defaultText = "pkgs.kwm";
- description = "This option specifies the kwm package to use";
+ description = "This option specifies the kwm package to use.";
};
services.kwm.kwmConfig = mkOption {
type = types.lines;
default = "";
example = ''kwmc rule owner="iTerm2" properties={role="AXDialog"}'';
+ description = "Config to use for <filename>kwmrc</filename>.";
};
};
diff --git a/modules/services/mopidy.nix b/modules/services/mopidy.nix
index b1a7151..be3c05e 100644
--- a/modules/services/mopidy.nix
+++ b/modules/services/mopidy.nix
@@ -3,40 +3,35 @@
with lib;
let
-
cfg = config.services.mopidy;
-
in
{
options = {
- services.mopidy = {
-
- enable = mkOption {
- type = types.bool;
- default = false;
- description = "Whether to enable the Mopidy Daemon.";
- };
+ services.mopidy.enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Whether to enable the Mopidy Daemon.";
+ };
- package = mkOption {
- type = types.path;
- default = pkgs.mopidy;
- description = "This option specifies the mopidy package to use.";
- };
+ services.mopidy.package = mkOption {
+ type = types.path;
+ default = pkgs.mopidy;
+ defaultText = "pkgs.mopidy";
+ description = "This option specifies the mopidy package to use.";
+ };
- mediakeys = {
- enable = mkOption {
- type = types.bool;
- default = false;
- description = "Whether to enable the Mopidy OSX Media Keys support daemon.";
- };
- package = mkOption {
- type = types.path;
- default = pkgs.pythonPackages.osxmpdkeys;
- description = "This option specifies the mediakeys package to use.";
- };
- };
+ services.mopidy.mediakeys.enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Whether to enable the Mopidy OSX Media Keys support daemon.";
+ };
+ services.mopidy.mediakeys.package = mkOption {
+ type = types.path;
+ default = pkgs.pythonPackages.osxmpdkeys;
+ defaultText = "pkgs.pythonPackages.osxmpdkeys";
+ description = "This option specifies the mediakeys package to use.";
};
};