diff options
Diffstat (limited to 'users/seth/default.nix')
| -rw-r--r-- | users/seth/default.nix | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/users/seth/default.nix b/users/seth/default.nix index ad36c4a..c71dab9 100644 --- a/users/seth/default.nix +++ b/users/seth/default.nix @@ -1,10 +1,44 @@ +{ config, lib, ... }: +let + cfg = config.seth; +in { + options.seth = { + shellAliases.enable = lib.mkEnableOption "shell aliases" // { + default = config.seth.enable; + defaultText = lib.literalExpression "config.seth.enable"; + }; + + shellVariables.enable = lib.mkEnableOption "shell variables" // { + default = config.seth.enable; + defaultText = lib.literalExpression "config.seth.enable"; + }; + }; + imports = [ ./base ./desktop ./programs ./services - ./shell ./tweaks ]; + + config = lib.mkMerge [ + (lib.mkIf cfg.shellAliases.enable { + home.shellAliases = { + diff = "diff --color=auto"; + g = "git"; + gs = "g status"; + }; + }) + + (lib.mkIf cfg.shellVariables.enable { + home.sessionVariables = { + EDITOR = "nvim"; + VISUAL = config.home.sessionVariables.EDITOR; + CARGO_HOME = "${config.xdg.dataHome}/cargo"; + LESSHISTFILE = "${config.xdg.stateHome}/less/history"; + }; + }) + ]; } |
