about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2022-03-24 21:11:25 +0100
committeraszlig <aszlig@nix.build>2022-03-24 21:11:25 +0100
commit18bb985d439b7435d993708685e0536d32aa67e7 (patch)
tree1347e86040958725a67f451e3b2126f94b260b45 /modules
parent9258289da52906bffa89b25870d548462567f723 (diff)
modules/zsh: Fix evaluation error and clean up
Regression introduced by 25a077f90a0005b519db071a6b5b4d20bd6d2d45.

I usually let Vim perform a syntax check on the Nix file I'm editing,
which usually displays errors. However, given that the zsh module is one
of my older modules where I did a big "with lib;" over the whole scope,
a nix-instantiate --parse didn't find the missing pkgs argument.

So apart from just fixing the error, I removed the "with lib;" and also
moved from the old lib.overrideDerivation to package.overrideAttrs.

Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'modules')
-rw-r--r--modules/user/aszlig/programs/zsh/default.nix16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/user/aszlig/programs/zsh/default.nix b/modules/user/aszlig/programs/zsh/default.nix
index b0e4f459..4876b865 100644
--- a/modules/user/aszlig/programs/zsh/default.nix
+++ b/modules/user/aszlig/programs/zsh/default.nix
@@ -8,10 +8,10 @@ let
 
 in {
   options.vuizvui.user.aszlig.programs.zsh = {
-    enable = mkEnableOption "zsh";
+    enable = lib.mkEnableOption "zsh";
 
-    machineColor = mkOption {
-      type = types.enum [
+    machineColor = lib.mkOption {
+      type = lib.types.enum [
         "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white"
       ];
       default = "red";
@@ -22,15 +22,15 @@ in {
     };
   };
 
-  config = mkIf cfg.enable {
+  config = lib.mkIf cfg.enable {
     environment.shellInit = ''
       export EDITOR="vim"
       export EMAIL="aszlig@nix.build"
     '';
 
-    nixpkgs.overlays = singleton (lib.const (super: {
-      zsh = overrideDerivation super.zsh (o: {
-        postConfigure = (o.postConfigure or "") + ''
+    nixpkgs.overlays = lib.singleton (lib.const (super: {
+      zsh = super.zsh.overrideAttrs (drv: {
+        postConfigure = (drv.postConfigure or "") + ''
           sed -i -e '/^name=zsh\/newuser/d' config.modules
         '';
       });
@@ -97,7 +97,7 @@ in {
           "$fixThemeColors"
         '';
       });
-    in mkAfter ''
+    in lib.mkAfter ''
       export HISTFILE=~/.histfile
       export HISTSIZE=100000
       export SAVEHIST=100000