mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
feat: add flake support
This commit is contained in:
parent
4d48679ccc
commit
1a55178fd6
7 changed files with 308 additions and 0 deletions
60
nix/default.nix
Normal file
60
nix/default.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
lib,
|
||||
libX11,
|
||||
libinput,
|
||||
libxcb,
|
||||
libxkbcommon,
|
||||
pixman,
|
||||
pkg-config,
|
||||
stdenv,
|
||||
wayland,
|
||||
wayland-protocols,
|
||||
wayland-scanner,
|
||||
wlroots_0_17,
|
||||
xcbutilwm,
|
||||
xwayland,
|
||||
enableXWayland ? true,
|
||||
meson,
|
||||
ninja,
|
||||
}:
|
||||
let
|
||||
pname = "maomaowm";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit pname;
|
||||
version = "nightly";
|
||||
|
||||
src = ../.;
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
wayland-scanner
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
libinput
|
||||
libxcb
|
||||
libxkbcommon
|
||||
pixman
|
||||
wayland
|
||||
wayland-protocols
|
||||
wlroots_0_17
|
||||
]
|
||||
++ lib.optionals enableXWayland [
|
||||
libX11
|
||||
xcbutilwm
|
||||
xwayland
|
||||
];
|
||||
|
||||
meta = {
|
||||
mainProgram = "maomao";
|
||||
description = "A streamlined but feature-rich Wayland compositor";
|
||||
homepage = "https://github.com/DreamMaoMao/maomaowm";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
45
nix/hm-modules.nix
Normal file
45
nix/hm-modules.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
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 = {
|
||||
".config/maomao/config.conf" = {
|
||||
text = config.wayland.windowManager.maomaowm.settings;
|
||||
};
|
||||
|
||||
".config/maomao/autostart.sh" = {
|
||||
text = config.wayland.windowManager.maomaowm.autostart_sh;
|
||||
executable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue