Compare commits
No commits in common. "345d9257c53508712002ecfb6b2a9d471a6bed73" and "80e5f8a1791d7ee35fe5198d183a9365e4de772b" have entirely different histories.
345d9257c5
...
80e5f8a179
|
@ -67,6 +67,252 @@ with lib; {
|
|||
tmate
|
||||
];
|
||||
})
|
||||
(mkIf (config.nathan.programs.util.git.enable
|
||||
&& config.nathan.programs.util.git.gpgSign) {
|
||||
programs.git.signing = {
|
||||
key = lib.mkDefault "B7A40A5D78C08885";
|
||||
signByDefault = lib.mkDefault config.nathan.programs.util.git.gpgSign;
|
||||
};
|
||||
})
|
||||
(mkIf (config.nathan.programs.util.git.enable
|
||||
&& config.nathan.programs.util.git.sshSign) {
|
||||
home.file.allowedSigners = {
|
||||
target = ".ssh/allowed_signers";
|
||||
text = (import ../../../info/ssh-keys.nix).allowedSigners;
|
||||
};
|
||||
programs.git = {
|
||||
extraConfig = {
|
||||
commit.gpgsign = true;
|
||||
gpg.format = "ssh";
|
||||
user.signingkey = "~/.ssh/id_ed25519.pub";
|
||||
gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers";
|
||||
};
|
||||
};
|
||||
})
|
||||
(mkIf config.nathan.programs.util.git.enable {
|
||||
# Git adjacent packages
|
||||
home.packages = [
|
||||
inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}".git-branchless
|
||||
];
|
||||
#########################
|
||||
## Git configuration
|
||||
#########################
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
userName = "Nathan McCarty";
|
||||
userEmail = "nathan@mccarty.io";
|
||||
ignores = [
|
||||
"**/*~"
|
||||
"*~"
|
||||
"*_archive"
|
||||
"/auto/"
|
||||
"auto-save-list"
|
||||
".cask/"
|
||||
".dir-locals.el"
|
||||
"dist/"
|
||||
"**/.DS_Store"
|
||||
"*.elc"
|
||||
"/elpa/"
|
||||
"/.emacs.desktop"
|
||||
"/.emacs.desktop.lock"
|
||||
"/eshell/history"
|
||||
"/eshell/lastdir"
|
||||
"flycheck_*.el"
|
||||
"*_flymake.*"
|
||||
"/network-security.data"
|
||||
".org-id-locations"
|
||||
".persp"
|
||||
".projectile"
|
||||
"*.rel"
|
||||
"/server/"
|
||||
"tramp"
|
||||
"\\#*\\#"
|
||||
];
|
||||
delta.enable = true;
|
||||
lfs.enable = true;
|
||||
extraConfig = {
|
||||
init = { defaultBranch = "trunk"; };
|
||||
log = {
|
||||
showSignature = true;
|
||||
abbrevCommit = true;
|
||||
follow = true;
|
||||
decorate = false;
|
||||
};
|
||||
rerere = {
|
||||
enable = true;
|
||||
autoupdate = true;
|
||||
};
|
||||
merge = {
|
||||
ff = "only";
|
||||
conflictstyle = "diff3";
|
||||
};
|
||||
push = {
|
||||
default = "simple";
|
||||
followTags = true;
|
||||
};
|
||||
pull = { rebase = true; };
|
||||
status = { showUntrackedFiles = "all"; };
|
||||
transfer = { fsckobjects = true; };
|
||||
color = { ui = "auto"; };
|
||||
diff = {
|
||||
mnemonicPrefix = true;
|
||||
renames = true;
|
||||
wordRegex = ".";
|
||||
submodule = "log";
|
||||
};
|
||||
# credential = { helper = "cache"; };
|
||||
# Disable annoying safe directory nonsense
|
||||
safe = { directory = "*"; };
|
||||
};
|
||||
};
|
||||
})
|
||||
(mkIf config.nathan.programs.util.ssh {
|
||||
#########################
|
||||
## SSH Configuration
|
||||
#########################
|
||||
programs.ssh = {
|
||||
# SSH configuration
|
||||
enable = true;
|
||||
# extra config to set the ciphers
|
||||
extraConfig = ''
|
||||
Ciphers aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
|
||||
'';
|
||||
# Enable compression
|
||||
compression = true;
|
||||
# enable session reuse
|
||||
controlMaster = "auto";
|
||||
controlPersist = "10m";
|
||||
# Configure known hosts
|
||||
matchBlocks = {
|
||||
"levitation" = {
|
||||
forwardAgent = true;
|
||||
user = "nathan";
|
||||
hostname = "100.95.223.6";
|
||||
};
|
||||
"perception" = {
|
||||
forwardAgent = true;
|
||||
user = "nathan";
|
||||
hostname = "100.121.150.78";
|
||||
};
|
||||
"oracles" = {
|
||||
forwardAgent = true;
|
||||
user = "nathan";
|
||||
hostname = "100.66.15.34";
|
||||
};
|
||||
"tounge" = {
|
||||
forwardAgent = true;
|
||||
user = "nathan";
|
||||
hostname = "100.75.37.98";
|
||||
};
|
||||
"shadowchild" = {
|
||||
forwardAgent = true;
|
||||
user = "nathan";
|
||||
hostname = "172.23.217.149";
|
||||
};
|
||||
"matrix.community.rs" = {
|
||||
forwardAgent = true;
|
||||
user = "nathan";
|
||||
hostname = "100.113.74.107";
|
||||
};
|
||||
"fusion" = {
|
||||
forwardAgent = true;
|
||||
user = "nathan";
|
||||
hostname = "100.99.69.14";
|
||||
};
|
||||
"de1955" = {
|
||||
user = "de1955";
|
||||
hostname = "de1955.rsync.net";
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
(mkIf config.nathan.programs.util.fish {
|
||||
#########################
|
||||
## Fish Configuration
|
||||
#########################
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
# Setup our aliases
|
||||
shellAliases = {
|
||||
ls = "exa --icons";
|
||||
la = "exa --icons -a";
|
||||
lg = "exa --icons --git";
|
||||
cat = "bat";
|
||||
dig = "dog";
|
||||
df = "duf";
|
||||
idris2 = "rlwrap -s 1000 idris2 --no-banner";
|
||||
};
|
||||
# Custom configuration
|
||||
interactiveShellInit = ''
|
||||
# Setup any-nix-shell
|
||||
any-nix-shell fish --info-right | source
|
||||
# Load logger function
|
||||
source ~/.config/fish/functions/cmdlogger.fish
|
||||
# Load up vi keybindings
|
||||
fish_vi_key_bindings
|
||||
'';
|
||||
functions = {
|
||||
# Setup command logging to ~/.logs
|
||||
cmdlogger = {
|
||||
onEvent = "fish_preexec";
|
||||
body = ''
|
||||
mkdir -p ~/.logs
|
||||
echo (date -u +"%Y-%m-%dT%H:%M:%SZ")" "(echo %self)" "(pwd)": "$argv >> ~/.logs/(hostname)-(date "+%Y-%m-%d").log
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
directory = {
|
||||
truncation_length = 3;
|
||||
fish_style_pwd_dir_length = 1;
|
||||
};
|
||||
git_commit = {
|
||||
commit_hash_length = 6;
|
||||
only_detached = false;
|
||||
};
|
||||
package = { symbol = ""; };
|
||||
time = {
|
||||
disabled = false;
|
||||
format = "[$time]($style)";
|
||||
time_format = "%I:%M %p";
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
theme = "zenburn";
|
||||
style = "header,rule,snip,changes";
|
||||
};
|
||||
};
|
||||
#########################
|
||||
## Readline + fzf and other quality of life stuff
|
||||
#########################
|
||||
programs.readline = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
set editing-mode vi
|
||||
set show-all-if-ambiguous on
|
||||
set editing-mode vi
|
||||
|
||||
set keymap vi-command
|
||||
# these are for vi-command mode
|
||||
"\e[A": history-search-backward
|
||||
"\e[B": history-search-forward
|
||||
j: history-search-forward
|
||||
k: history-search-backward
|
||||
set keymap vi-insert
|
||||
# these are for vi-insert mode
|
||||
"\e[A": history-search-backward
|
||||
"\e[B": history-search-forward
|
||||
'';
|
||||
};
|
||||
programs.fzf = { enable = true; };
|
||||
})
|
||||
(mkIf config.nathan.programs.util.json {
|
||||
#########################
|
||||
## JSON Utilities
|
||||
|
|
|
@ -1,91 +0,0 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
with lib; {
|
||||
config = mkMerge [
|
||||
(mkIf config.nathan.programs.util.fish {
|
||||
#########################
|
||||
## Fish Configuration
|
||||
#########################
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
# Setup our aliases
|
||||
shellAliases = {
|
||||
ls = "exa --icons";
|
||||
la = "exa --icons -a";
|
||||
lg = "exa --icons --git";
|
||||
cat = "bat";
|
||||
dig = "dog";
|
||||
df = "duf";
|
||||
idris2 = "rlwrap -s 1000 idris2 --no-banner";
|
||||
};
|
||||
# Custom configuration
|
||||
interactiveShellInit = ''
|
||||
# Setup any-nix-shell
|
||||
any-nix-shell fish --info-right | source
|
||||
# Load logger function
|
||||
source ~/.config/fish/functions/cmdlogger.fish
|
||||
# Load up vi keybindings
|
||||
fish_vi_key_bindings
|
||||
'';
|
||||
functions = {
|
||||
# Setup command logging to ~/.logs
|
||||
cmdlogger = {
|
||||
onEvent = "fish_preexec";
|
||||
body = ''
|
||||
mkdir -p ~/.logs
|
||||
echo (date -u +"%Y-%m-%dT%H:%M:%SZ")" "(echo %self)" "(pwd)": "$argv >> ~/.logs/(hostname)-(date "+%Y-%m-%d").log
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
directory = {
|
||||
truncation_length = 3;
|
||||
fish_style_pwd_dir_length = 1;
|
||||
};
|
||||
git_commit = {
|
||||
commit_hash_length = 6;
|
||||
only_detached = false;
|
||||
};
|
||||
package = { symbol = ""; };
|
||||
time = {
|
||||
disabled = false;
|
||||
format = "[$time]($style)";
|
||||
time_format = "%I:%M %p";
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
theme = "zenburn";
|
||||
style = "header,rule,snip,changes";
|
||||
};
|
||||
};
|
||||
#########################
|
||||
## Readline + fzf and other quality of life stuff
|
||||
#########################
|
||||
programs.readline = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
set editing-mode vi
|
||||
set show-all-if-ambiguous on
|
||||
set editing-mode vi
|
||||
|
||||
set keymap vi-command
|
||||
# these are for vi-command mode
|
||||
"\e[A": history-search-backward
|
||||
"\e[B": history-search-forward
|
||||
j: history-search-forward
|
||||
k: history-search-backward
|
||||
set keymap vi-insert
|
||||
# these are for vi-insert mode
|
||||
"\e[A": history-search-backward
|
||||
"\e[B": history-search-forward
|
||||
'';
|
||||
};
|
||||
programs.fzf = { enable = true; };
|
||||
})
|
||||
];
|
||||
}
|
|
@ -1,105 +0,0 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
with lib; {
|
||||
config = mkMerge [
|
||||
(mkIf (config.nathan.programs.util.git.enable
|
||||
&& config.nathan.programs.util.git.gpgSign) {
|
||||
programs.git.signing = {
|
||||
key = lib.mkDefault "B7A40A5D78C08885";
|
||||
signByDefault = lib.mkDefault config.nathan.programs.util.git.gpgSign;
|
||||
};
|
||||
})
|
||||
(mkIf (config.nathan.programs.util.git.enable
|
||||
&& config.nathan.programs.util.git.sshSign) {
|
||||
home.file.allowedSigners = {
|
||||
target = ".ssh/allowed_signers";
|
||||
text = (import ../../../info/ssh-keys.nix).allowedSigners;
|
||||
};
|
||||
programs.git = {
|
||||
extraConfig = {
|
||||
commit.gpgsign = true;
|
||||
gpg.format = "ssh";
|
||||
user.signingkey = "~/.ssh/id_ed25519.pub";
|
||||
gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers";
|
||||
};
|
||||
};
|
||||
})
|
||||
(mkIf config.nathan.programs.util.git.enable {
|
||||
# Git adjacent packages
|
||||
home.packages = [
|
||||
inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}".git-branchless
|
||||
];
|
||||
#########################
|
||||
## Git configuration
|
||||
#########################
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
userName = "Nathan McCarty";
|
||||
userEmail = "nathan@mccarty.io";
|
||||
ignores = [
|
||||
"**/*~"
|
||||
"*~"
|
||||
"*_archive"
|
||||
"/auto/"
|
||||
"auto-save-list"
|
||||
".cask/"
|
||||
".dir-locals.el"
|
||||
"dist/"
|
||||
"**/.DS_Store"
|
||||
"*.elc"
|
||||
"/elpa/"
|
||||
"/.emacs.desktop"
|
||||
"/.emacs.desktop.lock"
|
||||
"/eshell/history"
|
||||
"/eshell/lastdir"
|
||||
"flycheck_*.el"
|
||||
"*_flymake.*"
|
||||
"/network-security.data"
|
||||
".org-id-locations"
|
||||
".persp"
|
||||
".projectile"
|
||||
"*.rel"
|
||||
"/server/"
|
||||
"tramp"
|
||||
"\\#*\\#"
|
||||
];
|
||||
delta.enable = true;
|
||||
lfs.enable = true;
|
||||
extraConfig = {
|
||||
init = { defaultBranch = "trunk"; };
|
||||
log = {
|
||||
showSignature = true;
|
||||
abbrevCommit = true;
|
||||
follow = true;
|
||||
decorate = false;
|
||||
};
|
||||
rerere = {
|
||||
enable = true;
|
||||
autoupdate = true;
|
||||
};
|
||||
merge = {
|
||||
ff = "only";
|
||||
conflictstyle = "diff3";
|
||||
};
|
||||
push = {
|
||||
default = "simple";
|
||||
followTags = true;
|
||||
};
|
||||
pull = { rebase = true; };
|
||||
status = { showUntrackedFiles = "all"; };
|
||||
transfer = { fsckobjects = true; };
|
||||
color = { ui = "auto"; };
|
||||
diff = {
|
||||
mnemonicPrefix = true;
|
||||
renames = true;
|
||||
wordRegex = ".";
|
||||
submodule = "log";
|
||||
};
|
||||
# credential = { helper = "cache"; };
|
||||
# Disable annoying safe directory nonsense
|
||||
safe = { directory = "*"; };
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
with lib; {
|
||||
config = mkMerge [
|
||||
(mkIf config.nathan.programs.util.ssh {
|
||||
#########################
|
||||
## SSH Configuration
|
||||
#########################
|
||||
programs.ssh = {
|
||||
# SSH configuration
|
||||
enable = true;
|
||||
# extra config to set the ciphers
|
||||
extraConfig = ''
|
||||
Ciphers aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
|
||||
'';
|
||||
# Enable compression
|
||||
compression = true;
|
||||
# enable session reuse
|
||||
controlMaster = "auto";
|
||||
controlPersist = "10m";
|
||||
# Configure known hosts
|
||||
matchBlocks = {
|
||||
"levitation" = {
|
||||
forwardAgent = true;
|
||||
user = "nathan";
|
||||
hostname = "100.95.223.6";
|
||||
};
|
||||
"perception" = {
|
||||
forwardAgent = true;
|
||||
user = "nathan";
|
||||
hostname = "100.121.150.78";
|
||||
};
|
||||
"oracles" = {
|
||||
forwardAgent = true;
|
||||
user = "nathan";
|
||||
hostname = "100.66.15.34";
|
||||
};
|
||||
"tounge" = {
|
||||
forwardAgent = true;
|
||||
user = "nathan";
|
||||
hostname = "100.75.37.98";
|
||||
};
|
||||
"shadowchild" = {
|
||||
forwardAgent = true;
|
||||
user = "nathan";
|
||||
hostname = "172.23.217.149";
|
||||
};
|
||||
"matrix.community.rs" = {
|
||||
forwardAgent = true;
|
||||
user = "nathan";
|
||||
hostname = "100.113.74.107";
|
||||
};
|
||||
"fusion" = {
|
||||
forwardAgent = true;
|
||||
user = "nathan";
|
||||
hostname = "100.99.69.14";
|
||||
};
|
||||
"de1955" = {
|
||||
user = "de1955";
|
||||
hostname = "de1955.rsync.net";
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
|
@ -12,9 +12,6 @@ with nLib; {
|
|||
../common/programs/core.nix
|
||||
../common/programs/devel.nix
|
||||
../common/programs/terminal.nix
|
||||
../common/programs/git.nix
|
||||
../common/programs/ssh.nix
|
||||
../common/programs/fish.nix
|
||||
./programs/core.nix
|
||||
./programs/emacs.nix
|
||||
./programs/devel.nix
|
||||
|
|
|
@ -12,9 +12,6 @@ with nLib; {
|
|||
../common/programs/core.nix
|
||||
../common/programs/devel.nix
|
||||
../common/programs/terminal.nix
|
||||
../common/programs/git.nix
|
||||
../common/programs/ssh.nix
|
||||
../common/programs/fish.nix
|
||||
./programs/sway.nix
|
||||
./programs/communications.nix
|
||||
./programs/devel.nix
|
||||
|
|
|
@ -3,12 +3,7 @@
|
|||
{
|
||||
nathan = {
|
||||
programs = {
|
||||
util = {
|
||||
git = {
|
||||
gpgSign = false;
|
||||
sshSign = true;
|
||||
};
|
||||
};
|
||||
util = { git = { gpgSign = false; }; };
|
||||
devel = {
|
||||
idris2 = true;
|
||||
haskell = false;
|
||||
|
@ -19,4 +14,12 @@
|
|||
};
|
||||
config = { isDesktop = true; };
|
||||
};
|
||||
# Setup git commit signing with ssh key
|
||||
programs.git = {
|
||||
extraConfig = {
|
||||
commit.gpgsign = true;
|
||||
gpg.format = "ssh";
|
||||
user.signingkey = "~/.ssh/id_ed25519.pub";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue