Merge branch 'main' into dev
This commit is contained in:
commit
db2368c4d4
2 changed files with 313 additions and 628 deletions
393
daniel.nix
393
daniel.nix
|
@ -1,8 +1,4 @@
|
|||
{pkgs, lib, ...}: let
|
||||
email = "daniel@lyte.dev";
|
||||
name = "Daniel Flanagan";
|
||||
in
|
||||
{
|
||||
{ pkgs, lib, ... }: {
|
||||
# TODO: email access?
|
||||
# accounts.email.accounts = {
|
||||
# google = {
|
||||
|
@ -10,357 +6,25 @@ in
|
|||
# };
|
||||
# };
|
||||
|
||||
home = {
|
||||
username = "daniel";
|
||||
homeDirectory = lib.mkDefault "/home/daniel/.home";
|
||||
stateVersion = "23.05";
|
||||
home.username = "daniel";
|
||||
home.homeDirectory = lib.mkDefault "/home/daniel/.home";
|
||||
home.stateVersion = "23.05";
|
||||
|
||||
packages = [
|
||||
# I use rtx for managing the following programs' versions instead of nix:
|
||||
# kubectl, aws
|
||||
home.packages = [
|
||||
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?)
|
||||
(pkgs.buildEnv { name = "my-scripts"; paths = [ ./scripts ]; })
|
||||
];
|
||||
|
||||
file = {
|
||||
".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 = {
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
package = (pkgs.pass.withExtensions (exts: [ exts.pass-otp ]));
|
||||
};
|
||||
|
||||
git = {
|
||||
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 = {
|
||||
programs.zellij = {
|
||||
# TODO: enable after port config
|
||||
enable = false;
|
||||
enableFishIntegration = true;
|
||||
|
@ -369,7 +33,7 @@ select = {
|
|||
};
|
||||
};
|
||||
|
||||
broot = {
|
||||
programs.broot = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
settings = {
|
||||
|
@ -473,16 +137,12 @@ select = {
|
|||
};
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
enable = true;
|
||||
};
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
programs.direnv.enable = true;
|
||||
programs.direnv.nix-direnv.enable = true;
|
||||
|
||||
fish = {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
# I load long scripts from files for a better editing experience
|
||||
shellInit = builtins.readFile ./fish/shellInit.fish;
|
||||
|
@ -559,7 +219,6 @@ select = {
|
|||
"........" = "d ../../../../../../..";
|
||||
"........." = "d ../../../../../../../..";
|
||||
cat = "bat";
|
||||
p = "ping";
|
||||
dc = "docker compose";
|
||||
k = "kubectl";
|
||||
kg = "kubectl get";
|
||||
|
@ -569,21 +228,25 @@ select = {
|
|||
};
|
||||
};
|
||||
|
||||
exa = {
|
||||
enable = true;
|
||||
};
|
||||
programs.exa.enable = true;
|
||||
|
||||
skim = {
|
||||
programs.skim = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
|
||||
nix-index = {
|
||||
programs.nix-index = {
|
||||
enable = 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
|
||||
enable = true;
|
||||
|
||||
|
@ -608,6 +271,10 @@ select = {
|
|||
'';
|
||||
|
||||
userChrome = ''
|
||||
#TabsToolbar {
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
#webrtcIndicator {
|
||||
display: none;
|
||||
}
|
||||
|
@ -628,7 +295,6 @@ select = {
|
|||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# wayland.windowManager.sway = {
|
||||
# enable = true;
|
||||
|
@ -636,6 +302,3 @@ select = {
|
|||
# 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?
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -68,7 +68,28 @@ in
|
|||
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
|
||||
feh
|
||||
gimp
|
||||
|
@ -105,4 +126,5 @@ in
|
|||
wofi
|
||||
zathura
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue