Move Nix files into a nix directory

Move everything from `config` to the root level.
This commit is contained in:
Oliver Davies 2024-11-20 21:37:15 +00:00
parent 9f47df62b5
commit 69a397e624
124 changed files with 14 additions and 14 deletions

View file

@ -1,42 +0,0 @@
{
lib,
pkgs,
self,
...
}:
let
inherit (lib) strings;
inherit (strings) toInt;
theme = import "${self}/lib/theme" { inherit pkgs; };
in
{
programs.alacritty = {
enable = true;
settings = {
env = {
TERM = "screen-256color";
};
window.padding = {
x = 15;
y = 15;
};
font = {
size = toInt "${theme.fonts.monospace.size}";
bold.style = "Regular";
normal.family = "${theme.fonts.monospace.name}";
offset.y = 6;
glyph_offset.y = 3;
};
terminal.shell = {
program = "zsh";
};
};
};
}

View file

@ -1 +0,0 @@
{ programs.bat.enable = true; }

View file

@ -1,9 +0,0 @@
{ self, ... }:
{
home.sessionPath = [ "$HOME/.local/bin" ];
home.file.".local/bin" = {
source = "${self}/bin";
recursive = true;
};
}

View file

@ -1,19 +0,0 @@
{
xdg.configFile."bluetuith/bluetuith.conf" = {
text = ''
{
adapter: ""
adapter-states: ""
connect-bdaddr: ""
gsm-apn: ""
gsm-number: ""
keybindings: {
NavigateDown: j
NavigateUp: k
}
receive-dir: ""
theme: {}
}
'';
};
}

View file

@ -1 +0,0 @@
{ services.copyq.enable = true; }

View file

@ -1,7 +0,0 @@
{
programs.direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
};
}

View file

@ -1,16 +0,0 @@
{
services.espanso = {
enable = true;
configs = {
default = {
show_notifications = false;
toggle_key = "LEFT_ALT";
};
};
matches = {
base = import ./espanso/matches/base.nix;
};
};
}

View file

@ -1,81 +0,0 @@
let
websiteUrl = "https://www.oliverdavies.uk";
dailyUrl = "https://dailydrupaler.com";
podcastUrl = "https://beyondblockspodcast.com";
in
{
matches = [
{
trigger = ":archive";
replace = "${websiteUrl}/archive";
}
{
trigger = ":atdc";
replace = "${websiteUrl}/atdc";
}
{
trigger = ":call";
replace = "${websiteUrl}/call";
}
{
trigger = ":coaching";
replace = "${websiteUrl}/team-coaching";
}
{
trigger = ":daily";
replace = "${dailyUrl}";
}
{
trigger = ":dotfiles";
replace = "https://github.com/opdavies/dotfiles.nix";
}
{
trigger = ":dc";
replace = "Drupal Commerce";
}
{
trigger = ":dr";
replace = "Drupal";
}
{
trigger = ":gt";
replace = "Great, thanks!";
}
{
trigger = ":guest";
replace = "If you'd like to be a guest on ${podcastUrl} and talk about ..., I'd love to have you on the show.";
}
{
trigger = ":lh";
replace = "http://localhost";
}
{
trigger = ":podcast";
replace = "${podcastUrl}";
}
{
trigger = ":pricing";
replace = "${websiteUrl}/pricing";
}
{
trigger = ":record";
replace = "https://savvycal.com/opdavies/beyond-blocks";
}
{
trigger = ":talks";
replace = "${websiteUrl}/presentations";
}
{
trigger = ":website";
replace = "${websiteUrl}";
}
{
trigger = ":zet";
replace = "https://zet.oliverdavies.uk";
}
{
trigger = ":zoom";
replace = "https://savvycal.com/opdavies/zoom";
}
];
}

View file

@ -1,16 +0,0 @@
{ username, ... }:
{
services.flameshot = {
enable = true;
settings = {
General = {
disabledTrayIcon = false;
saveAfterCopy = true;
savePath = "/home/${username}/Pictures/Screenshots";
showHelp = false;
uiColor = "#60a5fa";
};
};
};
}

View file

@ -1,6 +0,0 @@
{
programs.fzf = {
enable = true;
enableZshIntegration = true;
};
}

View file

