1
0
Fork 0

Move languages into the base module

This commit is contained in:
Ethan Reece 2025-07-13 23:51:07 -05:00
parent 9e4bc003cb
commit 8ded2f1513
Signed by: me
GPG key ID: DD8CE04D5D8FF832
112 changed files with 79 additions and 86 deletions

1
.envrc
View file

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

View file

@ -41,7 +41,6 @@
imports = [
inputs.home-manager.flakeModules.home-manager
./modules
./languages
];
flake = {
# https://nix-community.github.io/home-manager/options.xhtml

View file

@ -1,57 +1,4 @@
{ flake-parts-lib, inputs, ... }:
{ ... }:
{
imports = [
inputs.treefmt-nix.flakeModule
inputs.git-hooks-nix.flakeModule
inputs.devshell.flakeModule
];
options.perSystem = flake-parts-lib.mkPerSystemOption (
{ config, pkgs, ... }:
{
config = {
devshells.default = {
commands = [
{
help = "󰚰 update dependencies";
name = "update";
command = "${pkgs.lix}/bin/nix flake update";
category = "󱄅 Flake";
}
{
help = "󰑓 reload direnv environment";
name = "reload";
command = "${pkgs.direnv}/bin/direnv reload";
category = "󱄅 Flake";
}
];
packages = [
pkgs.git
pkgs.jujutsu
pkgs.lix
pkgs.man
pkgs.uutils-coreutils-noprefix
];
devshell.startup = {
pre-commit.text = ''
${config.pre-commit.installationScript}
'';
};
};
# https://flake.parts/options/git-hooks-nix.html
pre-commit.settings = {
hooks = {
treefmt = {
enable = true;
package = config.treefmt.build.wrapper;
};
check-merge-conflicts.enable = true;
check-symlinks.enable = true;
flake-checker.enable = true;
};
};
# https://flake.parts/options/treefmt-nix.html
treefmt.projectRootFile = "flake.nix";
};
}
);
imports = [ ./modules ];
}

View file

@ -0,0 +1,57 @@
{ flake-parts-lib, inputs, ... }:
{
imports = [
inputs.treefmt-nix.flakeModule
inputs.git-hooks-nix.flakeModule
inputs.devshell.flakeModule
];
options.perSystem = flake-parts-lib.mkPerSystemOption (
{ config, pkgs, ... }:
{
config = {
devshells.default = {
commands = [
{
help = "󰚰 update dependencies";
name = "update";
command = "${pkgs.lix}/bin/nix flake update";
category = "󱄅 Flake";
}
{
help = "󰑓 reload direnv environment";
name = "reload";
command = "${pkgs.direnv}/bin/direnv reload";
category = "󱄅 Flake";
}
];
packages = [
pkgs.git
pkgs.jujutsu
pkgs.lix
pkgs.man
pkgs.uutils-coreutils-noprefix
];
devshell.startup = {
pre-commit.text = ''
${config.pre-commit.installationScript}
'';
};
};
# https://flake.parts/options/git-hooks-nix.html
pre-commit.settings = {
hooks = {
treefmt = {
enable = true;
package = config.treefmt.build.wrapper;
};
check-merge-conflicts.enable = true;
check-symlinks.enable = true;
flake-checker.enable = true;
};
};
# https://flake.parts/options/treefmt-nix.html
treefmt.projectRootFile = "flake.nix";
};
}
);
}

View file

@ -0,0 +1,11 @@
{ ... }:
let
entries = builtins.attrNames (builtins.readDir ./.);
configs = builtins.filter (dir: builtins.pathExists (./. + "/${dir}/default.nix")) entries;
in
{
imports = [
../base
../helix
] ++ builtins.map (name: (./. + "/${name}")) configs;
}

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