Move slim options into the displayManager attribute set.
Add an enable flag to slim which is by default set to be true. svn path=/nixos/branches/modular-nixos/; revision=15009
This commit is contained in:
parent
313fa38e2e
commit
0ff58754ae
@ -4,9 +4,7 @@
|
|||||||
let
|
let
|
||||||
inherit (pkgs.lib) mkOption;
|
inherit (pkgs.lib) mkOption;
|
||||||
|
|
||||||
options = { services = { xserver = {
|
slimOptions = {
|
||||||
|
|
||||||
slim = {
|
|
||||||
|
|
||||||
theme = mkOption {
|
theme = mkOption {
|
||||||
default = null;
|
default = null;
|
||||||
@ -39,6 +37,32 @@ let
|
|||||||
Hide the mouse cursor on the login screen.
|
Hide the mouse cursor on the login screen.
|
||||||
";
|
";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
options = { services = { xserver = { displayManager = {
|
||||||
|
|
||||||
|
slim = slimOptions // {
|
||||||
|
|
||||||
|
enable = mkOption {
|
||||||
|
default = true;
|
||||||
|
description = "
|
||||||
|
Whether to enable slim as the display manager.
|
||||||
|
";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}; /* displayManager */ }; /* xserver */ }; /* services */ };
|
||||||
|
|
||||||
|
copyOldOptions = { services = { xserver = {
|
||||||
|
|
||||||
|
# Declare old options.
|
||||||
|
slim = slimOptions;
|
||||||
|
|
||||||
|
# Copy the old options into the new options.
|
||||||
|
displayManager = {
|
||||||
|
slim = config.services.xserver.slim;
|
||||||
};
|
};
|
||||||
|
|
||||||
}; /* xserver */ }; /* services */ };
|
}; /* xserver */ }; /* services */ };
|
||||||
@ -49,7 +73,9 @@ in
|
|||||||
let
|
let
|
||||||
xcfg = config.services.xserver;
|
xcfg = config.services.xserver;
|
||||||
dmcfg = xcfg.displayManager;
|
dmcfg = xcfg.displayManager;
|
||||||
cfg = xcfg.slim;
|
cfg = dmcfg.slim;
|
||||||
|
|
||||||
|
inherit (pkgs.lib) mkIf;
|
||||||
|
|
||||||
slimConfig = pkgs.writeText "slim.cfg" ''
|
slimConfig = pkgs.writeText "slim.cfg" ''
|
||||||
xauth_path ${dmcfg.xauthBin}
|
xauth_path ${dmcfg.xauthBin}
|
||||||
@ -80,9 +106,10 @@ let
|
|||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
mkIf cfg.enable {
|
||||||
require = [
|
require = [
|
||||||
options
|
options
|
||||||
|
copyOldOptions
|
||||||
];
|
];
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user