@ -1,154 +0,0 @@
{ pkgs, ... }:
{
home.file.".gitmessage".text = ''
# Description
#
# - Why is this change necessary?
# - How does it address the issue?
# - What side effects does this change have?
#
# For breaking changes, uncomment the following line and describe the change:
#
# BREAKING CHANGE:
#
#
# Add any issue IDs or commit SHAs that this commit references:
#
# Refs:
'';
programs = {
git = {
enable = true;
userName = "Oliver Davies";
userEmail = "oliver@oliverdavies.dev";
includes = [
{
condition = "gitdir:~/Code/tfw";
contents.user.email = "oliver.davies@tfw.wales";
}
];
aliases = {
aa = "add --all";
assume = "update-index --assume-unchanged";
assumed = "!git ls-files -v | grep '^[hsmrck?]' | cut -c 3-";
b = "branch";
blame = "blame -w -C -C -C";
browse = "!gh repo view --web";
ca = "commit --amend --verbose";
car = "commit --amend --no-edit";
cl = "!hub clone";
co = "checkout";
compare = "!hub compare";
current-branch = "rev-parse --abbrev-ref HEAD";
dc = "diff --color --word-diff --cached";
df = "diff --color --word-diff";
dup = "!git checkout develop && git fetch origin && echo && git sl develop..origin/develop && echo && git pull --quiet && git checkout -";
fixup = "commit --fixup";
issues = "!gh issue list --web";
mup = "!git master-to-main-wrapper checkout %BRANCH% && git fetch origin && echo && git sl %BRANCH%..origin/%BRANCH% && echo && git pull --quiet && git checkout -";
no-ff = "merge --no-ff";
pl = "pull";
prune = "remote prune origin";
ps = "push";
pulls = "!gh pr list --web";
rbc = "rebase --continue";
rdup = "!git dup && git rebase develop";
remotes = "remote -v";
repush = "!git pull --rebase && git push";
ri = "rebase --interactive";
rid = "!git rebase -i $(git merge-base develop HEAD)";
rim = "!git rebase -i $(git master-to-main-wrapper merge-base %BRANCH% HEAD)";
rip = "!git rebase -i $(git merge-base production HEAD)";
ris = "!git rebase -i $(git merge-base staging HEAD)";
riu = "!git rebase -i $(git rev-parse --abbrev-ref --symbolic-full-name @{u})";
rmup = "!git mup && git master-to-main-wrapper rebase %BRANCH%";
sl = "log --oneline --decorate -20";
sla = "log --oneline --decorate --graph --all -20";
slap = "log --oneline --decorate --graph --all";
slp = "log --oneline --decorate";
stash = "stash --included-untracked";
unassume = "update-index --no-assume-unchanged";
uncommit = "reset --soft HEAD^";
unstage = "reset";
update = "!git fetch --all --jobs=4 --prune --progress && git rebase --autostash --stat";
upstream = "rev-parse --abbrev-ref --symbolic-full-name @{u}";
ureset = "!git reset --hard $(git upstream)";
worktrees = "worktree list";
};
ignores = [
"/.ddev/providers/"
"/.direnv/"
"/.ignored/"
"/.issue-id"
"/.phpactor.json"
"/notes"
"/todo"
];
extraConfig = {
branch = {
autosetupmerge = true;
autosetuprebase = "always";
sort = "-committerdate";
};
checkout.defaultRemote = "origin";
color.ui = true;
column.ui = "auto";
commit.template = "~/.gitmessage";
core = {
editor = "nvim";
excludesFile = "~/.config/git/ignore";
pager = "delta";
};
delta.line-numbers = true;
diff.tool = "vimdiff";
fetch.prune = true;
gpg.format = "ssh";
grep.lineNumber = true;
help.autocorrect = "1";
init.defaultBranch = "main";
maintenance = {
auto = false;
strategy = "incremental";
};
merge.ff = "only";
push = {
autoSetupRemote = true;
default = "upstream";
};
pull = {
ff = "only";
rebase = true;
};
rebase = {
autosquash = true;
autostash = true;
};
user.signingkey = "~/.ssh/id_rsa.pub";
};
};
};
home.packages = with pkgs.unstable; [ git-instafix ];
home.sessionVariables = {
GIT_INSTAFIX_UPSTREAM = "origin/main";
};
}

View file

@ -1,11 +0,0 @@
{ pkgs, ... }:
{
gtk = {
enable = true;
theme.package = pkgs.arc-theme;
theme.name = "Arc-Dark";
iconTheme.package = pkgs.arc-icon-theme;
iconTheme.name = "Arc";
};
}

View file

@ -1,9 +0,0 @@
{
programs.htop = {
enable = true;
settings = {
show_cpu_temperature = true;
};
};
}

View file

@ -1,10 +0,0 @@
{
programs.lsd = {
enable = true;
enableAliases = false;
settings = {
icons.when = "never";
};
};
}

View file

@ -1,11 +0,0 @@
{
programs.mpv = {
enable = true;
# https://github.com/mpv-player/mpv/blob/master/etc/input.conf
bindings = {
"DOWN" = "add volume -5";
"UP" = "add volume 5";
};
};
}

View file

@ -1,202 +0,0 @@
{ inputs, pkgs, ... }:
{
programs.neovim = {
enable = true;
plugins = with pkgs.vimPlugins; [
comment-nvim
dial-nvim
fidget-nvim
gitsigns-nvim
harpoon
impatient-nvim
mini-nvim
neodev-nvim
nvim-spectre
nvim-web-devicons
oil-nvim
refactoring-nvim
sort-nvim
treesj
undotree
vim-abolish
vim-eunuch
vim-highlightedyank
vim-just
vim-nix
vim-obsession
vim-pasta
vim-repeat
vim-sleuth
vim-sort-motion
vim-terraform
vim-textobj-user
vim-unimpaired
conf-vim
edit-alternate-vim
nvim-tmux-navigation
standard-vim
vim-autoread
vim-textobj-indent
vim-textobj-xmlattr
vim-zoom
# Testing
vim-test
# Git
committia-vim
diffview-nvim
vim-fugitive
# Debugging
nvim-dap
nvim-dap-ui
nvim-dap-virtual-text
# Treesitter
(pkgs.vimPlugins.nvim-treesitter.withPlugins (
plugins: with plugins; [
bash
comment
css
csv
dockerfile
gitattributes
gitignore
go
html
javascript
json
kdl
lua
luadoc
make
markdown
markdown_inline
nix
php
phpdoc
query
rst
scss
sql
terraform
twig
typescript
vim
vimdoc
vue
xml
yaml
]
))
nvim-treesitter-context
nvim-treesitter-textobjects
# LSP, linting and formatting
conform-nvim
lsp-status-nvim
nvim-lint
nvim-lspconfig
# Completion
cmp-buffer
cmp-calc
cmp-cmdline
cmp-nvim-lsp
cmp-path
cmp-treesitter
cmp_luasnip
lspkind-nvim
nvim-cmp
# Snippets
friendly-snippets
luasnip
# Telescope
plenary-nvim
popup-nvim
telescope-frecency-nvim
telescope-fzf-native-nvim
telescope-live-grep-args-nvim
telescope-nvim
telescope-ui-select-nvim
# Databases
vim-dadbod
vim-dadbod-ui
vim-dadbod-completion
# Themes
catppuccin-nvim
# Configuration.
inputs.self.packages.${pkgs.system}.opdavies-nvim
];
extraLuaConfig = ''
if vim.loader then
vim.loader.enable()
end
require "opdavies"
'';
extraPackages = with pkgs; [
# Languages
nodePackages.typescript
nodejs-slim
php81
# Language servers
gopls
lua-language-server
lua54Packages.luacheck
marksman
nixd
nodePackages."@tailwindcss/language-server"
nodePackages.bash-language-server
nodePackages.dockerfile-language-server-nodejs
nodePackages.intelephense
nodePackages.typescript-language-server
nodePackages.vls
nodePackages.vscode-langservers-extracted
nodePackages.vue-language-server
nodePackages.yaml-language-server
phpactor
terraform-ls
# Formatters
black
eslint_d
nixfmt-rfc-style
nodePackages.prettier
stylua
yamlfmt
# Tools
hadolint
html-tidy
nodePackages.jsonlint
nodePackages.markdownlint-cli
php82Packages.php-codesniffer
php82Packages.phpstan
proselint
shellcheck
yamllint
];
};
home.file.".markdownlint.yaml".text = ''
default: true
line-length: false
no-duplicate-heading:
siblings_only: true
'';
}

View file

@ -1,24 +0,0 @@
{
programs.pet = {
enable = true;
snippets = [
{
command = "nix flake lock --update-input <input-name>";
description = "Display a log of a Git repository, showing each commit on its own line.";
output = "";
tag = [ "git" ];
}
{
command = "nix flake lock --update-input opdavies-nvim";
description = "Update a single input within a Nix flake.";
output = "";
tag = [
"nix"
"nix-flake"
];
}
];
};
}

View file

@ -1,7 +0,0 @@
{ self, ... }:
{
xdg.configFile.phpactor = {
source = "${self}/config/phpactor";
recursive = true;
};
}

View file

@ -1,9 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [ ripgrep ];
xdg.configFile."ripgrep/config".text = ''
--follow
--smart-case
'';
}

View file

