mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 21:49:48 +01:00
pyperland: added pyprland module to home-manager
pyperland is a hyperland plugin manager.
This commit is contained in:
parent
31357486b0
commit
d63ef9f125
2 changed files with 62 additions and 0 deletions
|
@ -518,4 +518,10 @@
|
||||||
github = "zorrobert";
|
github = "zorrobert";
|
||||||
githubId = 118135271;
|
githubId = 118135271;
|
||||||
};
|
};
|
||||||
|
knoc-off = {
|
||||||
|
name = "Niko Selby";
|
||||||
|
email = "selby@niko.ink";
|
||||||
|
github = "knoc-off";
|
||||||
|
githubId = 36494048;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
56
modules/services/pyprland.nix
Normal file
56
modules/services/pyprland.nix
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
{ options, config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.services.pyprland;
|
||||||
|
settingsFormat = pkgs.formats.toml { };
|
||||||
|
in with lib; {
|
||||||
|
|
||||||
|
meta.maintainers = [ maintainers.knoc-off ];
|
||||||
|
options.services.pyprland = {
|
||||||
|
enable = mkEnableOption "pyperland";
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
default = pkgs.pyprland;
|
||||||
|
type = types.package;
|
||||||
|
description = "The pyprland package to use";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraPlugins = mkOption {
|
||||||
|
default = [ ];
|
||||||
|
type = with types; listOf str;
|
||||||
|
description = "Additional plugins to enable";
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = mkOption {
|
||||||
|
type = types.submodule {
|
||||||
|
freeformType = settingsFormat.type;
|
||||||
|
|
||||||
|
options.scratchpads = mkOption {
|
||||||
|
default = { };
|
||||||
|
type = with types; attrsOf attrs;
|
||||||
|
description = "Scratchpad configurations";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
default = { };
|
||||||
|
description = ''
|
||||||
|
Configuration for pyprland, see
|
||||||
|
<link xlink:href="https://github.com/hyprland-community/pyprland/wiki/Getting-started#configuring"/>
|
||||||
|
for supported values.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
|
services.pyprland.settings = {
|
||||||
|
pyprland = {
|
||||||
|
plugins = cfg.extraPlugins
|
||||||
|
++ (optional (cfg.settings.scratchpads != { }) "scratchpads");
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".config/hypr/pyprland.toml".source =
|
||||||
|
settingsFormat.generate "pyprland-config.toml" cfg.settings;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue