Merge branch 'main' into dev

This commit is contained in:
Daniel Flanagan 2023-09-14 16:02:20 -05:00
commit db2368c4d4
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
2 changed files with 313 additions and 628 deletions

View file

@ -1,8 +1,4 @@
{pkgs, lib, ...}: let { pkgs, lib, ... }: {
email = "daniel@lyte.dev";
name = "Daniel Flanagan";
in
{
# TODO: email access? # TODO: email access?
# accounts.email.accounts = { # accounts.email.accounts = {
# google = { # google = {
@ -10,357 +6,25 @@ in
# }; # };
# }; # };
home = { home.username = "daniel";
username = "daniel"; home.homeDirectory = lib.mkDefault "/home/daniel/.home";
homeDirectory = lib.mkDefault "/home/daniel/.home"; home.stateVersion = "23.05";
stateVersion = "23.05";
packages = [ home.packages = [
# I use rtx for managing the following programs' versions instead of nix:
# kubectl, aws
pkgs.rtx pkgs.rtx
# I use this for managing the following programs' versions instead of nix:
# kubectl, aws
# TODO: os-specific scripts? macOS versus Linux (arch or nixos? do I need to distinguish at that point?) # TODO: os-specific scripts? macOS versus Linux (arch or nixos? do I need to distinguish at that point?)
(pkgs.buildEnv { name = "my-scripts"; paths = [ ./scripts ]; }) (pkgs.buildEnv { name = "my-scripts"; paths = [ ./scripts ]; })
]; ];
file = { programs.password-store = {
".iex.exs" = {
enable = true;
text = ''
Application.put_env(:elixir, :ansi_enabled, true)
# PROTIP: to break, `#iex:break`
IEx.configure(
colors: [enabled: true],
inspect: [
pretty: true,
printable_limit: :infinity,
limit: :infinity
],
default_prompt:
[
# ANSI CHA, move cursor to column 1
"\e[G",
:magenta,
# IEx prompt variable
"%prefix",
"#",
# IEx prompt variable
"%counter",
# plain string
">",
:reset
]
|> IO.ANSI.format()
|> IO.chardata_to_string()
)
'';
};
};
pointerCursor = {
name = "Catppuccin-Mocha-Sapphire-Cursors";
package = pkgs.catppuccin-cursors.mochaSapphire;
size = 64; # TODO: this doesn't seem to work -- at least in Sway
};
};
programs = {
password-store = {
enable = true; enable = true;
package = (pkgs.pass.withExtensions (exts: [ exts.pass-otp ])); package = (pkgs.pass.withExtensions (exts: [ exts.pass-otp ]));
}; };
git = { programs.zellij = {
enable = true;
userEmail = email;
userName = name;
delta = {
enable = true;
options = { };
};
lfs = {
enable = true;
};
signing = {
signByDefault = true;
key = "daniel@lyte.dev";
};
extraConfig = {
push = {
autoSetupRemote = true;
};
branch = {
autoSeupMerge = true;
};
sendemail = {
smtpserver = "smtp.mailgun.org";
smtpuser = "daniel@lyte.dev";
smtrpencryption = "tls";
smtpserverport = 587;
};
url = {
"git@git.hq.bill.com:" = {
insteadOf = "https://git.hq.bill.com";
};
};
aliases = {
a = "add";
A = "add - A";
ac = "commit - a";
b = "rev-parse - -symbolic-full-name HEAD";
c = "commit";
cm = "commit - m";
cnv = "commit - -no-verify";
co = "checkoutd";
d = "diff";
ds = "diff - -staged";
dt = "difftool ";
f = "fetch";
l = "log - -graph - -abbrev-commit - -decorate - -oneline - -all";
plainlog = " log - -pretty=format:'%h %ad%x09%an%x09%s' --date=short --decorate";
ls = "ls-files";
mm = "merge master";
p = "push";
pf = "push --force-with-lease";
pl = "pull";
rim = "rebase -i master";
s = "status";
sur = "submodule update --remote";
};
};
};
gitui = {
enable = true;
};
helix = {
enable = true;
package = pkgs.helix;
languages = {
language-server = {
lexical = {
command = "lexical";
args = [ "start" ];
};
};
language = [
{
name = "elixir";
language-servers = [ "elixir-ls" "lexical" ];
auto-format = true;
}
{
name = "html";
auto-format = false;
}
{
name = "nix";
auto-format = true;
formatter = {
command = "nixpkgs-fmt";
args = [ ];
};
}
{
name = "fish";
auto-format = true;
indent = {
tab-width = 2;
unit = "\t";
};
}
# TODO: deno:
#[[language]]
#name = "javascript"
#scope = "source.js"
#injection-regex = "^(js|javascript)$"
#file-types = [ "js", "jsx", "mjs" ]
#shebangs = [ "deno", "node" ]
#roots = [ "deno.jsonc", "deno.json", "package.json", "tsconfig.json" ]
#comment-token = "//"
# config = { enable = true, lint = true, unstable = true }
# language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "javascript" }
#indent = {
#tab-width = 2, unit = "\t" }
#auto-format = true
# [[language]]
# name = "jsx"
# scope = "source.jsx"
# injection-regex = "jsx"
# file-types = ["jsx"]
# shebangs = ["deno", "node"]
# roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
# comment-token = "//"
# config = { enable = true, lint = true, unstable = true }
# language-server = { command = "deno", args = ["lsp"], language-id = "javascriptreact" }
# indent = { tab-width = 2, unit = " " }
# grammar = "javascript"
# auto-format = true
# [[language]]
# name = "typescript"
# scope = "source.ts"
# injection-regex = "^(ts|typescript)$"
# file-types = ["ts"]
# shebangs = ["deno", "node"]
# roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
# config = { enable = true, lint = true, unstable = true }
# language-server = { command = "deno", args = ["lsp"], language-id = "typescript" }
# indent = { tab-width = 2, unit = " " }
# auto-format = true
# [[language]]
# name = "tsx"
# scope = "source.tsx"
# injection-regex = "^(tsx)$" # |typescript
# file-types = ["tsx"]
# shebangs = ["deno", "node"]
# roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
# config = { enable = true, lint = true, unstable = true }
# language-server = { command = "deno", args = ["lsp"], language-id = "typescriptreact" }
# indent = { tab-width = 2, unit = " " }
# auto-format = true
# [[language]]
# name = "jsonc"
# scope = "source.jsonc"
# injection-regex = "^(jsonc)$"
# file-types = ["jsonc"]
# shebangs = ["deno", "node"]
# roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
# config = { enable = true, lint = true, unstable = true }
# language-server = { command = "deno", args = ["lsp"], language-id = "jsonc" }
# indent = { tab-width = 2, unit = " " }
# auto-format = true
];
};
settings = {
theme = "custom";
editor = {
soft-wrap.enable = true;
auto-pairs = false;
auto-save = false;
completion-trigger-len = 1;
color-modes = false;
bufferline = "multiple";
scrolloff = 8;
rulers = [80 120];
cursorline = true;
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
file-picker.hidden = false;
indent-guides = {
render = true;
character = "";
};
lsp = {
display-messages = true;
display-inlay-hints = true;
};
statusline = {
left = ["mode" "spinner" "selections" "primary-selection-length" "position" "position-percentage" "diagnostics" "workspace-diagnostics"];
center = ["file-name"];
right = [ "version-control" "total-line-numbers" "file-encoding"];
};
};
keys = {
insert = {
j = { k = "normal_mode"; j = "normal_mode"; K = "normal_mode"; J = "normal_mode"; };
};
normal = {
D = "kill_to_line_end";
"^" = "goto_line_start";
"C-k" = "jump_view_up";
"C-j" = "jump_view_down";
"C-h" = "jump_view_left";
"C-l" = "jump_view_right";
"C-q" = ":quit-all!";
"L" = "repeat_last_motion";
space = {
q = ":reflow 80";
Q = ":reflow 120";
v = ":run-shell-command fish -c 'env > /tmp/env'";
C = ":bc!";
h = ":toggle lsp.display-inlay-hints";
# O = ["select_textobject_inner WORD", ":pipe-to xargs xdg-open"];
};
};
select = {
space = { q = ":reflow 80"; Q = ":reflow 120"; };
"L" = "repeat_last_motion";
};
};
};
themes = {
custom = {
"inherits" = "catppuccin_mocha";
"ui.background" = "default";
# "ui.cursorline.primary" = { bg = "default" }
# "ui.cursorline.secondary" = { bg = "default" }
# "ui.cursorcolumn.primary" = { bg = "default" }
# "ui.cursorcolumn.secondary" = { bg = "default" }
# "ui.virtual.ruler" = { bg = "default" }
"ui.bufferline.active" = {
fg = "sapphire";
bg = "base";
underline = {
color = "sapphire";
style = "";
};
};
};
};
};
bat = {
enable = true;
config = {
theme = "Catppuccin-mocha";
};
themes = {
"Catppuccin-mocha" = builtins.readFile (pkgs.fetchFromGitHub
{
owner = "catppuccin";
repo = "bat";
rev = "477622171ec0529505b0ca3cada68fc9433648c6";
sha256 = "6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
} + "/Catppuccin-mocha.tmTheme");
};
};
zellij = {
# TODO: enable after port config # TODO: enable after port config
enable = false; enable = false;
enableFishIntegration = true; enableFishIntegration = true;
@ -369,7 +33,7 @@ select = {
}; };
}; };
broot = { programs.broot = {
enable = true; enable = true;
enableFishIntegration = true; enableFishIntegration = true;
settings = { settings = {
@ -473,16 +137,12 @@ select = {
}; };
}; };
home-manager = { programs.home-manager.enable = true;
enable = true;
};
direnv = { programs.direnv.enable = true;
enable = true; programs.direnv.nix-direnv.enable = true;
nix-direnv.enable = true;
};
fish = { programs.fish = {
enable = true; enable = true;
# I load long scripts from files for a better editing experience # I load long scripts from files for a better editing experience
shellInit = builtins.readFile ./fish/shellInit.fish; shellInit = builtins.readFile ./fish/shellInit.fish;
@ -559,7 +219,6 @@ select = {
"........" = "d ../../../../../../.."; "........" = "d ../../../../../../..";
"........." = "d ../../../../../../../.."; "........." = "d ../../../../../../../..";
cat = "bat"; cat = "bat";
p = "ping";
dc = "docker compose"; dc = "docker compose";
k = "kubectl"; k = "kubectl";
kg = "kubectl get"; kg = "kubectl get";
@ -569,21 +228,25 @@ select = {
}; };
}; };
exa = { programs.exa.enable = true;
enable = true;
};
skim = { programs.skim = {
enable = true; enable = true;
enableFishIntegration = true; enableFishIntegration = true;
}; };
nix-index = { programs.nix-index = {
enable = true; enable = true;
enableFishIntegration = true; enableFishIntegration = true;
}; };
firefox = { home.pointerCursor = {
name = "Catppuccin-Mocha-Sapphire-Cursors";
package = pkgs.catppuccin-cursors.mochaSapphire;
size = 64; # TODO: this doesn't seem to work -- at least in Sway
};
programs.firefox = {
# TODO: enable dark theme by default # TODO: enable dark theme by default
enable = true; enable = true;
@ -608,6 +271,10 @@ select = {
''; '';
userChrome = '' userChrome = ''
#TabsToolbar {
visibility: collapse;
}
#webrtcIndicator { #webrtcIndicator {
display: none; display: none;
} }
@ -628,7 +295,6 @@ select = {
}; };
}; };
};
# wayland.windowManager.sway = { # wayland.windowManager.sway = {
# enable = true; # enable = true;
@ -636,6 +302,3 @@ select = {
# maybe we can share somehow so things for nix-y systems and non-nix-y systems alike # maybe we can share somehow so things for nix-y systems and non-nix-y systems alike
# am I going to _have_ non-nix systems anymore? # am I going to _have_ non-nix systems anymore?
} }

View file

@ -68,7 +68,28 @@ in
enable = true; enable = true;
}; };
environment.systemPackages = with pkgs; [ gtk = {
enable = true;
theme = {
name = "Catppuccin-Mocha-Compact-Sapphire-dark";
package = pkgs.catppuccin-gtk.override {
accents = [ "sapphire" ];
size = "compact";
tweaks = [ "rimless" "black" ];
variant = "mocha";
};
};
};
environment = {
variables = {
GTK_THEME = "hx";
VISUAL = "hx";
PAGER = "less";
MANPAGER = "less";
};
systemPackages = with pkgs; [
brightnessctl brightnessctl
feh feh
gimp gimp
@ -105,4 +126,5 @@ in
wofi wofi
zathura zathura
]; ];
};
} }