mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 18:53:40 +01:00
Add home-manager module
This commit is contained in:
parent
a21bba1ce1
commit
3618e186aa
1 changed files with 18 additions and 3 deletions
21
flake.nix
21
flake.nix
|
@ -3,10 +3,10 @@
|
||||||
hyprland.url = "github:hyprwm/Hyprland";
|
hyprland.url = "github:hyprwm/Hyprland";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { hyprland, ... }: let
|
outputs = { self, hyprland, ... }: let
|
||||||
inherit (hyprland.inputs) nixpkgs;
|
inherit (hyprland.inputs) nixpkgs;
|
||||||
hyprlandSystems = fn: nixpkgs.lib.genAttrs (builtins.attrNames hyprland.packages) (system: fn system nixpkgs.legacyPackages.${system});
|
hyprlandSystems = fn: nixpkgs.lib.genAttrs (builtins.attrNames hyprland.packages) (system: fn system nixpkgs.legacyPackages.${system});
|
||||||
in rec {
|
in {
|
||||||
packages = hyprlandSystems (system: pkgs: rec {
|
packages = hyprlandSystems (system: pkgs: rec {
|
||||||
hy3 = pkgs.gcc12Stdenv.mkDerivation {
|
hy3 = pkgs.gcc12Stdenv.mkDerivation {
|
||||||
pname = "hy3";
|
pname = "hy3";
|
||||||
|
@ -39,8 +39,23 @@
|
||||||
bear
|
bear
|
||||||
];
|
];
|
||||||
|
|
||||||
inputsFrom = [ packages.${system}.hy3 ];
|
inputsFrom = [ self.packages.${system}.hy3 ];
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
homeManagerModules.default = { config, lib, pkgs, ... }: let
|
||||||
|
cfg = config.wayland.windowManager.hyprland.plugins.hy3;
|
||||||
|
hy3Package = self.packages.${pkgs.hostPlatform.system}.default;
|
||||||
|
in {
|
||||||
|
options.wayland.windowManager.hyprland.plugins.hy3 = {
|
||||||
|
enable = lib.mkEnableOption "hy3 plugin";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
wayland.windowManager.hyprland.extraConfig = ''
|
||||||
|
exec-once = hyprctl plugin load ${hy3Package}/lib/libhy3.so && hyprctl reload
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue