vi mode and direnv updates

This commit is contained in:
Noah Masur 2022-01-22 15:58:20 -05:00
parent 215e5157ab
commit d49dbebf9d
2 changed files with 35 additions and 11 deletions

View File

@ -3,6 +3,7 @@
let let
name = "Noah Masur"; name = "Noah Masur";
editor = "nvim";
font = "Victor Mono"; font = "Victor Mono";
in { in {
@ -54,11 +55,24 @@ in {
size = 14.0; size = 14.0;
normal = { family = "${font}"; }; normal = { family = "${font}"; };
}; };
key_bindings = [{ key_bindings = [
key = "L"; {
mods = "Control|Shift"; key = "L";
chars = "\\x1F"; mods = "Control|Shift";
}]; chars = "\\x1F";
}
{
key = "K";
mods = "Control";
mode = "~Vi";
action = "ToggleViMode";
}
{
key = "Return";
mode = "Vi";
action = "ToggleViMode";
}
];
colors = { colors = {
primary = { primary = {
background = "0x1d2021"; background = "0x1d2021";
@ -98,7 +112,10 @@ in {
functions = { }; functions = { };
interactiveShellInit = ""; interactiveShellInit = "";
loginShellInit = ""; loginShellInit = "";
shellAliases = { vim = "nvim"; }; shellAliases = {
vim = "nvim";
sudo = "doas";
};
shellAbbrs = { shellAbbrs = {
# Directory aliases # Directory aliases
@ -155,7 +172,7 @@ in {
v = "vim"; v = "vim";
vl = "vim -c 'normal! `0'"; vl = "vim -c 'normal! `0'";
vll = "vim -c 'Telescope oldfiles'"; vll = "vim -c 'Telescope oldfiles'";
vimrc = "vim ~/dev/personal/dotfiles/nvim.configlink/init.lua"; vimrc = "vim ${builtins.getEnv "PWD"}/../nvim.configlink/init.lua";
# Notes # Notes
qn = "quicknote"; qn = "quicknote";
@ -210,7 +227,7 @@ in {
home.sessionVariables = { home.sessionVariables = {
fish_greeting = ""; fish_greeting = "";
EDITOR = "nvim"; EDITOR = "${editor}";
NIXOS_CONFIG = builtins.getEnv "PWD"; NIXOS_CONFIG = builtins.getEnv "PWD";
DOTS = "${builtins.getEnv "PWD"}/.."; DOTS = "${builtins.getEnv "PWD"}/..";
}; };
@ -236,15 +253,14 @@ in {
"nvim/init.lua".source = ../nvim.configlink/init.lua; "nvim/init.lua".source = ../nvim.configlink/init.lua;
"fish/functions".source = ../fish.configlink/functions; "fish/functions".source = ../fish.configlink/functions;
"awesome/rc.lua".source = ./awesomerc.lua; "awesome/rc.lua".source = ./awesomerc.lua;
"direnvrc".text = "source $HOME/.nix-profile/share/nix-direnv/direnvrc";
}; };
home.file.".direnvrc".text =
"source $HOME/.nix-profile/share/nix-direnv/direnvrc";
programs.direnv = { programs.direnv = {
enable = true; enable = true;
enableFishIntegration = true; enableFishIntegration = true;
nix-direnv.enable = true; nix-direnv.enable = true;
config = { whitelist = { prefix = [ "${builtins.getEnv "PWD"}/" ]; }; };
}; };
programs.git = { programs.git = {

View File

@ -2,6 +2,14 @@
default: default:
@just --list --list-heading $'Update NixOS config:\n' @just --list --list-heading $'Update NixOS config:\n'
# Bootstrap from nothing
bootstrap:
sudo nix-channel --add https://nixos.org/channels/nixos-unstable
sudo nix-channel --add https://nixos.org/channels/nixpkgs-unstable
sudo nix-channel --update
sudo nixos-rebuild switch -I nixos-config=./configuration.nix
# Use intended software channels
channels: channels:
doas nix-channel --add https://nixos.org/channels/nixos-unstable doas nix-channel --add https://nixos.org/channels/nixos-unstable
doas nix-channel --add https://nixos.org/channels/nixpkgs-unstable doas nix-channel --add https://nixos.org/channels/nixpkgs-unstable