aight, making progress

This commit is contained in:
Chris Kruining 2025-07-28 16:52:48 +02:00
parent c2d6c719a2
commit 9aa634bd71
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
37 changed files with 451 additions and 620 deletions

View 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;
};
})
];
}