@ -1,175 +0,0 @@
let
inherit (builtins) concatStringsSep;
in
{
programs.starship = {
enable = true;
enableZshIntegration = true;
settings = {
add_newline = false;
# https://starship.rs/config/#prompt
format = concatStringsSep "" [
"\n"
"$username"
"$hostname"
"$directory"
"$vcsh"
"$git_branch"
"$git_status"
"$git_metrics"
"$docker_context"
"$nodejs"
"$php"
"$terraform"
"$nix_shell"
"$direnv"
"\${custom.mob}"
"$memory_usage"
"$cmd_duration"
"$lua"
"$status"
"$character"
];
cmd_duration.disabled = true;
direnv.disabled = false;
directory.format = "[$path]($style) ";
git_status.disabled = true;
nix_shell.disabled = true;
nodejs.disabled = true;
php.disabled = true;
username.disabled = true;
custom = {
mob = {
command = "echo $MOB_TIMER_ROOM";
format = "[($output)]($style) ";
when = "[[ -v MOB_TIMER_ROOM ]]";
};
};
# https://starship.rs/presets/plain-text
aws.symbol = "aws ";
azure.symbol = "az ";
bun.symbol = "bun ";
c.symbol = "C ";
character = {
success_symbol = "[>](bold green)";
error_symbol = "[x](bold red)";
vimcmd_symbol = "[<](bold green)";
};
cobol.symbol = "cobol ";
conda.symbol = "conda ";
crystal.symbol = "cr ";
cmake.symbol = "cmake ";
daml.symbol = "daml ";
dart.symbol = "dart ";
deno.symbol = "deno ";
dotnet.symbol = ".NET ";
directory.read_only = " ro";
docker_context.symbol = "docker ";
elixir.symbol = "exs ";
elm.symbol = "elm ";
fennel.symbol = "fnl ";
fossil_branch.symbol = "fossil ";
gcloud.symbol = "gcp ";
git_branch.symbol = "git ";
git_commit.tag_symbol = " tag ";
git_status = {
ahead = ">";
behind = "<";
diverged = "<>";
renamed = "r";
deleted = "x";
};
gleam.symbol = "gleam ";
golang.symbol = "go ";
gradle.symbol = "gradle ";
guix_shell.symbol = "guix ";
hg_branch.symbol = "hg ";
java.symbol = "java ";
julia.symbol = "jl ";
kotlin.symbol = "kt ";
lua.symbol = "lua ";
nodejs.symbol = "nodejs ";
memory_usage.symbol = "memory ";
meson.symbol = "meson ";
nats.symbol = "nats ";
nim.symbol = "nim ";
nix_shell.symbol = "nix ";
ocaml.symbol = "ml ";
opa.symbol = "opa ";
os.symbols = {
AIX = "aix ";
Alpaquita = "alq ";
AlmaLinux = "alma ";
Alpine = "alp ";
Amazon = "amz ";
Android = "andr ";
Arch = "rch ";
Artix = "atx ";
CentOS = "cent ";
Debian = "deb ";
DragonFly = "dfbsd ";
Emscripten = "emsc ";
EndeavourOS = "ndev ";
Fedora = "fed ";
FreeBSD = "fbsd ";
Garuda = "garu ";
Gentoo = "gent ";
HardenedBSD = "hbsd ";
Illumos = "lum ";
Kali = "kali ";
Linux = "lnx ";
Mabox = "mbox ";
Macos = "mac ";
Manjaro = "mjo ";
Mariner = "mrn ";
MidnightBSD = "mid ";
Mint = "mint ";
NetBSD = "nbsd ";
NixOS = "nix ";
OpenBSD = "obsd ";
OpenCloudOS = "ocos ";
openEuler = "oeul ";
openSUSE = "osuse ";
OracleLinux = "orac ";
Pop = "pop ";
Raspbian = "rasp ";
Redhat = "rhl ";
RedHatEnterprise = "rhel ";
RockyLinux = "rky ";
Redox = "redox ";
Solus = "sol ";
SUSE = "suse ";
Ubuntu = "ubnt ";
Ultramarine = "ultm ";
Unknown = "unk ";
Void = "void ";
Windows = "win ";
};
package.symbol = "pkg ";
perl.symbol = "pl ";
php.symbol = "php ";
pijul_channel.symbol = "pijul ";
pulumi.symbol = "pulumi ";
purescript.symbol = "purs ";
python.symbol = "py ";
quarto.symbol = "quarto ";
raku.symbol = "raku ";
ruby.symbol = "rb ";
rust.symbol = "rs ";
scala.symbol = "scala ";
spack.symbol = "spack ";
solidity.symbol = "solidity ";
status.symbol = "[x](bold red) ";
sudo.symbol = "sudo ";
swift.symbol = "swift ";
typst.symbol = "typst ";
terraform.symbol = "terraform ";
zig.symbol = "zig ";
};
};
}

View file

@ -1 +0,0 @@
{ services.syncthing.enable = true; }

View file

@ -1,77 +0,0 @@
{ pkgs, ... }:
let
inherit (pkgs) tmuxPlugins;
in
{
programs.tmux = {
enable = true;
terminal = "tmux-256color";
extraConfig = ''
set-option -g status-keys "vi"
set-option -sa terminal-features "''${TERM}:RGB"
bind -n S-Left resize-pane -L 2
bind -n S-Right resize-pane -R 2
bind -n S-Down resize-pane -D 1
bind -n S-Up resize-pane -U 1
bind -n C-Left resize-pane -L 10
bind -n C-Right resize-pane -R 10
bind -n C-Down resize-pane -D 5
bind -n C-Up resize-pane -U 5
# Status line customisation
set-option -g status-left ""
set-option -g status-right " #{session_name}"
set-option -g status-right-length 100
set-option -g status-style "fg=#7C7D83 bg=default"
set-option -g window-status-activity-style none
set-option -g window-status-current-style "fg=#E9E9EA"
bind c new-window -c "#{pane_current_path}"
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
# Break a pane into a new window.
bind-key b break-pane -d
bind-key J command-prompt -p "join pane from: " "join-pane -h -s '%%'"
bind-key C-j choose-tree
set-window-option -g mode-keys vi
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
bind C-j split-window -v "tmux list-sessions | sed -E 's/:.*$//' | grep -v \"^$(tmux display-message -p '#S')\$\" | fzf --reverse | xargs tmux switch-client -t"
bind-key K run-shell 'tmux switch-client -n \; kill-session -t "$(tmux display-message -p "#S")" || tmux kill-session'
# Allow clearing screen with ctrl-l by using <prefix> C-l
bind C-l send-keys "C-l"
bind C-k send-keys "C-k"
# Enable mouse support.
setw -g mouse on
# Remove delay when switching Vim modes.
set -sg escape-time 0
set-option -g pane-active-border-style "fg=#1f2335"
set-option -g pane-border-style "fg=#1f2335"
bind-key -r f run-shell "tmux new-window t"
if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local'
'';
plugins = [
tmuxPlugins.vim-tmux-navigator
tmuxPlugins.yank
];
};
}

View file

@ -1,11 +0,0 @@
{ self, ... }:
{
programs.zellij = {
enable = true;
};
xdg.configFile."zellij" = {
source = "${self}/config/zellij";
recursive = true;
};
}

View file

@ -1,124 +0,0 @@
{ pkgs, ... }:
{
programs.zsh = {
dotDir = ".config/zsh";
enable = true;
enableCompletion = true;
cdpath = [ "~/Code" ];
shellAliases = (import ./zsh/aliases.nix);
localVariables = {
ABBR_SET_EXPANSION_CURSOR = 1;
};
initExtra = ''
# suffix
alias -s gz="tar -tf"
alias -s {html,HTML}="background firefox"
alias -s {jpg,JPG,png,PNG}="background okular"
alias -s {pdf,PDF}="background okular"
alias -s {zip,ZIP}="unzip -l"
background() {
for ((i=2;i<=$#;i++)); do
''${@[1]} ''${@[$i]} &> /dev/null &
done
}
git() {
if [[ "''${1}" == "root" ]]; then
shift
local ROOT="$(${pkgs.git}/bin/git rev-parse --show-toplevel 2> /dev/null || echo -n .)"
if [[ $# == 0 ]]; then
cd "''${ROOT}"
else
(cd "''${ROOT}" && eval "''${@}")
fi
else
${pkgs.git}/bin/git "''${@}"
fi
}
ttyper() {
command ${pkgs.ttyper}/bin/ttyper --language english1000 --words 50 "''${@}"
}
yt-dlp() {
command yt-dlp --paths ~/Videos "$@"
}
# Case insensitive autocompletion.
zstyle ":completion:*" matcher-list "" "m:{a-zA-Z}={A-Za-z}" "r:|=*" "l:|=* r:|=*"
autoload -Uz compinit && compinit
bindkey -s ^f "t\n"
bindkey -s ^v "nvim\n"
clear-ls-all() {
clear
ls -al
zle reset-prompt
}
zle -N clear-ls-all
clear-git-status() {
clear
git status
zle reset-prompt
}
zle -N clear-git-status
clear-tree-2() {
clear
tree -L 2
zle reset-prompt
}
zle -N clear-tree-2
clear-tree-3() {
clear
tree -L 3
zle reset-prompt
}
zle -N clear-tree-3
bindkey '^G' clear-git-status
# bindkey '^H' clear-tree-3
# bindkey '^J' clear-tree-2
# bindkey '^K' clear-ls-all
setopt auto_cd
setopt auto_pushd
setopt pushd_ignore_dups
setopt pushdminus
'';
zplug = {
enable = true;
plugins = [
{
name = "plugin/git";
tags = [ "from:oh-my-zsh" ];
}
{
name = "plugin/vi-mode";
tags = [ "from:oh-my-zsh" ];
}
{ name = "olets/zsh-abbr"; }
{ name = "zsh-users/zsh-completions"; }
{ name = "zsh-users/zsh-syntax-highlighting"; }
];
};
};
home.file.".config/zsh-abbr/user-abbreviations".text = builtins.readFile ./zsh/abbreviations.zsh;
}

View file

@ -1,153 +0,0 @@
abbr c="clear"
abbr cs="create-script"
abbr daily="run create-daily next"
abbr rst="rst2pdf"
abbr st="source .tmux"
abbr sz="source ~/.config/zsh/.zshrc"
abbr ti="timer"
abbr uagr="update-all-git-repos"
abbr v="nvim"
abbr yt="yt-dlp"
abbr evl="export-video-list"
abbr vv="cat ~/Documents/videos.json"
abbr g="git"
abbr ga="git add"
abbr gan="git add -N"
abbr gap="git add -p"
abbr gb="git branch"
abbr gbl="git blame"
abbr gc="git commit"
abbr gca="git commit --amend"
abbr gcan="git commit --amend --no-edit"
abbr gcl="git clone"
abbr gcm="git commit -m"
abbr gco="git checkout"
abbr gcob="git checkout -b"
abbr gd="git diff"
abbr gds="git diff --staged"
abbr gf="git fetch"
abbr gfa="git fetch --all"
abbr gl="git log"
abbr glo="git log --oneline"
abbr gls="git log --stat"
abbr gm="git merge"
abbr gmf="git merge --ff"
abbr gmnf="git merge --no-ff"
abbr gpl="git pull"
abbr gplr="git pull --rebase"
abbr gps="git push"
abbr gpsa="git push acquia"
abbr gpsam="git push acquia main"
abbr gpsap="git push acquia HEAD:production"
abbr gpso="git push origin"
abbr gpsom="git push origin main"
abbr gr="git rebase"
abbr gra="git rebase --abort"
abbr grc="git rebase --continue"
abbr gri="git rebase -i"
abbr gs="git status"
abbr gsh="git show"
abbr gst="git stash"
abbr gstp="git stash pop"
# tmux
abbr ta="tmux attach"
abbr tl="tmux list-sessions"
abbr tk="tmux kill-session"
# zellij
abbr czs="create-zellij-session"
abbr z="zellij"
abbr za="zellij attach"
abbr zd="zellij delete-session"
abbr zda="zellij delete-all-sessions"
abbr ze="zellij edit"
abbr zei="zellij edit --in-place"
abbr zk="zellij kill-session"
abbr zka="zellij kill-all-sessions | sort"
abbr zl="zellij list-sessions | grep -v EXITED"
abbr zla="zellij list-sessions"
abbr znt="zellij action new-tab"
abbr zr="zellij run --"
abbr zri="zellij run --in-place --"
abbr zrf="zellij run --floating --"
abbr multitask="zellij action start-or-reload-plugin file:$HOME/zellij-plugins/multitask.wasm --configuration "shell=$SHELL,cwd=`pwd`""
# Docker and Docker Compose.
abbr dk="docker"
abbr dkp="docker ps"
abbr dkpa="docker ps -a"
abbr dkpaq="docker ps -a -q"
abbr dkb="docker build -t"
abbr dks="docker start"
abbr dkt="docker stop"
abbr dkrm="docker rm"
abbr dkri="docker rmi"
abbr dke="docker exec -ti"
abbr dkl="docker logs -f"
abbr dki="docker images"
abbr dkpu="docker pull"
abbr dkph="docker push"
abbr dkbnc="docker build --no-cache -t"
abbr dkr="docker run --rm"
abbr dkrti="docker run --rm -ti"
abbr dkc="docker compose"
abbr dkcb="docker compose build"
abbr dkcu="docker compose up"
abbr dkclean="docker ps -q -a -f status=exited | xargs -r docker rm && docker images -q -f dangling=true | xargs -r docker rmi"
# Nix and direnv.
abbr dea="direnv allow"
abbr dee="direnv edit"
abbr nxf="nix flake"
abbr nxfc="nix flake check"
abbr nxfs="nix flake show"
abbr nxfu="nix flake update"
abbr nxr="nix run nixpkgs#%"
abbr nxs="nix shell nixpkgs#%"
# run scripts.
abbr r="run"
abbr rc="run composer"
abbr rcda="run composer dump-autoload"
abbr rci="run composer install"
abbr rcr="run composer require"
abbr rcu="run composer update"
abbr rd="run drush"
abbr rdce="run drush config:export -y"
abbr rdci="run drush config:import -y"
abbr rdcr="run drush cache:rebuild"
abbr rdscr="run drush php:script"
abbr rduli="run drush uli"
abbr rdup="run drush updatedb -y"
abbr rpub="run publish"
abbr rt="run test"
abbr -g A1="| awk '{print $1}'"
abbr -g C="| xclip -sel clip"
abbr -g Fj="| jq ."
abbr -g Fy="| yq ."
abbr -g G="| grep"
abbr -g GH="| grep HTTP"
abbr -g Gi="| grep -i"
abbr -g H2="| head -n 20"
abbr -g H="| head"
abbr -g L="| less"
abbr -g V="| nvim -"
abbr -g X="| xargs -I1"
abbr today="task +TODAY"
abbr tomorrow="task +TOMORROW"
abbr overdue="task +OVERDUE"
abbr nah="git reset --hard; git clean -fd"
abbr wip="git commit -m wip"
abbr dv="devenv"
abbr dvi="devenv info"
abbr dvp="devenv processes"
abbr dvs="devenv shell"
abbr dvt="devenv tasks"
abbr dvu="devenv up"

View file

@ -1,14 +0,0 @@
{
"$" = "";
"-" = "cd -";
".." = "cd ..";
"..." = "cd ../..";
"...." = "cd ../../..";
"....." = "cd ../../../..";
cat = "bat";
s = "secrets";
secrets = ''doppler --project "$(whoami)" run'';
tag = "tag-release";
vss = "LC_ALL=C sort --unique $REPOS/dotfiles.nix/config/neovim/spell/en.utf-8.add --output $REPOS/dotfiles.nix/config/neovim/spell/en.utf-8.add";
wt = "git worktree";
}

View file

@ -1,43 +0,0 @@
{
services.autorandr = {
enable = true;
profiles =
let
fingerprint = "00ffffffffffff000dae081400000000251d0104a51f117802ee95a3544c99260f505400000001010101010101010101010101010101363680a0703820403020350035ad1000001a000000fe004e3134304843472d4551310a20000000fe00434d4e0a202020202020202020000000fe004e3134304843472d4551310a200084";
name = "eDP-1";
in
{
default = {
fingerprint = {
"${name}" = fingerprint;
};
config = {
"${name}" = {
enable = true;
mode = "1920x1080";
};
};
};
desktop = {
config = {
"${name}".enable = false;
"HDMI-1" = {
enable = true;
mode = "2560x1440";
primary = true;
rate = "59.95";
};
};
fingerprint = {
"${name}" = fingerprint;
"HDMI-1" = "00ffffffffffff004c2d1710424e58432b1f0103803f24782ac8b5ad50449e250f5054bfef80714f810081c081809500a9c0b300010108e80030f2705a80b0588a0078682100001e000000fd00324b1e873c000a202020202020000000fc004c5532385235350a2020202020000000ff0048345a524130303132380a20200183020335f04961120313041f10605f2309070783010000e305c0006b030c002000b83c2000200167d85dc401788003e20f81e3060501023a801871382d40582c450078682100001e023a80d072382d40102c458078682100001e04740030f2705a80b0588a0078682100001e565e00a0a0a029503020350078682100001a000049";
};
};
};
};
}

View file

@ -1,6 +0,0 @@
{
imports = [
./docker.nix
./kanata.nix
];
}

View file

@ -1,9 +0,0 @@
{
imports = [
../.
./fonts.nix
./gitea.nix
./jellyfin.nix
./immich.nix
];
}

View file

@ -1,36 +0,0 @@
{ pkgs, ... }:
let
theme = import ../../../lib/theme { inherit pkgs; };
in
{
environment.systemPackages = with pkgs; [
terminus_font
terminus_font_ttf
];
fonts = {
fontconfig = {
enable = true;
defaultFonts = {
monospace = [ theme.fonts.monospace.name ];
};
};
packages =
with pkgs;
[
(nerdfonts.override {
fonts = [
"AnonymousPro"
"FiraCode"
"GeistMono"
"IntelOneMono"
"Iosevka"
"JetBrainsMono"
];
})
]
++ [ theme.fonts.monospace.package ];
};
}

View file

@ -1,17 +0,0 @@
{ pkgs, ... }:
{
services.gitea = {
enable = true;
settings = {
server = {
HTTP_PORT = 2222;
};
service = {
DISABLE_REGISTRATION = true;
};
};
};
}

View file

@ -1,7 +0,0 @@
{ pkgs, ... }:
{
services.immich.enable = true;
environment.systemPackages = [ pkgs.immich-cli ];
}

View file

@ -1,6 +0,0 @@
{
services.jellyfin = {
enable = true;
openFirewall = true;
};
}

View file

@ -1,10 +0,0 @@
{
virtualisation.docker = {
enable = true;
autoPrune = {
enable = true;
dates = "weekly";
};
};
}

View file

@ -1,142 +0,0 @@
{
inputs,
pkgs,
self,
username,
...
}:
let
theme = import "${self}/lib/theme" { inherit pkgs; };
modifier = "Mod4";
in
{
services = {
displayManager.defaultSession = "none+i3";
xserver = {
displayManager.lightdm.enable = true;
windowManager.i3 = {
enable = true;
extraPackages = with pkgs; [
i3status
i3lock
i3blocks
];
};
};
};
environment.systemPackages = [ pkgs.nitrogen ];
home-manager.users.${username} = {
xsession.windowManager.i3 = {
enable = true;
config = {
assigns = {
"7" = [ { class = "vlc"; } ];
"8" = [ { class = "0ad"; } ];
"9" = [
{ class = "Slack"; }
{ class = "discord"; }
];
};
defaultWorkspace = "workspace number 1";
focus.followMouse = false;
modifier = modifier;
keybindings = inputs.nixpkgs.lib.mkOptionDefault {
"${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -show drun";
"${modifier}+Shift+b" = "exec ${pkgs.firefox}/bin/firefox";
"${modifier}+Shift+f" = "exec ${pkgs.xfce.thunar}/bin/thunar";
# Change focus.
"${modifier}+h" = "focus left";
"${modifier}+j" = "focus down";
"${modifier}+k" = "focus up";
"${modifier}+l" = "focus right";
# Move focused window.
"${modifier}+Shift+h" = "move left";
"${modifier}+Shift+j" = "move down";
"${modifier}+Shift+k" = "move up";
"${modifier}+Shift+l" = "move right";
"${modifier}+Shift+s" = "exec ${pkgs.flameshot}/bin/flameshot gui";
"${modifier}+Shift+p" = "exec ${pkgs.autorandr}/bin/autorandr --change";
"${modifier}+Shift+y" = "exec ${pkgs.copyq}/bin/copyq toggle";
"XF86AudioRaiseVolume" = "exec pamixer -ui 2 && pamixer --get-volume";
"XF86AudioLowerVolume" = "exec pamixer -ud 2 && pamixer --get-volume";
"XF86AudioMute" = ''exec pamixer --toggle-mute && ( [ "$(pamixer --get-mute)" = "true" ] && echo 0'';
"XF86MonBrightnessDown" = "exec brightnessctl set 5%- | sed -En 's/.*(([0-9]+)%).*/1/p'";
"XF86MonBrightnessUp" = "exec brightnessctl set +5% | sed -En 's/.*(([0-9]+)%).*/1/p'";
};
terminal = "alacritty";
window = {
border = 0;
hideEdgeBorders = "none";
};
};
extraConfig = ''
set $laptop eDP-1
bindswitch --reload --locked lid:on output $laptop disable
bindswitch --reload --locked lid:off output $laptop enable
exec_always --no-startup-id ${pkgs.nitrogen}/bin/nitrogen --restore &
exec_always --no-startup-id caffeine
default_border none
default_floating_border none
smart_borders on
smart_gaps on
for_window [class="zoom"] floating enable
# xprop | grep -i class
'';
config = {
bars = [
{
position = "bottom";
statusCommand = "${pkgs.i3status}/bin/i3status";
trayOutput = "none";
}
];
fonts.names = [ "${theme.fonts.monospace.name}" ];
gaps = {
smartBorders = "on";
smartGaps = true;
};
};
};
programs.i3status = {
enable = true;
general.colors = false;
modules = {
"battery all".settings.last_full_capacity = true;
"tztime local".settings.format = "%d-%m-%Y %H:%M:%S";
cpu_temperature.enable = false;
ipv6.enable = false;
load.enable = false;
};
};
};
}

View file

@ -1,42 +0,0 @@
{
services.kanata = {
enable = true;
keyboards = {
internalKeyboard = {
devices = [
"/dev/input/event18" # lemp11
];
extraDefCfg = "process-unmapped-keys yes";
config = ''
(defsrc
caps a s d f j k l ;
)
(defvar
tap-time 150
hold-time 200
)
(defalias
escctrl (tap-hold 100 100 esc lctl)
a (tap-hold $tap-time $hold-time a lmet)
s (tap-hold $tap-time $hold-time s lalt)
d (tap-hold $tap-time $hold-time d lsft)
f (tap-hold $tap-time $hold-time f lctl)
j (tap-hold $tap-time $hold-time j rctl)
k (tap-hold $tap-time $hold-time k rsft)
l (tap-hold $tap-time $hold-time l ralt)
; (tap-hold $tap-time $hold-time ; rmet)
)
(deflayer base
@escctrl @a @s @d @f @j @k @l @;
)
'';
};
};
};
}