2023-01-28 20:49:10 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
pkgs,
|
2023-11-10 18:48:06 +00:00
|
|
|
flake,
|
2023-01-28 20:49:10 +00:00
|
|
|
...
|
|
|
|
}:
|
2024-06-13 00:14:25 +00:00
|
|
|
let
|
2021-05-30 19:10:28 +00:00
|
|
|
psCfg = config.pub-solar;
|
|
|
|
cfg = config.pub-solar.terminal-life;
|
2023-01-28 20:49:10 +00:00
|
|
|
in
|
|
|
|
{
|
2021-05-30 19:10:28 +00:00
|
|
|
options.pub-solar.terminal-life = {
|
2024-06-13 00:14:25 +00:00
|
|
|
full = lib.mkOption {
|
2022-08-14 15:17:35 +00:00
|
|
|
description = ''
|
2023-11-10 18:48:06 +00:00
|
|
|
Enable a full version, which includes more nvim plugins and lsps.
|
2022-08-14 15:17:35 +00:00
|
|
|
'';
|
|
|
|
default = false;
|
2024-06-13 00:14:25 +00:00
|
|
|
type = lib.types.bool;
|
2022-08-14 15:17:35 +00:00
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
};
|
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
config = {
|
2021-05-30 19:10:28 +00:00
|
|
|
programs.command-not-found.enable = false;
|
2023-12-04 11:34:44 +00:00
|
|
|
programs.nix-index.enable = true;
|
|
|
|
# We do this manually in modules/terminal-life/bash/default.nix
|
|
|
|
# until https://github.com/nix-community/nix-index/pull/227 is merged
|
|
|
|
programs.nix-index.enableBashIntegration = false;
|
2021-05-30 19:10:28 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
users.users."${psCfg.user.name}".packages =
|
|
|
|
with pkgs;
|
|
|
|
[
|
|
|
|
asciinema
|
|
|
|
bat
|
|
|
|
blesh
|
2024-05-27 08:57:59 +00:00
|
|
|
delta
|
2023-11-12 18:06:07 +00:00
|
|
|
eza
|
2023-11-10 18:48:06 +00:00
|
|
|
fd
|
|
|
|
jump
|
|
|
|
(nnn.overrideAttrs (o: {
|
|
|
|
patches = (o.patches or [ ]) ++ [ ./nnn/0001-feat-use-wasd-keybindings-for-jkli.patch ];
|
|
|
|
}))
|
|
|
|
powerline
|
2024-08-19 08:18:12 +00:00
|
|
|
ripgrep
|
2021-05-30 19:10:28 +00:00
|
|
|
screen
|
2023-11-10 18:48:06 +00:00
|
|
|
watson
|
2024-08-19 08:18:12 +00:00
|
|
|
]
|
|
|
|
++ (
|
|
|
|
if cfg.full then
|
|
|
|
[
|
|
|
|
binutils
|
|
|
|
jq
|
|
|
|
|
|
|
|
# Nix specific utilities
|
|
|
|
manix
|
|
|
|
nix-index
|
|
|
|
nix-tree
|
|
|
|
nix-inspect
|
|
|
|
nvd
|
|
|
|
nixpkgs-review
|
2024-08-21 14:06:22 +00:00
|
|
|
nix-output-monitor
|
2024-08-19 08:18:12 +00:00
|
|
|
nix-update
|
|
|
|
nix-search-cli
|
|
|
|
]
|
|
|
|
else
|
|
|
|
[ ]
|
|
|
|
);
|
2021-05-30 19:10:28 +00:00
|
|
|
|
2024-03-06 17:47:35 +00:00
|
|
|
# Get completion for system packages
|
|
|
|
# https://nix-community.github.io/home-manager/options.xhtml#opt-programs.bash.enableCompletion
|
|
|
|
environment.pathsToLink = [ "/share/bash-completion" ];
|
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
home-manager.users."${psCfg.user.name}" = {
|
|
|
|
xdg.dataFile."scripts/base16.sh".source = .local/share/scripts/base16.sh;
|
|
|
|
|
|
|
|
programs.less = {
|
|
|
|
enable = true;
|
|
|
|
keys = ''
|
|
|
|
k forw-line
|
|
|
|
i back-line
|
|
|
|
K forw-scroll
|
|
|
|
I back-scroll
|
|
|
|
'';
|
|
|
|
};
|
2023-01-28 21:05:02 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
# Starship is a fast and featureful shell prompt
|
|
|
|
# starship.toml has sane defaults that can be changed there
|
|
|
|
programs.starship = {
|
|
|
|
enable = true;
|
|
|
|
settings = import ./starship.toml.nix;
|
|
|
|
};
|
|
|
|
|
|
|
|
programs.bash = import ./bash {
|
|
|
|
inherit config;
|
|
|
|
inherit pkgs;
|
|
|
|
inherit lib;
|
|
|
|
inherit flake;
|
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
programs.fzf = import ./fzf {
|
|
|
|
inherit config;
|
|
|
|
inherit pkgs;
|
2023-01-28 20:49:10 +00:00
|
|
|
};
|
2023-11-10 18:48:06 +00:00
|
|
|
|
|
|
|
programs.neovim = import ./nvim {
|
|
|
|
inherit config;
|
|
|
|
inherit pkgs;
|
|
|
|
inherit lib;
|
|
|
|
};
|
2024-08-19 08:18:12 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
# Ensure nvim backup directory gets created
|
|
|
|
# Workaround for E510: Can't make backup file (add ! to override)
|
|
|
|
xdg.dataFile."nvim/backup/.keep".text = "";
|
|
|
|
xdg.dataFile."nvim/json-schemas/.keep".text = "";
|
|
|
|
# Generated with:
|
|
|
|
# docker run -it --name caddy-json-schema registry.greenbaum.cloud/gc/caddy-l4:2.5.2 caddy json-schema -output /srv/caddy_schema.json
|
|
|
|
xdg.dataFile."nvim/json-schemas/caddy_schema.json".source = .local/share/nvim/json-schemas/caddy_schema.json;
|
|
|
|
xdg.dataFile."nvim/templates/.keep".text = "";
|
|
|
|
|
|
|
|
programs.git = import ./git { };
|
|
|
|
xdg.configFile."git/config".text = import ./.config/git/config.nix {
|
|
|
|
inherit config;
|
|
|
|
inherit pkgs;
|
|
|
|
};
|
|
|
|
xdg.configFile."git/gitmessage".text = import ./.config/git/gitmessage.nix {
|
|
|
|
inherit config;
|
|
|
|
inherit pkgs;
|
|
|
|
};
|
|
|
|
xdg.configFile."git/global_gitignore".text = import ./.config/git/global_gitignore.nix {
|
|
|
|
inherit config;
|
|
|
|
inherit pkgs;
|
|
|
|
};
|
|
|
|
|
2024-08-27 08:38:27 +00:00
|
|
|
programs.direnv = import ./direnv { inherit pkgs flake; };
|
2023-11-10 18:48:06 +00:00
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
};
|
|
|
|
}
|