From 3bed356294815f3fe3bdf7fc4e8a02bcbf0869c1 Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Fri, 26 Jul 2024 19:37:31 +0100 Subject: [PATCH] zsh: enable, set for qenya, add config --- common/default.nix | 1 + common/users/qenya.nix | 1 + common/zsh.nix | 9 +++++++++ home/vscode.nix | 1 + home/zsh.nix | 31 +++++++++++++++++++++++++++++++ hosts/orm/home.nix | 1 + hosts/tohru/home.nix | 1 + hosts/yevaud/home.nix | 1 + 8 files changed, 46 insertions(+) create mode 100644 common/zsh.nix create mode 100644 home/zsh.nix diff --git a/common/default.nix b/common/default.nix index 31657ff..1f4547d 100644 --- a/common/default.nix +++ b/common/default.nix @@ -5,5 +5,6 @@ ./nginx.nix ./openssh.nix ./security.nix + ./zsh.nix ]; } \ No newline at end of file diff --git a/common/users/qenya.nix b/common/users/qenya.nix index 74062f7..5974069 100644 --- a/common/users/qenya.nix +++ b/common/users/qenya.nix @@ -11,6 +11,7 @@ in "networkmanager" # UI wifi configuration "dialout" # access to serial ports ]; + shell = pkgs.zsh; openssh.authorizedKeys.keys = keys.users.qenya; uid = 1001; }; diff --git a/common/zsh.nix b/common/zsh.nix new file mode 100644 index 0000000..09576b4 --- /dev/null +++ b/common/zsh.nix @@ -0,0 +1,9 @@ +{ config, lib, pkgs,... }: + +{ + programs.zsh.enable = true; + environment = { + shells = with pkgs; [ zsh ]; + pathsToLink = [ "/share/zsh" ]; + }; +} diff --git a/home/vscode.nix b/home/vscode.nix index 9cac613..480581f 100644 --- a/home/vscode.nix +++ b/home/vscode.nix @@ -36,6 +36,7 @@ formatting.command = [ "nixpkgs-fmt" ]; }; "terminal.integrated.allowChords" = false; + "terminal.integrated.defaultProfile.linux" = "zsh"; "workbench.colorTheme" = "SynthWave '84"; }; }; diff --git a/home/zsh.nix b/home/zsh.nix new file mode 100644 index 0000000..a970ace --- /dev/null +++ b/home/zsh.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs, ... }: + +{ + programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + dotDir = ".config/zsh"; + + shellAliases = { + ll = "ls -l"; + }; + + history = { + size = 10000; + path = "${config.xdg.dataHome}/zsh/history"; + ignorePatterns = [ "rm *" "pkill *" ]; + }; + + oh-my-zsh = { + enable = true; + plugins = [ "git" "sudo" ]; + theme = "agnoster"; + }; + + envExtra = '' + DEFAULT_USER=qenya + ''; + }; +} diff --git a/hosts/orm/home.nix b/hosts/orm/home.nix index 06f12fb..e5267c7 100644 --- a/hosts/orm/home.nix +++ b/hosts/orm/home.nix @@ -5,6 +5,7 @@ imports = [ ../../home/cli.nix ../../home/git.nix + ../../home/zsh.nix ]; home.stateVersion = "23.11"; diff --git a/hosts/tohru/home.nix b/hosts/tohru/home.nix index b70a202..023f444 100644 --- a/hosts/tohru/home.nix +++ b/hosts/tohru/home.nix @@ -8,6 +8,7 @@ ../../home/git.nix ../../home/gnome ../../home/vscode.nix + ../../home/zsh.nix ]; home.packages = (with pkgs; [ diff --git a/hosts/yevaud/home.nix b/hosts/yevaud/home.nix index 87d8898..e8a18e9 100644 --- a/hosts/yevaud/home.nix +++ b/hosts/yevaud/home.nix @@ -6,6 +6,7 @@ ../../home/cli.nix ../../home/git.nix ../../home/tmux.nix + ../../home/zsh.nix ]; home.stateVersion = "23.11";