Clean up some duplicated definitions

This commit is contained in:
Christopher Mühl 2025-07-31 10:00:24 +02:00
parent 786af32daf
commit 79aff87f26
No known key found for this signature in database
GPG key ID: E919B0F59E14FD47
10 changed files with 16 additions and 72 deletions

View file

@ -1,6 +1,5 @@
{lib, ...}: {lib, ...}:
with builtins; let with builtins;
# Determines whether the given file name ends with ".nix" map
endsWithNix = fileName: substring (lib.trivial.max 0 (stringLength fileName - 4)) 4 fileName == ".nix"; (name: ./config + "/${name}")
in (filter (lib.strings.hasSuffix ".nix") (attrNames (readDir ./config)))
map (name: ./config + "/${name}") (filter endsWithNix (attrNames (readDir ./config)))

View file

@ -1,24 +1,18 @@
{pkgs, ...}: { {pkgs, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
# Dev tools
direnv
silver-searcher # ag search tool
zx # Tool for writing better scripts zx # Tool for writing better scripts
trurl # Parsing and manipulating URLs via CLI trurl # Parsing and manipulating URLs via CLI
onefetch # Git information tool onefetch # Git information tool
cloc # Line-of-code calc for entire project
tokei # Like cloc tokei # Like cloc
delta # Diffing tool
zeal # Offline documentation browser zeal # Offline documentation browser
just # Just a command runner just # Just a command runner
claude-code
# Build tools # Build tools
cargo cargo
glibc glibc
gcc gcc
claude-code
php82 php82
php82Packages.composer php82Packages.composer
@ -27,24 +21,8 @@
nodejs_20.pkgs.pnpm nodejs_20.pkgs.pnpm
]; ];
# `nix-shell` replacement for project development
# Most useful with `pkgs.direnv`
services.lorri.enable = true;
programs.direnv.enable = true; programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true; programs.direnv.nix-direnv.enable = true;
programs.go.enable = true; programs.go.enable = true;
programs.neovim = {
enable = false;
# defaultEditor = true;
viAlias = true;
vimAlias = true;
# extraConfig = lib.fileContents ../fixtures/neovim/init.vim;
#plugins = with pkgs.vimPlugins; [
# nvim-treesitter.withAllGrammars
#];
};
} }

View file

@ -1,5 +1,6 @@
{pkgs, ...}: { {pkgs, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
font-manager
nerd-fonts.monaspace # Patched fonts nerd-fonts.monaspace # Patched fonts
google-fonts # Google fonts google-fonts # Google fonts
monaspace monaspace

View file

@ -4,7 +4,8 @@
git git
gh gh
gitAndTools.git-absorb gitAndTools.git-absorb
delta delta # Diffing tool
onefetch # neofetch for git repos
pkgs._elements.git-delete-stale pkgs._elements.git-delete-stale
]; ];

View file

@ -1,7 +1,6 @@
{ {
pkgs, pkgs,
config, config,
lib,
... ...
} @ all: { } @ all: {
imports = imports =

View file

@ -1,19 +0,0 @@
{
pkgs,
lib,
...
}: {
home.packages = with pkgs; [neovim ripgrep];
xdg.configFile.nvim.source = ./config;
# Install the packer.nvim plugin manager
home.file = {
".local/state/nix/profile/share/nvim/site/pack/packer/start/packer.nvim".source = pkgs.fetchFromGitHub {
owner = "wbthomason";
repo = "packer.nvim";
rev = "ea0cc3c";
sha256 = "fLM+ptjMd1YNoJQEI0vvr4sjaay7dfpaGhvWUy91d1M=";
};
};
}

View file

@ -20,6 +20,7 @@ in {
BROWSER = "firefox"; BROWSER = "firefox";
TERMINAL = "kitty"; TERMINAL = "kitty";
EDITOR = "hx"; EDITOR = "hx";
TERM = "xterm-color";
# QT_QPA_PLATFORMTHEME = "qt5ct"; # QT_QPA_PLATFORMTHEME = "qt5ct";
# auto-run programs using nix-index-database # auto-run programs using nix-index-database

View file

@ -1,33 +1,17 @@
{ {pkgs, ...}: {
pkgs,
config,
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
# Shell software # Shell software
fzf # Fuzzy finding fzf # Fuzzy finding
eza # ls alternative bat # cat alternative
httpie # HTTP client / CURL alternative
yazi # Terminal file manager yazi # Terminal file manager
# Little thingies
gum
gh
gitAndTools.git-absorb
direnv
zellij # terminal workspace zellij # terminal workspace
silver-searcher # ag search tool silver-searcher # ag search tool
zx # Tool for writing better scripts gum
trurl # Parsing and manipulating URLs via CLI
onefetch # Git information tool httpie # HTTP client / CURL alternative
cloc # Line-of-code calc for entire project
delta # Diffing tool
genact # Jibberish output ("I'm waiting for a compile.") genact # Jibberish output ("I'm waiting for a compile.")
cbonsai # Create bonsai trees cbonsai # Create bonsai trees
wtfutil
]; ];
programs = { programs = {

View file

@ -3,12 +3,12 @@
elements = "just -f ~/.dotfiles/Justfile -d ~/.dotfiles"; elements = "just -f ~/.dotfiles/Justfile -d ~/.dotfiles";
elem = "elements"; elem = "elements";
g = "git"; g = "git";
copy = lib.mkDefault "xclip -sel clip"; copy = lib.mkDefault "wl-copy";
inspect = "tmux -f ~/.tmux.inspect.conf new-session ssh inspect"; inspect = "tmux -f ~/.tmux.inspect.conf new-session ssh inspect";
ansi = "sed -r \"s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g\""; ansi = "sed -r \"s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g\"";
ssh = "TERM=xterm-color ssh";
calc = "numbat --pretty-print never -e"; calc = "numbat --pretty-print never -e";
pcalc = "numbat --pretty-print always -e"; pcalc = "numbat --pretty-print always -e";
cat = "bat";
vim = "hx"; vim = "hx";
vi = "hx"; vi = "hx";
}; };