1
0
Fork 0

Tidy base module

This commit is contained in:
Ethan Reece 2025-07-14 00:15:54 -05:00
parent 8ded2f1513
commit ba4b6882cf
Signed by: me
GPG key ID: DD8CE04D5D8FF832
114 changed files with 29 additions and 30 deletions

2
.envrc
View file

@ -1,2 +1,2 @@
watch_dir ./modules watch_dir ./base
use flake use flake

8
base/default.nix Normal file
View file

@ -0,0 +1,8 @@
{ ... }:
{
imports = [
./base
./helix
./languages
];
}

View file

@ -40,11 +40,21 @@ in
config.devshells.default = config.devshells.default =
let let
tomlFormatter = pkgs.formats.toml { }; tomlFormatter = pkgs.formats.toml { };
helixLanguages = { helix = {
directory = ".helix"; languages = {
filename = "languages.toml"; name = "languages.toml";
content = config.helix.languages; content = config.helix.languages;
file = tomlFormatter.generate "languages.toml" helixLanguages.content; path = tomlFormatter.generate "languages.toml" helix.languages.content;
};
directory = {
name = ".helix";
path = pkgs.linkFarm helix.directory.name [
{
name = helix.languages.name;
path = helix.languages.path;
}
];
};
}; };
in in
{ {
@ -59,7 +69,8 @@ in
packages = [ pkgs.helix ]; packages = [ pkgs.helix ];
devshell.startup.helix_config.text = '' devshell.startup.helix_config.text = ''
mkdir -p .helix mkdir -p .helix
${pkgs.uutils-coreutils-noprefix}/bin/ln -fs ${helixLanguages.file} ./${helixLanguages.directory}/${helixLanguages.filename} ${pkgs.uutils-coreutils-noprefix}/bin/rm -rf ./${helix.directory.name}
${pkgs.uutils-coreutils-noprefix}/bin/ln -fsn ${helix.directory.path} ./${helix.directory.name}
''; '';
}; };
} }

Some files were not shown because too many files have changed in this diff Show more