wayland.systemd.target
The systemd target that will automatically start the graphical Wayland services.
This option is a generalization of individual systemd.target or systemdTarget,
and affect all Wayland services by default.
When setting this value to "sway-session.target",
make sure to also enable wayland.windowManager.sway.systemd.enable,
otherwise the service may never be started.
Type: string
Default:
"graphical-session.target"
Example:
"sway-session.target"
Declared by:
wayland.windowManager.hyprland.enable
Whether to enable configuration for Hyprland, a tiling Wayland compositor that doesn’t sacrifice on its looks.
Note: This module configures Hyprland and adds it to your user’s PATH,
but does not make certain system-level changes. NixOS users should
enable the NixOS module with programs.hyprland.enable, which
makes system-level changes such as adding a desktop session entry.
Type: boolean
Default:
false
Declared by:
wayland.windowManager.hyprland.package
The hyprland package to use. Set this to null if you use the NixOS module to install Hyprland.
Type: null or package
Default:
pkgs.hyprland
Declared by:
wayland.windowManager.hyprland.configType
The type of Hyprland configuration to generate.
hyprlang writes $XDG_CONFIG_HOME/hypr/hyprland.conf.
lua writes $XDG_CONFIG_HOME/hypr/hyprland.lua.
Type: one of “hyprlang”, “lua”
Default:
if lib.versionAtLeast config.home.stateVersion "26.05" then "lua" else "hyprlang"
Declared by:
wayland.windowManager.hyprland.extraConfig
Extra configuration content appended to the generated Hyprland file.
Type: strings concatenated with “\n”
Default:
""
Example:
''
hl.on("window.open", function()
hl.timer(function()
hl.dispatch(hl.dsp.exec_cmd("notify-send 'Window opened'"))
end, {
timeout = 100,
type = "oneshot",
})
end)
''
Declared by:
wayland.windowManager.hyprland.extraLuaFiles
Extra Lua files written under $XDG_CONFIG_HOME/hypr.
Attribute names are used as Lua module names and converted to file
names with a .lua suffix added when missing. For example,
bindings writes
$XDG_CONFIG_HOME/hypr/bindings.lua, while
lib.helpers writes $XDG_CONFIG_HOME/hypr/lib/helpers.lua.
Files with autoLoad enabled generate require(...) calls in
$XDG_CONFIG_HOME/hypr/hyprland.lua after adding the Hypr config
directory to Lua’s package.path. Use autoLoad = false for
helper modules that are imported by other Lua files.
This option only affects generated files when
wayland.windowManager.hyprland.configType is "lua".
Type: attribute set of ((submodule) or (absolute path or strings concatenated with “\n”) convertible to it)
Default:
{ }
Example:
{
"00-vars" = '\'
local M = {}
M.mainMod = "SUPER"
return M
'\';
"ui.bindings" = {
content = ./bindings.lua;
autoLoad = true;
};
"lib.helpers" = {
content = ./helpers.lua;
autoLoad = false;
};
"from-path.lua" = ./startup.lua;
}
Declared by:
wayland.windowManager.hyprland.extraLuaFiles.<name>.autoLoad
Whether to generate a require(...) call for this file in
$XDG_CONFIG_HOME/hypr/hyprland.lua.
Type: boolean
Default:
true
Declared by:
wayland.windowManager.hyprland.extraLuaFiles.<name>.content
Lua file content, set either by specifying a path to a Lua file or by providing a multi-line Lua string.
Type: absolute path or strings concatenated with “\n”
Declared by:
wayland.windowManager.hyprland.finalPackage
The Hyprland package after applying configuration.
Type: null or package (read only)
Default:
wayland.windowManager.hyprland.package with applied configuration
Declared by:
wayland.windowManager.hyprland.finalPortalPackage
The xdg-desktop-portal-hyprland package after overriding its hyprland input.
Type: null or package (read only)
Default:
wayland.windowManager.hyprland.portalPackage with
wayland.windowManager.hyprland.finalPackage override
Declared by:
wayland.windowManager.hyprland.importantPrefixes
List of prefix of attributes to source at the top of the config.
Type: list of string
Default:
[
"$"
"bezier"
"curve"
"name"
"output"
]
Example:
[
"$"
"bezier"
]
Declared by:
wayland.windowManager.hyprland.plugins
List of Hyprland plugins to use. Can either be packages or absolute plugin paths.
Type: list of (package or absolute path)
Default:
[ ]
Declared by:
wayland.windowManager.hyprland.portalPackage
The xdg-desktop-portal-hyprland package to use.
Type: null or package
Default:
pkgs.xdg-desktop-portal-hyprland
Declared by:
wayland.windowManager.hyprland.settings
Hyprland configuration written in Nix. Entries with the same key should be written as lists. Variables’ and colors’ names should be quoted. See https://wiki.hypr.land for more examples.
Note: Use the option to declare plugins.
When wayland.windowManager.hyprland.configType is "lua",
each attribute maps to an hl.<name>(...) call. List values generate
one call per element.
Attribute values with an _args list generate multi-argument calls.
Attribute values with _var generate a Lua local variable instead of
an hl.<name>(...) call. If no name is set, the attribute name is
used as the Lua variable name.
Values created with lib.generators.mkLuaInline are rendered as raw
Lua expressions.
Type: Hyprland configuration value
Default:
{ }
Example:
{
mod = {
_var = "SUPER";
};
config = {
general = {
gaps_in = 5;
gaps_out = 20;
border_size = 2;
};
decoration = {
rounding = 10;
};
};
bind = [
{
_args = [
(lib.generators.mkLuaInline "mod .. \" + Q\"")
(lib.generators.mkLuaInline "hl.dsp.window.close()")
{ locked = true; }
];
}
{
_args = [
"SUPER + RETURN"
(lib.generators.mkLuaInline "hl.dsp.exec_cmd(\"kitty\")")
];
}
{
_args = [
"ALT + R"
(lib.generators.mkLuaInline "hl.dsp.submap(\"resize\")")
];
}
];
define_submap = {
_args = [
"resize"
(lib.generators.mkLuaInline "function()\n hl.bind(\"right\", hl.dsp.window.resize({ x = 10, y = 0, relative = true }), { repeating = true })\n hl.bind(\"left\", hl.dsp.window.resize({ x = -10, y = 0, relative = true }), { repeating = true })\n hl.bind(\"escape\", hl.dsp.submap(\"reset\"))\nend")
];
};
window_rule = {
match.class = "kitty";
border_size = 2;
};
on = {
_args = [
"hyprland.start"
(lib.generators.mkLuaInline "function()\n hl.exec_cmd(\"waybar\")\nend")
];
};
}
Declared by:
wayland.windowManager.hyprland.sourceFirst
Whether to enable putting source entries at the top of the configuration .
Type: boolean
Default:
true
Example:
true
Declared by:
wayland.windowManager.hyprland.submaps
Attribute set of Hyprland submaps.
See https://wiki.hypr.land/Configuring/Basics/Binds/#submaps to learn about submaps.
Type: attribute set of (submodule)
Default:
{ }
Example:
{
# submap to change window focus with vim keys
move_focus = {
settings = {
bind = [
", h, movefocus, l"
", j, movefocus, d"
", k, movefocus, u"
", l, movefocus, r"
", escape, submap, reset"
];
};
};
other_submap = {
settings = {
# ...
};
};
}
Declared by:
wayland.windowManager.hyprland.submaps.<name>.onDispatch
Submap to use after a dispatch. Can either be a name or reset to disable submap after any dispatch.
Type: string
Default:
""
Example:
"reset"
Declared by:
wayland.windowManager.hyprland.submaps.<name>.settings
Hyprland binds to be put in the submap.
String entries render only when
wayland.windowManager.hyprland.configType is
"hyprlang".
Attribute set entries render only when
wayland.windowManager.hyprland.configType is "lua".
Attribute values with an _args list generate multi-argument
calls. Values created with lib.generators.mkLuaInline are
rendered as raw Lua expressions.
Type: Hyprland binds
Default:
{ }
Example:
{
binde = [
", right, resizeactive, 10 0"
", left, resizeactive, -10 0"
", up, resizeactive, 0 -10"
", down, resizeactive, 0 10"
];
bind = [
", escape, submap, reset"
{
_args = [
"escape"
(lib.generators.mkLuaInline "hl.dsp.submap(\"reset\")")
];
}
];
}
Declared by:
wayland.windowManager.hyprland.systemd.enable
Whether to enable hyprland-session.target on
hyprland startup. This links to graphical-session.target.
Some important environment variables will be imported to systemd
and D-Bus user environment before reaching the target, including
DISPLAYHYPRLAND_INSTANCE_SIGNATUREWAYLAND_DISPLAYXDG_CURRENT_DESKTOPXDG_SESSION_TYPE
Type: boolean
Default:
true
Example:
true
Declared by:
wayland.windowManager.hyprland.systemd.enableXdgAutostart
Whether to enable autostart of applications using
systemd-xdg-autostart-generator(8).
Type: boolean
Default:
false
Example:
true
Declared by:
wayland.windowManager.hyprland.systemd.extraCommands
Extra commands to be run after D-Bus activation.
Type: list of string
Default:
[
"systemctl --user stop hyprland-session.target"
"systemctl --user start hyprland-session.target"
]
Declared by:
wayland.windowManager.hyprland.systemd.variables
Environment variables to be imported in the systemd & D-Bus user environment.
Type: list of string
Default:
[
"DISPLAY"
"HYPRLAND_INSTANCE_SIGNATURE"
"WAYLAND_DISPLAY"
"XDG_CURRENT_DESKTOP"
"XDG_SESSION_TYPE"
]
Example:
[
"--all"
]
Declared by:
wayland.windowManager.hyprland.xwayland.enable
Whether or not to enable XWayland.
Overrides the enableXWayland option of the Hyprland package.
In newer versions of Hyprland, you can use the wayland.windowManager.hyprland.settings.xwayland
option to avoid recompiling Hyprland.
Type: boolean
Default:
true
Example:
true
Declared by:
wayland.windowManager.labwc.enable
Whether to enable Labwc, a wayland window-stacking compositor.
Type: boolean
Default:
false
Example:
true
Declared by:
wayland.windowManager.labwc.package
The labwc package to use. Set to null to use Nixos labwc package.
Type: null or package
Default:
pkgs.labwc
Declared by:
wayland.windowManager.labwc.autostart
Command to autostart when labwc start.
Type: list of string
Default:
[ ]
Example:
[
"wayvnc &"
"waybar &"
"swaybg -c '#113344' >/dev/null 2>&1 &"
]
Declared by:
wayland.windowManager.labwc.environment
Environment variable to add when labwc start.
Type: list of string
Default:
[ ]
Example:
[
"XDG_CURRENT_DESKTOP=labwc:wlroots"
"XKB_DEFAULT_LAYOUT=us"
]
Declared by:
wayland.windowManager.labwc.extraConfig
Extra lines appended to $XDG_CONFIG_HOME/labwc/rc.xml.
Type: strings concatenated with “\n”
Default:
""
Example:
''
<tablet mapToOutput="" rotate="0" mouseEmulation="no">
<!-- Active area dimensions are in mm -->
<area top="0.0" left="0.0" width="0.0" height="0.0" />
<map button="Tip" to="Left" />
<map button="Stylus" to="Right" />
<map button="Stylus2" to="Middle" />
</tablet>
''
Declared by:
wayland.windowManager.labwc.menu
Config to configure labwc menu
Type: list of (XML value)
Default:
[ ]
Example:
[
{
label = "pipemenu";
menuId = "menu";
execute = "/home/user/nix/scripts/pipe.sh";
}
{
menuId = "client-menu";
label = "Client Menu";
icon = "";
items = [
{
label = "Maximize";
icon = "";
action = {
name = "ToggleMaximize";
};
}
{
label = "Fullscreen";
action = {
name = "ToggleFullscreen";
};
}
{
label = "Alacritty";
action = {
name = "Execute";
command = "alacritty";
};
}
{
label = "Move Left";
action = {
name = "SendToDesktop";
to = "left";
};
}
{
separator = { };
}
{
label = "Workspace";
menuId = "workspace";
icon = "";
items = [
{
label = "Move Left";
action = {
name = "SendToDesktop";
to = "left";
};
}
];
}
{
separator = true;
}
];
}
];
Declared by:
wayland.windowManager.labwc.rc
Config to configure labwc options. Use “@attributes” for attributes. See https://labwc.github.io/labwc-config.5.html for configuration.
Type: open submodule of (XML value)
Default:
{ }
Example:
{
theme = {
name = "nord";
cornerRadius = 8;
font = {
"@name" = "FiraCode";
"@size" = "11";
};
};
keyboard = {
default = true;
keybind = [
# <keybind key="W-Return"><action name="Execute" command="foot"/></keybind>
{
"@key" = "W-Return";
action = {
"@name" = "Execute";
"@command" = "foot";
};
}
# <keybind key="W-Esc"><action name="Execute" command="loot"/></keybind>
{
"@key" = "W-Esc";
action = {
"@name" = "Execute";
"@command" = "loot";
};
}
];
};
}
Declared by:
wayland.windowManager.labwc.systemd.enable
Whether to enable labwc-session.target on
labwc startup. This links to graphical-session.target.
Some important environment variables will be imported to systemd
and D-Bus user environment before reaching the target, including
DISPLAYWAYLAND_DISPLAYXDG_CURRENT_DESKTOP
Type: boolean
Default:
true
Example:
true
Declared by:
wayland.windowManager.labwc.systemd.extraCommands
Extra commands to be run after D-Bus activation.
Type: list of string
Default:
[
"systemctl --user stop labwc-session.target"
"systemctl --user start labwc-session.target"
]
Declared by:
wayland.windowManager.labwc.systemd.variables
Environment variables to be imported in the systemd & D-Bus user environment.
Type: list of string
Default:
[
"DISPLAY"
"WAYLAND_DISPLAY"
"XDG_CURRENT_DESKTOP"
]
Example:
[
"-all"
]
Declared by:
wayland.windowManager.labwc.xwayland.enable
Whether to enable XWayland.
Type: boolean
Default:
true
Example:
true
Declared by:
wayland.windowManager.river.enable
Whether to enable the river window manager.
Type: boolean
Default:
false
Example:
true
Declared by:
wayland.windowManager.river.package
The river-classic package to use. Set to null to not add any river package to your path.
This should be done if you want to use the NixOS river module to install river.
Type: null or package
Default:
pkgs.river-classic
Declared by:
wayland.windowManager.river.extraConfig
Extra lines appended to $XDG_CONFIG_HOME/river/init.
Type: strings concatenated with “\n”
Default:
""
Example:
''
rivertile -view-padding 6 -outer-padding 6 &
''
Declared by:
wayland.windowManager.river.extraSessionVariables
Extra session variables set when running the compositor.
Type: attribute set
Default:
{ }
Example:
{
MOZ_ENABLE_WAYLAND = "1";
}
Declared by:
wayland.windowManager.river.settings
General settings given to riverctl.
Type: River configuration value
Default:
{ }
Example:
{
border-width = 2;
declare-mode = [
"locked"
"normal"
"passthrough"
];
input = {
pointer-foo-bar = {
accel-profile = "flat";
events = true;
pointer-accel = -0.3;
tap = false;
};
};
map = {
normal = {
"Alt Q" = "close";
};
};
rule-add = {
"-app-id" = {
"'bar'" = "csd";
"'float*'" = {
"-title" = {
"'foo'" = "float";
};
};
};
};
set-cursor-warp = "on-output-change";
set-repeat = "50 300";
spawn = [
"firefox"
"'foot -a terminal'"
];
xcursor-theme = "someGreatTheme 12";
}
Declared by:
wayland.windowManager.river.systemd.enable
Whether to enable river-session.target on
river startup. This links to graphical-session.target}.
Some important environment variables will be imported to systemd
and D-Bus user environment before reaching the target, including
DISPLAYWAYLAND_DISPLAYXDG_CURRENT_DESKTOPNIXOS_OZONE_WLXCURSOR_THEMEXCURSOR_SIZE
Type: boolean
Default:
true
Example:
true
Declared by:
wayland.windowManager.river.systemd.extraCommands
Extra commands to be run after D-Bus activation.
Type: list of string
Default:
[
"systemctl --user stop river-session.target"
"systemctl --user start river-session.target"
]
Declared by:
wayland.windowManager.river.systemd.variables
Environment variables to be imported in the systemd & D-Bus user environment.
Type: list of string
Default:
[
"DISPLAY"
"WAYLAND_DISPLAY"
"XDG_CURRENT_DESKTOP"
"NIXOS_OZONE_WL"
"XCURSOR_THEME"
"XCURSOR_SIZE"
]
Example:
[
"-all"
]
Declared by:
wayland.windowManager.river.xwayland.enable
Whether to enable XWayland.
Type: boolean
Default:
true
Example:
true
Declared by:
wayland.windowManager.sway.enable
Whether to enable sway wayland compositor.
Type: boolean
Default:
false
Example:
true
Declared by:
wayland.windowManager.sway.package
Sway package to use. Will override the options
‘wrapperFeatures’, ‘extraSessionCommands’, and ‘extraOptions’.
Set to null to not add any Sway package to your
path. This should be done if you want to use the NixOS Sway
module to install Sway. Beware setting to null will also disable
reloading Sway when new config is activated.
Type: null or package
Default:
${pkgs.sway}
Declared by:
wayland.windowManager.sway.checkConfig
If enabled, validates the generated config file.
Type: boolean
Default:
wayland.windowManager.sway.package != null
Declared by:
wayland.windowManager.sway.config
Sway configuration options.
Type: null or (submodule)
Default:
{ }
Declared by:
wayland.windowManager.sway.config.assigns
An attribute set that assigns applications to workspaces based on criteria.
Type: attribute set of list of attribute set of (string or boolean)
Default:
{ }
Example:
{
"0: extra" = [
{
class = "^Firefox$";
window_role = "About";
}
];
"1: web" = [
{
class = "^Firefox$";
}
];
}
Declared by:
wayland.windowManager.sway.config.bars
Sway bars settings blocks. Set to empty list to remove bars completely.
Type: list of (submodule)
Default:
see code
Declared by:
wayland.windowManager.sway.config.bars.*.colors
Bar color settings. All color classes can be specified using submodules with ‘border’, ‘background’, ‘text’, fields and RGB color hex-codes as values. See default values for the reference. Note that ‘background’, ‘status’, and ‘separator’ parameters take a single RGB value.
See https://i3wm.org/docs/userguide.html#_colors.
Type: submodule
Default:
{ }
Declared by:
wayland.windowManager.sway.config.bars.*.colors.activeWorkspace
Border, background and text color for a workspace button when the workspace is active.
Type: null or (submodule)
Default:
null for state version ≥ 20.09, as example otherwise
Declared by:
wayland.windowManager.sway.config.bars.*.colors.background
Background color of the bar.
Type: null or string
Default:
null for state version ≥ 20.09, as example otherwise
Declared by:
wayland.windowManager.sway.config.bars.*.colors.bindingMode
Border, background and text color for the binding mode indicator
Type: null or (submodule)
Default:
null for state version ≥ 20.09, as example otherwise
Declared by:
wayland.windowManager.sway.config.bars.*.colors.focusedBackground
Background color of the bar on the currently focused monitor output.
Type: null or string
Default:
null
Example:
"#000000"
Declared by:
wayland.windowManager.sway.config.bars.*.colors.focusedSeparator
Text color to be used for the separator on the currently focused monitor output.
Type: null or string
Default:
null
Example:
"#666666"
Declared by:
wayland.windowManager.sway.config.bars.*.colors.focusedStatusline
Text color to be used for the statusline on the currently focused monitor output.
Type: null or string
Default:
null
Example:
"#ffffff"
Declared by:
wayland.windowManager.sway.config.bars.*.colors.focusedWorkspace
Border, background and text color for a workspace button when the workspace has focus.
Type: null or (submodule)
Default:
null for state version ≥ 20.09, as example otherwise
Declared by:
wayland.windowManager.sway.config.bars.*.colors.inactiveWorkspace
Border, background and text color for a workspace button when the workspace does not have focus and is not active.
Type: null or (submodule)
Default:
null for state version ≥ 20.09, as example otherwise
Declared by:
wayland.windowManager.sway.config.bars.*.colors.separator
Text color to be used for the separator.
Type: null or string
Default:
null for state version ≥ 20.09, as example otherwise
Declared by:
wayland.windowManager.sway.config.bars.*.colors.statusline
Text color to be used for the statusline.
Type: null or string
Default:
null for state version ≥ 20.09, as example otherwise
Declared by:
wayland.windowManager.sway.config.bars.*.colors.urgentWorkspace
Border, background and text color for a workspace button when the workspace contains a window with the urgency hint set.
Type: null or (submodule)
Default:
null for state version ≥ 20.09, as example otherwise
Declared by:
wayland.windowManager.sway.config.bars.*.command
Command that will be used to start a bar.
Type: string
Default:
i3bar
Example:
"\${pkgs.waybar}/bin/waybar"
Declared by:
wayland.windowManager.sway.config.bars.*.extraConfig
Extra configuration lines for this bar.
Type: strings concatenated with “\n”
Default:
""
Declared by:
wayland.windowManager.sway.config.bars.*.fonts
Font configuration for this bar.
Type: (list of string) or (submodule)
Default:
{ }
Example:
{
names = [
"DejaVu Sans Mono"
"FontAwesome5Free"
];
size = 11.0;
style = "Bold Semi-Condensed";
}
Declared by:
wayland.windowManager.sway.config.bars.*.fonts.names
List of font names list used for window titles. Only FreeType fonts are supported. The order here is important (e.g. icons font should go before the one used for text).
Type: list of string
Default:
[ "monospace" ]
Example:
[
"FontAwesome"
"Terminus"
]
wayland.windowManager.sway.config.bars.*.fonts.size
The font size to use for window titles.
Type: floating point number or string
Default:
8.0
Example:
11.5
wayland.windowManager.sway.config.bars.*.fonts.style
The font style to use for window titles.
Type: string
Default:
""
Example:
"Bold Semi-Condensed"
wayland.windowManager.sway.config.bars.*.hiddenState
The default bar mode when ‘bar.mode’ == ‘hide’.
Type: null or one of “hide”, “show”
Default:
null for state version ≥ 20.09, as example otherwise
Declared by:
wayland.windowManager.sway.config.bars.*.id
Specifies the bar ID for the configured bar instance. If this option is missing, the ID is set to bar-x, where x corresponds to the position of the embedding bar block in the config file.
Type: null or string
Default:
null
Declared by:
wayland.windowManager.sway.config.bars.*.mode
Bar visibility mode.
Type: null or one of “dock”, “hide”, “invisible”
Default:
null for state version ≥ 20.09, as example otherwise
Declared by:
wayland.windowManager.sway.config.bars.*.position
The edge of the screen swaybar should show up.
Type: null or one of “top”, “bottom”
Default:
null for state version ≥ 20.09, as example otherwise
Declared by:
wayland.windowManager.sway.config.bars.*.statusCommand
Command that will be used to get status lines.
Type: null or string
Default:
null for state version ≥ 20.09, as example otherwise
Declared by:
wayland.windowManager.sway.config.bars.*.trayOutput
Where to output tray.
Type: null or string
Default:
null for state version ≥ 20.09, as example otherwise
Declared by:
wayland.windowManager.sway.config.bars.*.trayPadding
Sets the pixel padding of the system tray. This padding will surround the tray on all sides and between each item.
Type: null or signed integer
Default:
null for state version ≥ 20.09, as example otherwise
Declared by:
wayland.windowManager.sway.config.bars.*.workspaceButtons
Whether workspace buttons should be shown or not.
Type: null or boolean
Default:
null for state version ≥ 20.09, as example otherwise
Declared by:
wayland.windowManager.sway.config.bars.*.workspaceNumbers
Whether workspace numbers should be displayed within the workspace buttons.
Type: null or boolean
Default:
null for state version ≥ 20.09, as example otherwise
Declared by:
wayland.windowManager.sway.config.bindkeysToCode
Whether to make use of --to-code in keybindings.
Type: boolean
Default:
false
Example:
true
Declared by:
wayland.windowManager.sway.config.bindswitches
Binds <switch> to execute the sway command command on state changes. Supported switches are lid (laptop lid) and tablet (tablet mode) switches. Valid values for state are on, off and toggle. These switches are on when the device lid is shut and when tablet mode is active respectively. toggle is also supported to run a command both when the switch is toggled on or off. See sway(5).
Type: attribute set of (submodule)
Default:
"No bindswitches by default"
Example:
let
laptop = "eDP-1";
in
{
"lid:on" = {
reload = true;
locked = true;
action = "output ${laptop} disable";
};
"lid:off" = {
reload = true;
locked = true;
action = "output ${laptop} enable";
};
}
Declared by:
wayland.windowManager.sway.config.bindswitches.<name>.action
The sway command to execute on state changes
Type: string
Declared by:
wayland.windowManager.sway.config.bindswitches.<name>.locked
Unless the flag –locked is set, the command will not be run when a screen locking program is active. If there is a matching binding with and without –locked, the one with will be preferred when locked and the one without will be preferred when unlocked.
Type: boolean
Default:
false
Declared by:
wayland.windowManager.sway.config.bindswitches.<name>.reload
If the –reload flag is given, the binding will also be executed when the config is reloaded. toggle bindings will not be executed on reload. The –locked flag will operate as normal so if the config is reloaded while locked and –locked is not given, the binding will not be executed.
Type: boolean
Default:
false
Declared by:
wayland.windowManager.sway.config.colors
Color settings. All color classes can be specified using submodules with ‘border’, ‘background’, ‘text’, ‘indicator’ and ‘childBorder’ fields and RGB color hex-codes as values. See default values for the reference. Note that ‘sway.config.colors.background’ parameter takes a single RGB value.
See https://i3wm.org/docs/userguide.html#_changing_colors.
Type: submodule
Default:
{ }
Declared by:
wayland.windowManager.sway.config.colors.background
Background color of the window. Only applications which do not cover the whole area expose the color.
Type: string
Default:
"#ffffff"
Declared by:
wayland.windowManager.sway.config.colors.focused
A window which currently has the focus.
Type: submodule
Default:
{
background = "#285577";
border = "#4c7899";
childBorder = "#285577";
indicator = "#2e9ef4";
text = "#ffffff";
}
Declared by:
wayland.windowManager.sway.config.colors.focusedInactive
A window which is the focused one of its container, but it does not have the focus at the moment.
Type: submodule
Default:
{
background = "#5f676a";
border = "#333333";
childBorder = "#5f676a";
indicator = "#484e50";
text = "#ffffff";
}
Declared by:
wayland.windowManager.sway.config.colors.placeholder
Background and text color are used to draw placeholder window contents (when restoring layouts). Border and indicator are ignored.
Type: submodule
Default:
{
background = "#0c0c0c";
border = "#000000";
childBorder = "#0c0c0c";
indicator = "#000000";
text = "#ffffff";
}
Declared by:
wayland.windowManager.sway.config.colors.unfocused
A window which is not focused.
Type: submodule
Default:
{
background = "#222222";
border = "#333333";
childBorder = "#222222";
indicator = "#292d2e";
text = "#888888";
}
Declared by:
wayland.windowManager.sway.config.colors.urgent
A window which has its urgency hint activated.
Type: submodule
Default:
{
background = "#900000";
border = "#2f343a";
childBorder = "#900000";
indicator = "#900000";
text = "#ffffff";
}
Declared by:
wayland.windowManager.sway.config.defaultWorkspace
The default workspace to show when sway is launched. This must to correspond to the value of the keybinding of the default workspace.
Type: null or string
Default:
null
Example:
"workspace number 9"
Declared by:
wayland.windowManager.sway.config.down
Home row direction key for moving down.
Type: string
Default:
"j"
Declared by:
wayland.windowManager.sway.config.floating
Floating window settings.
Type: submodule
Default:
{ }
Declared by:
wayland.windowManager.sway.config.floating.border
Floating windows border width.
Type: signed integer
Default:
2
Declared by:
wayland.windowManager.sway.config.floating.criteria
List of criteria for windows that should be opened in a floating mode.
Type: list of attribute set of (string or boolean)
Default:
[ ]
Example:
[
{
title = "Steam - Update News";
}
{
class = "Pavucontrol";
}
]
Declared by:
wayland.windowManager.sway.config.floating.modifier
Modifier key or keys that can be used to drag floating windows.
Type: string
Default:
"sway.config.modifier"
Example:
"Mod4"
Declared by:
wayland.windowManager.sway.config.floating.titlebar
Whether to show floating window titlebars.
Type: boolean
Default:
''
true for state version ≥ 23.05
false for state version < 23.05
''
Declared by:
wayland.windowManager.sway.config.focus
Focus related settings.
Type: submodule
Default:
{ }
Declared by:
wayland.windowManager.sway.config.focus.followMouse
Whether focus should follow the mouse.
Type: one of “yes”, “no”, “always” or boolean
Default:
"yes"
Declared by:
wayland.windowManager.sway.config.focus.forceWrapping
Whether to force focus wrapping in tabbed or stacked containers.
This option is deprecated, use focus.wrapping instead.
Type: boolean
Default:
false
Declared by:
wayland.windowManager.sway.config.focus.mouseWarping
Whether mouse cursor should be warped to the center of the window when switching focus to a window on a different output.
Type: boolean or one of “container”, “output”
Default:
true
Declared by:
wayland.windowManager.sway.config.focus.newWindow
This option modifies focus behavior on new window activation.
See https://i3wm.org/docs/userguide.html#focus_on_window_activation
Type: one of “smart”, “urgent”, “focus”, “none”
Default:
"smart"
Example:
"none"
Declared by:
wayland.windowManager.sway.config.focus.wrapping
Whether the window focus commands automatically wrap around the edge of containers.
See https://i3wm.org/docs/userguide.html#_focus_wrapping
Type: one of “yes”, “no”, “force”, “workspace”
Default:
if focus.forceWrapping then "yes" else "no"
Declared by:
wayland.windowManager.sway.config.fonts
Font configuration for window titles, nagbar…
Type: (list of string) or (submodule)
Default:
{ }
Example:
{
names = [
"DejaVu Sans Mono"
"FontAwesome5Free"
];
size = 11.0;
style = "Bold Semi-Condensed";
}
Declared by:
wayland.windowManager.sway.config.fonts.names
List of font names list used for window titles. Only FreeType fonts are supported. The order here is important (e.g. icons font should go before the one used for text).
Type: list of string
Default:
[ "monospace" ]
Example:
[
"FontAwesome"
"Terminus"
]
wayland.windowManager.sway.config.fonts.size
The font size to use for window titles.
Type: floating point number or string
Default:
8.0
Example:
11.5
wayland.windowManager.sway.config.fonts.style
The font style to use for window titles.
Type: string
Default:
""
Example:
"Bold Semi-Condensed"
wayland.windowManager.sway.config.gaps
Gaps related settings.
Type: null or (submodule)
Default:
null
Declared by:
wayland.windowManager.sway.config.gaps.bottom
Bottom gaps value.
Type: null or signed integer
Default:
null
Example:
5
Declared by:
wayland.windowManager.sway.config.gaps.horizontal
Horizontal gaps value.
Type: null or signed integer
Default:
null
Example:
5
Declared by:
wayland.windowManager.sway.config.gaps.inner
Inner gaps value.
Type: null or signed integer
Default:
null
Example:
12
Declared by:
wayland.windowManager.sway.config.gaps.left
Left gaps value.
Type: null or signed integer
Default:
null
Example:
5
Declared by:
wayland.windowManager.sway.config.gaps.outer
Outer gaps value.
Type: null or signed integer
Default:
null
Example:
5
Declared by:
wayland.windowManager.sway.config.gaps.right
Right gaps value.
Type: null or signed integer
Default:
null
Example:
5
Declared by:
wayland.windowManager.sway.config.gaps.smartBorders
This option controls whether to disable container borders on workspace with a single container.
Type: one of “on”, “off”, “no_gaps”
Default:
"off"
Declared by:
wayland.windowManager.sway.config.gaps.smartGaps
This option controls whether to disable all gaps (outer and inner) on workspace with a single container.
Type: boolean or one of “on”, “off”, “inverse_outer”
Default:
"off"
Example:
"on"
Declared by:
wayland.windowManager.sway.config.gaps.top
Top gaps value.
Type: null or signed integer
Default:
null
Example:
5
Declared by:
wayland.windowManager.sway.config.gaps.vertical
Vertical gaps value.
Type: null or signed integer
Default:
null
Example:
5
Declared by:
wayland.windowManager.sway.config.input
An attribute set that defines input modules. See
sway-input(5)
for options.
Type: attribute set of attribute set of string
Default:
{ }
Example:
{
"*" = {
xkb_variant = "dvorak";
};
}
Declared by:
wayland.windowManager.sway.config.keybindings
An attribute set that assigns a key press to an action using a key symbol. See https://i3wm.org/docs/userguide.html#keybindings.
Consider to use lib.mkOptionDefault function to extend or override
default keybindings instead of specifying all of them from scratch.
Type: attribute set of (null or string)
Default:
"Default sway keybindings."
Example:
let
modifier = config.wayland.windowManager.sway.config.modifier;
in lib.mkOptionDefault {
"${modifier}+Return" = "exec ${cfg.config.terminal}";
"${modifier}+Shift+q" = "kill";
"${modifier}+d" = "exec ${cfg.config.menu}";
}
Declared by:
wayland.windowManager.sway.config.keycodebindings
An attribute set that assigns keypress to an action using key code. See https://i3wm.org/docs/userguide.html#keybindings.
Type: attribute set of (null or string)
Default:
{ }
Example:
{
"214" = "exec /bin/script.sh";
}
Declared by:
wayland.windowManager.sway.config.left
Home row direction key for moving left.
Type: string
Default:
"h"
Declared by:
wayland.windowManager.sway.config.menu
Default launcher to use.
Type: string
Default:
${pkgs.dmenu}/bin/dmenu_path | ${pkgs.dmenu}/bin/dmenu | ${pkgs.findutils}/bin/xargs swaymsg exec --
Example:
"bemenu-run"
Declared by:
wayland.windowManager.sway.config.modes
An attribute set that defines binding modes and keybindings inside them
Only basic keybinding is supported (bindsym keycomb action), for more advanced setup use ‘sway.extraConfig’.
Type: attribute set of attribute set of string
Default:
{
resize = {
# Binds arrow keys to resizing commands
${cfg.config.left}" = "resize shrink width 10 px";
${cfg.config.down}" = "resize grow height 10 px";
${cfg.config.up}" = "resize shrink height 10 px";
${cfg.config.right}" = "resize grow width 10 px";
"Left" = "resize shrink width 10 px";
"Down" = "resize grow height 10 px";
"Up" = "resize shrink height 10 px";
"Right" = "resize grow width 10 px";
# Exit resize mode
"Escape" = "mode default";
"Return" = "mode default";
};
}
Declared by:
wayland.windowManager.sway.config.modifier
Modifier key that is used for all default keybindings.
Type: one of “Shift”, “Control”, “Mod1”, “Mod2”, “Mod3”, “Mod4”, “Mod5” or string
Default:
"Mod1"
Example:
"Mod4"
Declared by:
wayland.windowManager.sway.config.output
An attribute set that defines output modules. See
sway-output(5)
for options.
Type: attribute set of attribute set of string
Default:
{ }
Example:
{
HDMI-A-2 = {
bg = "~/path/to/background.png fill";
};
}
Declared by:
wayland.windowManager.sway.config.right
Home row direction key for moving right.
Type: string
Default:
"l"
Declared by:
wayland.windowManager.sway.config.seat
An attribute set that defines seat modules. See
sway-input(5)
for options.
Type: attribute set of attribute set of string
Default:
{ }
Example:
{
"*" = {
hide_cursor = "when-typing enable";
};
}
Declared by:
wayland.windowManager.sway.config.startup
Commands that should be executed at startup.
See https://i3wm.org/docs/userguide.html#_automatically_starting_applications_on_i3_startup.
Type: list of (submodule)
Default:
[ ]
Example:
[
{ command = "systemctl --user restart waybar"; always = true; }
{ command = "dropbox start"; }
{ command = "firefox"; }
]
Declared by:
wayland.windowManager.sway.config.startup.*.always
Whether to run command on each sway restart.
Type: boolean
Default:
false
Declared by:
wayland.windowManager.sway.config.startup.*.command
Command that will be executed on startup.
Type: string
Declared by:
wayland.windowManager.sway.config.terminal
Default terminal to run.
Type: string
Default:
${pkgs.foot}/bin/foot
Example:
"alacritty"
Declared by:
wayland.windowManager.sway.config.up
Home row direction key for moving up.
Type: string
Default:
"k"
Declared by:
wayland.windowManager.sway.config.window
Window titlebar and border settings.
Type: submodule
Default:
{ }
Declared by:
wayland.windowManager.sway.config.window.border
Window border width.
Type: signed integer
Default:
2
Declared by:
wayland.windowManager.sway.config.window.commands
List of commands that should be executed on specific windows.
See for_window swaywm option documentation.
Type: list of (submodule)
Default:
[ ]
Example:
[
{
command = "border pixel 1";
criteria = {
class = "XTerm";
};
}
]
Declared by:
wayland.windowManager.sway.config.window.commands.*.command
Swaywm command to execute.
Type: string
Example:
"border pixel 1"
Declared by:
wayland.windowManager.sway.config.window.commands.*.criteria
Criteria of the windows on which command should be executed.
A value of true is equivalent to using an empty
criteria (which is different from an empty string criteria).
Type: attribute set of (string or boolean)
Default:
{ }
Example:
{
title = "x200: ~/work";
floating = true;
};
Declared by:
wayland.windowManager.sway.config.window.hideEdgeBorders
Hide window borders adjacent to the screen edges.
Type: one of “none”, “vertical”, “horizontal”, “both”, “smart”, “smart_no_gaps”, “–i3 none”, “–i3 vertical”, “–i3 horizontal”, “–i3 both”, “–i3 smart”, “–i3 smart_no_gaps”
Default:
"none"
Declared by:
wayland.windowManager.sway.config.window.titlebar
Whether to show window titlebars.
Type: boolean
Default:
''
true for state version ≥ 23.05
false for state version < 23.05
''
Declared by:
wayland.windowManager.sway.config.workspaceAutoBackAndForth
Assume you are on workspace “1: www” and switch to “2: IM” using mod+2 because somebody sent you a message. You don’t need to remember where you came from now, you can just press $mod+2 again to switch back to “1: www”.
Type: boolean
Default:
false
Example:
true
Declared by:
wayland.windowManager.sway.config.workspaceLayout
The mode in which new containers on workspace level will start.
Type: one of “default”, “stacking”, “tabbed”
Default:
"default"
Example:
"tabbed"
Declared by:
wayland.windowManager.sway.config.workspaceOutputAssign
Assign workspaces to outputs.
Type: list of (submodule)
Default:
[ ]
Declared by:
wayland.windowManager.sway.config.workspaceOutputAssign.*.output
Name(s) of the output(s) from swaymsg -t get_outputs .
Type: string or list of string
Default:
""
Example:
"eDP"
Declared by:
wayland.windowManager.sway.config.workspaceOutputAssign.*.workspace
Name of the workspace to assign.
Type: string
Default:
""
Example:
"Web"
Declared by:
wayland.windowManager.sway.extraConfig
Extra configuration lines to add to ~/.config/sway/config.
Type: strings concatenated with “\n”
Default:
""
Declared by:
wayland.windowManager.sway.extraConfigEarly
Like extraConfig, except lines are added to ~/.config/sway/config before all other configuration.
Type: strings concatenated with “\n”
Default:
""
Declared by:
wayland.windowManager.sway.extraOptions
Command line arguments passed to launch Sway. Please DO NOT report issues if you use an unsupported GPU (proprietary drivers).
Type: list of string
Default:
[ ]
Example:
[
"--verbose"
"--debug"
"--unsupported-gpu"
"--my-next-gpu-wont-be-nvidia"
]
Declared by:
wayland.windowManager.sway.extraSessionCommands
Shell commands executed just before Sway is started.
Type: strings concatenated with “\n”
Default:
""
Example:
''
export SDL_VIDEODRIVER=wayland
# needs qt5.qtwayland in systemPackages
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
# Fix for some Java AWT applications (e.g. Android Studio),
# use this if they aren't displayed properly:
export _JAVA_AWT_WM_NONREPARENTING=1
''
Declared by:
wayland.windowManager.sway.swaynag.enable
Whether to enable configuration of swaynag, a lightweight error bar for sway.
Type: boolean
Default:
false
Example:
true
Declared by:
wayland.windowManager.sway.swaynag.settings
Configuration written to
$XDG_CONFIG_HOME/swaynag/config.
See
swaynag(5)
for a list of available options and an example configuration.
Note, configurations declared under <config>
will override the default type values of swaynag.
Type: attribute set of attribute set of (Swaynag config atom (null, bool, int, float, str))
Default:
{ }
Example:
{
"<config>" = {
edge = "bottom";
font = "Dina 12";
};
green = {
edge = "top";
background = "00AA00";
text = "FFFFFF";
button-background = "00CC00";
message-padding = 10;
};
}
Declared by:
wayland.windowManager.sway.systemd.enable
Whether to enable sway-session.target on
sway startup. This links to
graphical-session.target.
Some important environment variables will be imported to systemd
and dbus user environment before reaching the target, including
DISPLAYWAYLAND_DISPLAYSWAYSOCKXDG_CURRENT_DESKTOPXDG_SESSION_TYPENIXOS_OZONE_WLXCURSOR_THEMEXCURSOR_SIZEYou can extend this list using thesystemd.variablesoption.
Type: boolean
Default:
true
Example:
false
Declared by:
wayland.windowManager.sway.systemd.dbusImplementation
The D-Bus implementation used on the system.
This affects which tool is used to import environment variables when starting the Sway session.
On NixOS, this should match the value of the option services.dbus.implementation (NixOS).
When set to dbus, dbus-update-activation-environment --systemd <variables> is run.
Otherwise, when set to broker, systemctl --user import-environment <variables> is run.
See https://github.com/swaywm/sway/wiki#systemd-and-dbus-activation-environments for more documentation.
Type: one of “dbus”, “broker”
Default:
"dbus"
Example:
"broker"
Declared by:
wayland.windowManager.sway.systemd.extraCommands
Extra commands to run after D-Bus activation.
Type: list of string
Default:
[
"systemctl --user reset-failed"
"systemctl --user start sway-session.target"
"swaymsg -mt subscribe '[]' || true"
"systemctl --user stop sway-session.target"
]
Declared by:
wayland.windowManager.sway.systemd.variables
Environment variables imported into the systemd and D-Bus user environment.
Type: list of string
Default:
[
"DISPLAY"
"WAYLAND_DISPLAY"
"SWAYSOCK"
"XDG_CURRENT_DESKTOP"
"XDG_SESSION_TYPE"
"NIXOS_OZONE_WL"
"XCURSOR_THEME"
"XCURSOR_SIZE"
]
Example:
[
"--all"
]
Declared by:
wayland.windowManager.sway.systemd.xdgAutostart
Whether to enable autostart of applications using
systemd-xdg-autostart-generator(8)
.
Type: boolean
Default:
false
Example:
true
Declared by:
wayland.windowManager.sway.wrapperFeatures
Attribute set of features to enable in the wrapper.
Type: submodule
Default:
{ }
Example:
{
gtk = true;
}
Declared by:
wayland.windowManager.sway.wrapperFeatures.base
Whether to make use of the base wrapper to execute extra session commands and prepend a dbus-run-session to the sway command.
Type: boolean
Default:
true
Example:
false
Declared by:
wayland.windowManager.sway.wrapperFeatures.gtk
Whether to make use of the wrapGAppsHook wrapper to execute sway with required environment variables for GTK applications.
Type: boolean
Default:
false
Example:
true
Declared by:
wayland.windowManager.sway.xwayland
Enable xwayland, which is needed for the default configuration of sway.
Type: boolean
Default:
true
Declared by:
wayland.windowManager.wayfire.enable
Whether to enable Wayfire, a wayland compositor based on wlroots.
Type: boolean
Default:
false
Example:
true
Declared by:
wayland.windowManager.wayfire.package
The wayfire package to use. Set to null to not add any wayfire package to your path.
This should be done if you want to use the NixOS wayfire module to install wayfire.
Type: null or package
Default:
pkgs.wayfire
Declared by:
wayland.windowManager.wayfire.plugins
Additional plugins to use with wayfire
Type: list of package
Default:
with pkgs.wayfirePlugins; [ wf-shell ]
Example:
with pkgs.wayfirePlugins; [
wcm
wf-shell
wayfire-plugins-extra
];
Declared by:
wayland.windowManager.wayfire.settings
Wayfire configuration written in Nix.
See https://github.com/WayfireWM/wayfire/wiki/Configuration
Type: open submodule of attribute set of attribute set of (string or absolute path or boolean or signed integer or floating point number)
Default:
{ }
Example:
{
command = {
binding_terminal = "alacritty";
command_terminal = "alacritty";
};
core = {
plugins = "command expo cube";
};
}
Declared by:
wayland.windowManager.wayfire.settings.core.plugins
Load the specified plugins
Type: strings concatenated with “ “
Declared by:
wayland.windowManager.wayfire.systemd.enable
Whether to enable wayfire-session.target on
wayfire startup. This links to graphical-session.target}.
Some important environment variables will be imported to systemd
and D-Bus user environment before reaching the target, including
DISPLAYWAYLAND_DISPLAYXDG_CURRENT_DESKTOPNIXOS_OZONE_WLXCURSOR_THEMEXCURSOR_SIZE
Type: boolean
Default:
true
Example:
true
Declared by:
wayland.windowManager.wayfire.systemd.extraCommands
Extra commands to be run after D-Bus activation.
Type: list of string
Default:
[
"systemctl --user stop wayfire-session.target"
"systemctl --user start wayfire-session.target"
]
Declared by:
wayland.windowManager.wayfire.systemd.variables
Environment variables to be imported in the systemd & D-Bus user environment.
Type: list of string
Default:
[
"DISPLAY"
"WAYLAND_DISPLAY"
"XDG_CURRENT_DESKTOP"
"NIXOS_OZONE_WL"
"XCURSOR_THEME"
"XCURSOR_SIZE"
]
Example:
[
"-all"
]
Declared by:
wayland.windowManager.wayfire.wf-shell.enable
Whether to enable Manage wf-shell Configuration.
Type: boolean
Default:
false
Example:
true
Declared by:
wayland.windowManager.wayfire.wf-shell.package
The wf-shell package to use.
Type: package
Default:
pkgs.wayfirePlugins.wf-shell
Declared by:
wayland.windowManager.wayfire.wf-shell.settings
Wf-shell configuration written in Nix.
See https://github.com/WayfireWM/wf-shell/blob/master/wf-shell.ini.example
Type: attribute set of attribute set of (string or absolute path or boolean or signed integer or floating point number)
Default:
{ }
Example:
{
panel = {
autohide = true;
widgets_left = "menu spacing4 launchers window-list";
};
}
Declared by:
wayland.windowManager.wayfire.xwayland.enable
Whether to enable XWayland.
Type: boolean
Default:
true
Example:
true
Declared by: