refactor(homeModules/cli): move zsh config to module
This commit is contained in:
parent
991a10ca18
commit
97e4bf372b
4 changed files with 5 additions and 8 deletions
|
@ -1,7 +0,0 @@
|
||||||
{ config, lib, pkgs, osConfig, ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./cli/zsh.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./cli.nix
|
|
||||||
./desktop.nix
|
./desktop.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
cli.shell = "zsh";
|
||||||
cli.editor = "nvf";
|
cli.editor = "nvf";
|
||||||
cli.file-browser = "yazi";
|
cli.file-browser = "yazi";
|
||||||
cli.git.name = "Mohammad Rafiq";
|
cli.git.name = "Mohammad Rafiq";
|
||||||
|
|
|
@ -3,10 +3,12 @@
|
||||||
imports = [
|
imports = [
|
||||||
./file-browser/yazi.nix
|
./file-browser/yazi.nix
|
||||||
./editor/nvf.nix
|
./editor/nvf.nix
|
||||||
|
./shell/zsh.nix
|
||||||
./utilities/git.nix
|
./utilities/git.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
options.cli = {
|
options.cli = {
|
||||||
|
shell = lib.pantheon.mkStrOption;
|
||||||
editor = lib.pantheon.mkStrOption;
|
editor = lib.pantheon.mkStrOption;
|
||||||
file-browser = lib.pantheon.mkStrOption;
|
file-browser = lib.pantheon.mkStrOption;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
|
config = lib.mkIf (config.cli.shell == "zsh") {
|
||||||
home.sessionVariables.SHELL = "zsh";
|
home.sessionVariables.SHELL = "zsh";
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -10,4 +11,5 @@
|
||||||
history.ignoreDups = true;
|
history.ignoreDups = true;
|
||||||
history.ignoreSpace = true;
|
history.ignoreSpace = true;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue