mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
nix: add package option for home-manager
This commit is contained in:
parent
1259683027
commit
b6c4f59a07
1 changed files with 6 additions and 2 deletions
|
|
@ -4,7 +4,6 @@ self: {
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (self.packages.${pkgs.system}) mango;
|
|
||||||
cfg = config.wayland.windowManager.mango;
|
cfg = config.wayland.windowManager.mango;
|
||||||
variables = lib.concatStringsSep " " cfg.systemd.variables;
|
variables = lib.concatStringsSep " " cfg.systemd.variables;
|
||||||
extraCommands = lib.concatStringsSep " && " cfg.systemd.extraCommands;
|
extraCommands = lib.concatStringsSep " && " cfg.systemd.extraCommands;
|
||||||
|
|
@ -20,6 +19,11 @@ in {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
};
|
};
|
||||||
|
package = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = self.packages.${pkgs.system}.mango;
|
||||||
|
description = "The mango package to use";
|
||||||
|
};
|
||||||
systemd = {
|
systemd = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
|
@ -92,7 +96,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.packages = [mango];
|
home.packages = [ cfg.package ];
|
||||||
home.activation =
|
home.activation =
|
||||||
lib.optionalAttrs (cfg.autostart_sh != "") {
|
lib.optionalAttrs (cfg.autostart_sh != "") {
|
||||||
createMangoScript = lib.hm.dag.entryAfter ["clearMangoConfig"] ''
|
createMangoScript = lib.hm.dag.entryAfter ["clearMangoConfig"] ''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue