Upgraded snowfall lib
This commit is contained in:
parent
7e87dbc55b
commit
a1709f033f
58 changed files with 22 additions and 19 deletions
23
modules/nixos/tools/direnv/default.nix
Normal file
23
modules/nixos/tools/direnv/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.aa.tools.direnv;
|
||||
in {
|
||||
options.aa.tools.direnv = with lib.types; {
|
||||
enable = mkEnableOption "direnv";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
aa.home.extraOptions = {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
25
modules/nixos/tools/eza/default.nix
Normal file
25
modules/nixos/tools/eza/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.aa.tools.eza;
|
||||
in {
|
||||
options.aa.tools.eza = with types; {
|
||||
enable = mkEnableOption "eza";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
aa.home.extraOptions = {
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
icons = true;
|
||||
git = true;
|
||||
enableAliases = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
88
modules/nixos/tools/git/default.nix
Normal file
88
modules/nixos/tools/git/default.nix
Normal file
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.aa.tools.git;
|
||||
gpg = config.aa.tools.gpg;
|
||||
user = config.aa.user;
|
||||
in {
|
||||
options.aa.tools.git = with types; {
|
||||
enable = mkEnableOption "git";
|
||||
userName = mkOption {
|
||||
type = str;
|
||||
default = user.fullName;
|
||||
description = "The name to use for git commits.";
|
||||
};
|
||||
userEmail = mkOption {
|
||||
type = str;
|
||||
default = user.email;
|
||||
description = "The email to use for git commits.";
|
||||
};
|
||||
signingKey = mkOption {
|
||||
type = str;
|
||||
default = "0xE1B13CCEFDEDDFB7";
|
||||
description = "The key ID used to sign commits.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [git];
|
||||
|
||||
aa.home.extraOptions = {
|
||||
programs.git = {
|
||||
delta = {
|
||||
enable = true;
|
||||
options = {
|
||||
line-numbers = true;
|
||||
navigate = true;
|
||||
};
|
||||
};
|
||||
|
||||
enable = true;
|
||||
userName = cfg.userName;
|
||||
userEmail = cfg.userEmail;
|
||||
|
||||
aliases = {
|
||||
lol = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative";
|
||||
pushup = "push -u origin HEAD";
|
||||
};
|
||||
|
||||
signing = {
|
||||
key = cfg.signingKey;
|
||||
signByDefault = mkIf config.aa.tools.gpg.enable true;
|
||||
};
|
||||
|
||||
ignores = [
|
||||
# PyCharm
|
||||
".idea/"
|
||||
|
||||
# Vim artifacts
|
||||
"*.swp"
|
||||
"*.swo"
|
||||
"tags"
|
||||
".vimspector.json"
|
||||
".vimlocal"
|
||||
"Session.vim*"
|
||||
|
||||
# direnv
|
||||
".envrc"
|
||||
".direnv"
|
||||
];
|
||||
|
||||
extraConfig = {
|
||||
init = {
|
||||
defaultBranch = "main";
|
||||
};
|
||||
|
||||
pull = {
|
||||
rebase = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
40
modules/nixos/tools/gpg/default.nix
Normal file
40
modules/nixos/tools/gpg/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.aa.tools.gpg;
|
||||
user = config.aa.user;
|
||||
in {
|
||||
options.aa.tools.gpg = with types; {
|
||||
enable = mkEnableOption "gpg";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [gnupg pinentry-curses];
|
||||
|
||||
aa.home.extraOptions = {
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
scdaemonSettings = {
|
||||
# Fix conflicts with config in common/yubikey.nix
|
||||
disable-ccid = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
pinentryFlavor = "curses";
|
||||
enableZshIntegration = true; # TODO: Only set if using zsh
|
||||
enableSshSupport = true;
|
||||
sshKeys = [
|
||||
# run `gpg-connect-agent 'keyinfo --list' /bye` to get these values for existing keys
|
||||
"E274D5078327CB6C8C83CFF102CC12A2D493C77F"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
79
modules/nixos/tools/zsh/default.nix
Normal file
79
modules/nixos/tools/zsh/default.nix
Normal file
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.aa.tools.zsh;
|
||||
in {
|
||||
options.aa.tools.zsh = with types; {
|
||||
enable = mkEnableOption "zsh";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Already set in home-manager below, but without this building fails with
|
||||
# an assertion error that suggests setting this
|
||||
programs.zsh.enable = true;
|
||||
|
||||
aa.home.extraOptions = {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
enableCompletion = true;
|
||||
envExtra = ''
|
||||
export PATH=~/.local/bin:$PATH
|
||||
export EDITOR=nvim
|
||||
'';
|
||||
initExtra = ''
|
||||
base16_darktooth
|
||||
bindkey -v
|
||||
bindkey '^A' beginning-of-line
|
||||
bindkey '^E' end-of-line
|
||||
bindkey '^R' history-incremental-search-backward
|
||||
alias view="nvim -R $1"
|
||||
alias l='ls -la'
|
||||
'';
|
||||
|
||||
plugins = with pkgs; [
|
||||
{
|
||||
name = "zsh-syntax-highlighting";
|
||||
src = fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-syntax-highlighting";
|
||||
rev = "0.7.1";
|
||||
sha256 = "sha256-gOG0NLlaJfotJfs+SUhGgLTNOnGLjoqnUp54V9aFJg8=";
|
||||
};
|
||||
file = "zsh-syntax-highlighting.zsh";
|
||||
}
|
||||
{
|
||||
name = "powerlevel10k";
|
||||
src = fetchFromGitHub {
|
||||
owner = "romkatv";
|
||||
repo = "powerlevel10k";
|
||||
rev = "v1.17.0";
|
||||
sha256 = "sha256-fgrwbWj6CcPoZ6GbCZ47HRUg8ZSJWOsa7aipEqYuE0Q=";
|
||||
};
|
||||
file = "powerlevel10k.zsh-theme";
|
||||
}
|
||||
{
|
||||
name = "powerlevel10k-config";
|
||||
src = lib.cleanSource ./.;
|
||||
file = "p10k.zsh";
|
||||
}
|
||||
{
|
||||
name = "base16-shell";
|
||||
src = fetchFromGitHub {
|
||||
owner = "chriskempson";
|
||||
repo = "base16-shell";
|
||||
rev = "588691ba71b47e75793ed9edfcfaa058326a6f41";
|
||||
sha256 = "sha256-X89FsG9QICDw3jZvOCB/KsPBVOLUeE7xN3VCtf0DD3E=";
|
||||
};
|
||||
file = "base16-shell.plugin.zsh";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
1671
modules/nixos/tools/zsh/p10k.zsh
Normal file
1671
modules/nixos/tools/zsh/p10k.zsh
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue