mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 23:22:37 +00:00
i3: Allow to pass a configuration file.
With this it's now possible to directly embed a configuration file using `services.xserver.windowManager.i3.configFile = path`, which then will be used instead of the one in the users home directory. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
047b65dd68
commit
93923296a9
@ -1,7 +1,8 @@
|
|||||||
{pkgs, config, ...}:
|
{ pkgs, config, ... }:
|
||||||
|
|
||||||
|
with pkgs.lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.lib) mkOption mkIf;
|
|
||||||
cfg = config.services.xserver.windowManager.i3;
|
cfg = config.services.xserver.windowManager.i3;
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -13,6 +14,15 @@ in
|
|||||||
example = true;
|
example = true;
|
||||||
description = "Enable the i3 tiling window manager.";
|
description = "Enable the i3 tiling window manager.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
configFile = mkOption {
|
||||||
|
default = null;
|
||||||
|
type = types.nullOr types.path;
|
||||||
|
description = ''
|
||||||
|
Path to the i3 configuration file.
|
||||||
|
If left at the default value, $HOME/.i3/config will be used.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -21,7 +31,9 @@ in
|
|||||||
session = [{
|
session = [{
|
||||||
name = "i3";
|
name = "i3";
|
||||||
start = "
|
start = "
|
||||||
${pkgs.i3}/bin/i3 &
|
${pkgs.i3}/bin/i3 ${optionalString (cfg.configFile != null)
|
||||||
|
"-c \"${cfg.configFile}\""
|
||||||
|
} &
|
||||||
waitPID=$!
|
waitPID=$!
|
||||||
";
|
";
|
||||||
}];
|
}];
|
||||||
|
Loading…
Reference in New Issue
Block a user