diff --git a/modules/hyprland/check.nix b/modules/hyprland/check.nix new file mode 100644 index 0000000..a78d345 --- /dev/null +++ b/modules/hyprland/check.nix @@ -0,0 +1,33 @@ +{ + pkgs, + self, +}: + +let + hyprlandWrapped = + (self.wrapperModules.hyprland.apply { + inherit pkgs; + + "hypr.conf".content = '' + + dwindle { + pseudotile = yes + preserve_split = yes + special_scale_factor = 0.95 + } + + general { + layout = dwindle + } + + ''; + }).wrapper; + +in +pkgs.runCommand "hypr-test" { } '' + + export XDG_RUNTIME_DIR=/run/user/$(id -u) + "${hyprlandWrapped}/bin/hyprland" --version | grep -q "${hyprlandWrapped.version}" + + touch $out +'' diff --git a/modules/hyprland/module.nix b/modules/hyprland/module.nix new file mode 100644 index 0000000..0733139 --- /dev/null +++ b/modules/hyprland/module.nix @@ -0,0 +1,33 @@ +{ + config, + lib, + wlib, + ... +}: +{ + _class = "wrapper"; + options = { + "hypr.conf" = lib.mkOption { + type = wlib.types.file config.pkgs; + default.content = ""; + description = '' + for basic setup of one hypr.conf file + ''; + }; + }; + + config.flags = { + "--config" = toString config."hypr.conf".path; + }; + + config.package = config.pkgs.hyprland; + + config.meta.maintainers = [ + { + name = "PeDro0210"; + github = "PeDro0210"; + githubId = 123851480; + } + ]; + config.meta.platforms = lib.platforms.linux; +}