init
This commit is contained in:
commit
aae151cee6
33 changed files with 1351 additions and 0 deletions
29
modules/home-manager/editors/default.nix
Executable file
29
modules/home-manager/editors/default.nix
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.custom.editors;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./helix.nix
|
||||
];
|
||||
|
||||
options.custom.editors = {
|
||||
defaultEditor = lib.mkOption {
|
||||
type = lib.types.enum [ "helix" ];
|
||||
default = null;
|
||||
description = "Which editor to use as the default one. If set to null the default editor won't be set explicitly.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf (cfg.defaultEditor != null) {
|
||||
assertions = [
|
||||
{ assertion = (config.custom.editors.${cfg.defaultEditor}.enable);
|
||||
message = "Can't set an editor as the default if it is disabled.";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue