clanModules: init packages

This commit is contained in:
Johannes Kirschbauer
2024-07-03 12:29:22 +02:00
parent 1dd4db0034
commit dc583ece4f
6 changed files with 68 additions and 0 deletions

View File

@@ -10,6 +10,7 @@
single-disk = ./single-disk;
matrix-synapse = ./matrix-synapse;
moonlight = ./moonlight;
packages = ./packages;
postgresql = ./postgresql;
root-password = ./root-password;
sshd = ./sshd;

View File

@@ -0,0 +1,4 @@
---
description = "Define package sets from nixpkgs and install them on one or more machines"
categories = ["packages"]
---

View File

@@ -0,0 +1,19 @@
{
config,
lib,
pkgs,
...
}:
{
options.clan.packages = {
packages = lib.mkOption {
type = lib.types.listOf lib.types.str;
description = "The packages to install on the machine";
};
};
config = {
environment.systemPackages = map (
pName: lib.getAttrFromPath (lib.splitString "." pName) pkgs
) config.clan.packages.packages;
};
}

View File

@@ -0,0 +1 @@
{ }