Files
NixOS/modules/apps/office.nix
Danilo Reyes f1e6015d39 Add multi-user support for package installations across various modules
Updated multiple configuration files to include a `merge` option for user management, enhancing the ability to handle multi-user setups for applications and services. This change improves flexibility in managing user-specific package installations, ensuring a more streamlined configuration process.
2026-01-16 13:38:49 -06:00

36 lines
1.1 KiB
Nix

{
config,
inputs,
lib,
pkgs,
...
}:
{
options.my.apps.office = {
enable = lib.mkEnableOption "office applications and productivity tools";
users = lib.mkOption {
type = lib.types.either lib.types.str (lib.types.listOf lib.types.str);
default = config.my.toggleUsers.apps;
merge = inputs.self.lib.mergeUsersOption lib;
description = "Users to install office packages for";
};
};
config = lib.mkIf config.my.apps.office.enable {
environment.variables.CALIBRE_USE_SYSTEM_THEME = "1";
users.users =
let
packages = builtins.attrValues {
inherit (pkgs)
jre17_minimal # for libreoffice extensions
libreoffice # office, but based & european
calibre # ugly af eBook library manager
newsflash # feed reader, syncs with nextcloud
furtherance # I packaged this one tehee track time utility
# planify # let's pretend I will organize my tasks
;
};
in
inputs.self.lib.mkUserPackages lib config.my.apps.office.users packages;
};
}