completely remove secondary home-manager section

This commit is contained in:
Noah Masur 2022-04-28 21:40:21 -04:00
parent cb66ca402e
commit 2a225debe5
9 changed files with 291 additions and 277 deletions

View File

@ -37,6 +37,7 @@
inherit user fullName font; inherit user fullName font;
}; };
modules = [ modules = [
home-manager.nixosModules.home-manager
./nixos/configuration.nix ./nixos/configuration.nix
./nixos/hardware-configuration.nix ./nixos/hardware-configuration.nix
./nixos/home.nix ./nixos/home.nix
@ -45,27 +46,12 @@
./modules/gaming ./modules/gaming
./modules/services/keybase.nix ./modules/services/keybase.nix
./modules/applications/firefox.nix ./modules/applications/firefox.nix
home-manager.nixosModules.home-manager ./modules/applications/alacritty.nix
{ ./modules/shell/fish.nix
home-manager = { ./modules/shell/utilities.nix
useGlobalPkgs = true; ./modules/shell/git.nix
useUserPackages = true; ./modules/shell/github.nix
extraSpecialArgs = { ./modules/editor/neovim.nix
gui = true;
inherit user fullName font;
};
users.${user} = {
imports = [
./modules/applications/alacritty.nix
./modules/shell/fish.nix
./modules/shell/utilities.nix
./modules/shell/git.nix
./modules/shell/github.nix
./modules/editor/neovim.nix
];
};
};
}
]; ];
}; };
}; };

View File

@ -1,71 +1,74 @@
{ pkgs, config, font, ... }: { { pkgs, user, font, ... }: {
programs.alacritty = {
enable = true; home-manager.users.${user} = {
settings = { programs.alacritty = {
window = { enable = true;
dimensions = { settings = {
columns = 85; window = {
lines = 30; dimensions = {
columns = 85;
lines = 30;
};
padding = {
x = 20;
y = 20;
};
}; };
padding = { scrolling.history = 10000;
x = 20; font = {
y = 20; size = 14.0;
normal = { family = font.name; };
}; };
key_bindings = [
{
key = "L";
mods = "Control|Shift";
chars = "\\x1F";
}
{
key = "K";
mods = "Control";
mode = "~Vi";
action = "ToggleViMode";
}
{
key = "Return";
mode = "Vi";
action = "ToggleViMode";
}
];
colors = {
primary = {
background = "0x1d2021";
foreground = "0xd5c4a1";
};
cursor = {
text = "0x1d2021";
cursor = "0xd5c4a1";
};
normal = {
black = "0x1d2021";
red = "0xfb4934";
green = "0xb8bb26";
yellow = "0xfabd2f";
blue = "0x83a598";
magenta = "0xd3869b";
cyan = "0x8ec07c";
white = "0xd5c4a1";
};
bright = {
black = "0x665c54";
red = "0xfe8019";
green = "0x3c3836";
yellow = "0x504945";
blue = "0xbdae93";
magenta = "0xebdbb2";
cyan = "0xd65d0e";
white = "0xfbf1c7";
};
};
draw_bold_text_with_bright_colors = false;
}; };
scrolling.history = 10000;
font = {
size = 14.0;
normal = { family = font.name; };
};
key_bindings = [
{
key = "L";
mods = "Control|Shift";
chars = "\\x1F";
}
{
key = "K";
mods = "Control";
mode = "~Vi";
action = "ToggleViMode";
}
{
key = "Return";
mode = "Vi";
action = "ToggleViMode";
}
];
colors = {
primary = {
background = "0x1d2021";
foreground = "0xd5c4a1";
};
cursor = {
text = "0x1d2021";
cursor = "0xd5c4a1";
};
normal = {
black = "0x1d2021";
red = "0xfb4934";
green = "0xb8bb26";
yellow = "0xfabd2f";
blue = "0x83a598";
magenta = "0xd3869b";
cyan = "0x8ec07c";
white = "0xd5c4a1";
};
bright = {
black = "0x665c54";
red = "0xfe8019";
green = "0x3c3836";
yellow = "0x504945";
blue = "0xbdae93";
magenta = "0xebdbb2";
cyan = "0xd65d0e";
white = "0xfbf1c7";
};
};
draw_bold_text_with_bright_colors = false;
}; };
}; };
} }

View File

@ -1,13 +1,19 @@
{ config, pkgs, ... }: { { pkgs, user, ... }: {
home.packages = with pkgs; [ home-manager.users.${user} = {
neovim
gcc # for tree-sitter
];
xdg.configFile = { "nvim/init.lua".source = ../../nvim.configlink/init.lua; }; home.packages = with pkgs; [
neovim
gcc # for tree-sitter
];
programs.git.extraConfig.core.editor = "nvim"; xdg.configFile = {
home.sessionVariables = { EDITOR = "nvim"; }; "nvim/init.lua".source = ../../nvim.configlink/init.lua;
};
programs.git.extraConfig.core.editor = "nvim";
home.sessionVariables = { EDITOR = "nvim"; };
};
} }

View File

