summaryrefslogtreecommitdiff
path: root/users/kassouni/theme.nix
blob: 70785ca2631626759de101ce129fc2b1a5672aa5 (plain)
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
{ config, lib, pkgs,  ... }:

{
  options = {
    theme = {
      font = {
        size = lib.mkOption {
          type = lib.types.int;
          default = 16;
          description = "Global font size for all applications";
        };

        family = lib.mkOption {
          type = lib.types.str;
          default = "BlexMono Nerd Font";
        };
      };

      desktop = {
        gap-size = lib.mkOption {
          default = 10;
          type = lib.types.int;
        };

        wallpaper = lib.mkOption {
          type = lib.types.path;
          description = "Wallpaper image used by the window manager";
          default = pkgs.runCommand "fw-13-pro-wallpaper-6.png" {
            src = pkgs.fetchurl {
              url = "https://downloads.frame.work/assets/framework-laptop13pro-wallpaper-pack.zip";
              sha256 = "0pjmsyfz49r2fwkz0c00rzjhf2rzfxrk72lnqc94z6a8h3rs3v3b";
            };
            nativeBuildInputs = [ pkgs.unzip ];
          } ''
            unzip -j "$src" "FW 13 Pro Wallpaper 6.png"
            # unzip restores the archive's own mode bits, which nix rejects on a
            # store output; install with an explicit mode instead of moving.
            install -m 0444 "FW 13 Pro Wallpaper 6.png" "$out"
          '';
        };
     };
    };
  };
}