Modularize nixos and home-manager packages
This commit is contained in:
parent
b0979afa53
commit
51d2c2aa7c
32 changed files with 713 additions and 482 deletions
19
modules/programs/piper.nix
Normal file
19
modules/programs/piper.nix
Normal 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
|
||||
];
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue