From a5edf53519a64773f11d03e530c83609b75eb2f4 Mon Sep 17 00:00:00 2001 From: smayzy Date: Tue, 8 Jul 2025 17:43:52 +0200 Subject: [PATCH] mv zsh to module --- hosts/desktop1/configuration.nix | 2 +- modules/nix/default.nix | 1 + modules/nix/shell/default.nix | 6 ++++++ modules/nix/shell/zsh.nix | 15 +++++++++++++++ 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 modules/nix/shell/default.nix create mode 100644 modules/nix/shell/zsh.nix diff --git a/hosts/desktop1/configuration.nix b/hosts/desktop1/configuration.nix index 6ad7cd6..6b342bc 100644 --- a/hosts/desktop1/configuration.nix +++ b/hosts/desktop1/configuration.nix @@ -13,6 +13,7 @@ prism.enable = true; fzf.enable = true; firefox.enable = true; + zsh.enable = true; }; home-manager = { @@ -98,5 +99,4 @@ ]; }; - programs.zsh.enable = true; } diff --git a/modules/nix/default.nix b/modules/nix/default.nix index 52fc071..4fdcd64 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -7,6 +7,7 @@ ./virt ./games ./browser + ./shell ]; # Timzone and locales (same for all machines so I put it here) diff --git a/modules/nix/shell/default.nix b/modules/nix/shell/default.nix new file mode 100644 index 0000000..09e4e7b --- /dev/null +++ b/modules/nix/shell/default.nix @@ -0,0 +1,6 @@ +{ lib, config, pkgs, ... }: +{ + imports = [ + ./zsh.nix + ]; +} diff --git a/modules/nix/shell/zsh.nix b/modules/nix/shell/zsh.nix new file mode 100644 index 0000000..5522da1 --- /dev/null +++ b/modules/nix/shell/zsh.nix @@ -0,0 +1,15 @@ +{ lib, config, pkgs, ... }: +let + inherit (lib) mkIf mkOption types; +in +{ + options.smayzy.zsh.enable = mkOption { + type = types.bool; + default = false; + description = "zsh"; + }; + + config = mkIf config.smayzy.zsh.enable { + programs.zsh.enable = true; + }; +}