all repos — flake @ 8e07b34fd14b326d037be884e12600f18dd6c4e1

got my cool flake

home/common/sway/default.nix (view raw)

 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
{ lib, ... }:
let
  workspaces = lib.genAttrs (map toString (lib.range 1 10)) (
    i:
    if
      lib.elem (lib.toInt i) [
        1
        3
        5
        7
        9
      ]
    then
      "DP-1"
    else
      "HDMI-A-1"
  );
in
{
  imports = [
    ./binds.nix
    ./rules.nix
    ./theme.nix
  ];

  wayland.windowManager.sway = {
    enable = true;
    systemd.enable = true;
    wrapperFeatures.gtk = true;
    checkConfig = false;

    config = {
      bars = [ ];
      keybindings = { };
    };
    extraConfig = lib.concatStringsSep "\n" (
      lib.mapAttrsToList (ws: output: "workspace ${ws} output ${output}") workspaces
    );
  };
}