tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
ragnarwm: init at 1.3.1
Sigmanificient
2 years ago
0482394f
e936aa35
+142
6 changed files
expand all
collapse all
unified
split
nixos
modules
services
x11
window-managers
default.nix
ragnarwm.nix
tests
all-tests.nix
ragnarwm.nix
pkgs
applications
window-managers
ragnarwm
default.nix
top-level
all-packages.nix
+1
nixos/modules/services/x11/window-managers/default.nix
reviewed
···
35
35
./openbox.nix
36
36
./pekwm.nix
37
37
./notion.nix
38
38
+
./ragnarwm.nix
38
39
./ratpoison.nix
39
40
./sawfish.nix
40
41
./smallwm.nix
+33
nixos/modules/services/x11/window-managers/ragnarwm.nix
reviewed
···
1
1
+
{ config, lib, pkgs, ... }:
2
2
+
3
3
+
with lib;
4
4
+
5
5
+
let
6
6
+
cfg = config.services.xserver.windowManager.ragnarwm;
7
7
+
in
8
8
+
{
9
9
+
###### interface
10
10
+
11
11
+
options = {
12
12
+
services.xserver.windowManager.ragnarwm = {
13
13
+
enable = mkEnableOption (lib.mdDoc "ragnarwm");
14
14
+
package = mkOption {
15
15
+
type = types.package;
16
16
+
default = pkgs.ragnarwm;
17
17
+
defaultText = literalExpression "pkgs.ragnarwm";
18
18
+
description = lib.mdDoc ''
19
19
+
The ragnar package to use.
20
20
+
'';
21
21
+
};
22
22
+
};
23
23
+
};
24
24
+
25
25
+
###### implementation
26
26
+
27
27
+
config = mkIf cfg.enable {
28
28
+
services.xserver.displayManager.sessionPackages = [ cfg.package ];
29
29
+
environment.systemPackages = [ cfg.package ];
30
30
+
};
31
31
+
32
32
+
meta.maintainers = with lib.maintainers; [ sigmanificient ];
33
33
+
}
+1
nixos/tests/all-tests.nix
reviewed
···
667
667
rabbitmq = handleTest ./rabbitmq.nix {};
668
668
radarr = handleTest ./radarr.nix {};
669
669
radicale = handleTest ./radicale.nix {};
670
670
+
ragnarwm = handleTest ./ragnarwm.nix {};
670
671
rasdaemon = handleTest ./rasdaemon.nix {};
671
672
readarr = handleTest ./readarr.nix {};
672
673
redis = handleTest ./redis.nix {};
+32
nixos/tests/ragnarwm.nix
reviewed
···
1
1
+
import ./make-test-python.nix ({ lib, ...} : {
2
2
+
name = "ragnarwm";
3
3
+
4
4
+
meta = {
5
5
+
maintainers = with lib.maintainers; [ sigmanificient ];
6
6
+
};
7
7
+
8
8
+
nodes.machine = { pkgs, lib, ... }: {
9
9
+
imports = [ ./common/x11.nix ./common/user-account.nix ];
10
10
+
test-support.displayManager.auto.user = "alice";
11
11
+
services.xserver.displayManager.defaultSession = lib.mkForce "ragnar";
12
12
+
services.xserver.windowManager.ragnarwm.enable = true;
13
13
+
14
14
+
# Setup the default terminal of Ragnar
15
15
+
environment.systemPackages = [ pkgs.alacritty ];
16
16
+
};
17
17
+
18
18
+
testScript = ''
19
19
+
with subtest("ensure x starts"):
20
20
+
machine.wait_for_x()
21
21
+
machine.wait_for_file("/home/alice/.Xauthority")
22
22
+
machine.succeed("xauth merge ~alice/.Xauthority")
23
23
+
24
24
+
with subtest("ensure we can open a new terminal"):
25
25
+
# Sleeping a bit before the test, as it may help for sending keys
26
26
+
machine.sleep(2)
27
27
+
machine.send_key("meta_l-ret")
28
28
+
machine.wait_for_window(r"alice.*?machine")
29
29
+
machine.sleep(2)
30
30
+
machine.screenshot("terminal")
31
31
+
'';
32
32
+
})
+73
pkgs/applications/window-managers/ragnarwm/default.nix
reviewed
···
1
1
+
{ lib
2
2
+
, stdenv
3
3
+
, fetchFromGitHub
4
4
+
, writeText
5
5
+
, fontconfig
6
6
+
, libX11
7
7
+
, libXft
8
8
+
, libXcursor
9
9
+
, libXcomposite
10
10
+
, conf ? null
11
11
+
, nixosTests
12
12
+
}:
13
13
+
14
14
+
stdenv.mkDerivation (finalAttrs: {
15
15
+
pname = "ragnarwm";
16
16
+
version = "1.3.1";
17
17
+
18
18
+
src = fetchFromGitHub {
19
19
+
owner = "cococry";
20
20
+
repo = "Ragnar";
21
21
+
rev = finalAttrs.version;
22
22
+
hash = "sha256-SZWhmFNmS2oLdO9BnPzimoind1452v/EEQzadc5A+bI";
23
23
+
};
24
24
+
25
25
+
prePatch = ''
26
26
+
substituteInPlace Makefile \
27
27
+
--replace '/usr/bin' "$out/bin" \
28
28
+
--replace '/usr/share' "$out/share"
29
29
+
'';
30
30
+
31
31
+
postPatch =
32
32
+
let
33
33
+
configFile =
34
34
+
if lib.isDerivation conf || builtins.isPath conf
35
35
+
then conf else writeText "config.h" conf;
36
36
+
in
37
37
+
lib.optionalString (conf != null) "cp ${configFile} config.h";
38
38
+
39
39
+
buildInputs = [
40
40
+
fontconfig
41
41
+
libX11
42
42
+
libXft
43
43
+
libXcursor
44
44
+
libXcomposite
45
45
+
];
46
46
+
47
47
+
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
48
48
+
enableParallelBuilding = true;
49
49
+
50
50
+
preInstall = ''
51
51
+
mkdir -p $out/bin
52
52
+
mkdir -p $out/share/applications
53
53
+
'';
54
54
+
55
55
+
postInstall = ''
56
56
+
install -Dm644 $out/share/applications/ragnar.desktop $out/share/xsessions/ragnar.desktop
57
57
+
'';
58
58
+
59
59
+
passthru = {
60
60
+
tests.ragnarwm = nixosTests.ragnarwm;
61
61
+
providedSessions = [ "ragnar" ];
62
62
+
};
63
63
+
64
64
+
meta = with lib; {
65
65
+
description = "Minimal, flexible & user-friendly X tiling window manager";
66
66
+
homepage = "https://ragnar-website.vercel.app";
67
67
+
changelog = "https://github.com/cococry/Ragnar/releases/tag/${finalAttrs.version}";
68
68
+
license = licenses.gpl3Only;
69
69
+
maintainers = with maintainers; [ sigmanificient ];
70
70
+
mainProgram = "ragnar";
71
71
+
platforms = platforms.linux;
72
72
+
};
73
73
+
})
+2
pkgs/top-level/all-packages.nix
reviewed
···
33926
33926
33927
33927
qemacs = callPackage ../applications/editors/qemacs { };
33928
33928
33929
33929
+
ragnarwm = callPackage ../applications/window-managers/ragnarwm {};
33930
33930
+
33929
33931
rime-cli = callPackage ../applications/office/rime-cli { };
33930
33932
33931
33933
roxctl = callPackage ../applications/networking/cluster/roxctl {