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
|
#+BEGIN_SRC nix :tangle generated/modules/terminals/zsh.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
flake.nixosModules.zsh = { config, pkgs, lib, ... }: let
|
||||||
username = "henrov";
|
username = "henrov";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Declare a module option to enable Zsh
|
|
||||||
options.mySystem.terminals.zsh.enable =
|
options.mySystem.terminals.zsh.enable =
|
||||||
lib.mkEnableOption "Enable Zsh terminal with Oh-My-Zsh";
|
lib.mkEnableOption "Enable Zsh terminal with Oh-My-Zsh";
|
||||||
|
|
||||||
# Flake-style nixosModule
|
config = lib.mkIf (config.mySystem.terminals.zsh.enable or false) {
|
||||||
flake.nixosModules.zsh = { config, ... }: let
|
|
||||||
enableZsh = config.mySystem.terminals.zsh.enable or false;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
config = lib.mkIf enableZsh {
|
|
||||||
|
|
||||||
# Home Manager scope for the user
|
|
||||||
home-manager.users.${username} = {
|
home-manager.users.${username} = {
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
programs.zsh.enableCompletion = true;
|
programs.zsh.enableCompletion = true;
|
||||||
|
|
||||||
@@ -1340,7 +1331,7 @@ in
|
|||||||
"zsh-autosuggestions"
|
"zsh-autosuggestions"
|
||||||
"zsh-completions"
|
"zsh-completions"
|
||||||
"zsh-history-substring-search"
|
"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
|
#+END_SRC
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +1,14 @@
|
|||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
flake.nixosModules.zsh = { config, pkgs, lib, ... }: let
|
||||||
username = "henrov";
|
username = "henrov";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Declare a module option to enable Zsh
|
|
||||||
options.mySystem.terminals.zsh.enable =
|
options.mySystem.terminals.zsh.enable =
|
||||||
lib.mkEnableOption "Enable Zsh terminal with Oh-My-Zsh";
|
lib.mkEnableOption "Enable Zsh terminal with Oh-My-Zsh";
|
||||||
|
|
||||||
# Flake-style nixosModule
|
config = lib.mkIf (config.mySystem.terminals.zsh.enable or false) {
|
||||||
flake.nixosModules.zsh = { config, ... }: let
|
|
||||||
enableZsh = config.mySystem.terminals.zsh.enable or false;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
config = lib.mkIf enableZsh {
|
|
||||||
|
|
||||||
# Home Manager scope for the user
|
|
||||||
home-manager.users.${username} = {
|
home-manager.users.${username} = {
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
programs.zsh.enableCompletion = true;
|
programs.zsh.enableCompletion = true;
|
||||||
|
|
||||||
@@ -31,7 +22,7 @@ in
|
|||||||
"zsh-autosuggestions"
|
"zsh-autosuggestions"
|
||||||
"zsh-completions"
|
"zsh-completions"
|
||||||
"zsh-history-substring-search"
|
"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