Working on reshuffling
This commit is contained in:
+3
-13
@@ -1309,24 +1309,15 @@ This sets up the zsh in the terminal
|
||||
#+BEGIN_SRC nix :tangle generated/modules/terminals/zsh.nix :noweb tangle :mkdirp yes :eval never-html
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
flake.nixosModules.zsh = { config, pkgs, lib, ... }: let
|
||||
username = "henrov";
|
||||
in
|
||||
{
|
||||
# Declare a module option to enable Zsh
|
||||
options.mySystem.terminals.zsh.enable =
|
||||
lib.mkEnableOption "Enable Zsh terminal with Oh-My-Zsh";
|
||||
|
||||
# Flake-style nixosModule
|
||||
flake.nixosModules.zsh = { config, ... }: let
|
||||
enableZsh = config.mySystem.terminals.zsh.enable or false;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf enableZsh {
|
||||
|
||||
# Home Manager scope for the user
|
||||
config = lib.mkIf (config.mySystem.terminals.zsh.enable or false) {
|
||||
home-manager.users.${username} = {
|
||||
|
||||
programs.zsh.enable = true;
|
||||
programs.zsh.enableCompletion = true;
|
||||
|
||||
@@ -1340,7 +1331,7 @@ in
|
||||
"zsh-autosuggestions"
|
||||
"zsh-completions"
|
||||
"zsh-history-substring-search"
|
||||
# zsh-syntax-highlighting will be sourced in initExtra
|
||||
# zsh-syntax-highlighting is sourced in initExtra
|
||||
];
|
||||
};
|
||||
|
||||
@@ -1374,7 +1365,6 @@ in
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
|
||||
@@ -1,23 +1,14 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
flake.nixosModules.zsh = { config, pkgs, lib, ... }: let
|
||||
username = "henrov";
|
||||
in
|
||||
{
|
||||
# Declare a module option to enable Zsh
|
||||
options.mySystem.terminals.zsh.enable =
|
||||
lib.mkEnableOption "Enable Zsh terminal with Oh-My-Zsh";
|
||||
|
||||
# Flake-style nixosModule
|
||||
flake.nixosModules.zsh = { config, ... }: let
|
||||
enableZsh = config.mySystem.terminals.zsh.enable or false;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf enableZsh {
|
||||
|
||||
# Home Manager scope for the user
|
||||
config = lib.mkIf (config.mySystem.terminals.zsh.enable or false) {
|
||||
home-manager.users.${username} = {
|
||||
|
||||
programs.zsh.enable = true;
|
||||
programs.zsh.enableCompletion = true;
|
||||
|
||||
@@ -31,7 +22,7 @@ in
|
||||
"zsh-autosuggestions"
|
||||
"zsh-completions"
|
||||
"zsh-history-substring-search"
|
||||
# zsh-syntax-highlighting will be sourced in initExtra
|
||||
# zsh-syntax-highlighting is sourced in initExtra
|
||||
];
|
||||
};
|
||||
|
||||
@@ -65,5 +56,4 @@ in
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user