blob: 665763f9461533a8cbe67cdc47da3596e0c5f9ec (
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
50
51
52
53
54
|
{ pkgs, lib, config, ... }:
{
imports = [ ./swayidle ];
options = {
programs.sway.extraConfig = with lib; mkOption {
type = types.lines;
description = "Lines to append to sway's config file";
default = "";
};
};
config = let
cfg = config.programs.sway;
wallpaper = pkgs.fetchurl {
url = https://mir-s3-cdn-cf.behance.net/project_modules/2800_opt_1/36731876964505.5c793fa788b5d.jpg;
sha256 = "1c6camdipng8ws41sgpcxzrxb96crgip3wirqjgf2ajn60qg3v64";
meta = with lib; {
homepage = https://www.behance.net/gallery/76964505/IQOO-style-frame-and-scene-design;
};
};
configFile = pkgs.substituteAll {
src = ./config.in;
inherit choose_workspace status_command wallpaper;
inherit (cfg) extraConfig;
};
status_command = pkgs.substituteAll {
src = ./status_command.in;
isExecutable = true;
inherit (pkgs) execline;
};
choose_workspace = pkgs.substituteAll {
src = ./choose_workspace.sh.in;
isExecutable = true;
inherit (pkgs) bemenu jq;
};
in
{
environment.systemPackages = with pkgs; [ bemenu choose ];
programs.sway.enable = true;
programs.swayidle.enable = true;
users.users.qyliss.xdg.config.paths."sway/config" = configFile;
};
}
|