os/modules/terminal-life/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

120 lines
2.7 KiB
Nix
Raw Normal View History

{
lib,
config,
pkgs,
...
}:
2021-05-30 19:10:28 +00:00
with lib; let
psCfg = config.pub-solar;
cfg = config.pub-solar.terminal-life;
in {
options.pub-solar.terminal-life = {
full = mkOption {
description = ''
2023-10-07 19:11:08 +00:00
Enable a full version, which includes more nvim plugins and lsps.
'';
2023-10-07 19:11:08 +00:00
default = false;
type = types.bool;
};
2021-05-30 19:10:28 +00:00
};
config = {
2021-05-30 19:10:28 +00:00
programs.command-not-found.enable = false;
2024-08-18 22:22:59 +00:00
users.users."${psCfg.user.name}".packages = with pkgs;
[
asciinema
bat
blesh
eza
fd
ripgrep
(nnn.overrideAttrs (o: {
patches =
(o.patches or [])
++ [
./nnn/0001-feat-use-wasd-keybindings-for-jkli.patch
];
}))
p
powerline
screen
watson
jump
]
++ (
if cfg.full
then [
# Nix specific utilities
alejandra
manix
nix-index
nix-tree
nix-inspect
nvd
]
else []
);
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
'';
};
2021-05-30 19:10:28 +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;
};
2023-09-12 20:07:05 +00:00
programs.bash = import ./bash {
inherit config;
inherit pkgs;
inherit lib;
};
2023-09-12 20:07:05 +00:00
programs.fzf = import ./fzf {
inherit config;
inherit pkgs;
};
2023-09-12 20:07:05 +00:00
programs.neovim = import ./nvim {
inherit config;
inherit pkgs;
inherit lib;
};
# 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 = "";
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;
2022-11-20 22:28:23 +00:00
};
xdg.configFile."git/global_gitignore".text = import ./.config/git/global_gitignore.nix {
inherit config;
inherit pkgs;
};
programs.direnv = import ./direnv {};
2023-09-12 20:07:05 +00:00
};
};
2021-05-30 19:10:28 +00:00
}