Merge pull request #198 from iynaix/hm-package-option

nix: add package option for home-manager
This commit is contained in:
DreamMaoMao 2025-08-12 18:15:14 +08:00
commit 86e4ca1b76

View file

@ -4,7 +4,6 @@ self: {
pkgs,
...
}: let
inherit (self.packages.${pkgs.system}) mango;
cfg = config.wayland.windowManager.mango;
variables = lib.concatStringsSep " " cfg.systemd.variables;
extraCommands = lib.concatStringsSep " && " cfg.systemd.extraCommands;
@ -20,6 +19,11 @@ in {
type = types.bool;
default = false;
};
package = lib.mkOption {
type = lib.types.package;
default = self.packages.${pkgs.system}.mango;
description = "The mango package to use";
};
systemd = {
enable = mkOption {
type = types.bool;
@ -92,7 +96,7 @@ in {
};
config = lib.mkIf cfg.enable {
home.packages = [mango];
home.packages = [ cfg.package ];
home.activation =
lib.optionalAttrs (cfg.autostart_sh != "") {
createMangoScript = lib.hm.dag.entryAfter ["clearMangoConfig"] ''