~ruther/nixos-config

ref: 5b1602c8f5563556f28c67d066d1aee7b46e55e7 nixos-config/modules/programs/iamb.nix -rw-r--r-- 575 bytes
5b1602c8 — Frantisek Bohacek chore: update 1 year, 3 days ago
                                                                                
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
{ config, pkgs, lib, ... }:

let
  cfg = config.programs.iamb;
  settingsFormat = pkgs.formats.toml {};
in {
  options = {
    programs.iamb = {
      enable = lib.mkEnableOption "Enable iamb program";
      package = lib.mkPackageOption pkgs "iamb" { nullable = true;};

      settings = lib.mkOption {
        inherit (settingsFormat) type;
      };
    };
  };

  config = lib.mkIf cfg.enable {
    home.packages = [
      cfg.package
    ];

    xdg.configFile."iamb/config.toml".source =
      settingsFormat.generate "config.toml" config.programs.iamb.settings;
  };
}
Do not follow this link