@ -3,7 +3,16 @@
services.keybase.enable = true; services.keybase.enable = true;
services.kbfs.enable = true; services.kbfs.enable = true;
home-manager.users.${user}.home.packages = home-manager.users.${user} = {
[ (lib.mkIf gui pkgs.keybase-gui) ]; home.packages = [ (lib.mkIf gui pkgs.keybase-gui) ];
home.file = let
ignorePatterns = ''
keybase/
kbfs/'';
in {
".rgignore".text = ignorePatterns;
".fdignore".text = ignorePatterns;
};
};
} }

View File

@ -1,115 +1,117 @@
{ pkgs, ... }: { { pkgs, user, ... }: {
programs.fish = { home-manager.users.${user} = {
enable = true; programs.fish = {
functions = { }; enable = true;
interactiveShellInit = ""; functions = { };
loginShellInit = ""; interactiveShellInit = "";
shellAliases = { loginShellInit = "";
vim = "nvim"; shellAliases = {
sudo = "doas"; vim = "nvim";
sudo = "doas";
};
shellAbbrs = {
# Directory aliases
l = "ls";
lh = "ls -lh";
ll = "ls -alhF";
la = "ls -a";
lf = "ls -lh | fzf";
c = "cd";
"-" = "cd -";
mkd = "mkdir -pv";
# System
s = "sudo";
sc = "systemctl";
scs = "systemctl status";
reb = "nixos-rebuild switch -I nixos-config=${
builtins.toString ../../nixos/.
}/configuration.nix";
# Tmux
ta = "tmux attach-session";
tan = "tmux attach-session -t noah";
tnn = "tmux new-session -s noah";
# Vim
v = "vim";
vl = "vim -c 'normal! `0'";
vll = "vim -c 'Telescope oldfiles'";
vimrc = "vim ${builtins.toString ../../.}/nvim.configlink/init.lua";
# Notes
qn = "quicknote";
sn = "syncnotes";
to = "today";
work = "vim $NOTES_PATH/work.md";
# CLI Tools
cat = "bat"; # Swap cat with bat
h = "http -Fh --all"; # Curl site for headers
m = "make"; # For makefiles
# Fun CLI Tools
weather = "curl wttr.in/$WEATHER_CITY";
moon = "curl wttr.in/Moon";
# Cheat Sheets
ssl =
"openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr";
fingerprint = "ssh-keyscan myhost.com | ssh-keygen -lf -";
publickey = "ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub";
forloop = "for i in (seq 1 100)";
# Docker
dc = "$DOTS/bin/docker_cleanup";
dr = "docker run --rm -it";
db = "docker build . -t";
# Terraform
te = "terraform";
# Kubernetes
k = "kubectl";
pods = "kubectl get pods -A";
nodes = "kubectl get nodes";
deploys = "kubectl get deployments -A";
dash = "kube-dashboard";
ks = "k9s";
# Python
py = "python";
po = "poetry";
pr = "poetry run python";
# Rust
ca = "cargo";
};
shellAliases = { };
shellInit = "";
}; };
shellAbbrs = {
# Directory aliases home.sessionVariables = { fish_greeting = ""; };
l = "ls";
lh = "ls -lh";
ll = "ls -alhF";
la = "ls -a";
lf = "ls -lh | fzf";
c = "cd";
"-" = "cd -";
mkd = "mkdir -pv";
# System
s = "sudo";
sc = "systemctl";
scs = "systemctl status";
reb = "nixos-rebuild switch -I nixos-config=${
builtins.toString ../../nixos/.
}/configuration.nix";
# Tmux
ta = "tmux attach-session";
tan = "tmux attach-session -t noah";
tnn = "tmux new-session -s noah";
# Vim
v = "vim";
vl = "vim -c 'normal! `0'";
vll = "vim -c 'Telescope oldfiles'";
vimrc = "vim ${builtins.toString ../../.}/nvim.configlink/init.lua";
# Notes
qn = "quicknote";
sn = "syncnotes";
to = "today";
work = "vim $NOTES_PATH/work.md";
# CLI Tools
cat = "bat"; # Swap cat with bat
h = "http -Fh --all"; # Curl site for headers
m = "make"; # For makefiles
# Fun CLI Tools
weather = "curl wttr.in/$WEATHER_CITY";
moon = "curl wttr.in/Moon";
# Cheat Sheets
ssl =
"openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr";
fingerprint = "ssh-keyscan myhost.com | ssh-keygen -lf -";
publickey = "ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub";
forloop = "for i in (seq 1 100)";
# Docker
dc = "$DOTS/bin/docker_cleanup";
dr = "docker run --rm -it";
db = "docker build . -t";
# Terraform
te = "terraform";
# Kubernetes
k = "kubectl";
pods = "kubectl get pods -A";
nodes = "kubectl get nodes";
deploys = "kubectl get deployments -A";
dash = "kube-dashboard";
ks = "k9s";
# Python
py = "python";
po = "poetry";
pr = "poetry run python";
# Rust
ca = "cargo";
programs.starship = {
enable = true;
enableFishIntegration = true;
}; };
shellAliases = { };
shellInit = "";
};
home.sessionVariables = { fish_greeting = ""; }; programs.fzf = {
enable = true;
enableFishIntegration = true;
};
programs.starship = { programs.zoxide = {
enable = true; enable = true;
enableFishIntegration = true; enableFishIntegration = true;
}; };
programs.fzf = { xdg.configFile = {
enable = true; "starship.toml".source = ../../starship/starship.toml.configlink;
enableFishIntegration = true; "fish/functions".source = ../../fish.configlink/functions;
}; };
programs.zoxide = {
enable = true;
enableFishIntegration = true;
};
xdg.configFile = {
"starship.toml".source = ../../starship/starship.toml.configlink;
"fish/functions".source = ../../fish.configlink/functions;
}; };
} }

View File

@ -1,43 +1,45 @@
{ config, pkgs, fullName, ... }: { { pkgs, user, fullName, ... }: {
programs.git = { home-manager.users.${user} = {
enable = true; programs.git = {
userName = fullName; enable = true;
userEmail = "7386960+nmasur@users.noreply.github.com"; userName = fullName;
extraConfig = { userEmail = "7386960+nmasur@users.noreply.github.com";
pager = { branch = "false"; }; extraConfig = {
safe = { directory = builtins.toString ../../.; }; pager = { branch = "false"; };
safe = { directory = builtins.toString ../../.; };
};
};
programs.fish.shellAbbrs = {
g = "git";
gs = "git status";
gd = "git diff";
gds = "git diff --staged";
gdp = "git diff HEAD^";
ga = "git add";
gaa = "git add -A";
gac = "git commit -am";
gc = "git commit -m";
gca = "git commit --amend --no-edit";
gcae = "git commit --amend";
gu = "git pull";
gp = "git push";
gpp = "git_set_upstream";
gl = "git log --graph --decorate --oneline -20";
gll = "git log --graph --decorate --oneline";
gco = "git checkout";
gcom = "git switch master";
gcob = "git switch -c";
gb = "git branch";
gbd = "git branch -d";
gbD = "git branch -D";
gr = "git reset";
grh = "git reset --hard";
gm = "git merge";
gcp = "git cherry-pick";
cdg = "cd (git rev-parse --show-toplevel)";
}; };
}; };
programs.fish.shellAbbrs = {
g = "git";
gs = "git status";
gd = "git diff";
gds = "git diff --staged";
gdp = "git diff HEAD^";
ga = "git add";
gaa = "git add -A";
gac = "git commit -am";
gc = "git commit -m";
gca = "git commit --amend --no-edit";
gcae = "git commit --amend";
gu = "git pull";
gp = "git push";
gpp = "git_set_upstream";
gl = "git log --graph --decorate --oneline -20";
gll = "git log --graph --decorate --oneline";
gco = "git checkout";
gcom = "git switch master";
gcob = "git switch -c";
gb = "git branch";
gbd = "git branch -d";
gbD = "git branch -D";
gr = "git reset";
grh = "git reset --hard";
gm = "git merge";
gcp = "git cherry-pick";
cdg = "cd (git rev-parse --show-toplevel)";
};
} }

View File

@ -1,19 +1,22 @@
{ config, pkgs, ... }: { { pkgs, user, ... }: {
imports = [ ./git.nix ]; imports = [ ./git.nix ];
programs.gh = { home-manager.users.${user} = {
enable = true; programs.gh = {
enableGitCredentialHelper = true; enable = true;
settings.git_protocol = "https"; enableGitCredentialHelper = true;
}; settings.git_protocol = "https";
};
programs.fish.shellAbbrs = { programs.fish.shellAbbrs = {
ghr = "gh repo view -w"; ghr = "gh repo view -w";
gha = "gh run list | head -1 | awk '{ print $(NF-2) }' | xargs gh run view"; gha =
grw = "gh run watch"; "gh run list | head -1 | awk '{ print $(NF-2) }' | xargs gh run view";
grf = "gh run view --log-failed"; grw = "gh run watch";
grl = "gh run view --log"; grf = "gh run view --log-failed";
grl = "gh run view --log";
};
}; };
} }

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { pkgs, user, ... }:
let let
@ -9,35 +9,36 @@ let
!*.tfvars !*.tfvars
.terraform/ .terraform/
.target/ .target/
/Library/ /Library/'';
keybase/
kbfs/
'';
in { in {
home.packages = with pkgs; [ home-manager.users.${user}.home = {
unzip
rsync packages = with pkgs; [
fzf unzip
ripgrep rsync
bat fzf
fd ripgrep
exa bat
sd fd
zoxide exa
jq sd
tealdeer zoxide
gh jq
direnv tealdeer
tree gh
htop direnv
glow tree
]; htop
glow
];
file = {
".rgignore".text = ignorePatterns;
".fdignore".text = ignorePatterns;
};
home.file = {
".rgignore".text = ignorePatterns;
".fdignore".text = ignorePatterns;
}; };
} }

View File

@ -5,6 +5,8 @@ let
notes_path = "$HOME/dev/personal/notes"; notes_path = "$HOME/dev/personal/notes";
in { in {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${user} = { home-manager.users.${user} = {
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;