refactor(packages): split core packages from per-host extras
modules/system/packages.nix now exposes myPackages.extra so hosts can add their own tools on top of the always-installed core set, instead of hardcoding every host's packages in one shared list. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
933afc7d11
commit
7c2a09a360
3 files changed
+25
-6
No files matched your search
@@ -12,6 +12,13 @@
|
||||
|
||||
age.secrets.miku-homelab-wg.file = ../../secrets/miku-homelab-wg.age;
|
||||
|
||||
myPackages.extra = with pkgs; [
|
||||
rocmPackages.rocm-smi
|
||||
btrfs-progs
|
||||
distrobox
|
||||
steam-run
|
||||
];
|
||||
|
||||
myNetworking = {
|
||||
hostName = "miku-homelab";
|
||||
useNetworkManager = true;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules/profiles/server.nix
|
||||
../../modules/system/packages.nix
|
||||
];
|
||||
|
||||
# PLACEHOLDER: secrets/vps-wg.age does not exist yet. It has to be created
|
||||
|
||||
@@ -1,14 +1,25 @@
|
||||
{pkgs, ... }:
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
let
|
||||
cfg = config.myPackages;
|
||||
in
|
||||
{
|
||||
options.myPackages = {
|
||||
extra = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.package;
|
||||
default = [ ];
|
||||
description = "Extra packages to install on this host, beyond the core set.";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
wget
|
||||
curl
|
||||
ethtool
|
||||
fish
|
||||
rocmPackages.rocm-smi
|
||||
btrfs-progs
|
||||
distrobox
|
||||
steam-run
|
||||
];
|
||||
tmux
|
||||
] ++ cfg.extra;
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user