fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Robert HelgessonMerge PR #421575790441

master
845 B41 linesraw
1{ config, lib, pkgs, ... }:
2
3with lib;
4
5let
6
7  cfg = config.programs.tint2;
8
9in {
10  meta.maintainers = [ hm.maintainers.CarlosLoboxyz ];
11
12  options.programs.tint2 = {
13    enable =
14      mkEnableOption "tint2, a simple, unobtrusive and light panel for Xorg";
15
16    package = mkOption {
17      type = types.package;
18      default = pkgs.tint2;
19      defaultText = literalExpression "pkgs.tint2";
20      description = "Tint2 package to install.";
21    };
22
23    extraConfig = mkOption {
24      type = types.lines;
25      default = "";
26      description = ''
27        Commands for tint2 that will be add to the {file}`tint2rc`
28        file.
29      '';
30    };
31  };
32
33  config = mkIf cfg.enable {
34    home.packages = [ cfg.package ];
35
36    xdg.configFile = {
37      "tint2/tint2rc" =
38        mkIf (cfg.extraConfig != "") { text = cfg.extraConfig; };
39    };
40  };
41}