re-work cli aspect for nixos and homeModules

This commit is contained in:
William 2026-02-15 12:53:05 -03:00
parent 5f1c05f090
commit bfa2521ed0
13 changed files with 264 additions and 230 deletions

View file

@ -1,20 +1,28 @@
{ ... }:
{
flake.modules.homeManager.cli-btop =
{
config,
lib,
pkgs,
...
}:
{
programs.btop = {
enable = true;
settings = {
theme_background = false;
proc_sorting = "cpu direct";
update_ms = 500;
flake.modules = {
nixos.btop =
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ btop ];
};
homeManager.btop =
{
config,
lib,
pkgs,
...
}:
{
programs.btop = {
enable = true;
settings = {
theme_background = false;
proc_sorting = "cpu direct";
update_ms = 500;
};
};
};
};
};
}

28
aspects/cli/cli.nix Normal file
View file

@ -0,0 +1,28 @@
{ inputs, ... }:
{
flake.modules = {
nixos.cli =
{ ... }:
{
imports = with inputs.self.modules.nixos; [
btop
helix
tmux
];
};
homeManager.cli =
{ ... }:
{
imports = with inputs.self.modules.nixos; [
btop
comma
direnv
helix
hm-cli
starship
tmux
];
};
};
}

View file

@ -1,6 +1,6 @@
{ ... }:
{
flake.modules.homeManager.cli-comma =
flake.modules.homeManager.comma =
{
config,
lib,

View file

@ -1,6 +1,6 @@
{ ... }:
{
flake.modules.homeManager.cli-direnv =
flake.modules.homeManager.direnv =
{
config,
lib,

View file

@ -1,57 +1,67 @@
{ ... }:
{
flake.modules.homeManager.cli-helix =
{
config,
lib,
pkgs,
...
}:
{
home.sessionVariables = {
EDITOR = "hx";
flake.modules = {
nixos.helix =
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
helix
];
};
programs.helix = {
enable = true;
settings = {
editor = {
file-picker.hidden = false;
idle-timeout = 0;
line-number = "relative";
cursor-shape = {
normal = "underline";
insert = "bar";
select = "underline";
};
soft-wrap.enable = true;
auto-format = true;
indent-guides.render = true;
};
keys.normal = {
space = {
o = "file_picker_in_current_buffer_directory";
esc = [
"collapse_selection"
"keep_primary_selection"
];
};
};
homeManager.helix =
{
config,
lib,
pkgs,
...
}:
{
home.sessionVariables = {
EDITOR = "hx";
};
languages = {
language = [
{
name = "nix";
programs.helix = {
enable = true;
settings = {
editor = {
file-picker.hidden = false;
idle-timeout = 0;
line-number = "relative";
cursor-shape = {
normal = "underline";
insert = "bar";
select = "underline";
};
soft-wrap.enable = true;
auto-format = true;
formatter.command = "nixfmt";
}
{
name = "typst";
auto-format = true;
formatter.command = "typstyle -c 1000 -i";
}
];
indent-guides.render = true;
};
keys.normal = {
space = {
o = "file_picker_in_current_buffer_directory";
esc = [
"collapse_selection"
"keep_primary_selection"
];
};
};
};
languages = {
language = [
{
name = "nix";
auto-format = true;
formatter.command = "nixfmt";
}
{
name = "typst";
auto-format = true;
formatter.command = "typstyle -c 1000 -i";
}
];
};
};
};
};
};
}

View file

@ -1,6 +1,6 @@
{ ... }:
{
flake.modules.homeManager.cli-base =
flake.modules.homeManager.hm-cli =
{
config,
lib,

View file

@ -1,6 +1,6 @@
{ ... }:
{
flake.modules.homeManager.cli-starship =
flake.modules.homeManager.starship =
{
config,
lib,

View file

@ -1,19 +1,29 @@
{ ... }:
{
flake.modules.homeManager.cli-tmux =
{
config,
lib,
pkgs,
...
}:
{
programs.tmux = {
enable = true;
clock24 = true;
terminal = "xterm-256color";
mouse = true;
keyMode = "vi";
flake.modules = {
nixos.tmux =
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
tmux
];
};
};
homeManager.tmux =
{
config,
lib,
pkgs,
...
}:
{
programs.tmux = {
enable = true;
clock24 = true;
terminal = "xterm-256color";
mouse = true;
keyMode = "vi";
};
};
};
}