Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

services.darkman.enable

Whether to enable darkman, a tool that automatically switches dark-mode on and off based on the time of the day.

Type: boolean

Default:

false

Example:

true

Declared by:

services.darkman.package

The darkman package to use.

Type: null or package

Default:

pkgs.darkman

Declared by:

services.darkman.darkModeScripts

Scripts to run when switching to “dark mode”.

Multiline strings are interpreted as Bash shell scripts and a shebang is not required.

Type: attribute set of (absolute path or strings concatenated with “\n”)

Default:

{ }

Example:

{
  gtk-theme = ''
    ${pkgs.dconf}/bin/dconf write \
        /org/gnome/desktop/interface/color-scheme "'prefer-dark'"
  '';
  my-python-script = pkgs.writers.writePython3 "my-python-script" { } ''
    print('Do something!')
  '';
}

Declared by:

services.darkman.lightModeScripts

Scripts to run when switching to “light mode”.

Multiline strings are interpreted as Bash shell scripts and a shebang is not required.

Type: attribute set of (absolute path or strings concatenated with “\n”)

Default:

{ }

Example:

{
  gtk-theme = ''
    ${pkgs.dconf}/bin/dconf write \
        /org/gnome/desktop/interface/color-scheme "'prefer-light'"
  '';
  my-python-script = pkgs.writers.writePython3 "my-python-script" { } ''
    print('Do something!')
  '';
}

Declared by:

services.darkman.scripts

Scripts to run when switching modes, placed in $XDG_DATA_HOME/darkman/. Each script receives the new mode (dark or light) as its first argument, allowing a single script to handle both modes.

Multiline strings are interpreted as Bash shell scripts and a shebang is not required.

These scripts take precedence over legacy scripts of the same name in darkModeScripts and lightModeScripts.

Type: attribute set of (absolute path or strings concatenated with “\n”)

Default:

{ }

Example:

{
  gtk-theme = ''
    if [ "$1" = "dark" ]; then
      ${pkgs.dconf}/bin/dconf write \
          /org/gnome/desktop/interface/color-scheme "'prefer-dark'"
    else
      ${pkgs.dconf}/bin/dconf write \
          /org/gnome/desktop/interface/color-scheme "'prefer-light'"
    fi
  '';
}

Declared by:

services.darkman.settings

Settings for the darkman command. See https://darkman.whynothugo.nl/#CONFIGURATION for details.

Type: open submodule of (YAML 1.1 value)

Default:

{ }

Example:

{
  lat = 52.3;
  lng = 4.8;
  usegeoclue = true;
}

Declared by: