refactor(treewide): clean-up, flatten, rework module system

This commit is contained in:
ooks-io 2024-06-05 22:56:07 +12:00
parent 4ddf9d2b35
commit 5590c8a951
58 changed files with 397 additions and 635 deletions

View file

@ -1,18 +1,21 @@
{ inputs, config, pkgs, lib, ... }:
let
cfg = config.ooknet.console.editor.helix;
inherit (config) colorscheme;
in
{
let
inherit (config) colorscheme;
inherit (lib) mkIf;
cfg = config.ooknet.editor.helix;
console = config.ooknet.console;
in
{
imports = [
./languages.nix
];
config = lib.mkIf cfg.enable {
config = mkIf (cfg.enable || console.editor == "helix") {
programs.helix = {
enable = true;
defaultEditor = lib.mkIf cfg.default true;
defaultEditor = mkIf (console.editor == "helix") true;
package = inputs.helix.packages.${pkgs.system}.default.overrideAttrs (old: {
makeWrapperArgs = with pkgs;
old.makeWrapperArgs

View file

@ -1,11 +1,13 @@
{ pkgs, lib, config, ... }:
let
cfg = config.ooknet.console.editor.helix;
inherit (lib) mkIf getExe;
cfg = config.ooknet.editor.helix;
console = config.ooknet.console;
in
{
config = lib.mkIf cfg.enable {
config = mkIf (cfg.enable || console.editor == "helix") {
programs.helix.languages = {
language = let
deno = lang: {
@ -89,12 +91,12 @@ in
};
nil = {
command = lib.getExe pkgs.nil;
config.nil.formatting.command = ["${lib.getExe pkgs.alejandra}" "-q"];
command = getExe pkgs.nil;
config.nil.formatting.command = ["${getExe pkgs.alejandra}" "-q"];
};
dprint = {
command = lib.getExe pkgs.dprint;
command = getExe pkgs.dprint;
args = ["lsp"];
};