diff --git a/build.sbt b/build.sbt index 3de9b2a..c008582 100644 --- a/build.sbt +++ b/build.sbt @@ -5,26 +5,31 @@ ThisBuild / versionScheme := Some("strict") inThisBuild( - List( - publishTo := { - val base = "https://dig.iterative.works/maven/" - if (version.value.endsWith("SNAPSHOT")) - Some("snapshots" at base + "snapshots") - else Some("releases" at base + "releases") - }, - credentials += { - val username = sys.env.getOrElse("IW_USERNAME", "") - val password = sys.env.getOrElse("IW_PASSWORD", "") - Credentials( - "GitBucket Maven Repository", - "dig.iterative.works", - username, - password - ) - } + List( + resolvers ++= Seq( + "e-BS Snapshot Repository" at "https://nexus.e-bs.cz/repository/maven-snapshots/", + "e-BS Release Repository" at "https://nexus.e-bs.cz/repository/maven-releases/" ) + ) ++ + (for { + username <- sys.env.get("EBS_NEXUS_USERNAME") + password <- sys.env.get("EBS_NEXUS_PASSWORD") + } yield credentials += Credentials( + "Sonatype Nexus Repository Manager", + "nexus.e-bs.cz", + username, + password + )).toList ) +ThisBuild / publishTo := { + val nexus = "https://nexus.e-bs.cz/repository/maven-" + if (isSnapshot.value) + Some("snapshots" at nexus + "snapshots/") + else + Some("releases" at nexus + "releases/") +} + lazy val `sbt-iw-plugin-presets` = (project in file("sbt-iw-plugin-presets")) .enablePlugins(SbtPlugin, BuildInfoPlugin) .disablePlugins(Giter8Plugin) diff --git a/build.sbt b/build.sbt index 3de9b2a..c008582 100644 --- a/build.sbt +++ b/build.sbt @@ -5,26 +5,31 @@ ThisBuild / versionScheme := Some("strict") inThisBuild( - List( - publishTo := { - val base = "https://dig.iterative.works/maven/" - if (version.value.endsWith("SNAPSHOT")) - Some("snapshots" at base + "snapshots") - else Some("releases" at base + "releases") - }, - credentials += { - val username = sys.env.getOrElse("IW_USERNAME", "") - val password = sys.env.getOrElse("IW_PASSWORD", "") - Credentials( - "GitBucket Maven Repository", - "dig.iterative.works", - username, - password - ) - } + List( + resolvers ++= Seq( + "e-BS Snapshot Repository" at "https://nexus.e-bs.cz/repository/maven-snapshots/", + "e-BS Release Repository" at "https://nexus.e-bs.cz/repository/maven-releases/" ) + ) ++ + (for { + username <- sys.env.get("EBS_NEXUS_USERNAME") + password <- sys.env.get("EBS_NEXUS_PASSWORD") + } yield credentials += Credentials( + "Sonatype Nexus Repository Manager", + "nexus.e-bs.cz", + username, + password + )).toList ) +ThisBuild / publishTo := { + val nexus = "https://nexus.e-bs.cz/repository/maven-" + if (isSnapshot.value) + Some("snapshots" at nexus + "snapshots/") + else + Some("releases" at nexus + "releases/") +} + lazy val `sbt-iw-plugin-presets` = (project in file("sbt-iw-plugin-presets")) .enablePlugins(SbtPlugin, BuildInfoPlugin) .disablePlugins(Giter8Plugin) diff --git a/flake.lock b/flake.lock index 92e6ba3..8e53926 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,24 @@ { "nodes": { + "eid-pki": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1722189474, + "narHash": "sha256-eeMIKVfxfPwAMlGEIwSwwuGtvw9sUH7wY2J96UfFe5g=", + "ref": "main", + "rev": "1005485aac81c49c6b1c53b56b429452ddc13b04", + "revCount": 8, + "type": "git", + "url": "https://gitlab.e-bs.cz/mph/eid-nix-pki.git" + }, + "original": { + "ref": "main", + "type": "git", + "url": "https://gitlab.e-bs.cz/mph/eid-nix-pki.git" + } + }, "flake-compat": { "flake": false, "locked": { @@ -36,6 +55,22 @@ }, "nixpkgs": { "locked": { + "lastModified": 1719506693, + "narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { "lastModified": 1746055187, "narHash": "sha256-3dqArYSMP9hM7Qpy5YWhnSjiqniSaT2uc5h2Po7tmg0=", "owner": "NixOS", @@ -52,9 +87,10 @@ }, "root": { "inputs": { + "eid-pki": "eid-pki", "flake-compat": "flake-compat", "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" } }, "systems": { diff --git a/build.sbt b/build.sbt index 3de9b2a..c008582 100644 --- a/build.sbt +++ b/build.sbt @@ -5,26 +5,31 @@ ThisBuild / versionScheme := Some("strict") inThisBuild( - List( - publishTo := { - val base = "https://dig.iterative.works/maven/" - if (version.value.endsWith("SNAPSHOT")) - Some("snapshots" at base + "snapshots") - else Some("releases" at base + "releases") - }, - credentials += { - val username = sys.env.getOrElse("IW_USERNAME", "") - val password = sys.env.getOrElse("IW_PASSWORD", "") - Credentials( - "GitBucket Maven Repository", - "dig.iterative.works", - username, - password - ) - } + List( + resolvers ++= Seq( + "e-BS Snapshot Repository" at "https://nexus.e-bs.cz/repository/maven-snapshots/", + "e-BS Release Repository" at "https://nexus.e-bs.cz/repository/maven-releases/" ) + ) ++ + (for { + username <- sys.env.get("EBS_NEXUS_USERNAME") + password <- sys.env.get("EBS_NEXUS_PASSWORD") + } yield credentials += Credentials( + "Sonatype Nexus Repository Manager", + "nexus.e-bs.cz", + username, + password + )).toList ) +ThisBuild / publishTo := { + val nexus = "https://nexus.e-bs.cz/repository/maven-" + if (isSnapshot.value) + Some("snapshots" at nexus + "snapshots/") + else + Some("releases" at nexus + "releases/") +} + lazy val `sbt-iw-plugin-presets` = (project in file("sbt-iw-plugin-presets")) .enablePlugins(SbtPlugin, BuildInfoPlugin) .disablePlugins(Giter8Plugin) diff --git a/flake.lock b/flake.lock index 92e6ba3..8e53926 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,24 @@ { "nodes": { + "eid-pki": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1722189474, + "narHash": "sha256-eeMIKVfxfPwAMlGEIwSwwuGtvw9sUH7wY2J96UfFe5g=", + "ref": "main", + "rev": "1005485aac81c49c6b1c53b56b429452ddc13b04", + "revCount": 8, + "type": "git", + "url": "https://gitlab.e-bs.cz/mph/eid-nix-pki.git" + }, + "original": { + "ref": "main", + "type": "git", + "url": "https://gitlab.e-bs.cz/mph/eid-nix-pki.git" + } + }, "flake-compat": { "flake": false, "locked": { @@ -36,6 +55,22 @@ }, "nixpkgs": { "locked": { + "lastModified": 1719506693, + "narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { "lastModified": 1746055187, "narHash": "sha256-3dqArYSMP9hM7Qpy5YWhnSjiqniSaT2uc5h2Po7tmg0=", "owner": "NixOS", @@ -52,9 +87,10 @@ }, "root": { "inputs": { + "eid-pki": "eid-pki", "flake-compat": "flake-compat", "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" } }, "systems": { diff --git a/flake.nix b/flake.nix index d78fc52..7897164 100644 --- a/flake.nix +++ b/flake.nix @@ -4,25 +4,19 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; flake-utils.url = "github:numtide/flake-utils"; + eid-pki.url = "git+https://gitlab.e-bs.cz/mph/eid-nix-pki.git?ref=main"; flake-compat = { url = "github:edolstra/flake-compat"; flake = false; }; }; - outputs = { self, nixpkgs, flake-utils, ... }: + outputs = { self, nixpkgs, flake-utils, eid-pki, ... }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; - overlays = [ - (self: super: - let jvm = super.jdk17_headless; - in { - jre = jvm; - jdk = jvm; - }) - ]; + overlays = [ eid-pki.overlays.jdk17 ]; }; in { devShell = with pkgs;