fork/home-manager

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

Philippe Laflammesbt: allow managing the `~/.sbt/repositories` file599e22b1

master
778 B39 linesraw
1{ config, lib, pkgs, ... }:
2
3with lib;
4
5let
6  plugins = [{
7    org = "a";
8    artifact = "b";
9    version = "c";
10  }];
11
12  credentials = [{
13    realm = "a";
14    host = "b";
15    user = "c";
16    passwordCommand = "d";
17  }];
18
19  repositories = [ "local" ];
20
21  baseSbtPath = ".config/sbt";
22in {
23  config = {
24    programs.sbt = {
25      enable = true;
26      plugins = plugins;
27      credentials = credentials;
28      repositories = repositories;
29      baseUserConfigPath = ".config/sbt";
30      package = pkgs.writeScriptBin "sbt" "";
31    };
32
33    nmt.script = ''
34      assertFileExists "home-files/${baseSbtPath}/1.0/plugins/plugins.sbt"
35      assertFileExists "home-files/${baseSbtPath}/1.0/credentials.sbt"
36      assertFileExists "home-files/${baseSbtPath}/repositories"
37    '';
38  };
39}