From 4698a6318d460bf3f99495629e795b49ef3c757b Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Sat, 8 Jul 2023 22:27:08 +0300 Subject: [PATCH] zsh --- hosts/sakotop/configuration.nix | 13 +------------ modules/desktop/kitty/default.nix | 7 +++++++ modules/shell/default.nix | 1 + modules/shell/zsh/default.nix | 29 +++++++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 12 deletions(-) create mode 100644 modules/shell/zsh/default.nix diff --git a/hosts/sakotop/configuration.nix b/hosts/sakotop/configuration.nix index 5b1890b3..2e4a3be9 100644 --- a/hosts/sakotop/configuration.nix +++ b/hosts/sakotop/configuration.nix @@ -30,6 +30,7 @@ # ALOT faster search.enable = true; }; + zsh.enable = true; }; }; @@ -42,7 +43,6 @@ # TODO(sako):: put this in different files # Define a user account. Don't forget to set a password with ‘passwd’. users.users.sako= { - shell = pkgs.zsh; isNormalUser = true; extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user. packages = with pkgs; [ @@ -129,17 +129,6 @@ }; }; - programs.zsh = { - enable = true; - # TODO(sako):: make my own zsh config - promptInit = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; - }; - - fonts.fonts = with pkgs;[ - jetbrains-mono - (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) - ]; - # git crediental manager is in gitFull package # config options happen to be here too #programs.git = { diff --git a/modules/desktop/kitty/default.nix b/modules/desktop/kitty/default.nix index ea63f81a..45a8e6b5 100644 --- a/modules/desktop/kitty/default.nix +++ b/modules/desktop/kitty/default.nix @@ -20,5 +20,12 @@ in }; }; }; + + # also just in case + fonts.fonts = with pkgs;[ + jetbrains-mono + (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) + ]; + }; } diff --git a/modules/shell/default.nix b/modules/shell/default.nix index 344c6b12..533ec3f7 100644 --- a/modules/shell/default.nix +++ b/modules/shell/default.nix @@ -1,5 +1,6 @@ { imports = [ ./nix + ./zsh ]; } diff --git a/modules/shell/zsh/default.nix b/modules/shell/zsh/default.nix new file mode 100644 index 00000000..78aa45b6 --- /dev/null +++ b/modules/shell/zsh/default.nix @@ -0,0 +1,29 @@ +{ inputs, options, config, lib, pkgs, ...}: +# this makes +# nix search nixpkgs +# ALOT faster +with lib; +let cfg = config.modules.shell.zsh; +in +{ + options.modules.shell.zsh = { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + + users.users.sako.shell = pkgs.zsh; + + programs.zsh = { + enable = true; + promptInit = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; + }; + + # for theme + fonts.fonts = with pkgs;[ + jetbrains-mono + (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) + ]; + + }; +}