Tidy base module
This commit is contained in:
parent
8ded2f1513
commit
ba4b6882cf
114 changed files with 29 additions and 30 deletions
2
.envrc
2
.envrc
|
@ -1,2 +1,2 @@
|
||||||
watch_dir ./modules
|
watch_dir ./base
|
||||||
use flake
|
use flake
|
||||||
|
|
8
base/default.nix
Normal file
8
base/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./base
|
||||||
|
./helix
|
||||||
|
./languages
|
||||||
|
];
|
||||||
|
}
|
|
@ -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
Loading…
Add table
Reference in a new issue