mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-03 06:46:38 -04:00
feat: add flake support
This commit is contained in:
parent
fb990c196d
commit
c983ac8a44
8 changed files with 362 additions and 7 deletions
47
nix/hm-modules.nix
Normal file
47
nix/hm-modules.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
maomaowm = pkgs.callPackage ./. { };
|
||||
in
|
||||
{
|
||||
options = {
|
||||
wayland.windowManager.maomaowm = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
settings = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
|
||||
autostart_sh = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.wayland.windowManager.maomaowm.enable {
|
||||
home.packages = [ maomaowm ];
|
||||
|
||||
home.file =
|
||||
lib.optionalAttrs (config.wayland.windowManager.maomaowm.settings != "") {
|
||||
".config/maomao/config.conf" = {
|
||||
text = config.wayland.windowManager.maomaowm.settings;
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs (config.wayland.windowManager.maomaowm.autostart_sh != "") {
|
||||
".config/maomao/autostart.sh" = {
|
||||
text = config.wayland.windowManager.maomaowm.autostart_sh;
|
||||
executable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue