35 lines
650 B
Nix
Raw Normal View History

2025-01-20 19:40:54 -05:00
{
config,
lib,
pkgs,
...
}:
{
imports = [ ];
options.me = {
2025-01-20 20:06:33 -05:00
kodi.enable = lib.mkOption {
2025-01-20 19:40:54 -05:00
type = lib.types.bool;
default = false;
example = true;
description = "Whether we want to install kodi.";
};
};
2025-01-20 20:06:33 -05:00
config = lib.mkIf config.me.kodi.enable (
2025-01-20 19:40:54 -05:00
lib.mkMerge [
{
environment.systemPackages = with pkgs; [
];
}
(lib.mkIf config.me.graphical {
2025-01-20 20:06:33 -05:00
users.extraUsers.kodi.isNormalUser = true;
services.cage.user = "kodi";
services.cage.program = "${pkgs.kodi-wayland}/bin/kodi-standalone";
services.cage.enable = true;
2025-01-20 19:40:54 -05:00
})
]
);
}