commit 8b4f9ecf1462720f6b3c18790e50c642c59fcdb6
parent b350757c6af80bfdc270913cacf530e94aed437f
Author: Vincent Demeester <vincent@sbr.pm>
Date: Thu, 1 Nov 2018 14:31:07 +0100
profiles: add zsh (disabled by default)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
3 files changed, 24 insertions(+), 8 deletions(-)
diff --git a/modules/module-list.nix b/modules/module-list.nix
@@ -13,6 +13,7 @@
./profiles/laptop.nix
./profiles/ssh.nix
./profiles/tmux.nix
+ ./profiles/zsh.nix
./programs/vscode.nix
./services/shairport-sync.nix
];
diff --git a/modules/profiles/zsh.nix b/modules/profiles/zsh.nix
@@ -0,0 +1,23 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+let
+ cfg = config.profiles.zsh;
+in
+{
+ options = {
+ profiles.zsh = {
+ enable = mkOption {
+ default = false;
+ description = "Enable zsh profile and configuration";
+ type = types.bool;
+ };
+ };
+ };
+ config = mkIf cfg.enable {
+ programs.zsh = {
+ enable = true;
+ shellAliases = import ./aliases.shell.nix;
+ };
+ };
+}
diff --git a/zsh.nix b/zsh.nix
@@ -1,8 +0,0 @@
-{ pkgs, config, lib, ...}:
-
-{
- programs.zsh = {
- enable = true;
- shellAliases = import ./aliases.nix
- };
-}