aight, making progress
This commit is contained in:
parent
c2d6c719a2
commit
9aa634bd71
37 changed files with 451 additions and 620 deletions
24
modules/home/editor/default.nix
Normal file
24
modules/home/editor/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ config, options, lib, pkgs, namespace, ... }:
|
||||
let
|
||||
inherit (lib) attrValues mkIf mkMerge mkOption;
|
||||
inherit (lib.types) nullOr enum;
|
||||
|
||||
cfg = config.${namespace}.editors;
|
||||
in {
|
||||
options.${namespace}.editors = {
|
||||
default = mkOption {
|
||||
type = nullOr (enum [ "nano" "nvim" "zed" "kate" "vscodium" ]);
|
||||
default = "nano";
|
||||
description = "Default editor for text manipulation";
|
||||
example = "nvim";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf (cfg.default != null) {
|
||||
home.sessionVariables = {
|
||||
EDITOR = cfg.default;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue