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 = { den.aspects.ai-tools.homeManager = {
pkgs, pkgs,
inputs', inputs',

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,9 @@
{...}: { {...}: {
den.aspects.desktop.homeManager = {...}: { den.aspects.desktop.homeManager = {
pkgs,
lib,
...
}: {
programs.aerospace = { programs.aerospace = {
enable = true; enable = true;
launchd.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"; name = "Christoph Schmatzler";
in { in {
# Git configuration # Git configuration
@@ -367,5 +371,37 @@
auto_install = false; 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; 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.age.sshKeyPaths = [];
sops.gnupg.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 = '' xdg.configFile."ghostty/config".text = ''
command = ${pkgs.nushell}/bin/nu command = ${pkgs.nushell}/bin/nu
theme = Catppuccin Latte 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 = { den.aspects.cschmatzler.homeManager = {
lib, lib,
pkgs, pkgs,
inputs',
... ...
}: { }: {
programs.home-manager.enable = true; programs.home-manager.enable = true;
home.packages = pkgs.callPackage ./_lib/packages.nix {inputs = inputs';};
home.activation = home.activation =
lib.mkIf pkgs.stdenv.isDarwin { lib.mkIf pkgs.stdenv.isDarwin {
"setWallpaper" = "setWallpaper" =