Modularize nixos and home-manager packages

This commit is contained in:
DashieTM 2024-08-03 18:08:22 +02:00
parent b0979afa53
commit 51d2c2aa7c
32 changed files with 713 additions and 482 deletions

View file

@ -0,0 +1,19 @@
{ lib, config, options, pkgs, ... }: {
options.mods.piper = {
enable = lib.mkOption {
default = false;
example = true;
type = lib.types.bool;
description = "Enables the piper program and its daemon";
};
};
config = lib.mkIf config.mods.piper.enable
(lib.optionalAttrs (options?services.ratbagd)
{
services.ratbagd.enable = true;
} // lib.optionalAttrs (options?home.packages) {
home.packages = with pkgs; [
piper
];
});
}