diff options
author | Shea Levy <shea@shealevy.com> | 2013-10-16 16:01:27 -0400 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2013-10-16 16:01:27 -0400 |
commit | 418fa3bb330af527e0d48e3f597a296a7d42c461 (patch) | |
tree | b66f83760ba1d17d58c0014d3fbcaa80c8945441 /nixos | |
parent | 6171f13ed573183516fa3a86ca44e0334501b037 (diff) | |
download | nixlib-418fa3bb330af527e0d48e3f597a296a7d42c461.tar nixlib-418fa3bb330af527e0d48e3f597a296a7d42c461.tar.gz nixlib-418fa3bb330af527e0d48e3f597a296a7d42c461.tar.bz2 nixlib-418fa3bb330af527e0d48e3f597a296a7d42c461.tar.lz nixlib-418fa3bb330af527e0d48e3f597a296a7d42c461.tar.xz nixlib-418fa3bb330af527e0d48e3f597a296a7d42c461.tar.zst nixlib-418fa3bb330af527e0d48e3f597a296a7d42c461.zip |
D'oh
Signed-off-by: Shea Levy <shea@shealevy.com>
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/module-list.nix | 2 | ||||
-rw-r--r-- | nixos/modules/programs/gurobi.nix | 28 |
2 files changed, 15 insertions, 15 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index ff272ffea9b8..a2e1abf036bf 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -35,7 +35,6 @@ ./misc/assertions.nix ./misc/check-config.nix ./misc/crashdump.nix - ./misc/gurobi.nix ./misc/ids.nix ./misc/lib.nix ./misc/locate.nix @@ -120,6 +119,7 @@ ./services/misc/felix.nix ./services/misc/folding-at-home.nix ./services/misc/gpsd.nix + ./services/misc/gurobi.nix ./services/misc/nix-daemon.nix ./services/misc/nix-gc.nix ./services/misc/nixos-manual.nix diff --git a/nixos/modules/programs/gurobi.nix b/nixos/modules/programs/gurobi.nix index 4c673a96db06..7fa099b0884f 100644 --- a/nixos/modules/programs/gurobi.nix +++ b/nixos/modules/programs/gurobi.nix @@ -23,21 +23,21 @@ in { type = types.nullOr types.string; }; }; + }; - config = mkIf (cfg.license != null || cfg.tokenServerAddress != null) { - assertions = [ { - assertion = cfg.license == null || cfg.tokenServerAddress == null; - message = "Please only set one of a gurobi license file and a gurobi token server address"; - } ]; - - environment.variables.GRB_LICENSE_FILE = if cfg.license != null - then cfg.license - else pkgs.writeTextFile { - name = "gurobi-generated-license"; - text = "TOKENSERVER=${cfg.tokenServerAddress}"; - }; + config = mkIf (cfg.license != null || cfg.tokenServerAddress != null) { + assertions = [ { + assertion = cfg.license == null || cfg.tokenServerAddress == null; + message = "Please only set one of a gurobi license file and a gurobi token server address"; + } ]; + + environment.variables.GRB_LICENSE_FILE = if cfg.license != null + then cfg.license + else pkgs.writeTextFile { + name = "gurobi-generated-license"; + text = "TOKENSERVER=${cfg.tokenServerAddress}"; + }; - environment.systemPackages = [ pkgs.gurobi ]; - }; + environment.systemPackages = [ pkgs.gurobi ]; }; } |