diff options
| author | seth <[email protected]> | 2024-10-27 02:27:42 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2024-10-27 02:27:42 -0400 |
| commit | 87e5274c0ad37baf3130e090f6645935e9c17e11 (patch) | |
| tree | 6e995f0bba34861c114a540319f0f9d76e91410b /users/seth/default.nix | |
| parent | d088ba5731cca3c552584b9eb2e212c8fd624b58 (diff) | |
seth: merge shell modules with regular programs
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"; + }; + }) + ]; } |
