Skip to content

Commit 4e12f43

Browse files
authored
Merge pull request #138 from PeDro0210/main
modules/hyprland: init
2 parents eebbbf6 + d08c728 commit 4e12f43

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

modules/hyprland/check.nix

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
pkgs,
3+
self,
4+
}:
5+
6+
let
7+
hyprlandWrapped =
8+
(self.wrapperModules.hyprland.apply {
9+
inherit pkgs;
10+
11+
"hypr.conf".content = ''
12+
13+
dwindle {
14+
pseudotile = yes
15+
preserve_split = yes
16+
special_scale_factor = 0.95
17+
}
18+
19+
general {
20+
layout = dwindle
21+
}
22+
23+
'';
24+
}).wrapper;
25+
26+
in
27+
pkgs.runCommand "hypr-test" { } ''
28+
29+
export XDG_RUNTIME_DIR=/run/user/$(id -u)
30+
"${hyprlandWrapped}/bin/hyprland" --version | grep -q "${hyprlandWrapped.version}"
31+
32+
touch $out
33+
''

modules/hyprland/module.nix

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
config,
3+
lib,
4+
wlib,
5+
...
6+
}:
7+
{
8+
_class = "wrapper";
9+
options = {
10+
"hypr.conf" = lib.mkOption {
11+
type = wlib.types.file config.pkgs;
12+
default.content = "";
13+
description = ''
14+
for basic setup of one hypr.conf file
15+
'';
16+
};
17+
};
18+
19+
config.flags = {
20+
"--config" = toString config."hypr.conf".path;
21+
};
22+
23+
config.package = config.pkgs.hyprland;
24+
25+
config.meta.maintainers = [
26+
{
27+
name = "PeDro0210";
28+
github = "PeDro0210";
29+
githubId = 123851480;
30+
}
31+
];
32+
config.meta.platforms = lib.platforms.linux;
33+
}

0 commit comments

Comments
 (0)