refactor: distribute packages from _lib/packages.nix into aspect modules

This commit is contained in:
2026-03-08 19:08:15 +00:00
parent 0aa8606153
commit bfc9af382f
14 changed files with 129 additions and 74 deletions

View File

@@ -1,66 +0,0 @@
{
inputs,
lib,
pkgs,
...
}:
with pkgs;
[
(callPackage ./open-project.nix {})
age
alejandra
ast-grep
bun
delta
devenv
dig
docker
docker-compose
dust
fastfetch
fd
gh
git
glow
gnumake
gnupg
hledger
htop
hyperfine
jj-ryu
jj-starship
jq
killall
lsof
nodejs_24
nurl
openssh
ouch
ov
pnpm
postgresql_17
sd
serie
sops
sqlite
tea
tokei
tree
tree-sitter
tuicr
vivid
]
++ lib.optionals stdenv.isDarwin [
_1password-gui
alcove
dockutil
mas
raycast
tailscale
xcodes
]
++ lib.optionals stdenv.isLinux [
gcc15
ghostty.terminfo
lm_sensors
]

View File

@@ -1,4 +1,4 @@
{inputs, ...}: {
{
den.aspects.ai-tools.homeManager = {
pkgs,
inputs',

View File

@@ -1,5 +1,9 @@
{...}: {
den.aspects.core.os = {pkgs, ...}: {
den.aspects.core.os = {
pkgs,
lib,
...
}: {
programs.fish.enable = true;
environment.shells = [pkgs.nushell];
@@ -29,5 +33,11 @@
experimental-features = nix-command flakes
'';
};
# System utilities
environment.systemPackages =
lib.optionals pkgs.stdenv.isLinux [
pkgs.lm_sensors
];
};
}

View File

@@ -137,5 +137,12 @@
"tidal"
];
};
# Darwin system utilities
environment.systemPackages = with pkgs; [
alcove
dockutil
mas
];
};
}

View File

@@ -29,6 +29,7 @@
desktop = ./desktop.nix;
dev-tools = ./dev-tools.nix;
email = ./email.nix;
finance = ./finance.nix;
neovim = ./neovim.nix;
network = ./network.nix;
nixos-system = ./nixos-system.nix;

View File

@@ -1,5 +1,9 @@
{...}: {
den.aspects.desktop.homeManager = {...}: {
den.aspects.desktop.homeManager = {
pkgs,
lib,
...
}: {
programs.aerospace = {
enable = true;
launchd.enable = true;
@@ -140,5 +144,11 @@
};
};
};
home.packages = with pkgs;
lib.optionals stdenv.isDarwin [
_1password-gui
raycast
];
};
}

View File

@@ -1,5 +1,9 @@
{...}: {
den.aspects.dev-tools.homeManager = {...}: let
den.aspects.dev-tools.homeManager = {
pkgs,
lib,
...
}: let
name = "Christoph Schmatzler";
in {
# Git configuration
@@ -367,5 +371,37 @@
auto_install = false;
};
};
home.packages = with pkgs;
[
alejandra
ast-grep
bun
delta
devenv
docker
docker-compose
gh
git
gnumake
hyperfine
jj-ryu
jj-starship
nodejs_24
nurl
pnpm
postgresql_17
serie
sqlite
tea
tokei
tree-sitter
]
++ lib.optionals stdenv.isDarwin [
xcodes
]
++ lib.optionals stdenv.isLinux [
gcc15
];
};
}

5
modules/finance.nix Normal file
View File

@@ -0,0 +1,5 @@
{...}: {
den.aspects.finance.homeManager = {pkgs, ...}: {
home.packages = [pkgs.hledger];
};
}

View File

@@ -64,4 +64,19 @@
enable = true;
};
};
# Network tools
den.aspects.network.homeManager = {
pkgs,
lib,
...
}: {
home.packages = with pkgs;
[
dig
]
++ lib.optionals stdenv.isDarwin [
tailscale
];
};
}

View File

@@ -12,4 +12,13 @@
sops.age.sshKeyPaths = [];
sops.gnupg.sshKeyPaths = [];
};
# Encryption/secrets tools
den.aspects.secrets.homeManager = {pkgs, ...}: {
home.packages = with pkgs; [
age
gnupg
sops
];
};
}

View File

@@ -281,5 +281,10 @@
};
};
};
home.packages = with pkgs; [
vivid
(callPackage ./_lib/open-project.nix {})
];
};
}

View File

@@ -23,5 +23,7 @@
};
};
};
home.packages = [pkgs.openssh];
};
}

View File

@@ -1,5 +1,9 @@
{...}: {
den.aspects.terminal.homeManager = {pkgs, ...}: {
den.aspects.terminal.homeManager = {
pkgs,
lib,
...
}: {
xdg.configFile."ghostty/config".text = ''
command = ${pkgs.nushell}/bin/nu
theme = Catppuccin Latte
@@ -125,5 +129,25 @@
};
};
};
home.packages = with pkgs;
[
dust
fastfetch
fd
glow
htop
jq
killall
lsof
ouch
ov
sd
tree
tuicr
]
++ lib.optionals stdenv.isLinux [
ghostty.terminfo
];
};
}

View File

@@ -8,13 +8,10 @@
den.aspects.cschmatzler.homeManager = {
lib,
pkgs,
inputs',
...
}: {
programs.home-manager.enable = true;
home.packages = pkgs.callPackage ./_lib/packages.nix {inputs = inputs';};
home.activation =
lib.mkIf pkgs.stdenv.isDarwin {
"setWallpaper" =