Group modules into feature directories
This commit is contained in:
parent
0baed7e6f6
commit
9782272a76
49 changed files with 244 additions and 83 deletions
1
nix/modules/home-manager/features/cli/bat.nix
Normal file
1
nix/modules/home-manager/features/cli/bat.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{ programs.bat.enable = true; }
|
9
nix/modules/home-manager/features/cli/bin.nix
Normal file
9
nix/modules/home-manager/features/cli/bin.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ self, ... }:
|
||||
{
|
||||
home.sessionPath = [ "$HOME/bin" ];
|
||||
|
||||
home.file."bin" = {
|
||||
source = "${self}/bin";
|
||||
recursive = true;
|
||||
};
|
||||
}
|
34
nix/modules/home-manager/features/cli/bluetuith.nix
Normal file
34
nix/modules/home-manager/features/cli/bluetuith.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.cli.bluetuith.enable = lib.mkEnableOption "Enable bluetuith";
|
||||
|
||||
config = lib.mkIf config.features.cli.bluetuith.enable {
|
||||
home.packages = with pkgs; [
|
||||
bluetuith
|
||||
];
|
||||
|
||||
xdg.configFile."bluetuith/bluetuith.conf" = {
|
||||
text = ''
|
||||
{
|
||||
adapter: ""
|
||||
adapter-states: ""
|
||||
connect-bdaddr: ""
|
||||
gsm-apn: ""
|
||||
gsm-number: ""
|
||||
keybindings: {
|
||||
NavigateDown: j
|
||||
NavigateUp: k
|
||||
}
|
||||
receive-dir: ""
|
||||
theme: {}
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
37
nix/modules/home-manager/features/cli/default.nix
Normal file
37
nix/modules/home-manager/features/cli/default.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# (import ./neovim.nix {
|
||||
# inherit
|
||||
# config
|
||||
# inputs
|
||||
# lib
|
||||
# pkgs
|
||||
# ;
|
||||
# })
|
||||
|
||||
./bat.nix
|
||||
./bin.nix
|
||||
./bluetuith.nix
|
||||
./direnv.nix
|
||||
./fzf.nix
|
||||
./git.nix
|
||||
./htop.nix
|
||||
./lsd.nix
|
||||
./neovim.nix
|
||||
./pet.nix
|
||||
./phpactor.nix
|
||||
./ripgrep.nix
|
||||
./starship.nix
|
||||
./syncthing.nix
|
||||
./tmux.nix
|
||||
./zsh.nix
|
||||
];
|
||||
}
|
13
nix/modules/home-manager/features/cli/direnv.nix
Normal file
13
nix/modules/home-manager/features/cli/direnv.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.features.cli.direnv.enable = lib.mkEnableOption "Enable direnv";
|
||||
|
||||
config = lib.mkIf config.features.cli.direnv.enable {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
6
nix/modules/home-manager/features/cli/fzf.nix
Normal file
6
nix/modules/home-manager/features/cli/fzf.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
154
nix/modules/home-manager/features/cli/git.nix
Normal file
154
nix/modules/home-manager/features/cli/git.nix
Normal file
|
@ -0,0 +1,154 @@
|
|||
{ 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 = [ pkgs.git-instafix ];
|
||||
|
||||
home.sessionVariables = {
|
||||
GIT_INSTAFIX_UPSTREAM = "origin/main";
|
||||
};
|
||||
}
|
9
nix/modules/home-manager/features/cli/htop.nix
Normal file
9
nix/modules/home-manager/features/cli/htop.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
programs.htop = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
show_cpu_temperature = true;
|
||||
};
|
||||
};
|
||||
}
|
10
nix/modules/home-manager/features/cli/lsd.nix
Normal file
10
nix/modules/home-manager/features/cli/lsd.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
programs.lsd = {
|
||||
enable = true;
|
||||
enableAliases = false;
|
||||
|
||||
settings = {
|
||||
icons.when = "never";
|
||||
};
|
||||
};
|
||||
}
|
211
nix/modules/home-manager/features/cli/neovim.nix
Normal file
211
nix/modules/home-manager/features/cli/neovim.nix
Normal file
|
@ -0,0 +1,211 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.cli.neovim.enable = lib.mkEnableOption "Enable neovim";
|
||||
|
||||
config = lib.mkIf config.features.cli.neovim.enable {
|
||||
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-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
|
||||
'';
|
||||
};
|
||||
}
|
24
nix/modules/home-manager/features/cli/pet.nix
Normal file
24
nix/modules/home-manager/features/cli/pet.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
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"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
7
nix/modules/home-manager/features/cli/phpactor.nix
Normal file
7
nix/modules/home-manager/features/cli/phpactor.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ self, ... }:
|
||||
{
|
||||
xdg.configFile.phpactor = {
|
||||
source = "${self}/phpactor";
|
||||
recursive = true;
|
||||
};
|
||||
}
|
9
nix/modules/home-manager/features/cli/ripgrep.nix
Normal file
9
nix/modules/home-manager/features/cli/ripgrep.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [ ripgrep ];
|
||||
|
||||
xdg.configFile."ripgrep/config".text = ''
|
||||
--follow
|
||||
--smart-case
|
||||
'';
|
||||
}
|
175
nix/modules/home-manager/features/cli/starship.nix
Normal file
175
nix/modules/home-manager/features/cli/starship.nix
Normal file
|
@ -0,0 +1,175 @@
|
|||
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 ";
|
||||
};
|
||||
};
|
||||
}
|
1
nix/modules/home-manager/features/cli/syncthing.nix
Normal file
1
nix/modules/home-manager/features/cli/syncthing.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{ services.syncthing.enable = true; }
|
87
nix/modules/home-manager/features/cli/tmux.nix
Normal file
87
nix/modules/home-manager/features/cli/tmux.nix
Normal file
|
@ -0,0 +1,87 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (pkgs) tmuxPlugins;
|
||||
in
|
||||
{
|
||||
options.features.cli.tmux.enable = lib.mkEnableOption "Enable tmux";
|
||||
|
||||
config = lib.mkIf config.features.cli.tmux.enable {
|
||||
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
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
125
nix/modules/home-manager/features/cli/zsh.nix
Normal file
125
nix/modules/home-manager/features/cli/zsh.nix
Normal file
|
@ -0,0 +1,125 @@
|
|||
{ 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 = "Aloxaf/fzf-tab"; }
|
||||
{ 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;
|
||||
}
|
135
nix/modules/home-manager/features/cli/zsh/abbreviations.zsh
Normal file
135
nix/modules/home-manager/features/cli/zsh/abbreviations.zsh
Normal file
|
@ -0,0 +1,135 @@
|
|||
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"
|
||||
|
||||
# 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"
|
14
nix/modules/home-manager/features/cli/zsh/aliases.nix
Normal file
14
nix/modules/home-manager/features/cli/zsh/aliases.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"$" = "";
|
||||
"-" = "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/nvim/spell/en.utf-8.add --output $REPOS/dotfiles/nvim/spell/en.utf-8.add";
|
||||
wt = "git worktree";
|
||||
}
|
47
nix/modules/home-manager/features/desktop/alacritty.nix
Normal file
47
nix/modules/home-manager/features/desktop/alacritty.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) strings;
|
||||
inherit (strings) toInt;
|
||||
|
||||
theme = import "${self}/nix/lib/theme" { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
options.features.desktop.alacritty.enable = lib.mkEnableOption "Enable Alacritty";
|
||||
|
||||
config = lib.mkIf config.features.desktop.alacritty.enable {
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
9
nix/modules/home-manager/features/desktop/copyq.nix
Normal file
9
nix/modules/home-manager/features/desktop/copyq.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.features.desktop.copyq.enable = lib.mkEnableOption "Enable copyq";
|
||||
|
||||
config = lib.mkIf config.features.desktop.copyq.enable {
|
||||
services.copyq.enable = true;
|
||||
};
|
||||
}
|
13
nix/modules/home-manager/features/desktop/default.nix
Normal file
13
nix/modules/home-manager/features/desktop/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
imports = [
|
||||
./alacritty.nix
|
||||
./copyq.nix
|
||||
./discord.nix
|
||||
./espanso.nix
|
||||
./flameshot.nix
|
||||
./gtk.nix
|
||||
./media
|
||||
./slack.nix
|
||||
./zoom.nix
|
||||
];
|
||||
}
|
14
nix/modules/home-manager/features/desktop/discord.nix
Normal file
14
nix/modules/home-manager/features/desktop/discord.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.desktop.discord.enable = lib.mkEnableOption "Enable Discord";
|
||||
|
||||
config = lib.mkIf config.features.desktop.discord.enable {
|
||||
home.packages = with pkgs; [ discord ];
|
||||
};
|
||||
}
|
22
nix/modules/home-manager/features/desktop/espanso.nix
Normal file
22
nix/modules/home-manager/features/desktop/espanso.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.features.desktop.espanso.enable = lib.mkEnableOption "Enable espanso";
|
||||
|
||||
config = lib.mkIf config.features.desktop.espanso.enable {
|
||||
services.espanso = {
|
||||
enable = true;
|
||||
|
||||
configs = {
|
||||
default = {
|
||||
show_notifications = false;
|
||||
toggle_key = "LEFT_ALT";
|
||||
};
|
||||
};
|
||||
|
||||
matches = {
|
||||
base = import ./espanso/matches/base.nix { inherit lib; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
{ lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) removePrefix;
|
||||
|
||||
websiteUrl = "https://www.oliverdavies.uk";
|
||||
dailyUrl = "https://dailydrupaler.com";
|
||||
githubUrl = "https://github.com/opdavies";
|
||||
podcastUrl = "https://beyondblockspodcast.com";
|
||||
in
|
||||
{
|
||||
matches = [
|
||||
{
|
||||
trigger = ":email";
|
||||
replace = "oliver@${removePrefix "https://www." websiteUrl}";
|
||||
}
|
||||
{
|
||||
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 = ":dot";
|
||||
replace = "${githubUrl}/dotfiles";
|
||||
}
|
||||
{
|
||||
trigger = ":gh";
|
||||
replace = "${githubUrl}";
|
||||
}
|
||||
{
|
||||
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";
|
||||
}
|
||||
];
|
||||
}
|
26
nix/modules/home-manager/features/desktop/flameshot.nix
Normal file
26
nix/modules/home-manager/features/desktop/flameshot.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.desktop.flameshot.enable = lib.mkEnableOption "Enable flameshot";
|
||||
|
||||
config = lib.mkIf config.features.desktop.flameshot.enable {
|
||||
services.flameshot = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
General = {
|
||||
disabledTrayIcon = false;
|
||||
saveAfterCopy = true;
|
||||
savePath = "/home/${username}/Pictures/Screenshots";
|
||||
showHelp = false;
|
||||
uiColor = "#60a5fa";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
26
nix/modules/home-manager/features/desktop/gtk.nix
Normal file
26
nix/modules/home-manager/features/desktop/gtk.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.desktop.gtk.enable = lib.mkEnableOption "Enable gtk";
|
||||
|
||||
config = lib.mkIf config.features.desktop.gtk.enable {
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
theme = {
|
||||
name = "Arc-Dark";
|
||||
package = pkgs.arc-theme;
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
name = "Arc";
|
||||
package = pkgs.arc-icon-theme;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
./gimp.nix
|
||||
./kdenlive.nix
|
||||
./mpv.nix
|
||||
./pocket-casts.nix
|
||||
];
|
||||
}
|
14
nix/modules/home-manager/features/desktop/media/gimp.nix
Normal file
14
nix/modules/home-manager/features/desktop/media/gimp.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.desktop.media.gimp.enable = lib.mkEnableOption "Enable gimp";
|
||||
|
||||
config = lib.mkIf config.features.desktop.media.gimp.enable {
|
||||
home.packages = with pkgs; [ gimp ];
|
||||
};
|
||||
}
|
14
nix/modules/home-manager/features/desktop/media/kdenlive.nix
Normal file
14
nix/modules/home-manager/features/desktop/media/kdenlive.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.desktop.media.kdenlive.enable = lib.mkEnableOption "Enable kdenlive";
|
||||
|
||||
config = lib.mkIf config.features.desktop.media.kdenlive.enable {
|
||||
home.packages = with pkgs; [ kdenlive ];
|
||||
};
|
||||
}
|
17
nix/modules/home-manager/features/desktop/media/mpv.nix
Normal file
17
nix/modules/home-manager/features/desktop/media/mpv.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.features.desktop.media.mpv.enable = lib.mkEnableOption "Enable mpv media player";
|
||||
|
||||
config = lib.mkIf config.features.desktop.media.mpv.enable {
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
|
||||
# https://github.com/mpv-player/mpv/blob/master/etc/input.conf
|
||||
bindings = {
|
||||
"DOWN" = "add volume -5";
|
||||
"UP" = "add volume 5";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.desktop.media.pocket-casts.enable = lib.mkEnableOption "Enable Pocket Casts";
|
||||
|
||||
config = lib.mkIf config.features.desktop.media.pocket-casts.enable {
|
||||
home.packages = with pkgs; [ pocket-casts ];
|
||||
};
|
||||
}
|
14
nix/modules/home-manager/features/desktop/slack.nix
Normal file
14
nix/modules/home-manager/features/desktop/slack.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.desktop.slack.enable = lib.mkEnableOption "Enable Slack";
|
||||
|
||||
config = lib.mkIf config.features.desktop.slack.enable {
|
||||
home.packages = with pkgs; [ slack ];
|
||||
};
|
||||
}
|
14
nix/modules/home-manager/features/desktop/zoom.nix
Normal file
14
nix/modules/home-manager/features/desktop/zoom.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.desktop.zoom.enable = lib.mkEnableOption "Enable zoom";
|
||||
|
||||
config = lib.mkIf config.features.desktop.zoom.enable {
|
||||
home.packages = with pkgs; [ nixpkgs-2405.zoom-us ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue