summary refs log tree commit diff stats
path: root/hm/river/default.nix
blob: 07fc5eca87018cc7e1f5e6101582e7a7756ef2b1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
  pkgs,
  sysLib,
  river_init_lesser,
  nixosConfig,
  system,
  ...
}: let
  inherit (nixosConfig.networking) hostName;
  mappings = ''
    err_fail riverctl keyboard-layout 'de'
    err_fail river_init_lesser ~/.config/river/res/keys.ron
  '';

  screen_setup = ''
    #err_fail wlr-randr --output Virtual-1 --mode 1920x1080
  '';
  init_scr = pkgs.substituteAll {
    src = ./init;
    inherit mappings screen_setup;
  };
in {
  xdg.configFile."river/init".source =
    sysLib.writeShellScriptWithLibraryAndKeepPath {
      name = "river_init";
      script = init_scr;
      dependencies = builtins.attrValues {
        river_init_lesser = river_init_lesser.packages.${system}.default;
        inherit
          (pkgs)
          dash
          river
          gammastep
          wlr-randr
          yambar
          mako
          swaybg
          swayidle
          swaylock
          alacritty
          ;
      };
    }
    + /bin/river_init;

  xdg.configFile."river/res".source = ./res;
}
# vim: ts=2