chore(nix): fix registry url
This commit is contained in:
parent
d1ae65bf8f
commit
d15cdf29e1
17
flake.lock
17
flake.lock
@ -151,22 +151,6 @@
|
||||
"url": "https://gitlab.ifi.lmu.de/uni2work/haskell/cryptonite.git"
|
||||
}
|
||||
},
|
||||
"docker-nixpkgs": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1678089139,
|
||||
"narHash": "sha256-cK0RDcxR4eWMrdZIcqNVqnjo9k2LwVmNZO3qj1ctDXU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "docker-nixpkgs",
|
||||
"rev": "2205fb4968adf683324e6d0401b74b9d250d8f56",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "docker-nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"encoding": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@ -520,7 +504,6 @@
|
||||
"conduit-resumablesink": "conduit-resumablesink",
|
||||
"cryptoids": "cryptoids",
|
||||
"cryptonite": "cryptonite",
|
||||
"docker-nixpkgs": "docker-nixpkgs",
|
||||
"encoding": "encoding",
|
||||
"esqueleto": "esqueleto",
|
||||
"flake-utils": "flake-utils",
|
||||
|
||||
20
flake.nix
20
flake.nix
@ -28,11 +28,6 @@
|
||||
ref = "main";
|
||||
};
|
||||
|
||||
docker-nixpkgs = {
|
||||
url = "github:nix-community/docker-nixpkgs";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
encoding = {
|
||||
url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/encoding.git?ref=uni2work";
|
||||
flake = false;
|
||||
@ -91,7 +86,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, nixpkgs-recent, docker-nixpkgs, flake-utils, haskell-nix, ... }: flake-utils.lib.eachSystem ["x86_64-linux"]
|
||||
outputs = inputs@{ self, nixpkgs, nixpkgs-recent, flake-utils, haskell-nix, ... }: flake-utils.lib.eachSystem ["x86_64-linux"]
|
||||
(system:
|
||||
let frontendSource = pkgs.lib.sourceByRegex ./. [
|
||||
"^(assets|frontend)(/.*)?$"
|
||||
@ -116,8 +111,6 @@
|
||||
};
|
||||
|
||||
overlays = [
|
||||
(import "${docker-nixpkgs}/overlay.nix")
|
||||
|
||||
(final: prev: let
|
||||
pkgs-recent = import nixpkgs-recent { inherit system; };
|
||||
in { inherit (pkgs-recent) dockerTools node2nix stack glibcLocalesUtf8 tzdata chromium minio minio-client skopeo; inherit (pkgs-recent.stdenv) fetchurlBoot; })
|
||||
@ -134,9 +127,9 @@
|
||||
mkPushDocker = { imageName, dockerImage, defaultRegistry ? "docker://registry.uniworx.de/fradrive/fradrive" }: pkgs.writeScriptBin "push-${dockerImage.imageName}" ''
|
||||
#!${pkgs.zsh}/bin/zsh -xe
|
||||
|
||||
target=''${1-${defaultRegistry}/${imageName}:${dockerImage.imageTag}}
|
||||
target=''${1:-${defaultRegistry}/${imageName}:${dockerImage.imageTag}}
|
||||
[[ -n "''${1}" ]] && shift
|
||||
${pkgs.skopeo}/bin/skopeo ''${@} --insecure-policy copy docker-archive://${dockerImage} ''${target}
|
||||
${pkgs.skopeo}/bin/skopeo --tmpdir ''${TMPDIR:-/var/tmp} ''${@} --insecure-policy copy docker-archive://${dockerImage} ''${target}
|
||||
'';
|
||||
|
||||
inherit (pkgs.lib) recursiveUpdate;
|
||||
@ -146,10 +139,9 @@
|
||||
};
|
||||
|
||||
apps = haskellFlake.apps // {
|
||||
pushUniworxDemoDocker = flake-utils.lib.mkApp { drv = mkPushDocker { imageName = "uniworx-demo"; dockerImage = pkgs.uniworxDemoDocker; defaultRegistry = "docker://registry.gitlab.uniworx.de/fradrive/fradrive"; }; };
|
||||
pushUniworxDocker = flake-utils.lib.mkApp { drv = mkPushDocker { imageName = "uniworx"; dockerImage = pkgs.uniworxDocker; defaultRegistry = "docker://registry.gitlab.uniworx.de/fradrive/fradrive"; }; };
|
||||
pushCIDocker = flake-utils.lib.mkApp { drv = mkPushDocker { imageName = "nix-unstable"; dockerImage = pkgs.ciDocker; }; };
|
||||
calculateMaterializedSha = flake-utils.lib.mkApp { drv = pkgs.uniworx.stack-nix.passthru.calculateMaterializedSha; execPath = ""; };
|
||||
pushUniworxDemoDocker = flake-utils.lib.mkApp { drv = mkPushDocker { imageName = "uniworx-demo"; dockerImage = pkgs.uniworxDemoDocker; }; };
|
||||
pushUniworxDocker = flake-utils.lib.mkApp { drv = mkPushDocker { imageName = "uniworx"; dockerImage = pkgs.uniworxDocker; }; };
|
||||
calculateMaterializedSha = flake-utils.lib.mkApp { drv = pkgs.uniworx.stack-nix.passthru.calculateMaterializedSha; exePath = ""; };
|
||||
jqChangelogJson = flake-utils.lib.mkApp { drv = pkgs.jqChangelogJson; };
|
||||
};
|
||||
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"version": "0.2.0"
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
SPDX-FileCopyrightText: 2022 Gregor Kleen <gregor.kleen@ifi.lmu.de>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2022 Gregor Kleen <gregor.kleen@ifi.lmu.de>,Sarah Vaupel <sarah.vaupel@ifi.lmu.de>,Steffen Jost <jost@cip.ifi.lmu.de>,Steffen Jost <jost@tcs.ifi.lmu.de>
|
||||
# SPDX-FileCopyrightText: 2022-2023 Gregor Kleen <gregor@kleen.consulting>, Sarah Vaupel <sarah.vaupel@ifi.lmu.de>, Steffen Jost <jost@tcs.ifi.lmu.de>
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
@ -13,35 +13,35 @@ let
|
||||
printf '%s' $(date -Is -d '@${toString self.lastModified}') > $out
|
||||
'');
|
||||
in if self ? lastModified then fromDate else "1970-01-01T00:00:01Z";
|
||||
|
||||
|
||||
mkUniworxDocker = { isDemo }: prev.dockerTools.buildImage {
|
||||
name = "uniworx${optionalString isDemo "-demo"}";
|
||||
tag =
|
||||
let
|
||||
versionFile = if isDemo then ./demo-version.json else ./version.json;
|
||||
in (builtins.fromJSON (prev.lib.readFile versionFile)).version;
|
||||
inherit created;
|
||||
inherit created;
|
||||
|
||||
contents = with final; [
|
||||
uniworx.uniworx.components.exes.uniworx
|
||||
prev.dockerTools.binSh findutils coreutils
|
||||
prev.dockerTools.binSh findutils coreutils
|
||||
iana-etc
|
||||
# for PDF creation with Pandoc and LuaTeX
|
||||
# for PDF creation with Pandoc and LuaTeX
|
||||
#cups # needed for interface with print center -- did not work as intended, requires lpd running
|
||||
busybox # should provide a working lpr -- to be tested
|
||||
htop
|
||||
pdftk # for encrypting pdfs
|
||||
#texlive.combined.scheme-medium # too large for container in LMU build environment.
|
||||
(texlive.combine {
|
||||
inherit (texlive) scheme-basic
|
||||
(texlive.combine {
|
||||
inherit (texlive) scheme-basic
|
||||
babel-german babel-english booktabs textpos
|
||||
enumitem eurosym koma-script parskip xcolor dejavu
|
||||
# required fro LuaTeX
|
||||
# required fro LuaTeX
|
||||
luatexbase lualatex-math unicode-math selnolig
|
||||
;
|
||||
})
|
||||
})
|
||||
# just for manual testing within the pod, may be removef for production?
|
||||
curl wget netcat openldap
|
||||
curl wget netcat openldap
|
||||
unixtools.netstat htop gnugrep
|
||||
locale
|
||||
] ++ optionals isDemo [ postgresql_12 memcached uniworx.uniworx.components.exes.uniworxdb ];
|
||||
@ -61,7 +61,7 @@ let
|
||||
install -d -g uniworx -o uniworx -m 0755 /var/log/uniworx
|
||||
|
||||
# just to see how to create directories here
|
||||
mkdir -p /testdir
|
||||
mkdir -p /testdir
|
||||
|
||||
${optionalString isDemo ''
|
||||
install -d -g uniworx -o uniworx -m 0750 /var/lib/postgres
|
||||
@ -148,26 +148,7 @@ let
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
ciDocker = prev.dockerTools.buildImageWithNixDb rec {
|
||||
name = "uniworx-ci";
|
||||
inherit created;
|
||||
tag = (builtins.fromJSON (prev.lib.readFile ./ci-version.json)).version;
|
||||
fromImage = prev.docker-nixpkgs.nix-unstable;
|
||||
|
||||
contents = with final; [
|
||||
bash coreutils
|
||||
minio-client
|
||||
xz
|
||||
];
|
||||
|
||||
runAsRoot = ''
|
||||
#!${final.stdenv.shell}
|
||||
|
||||
${final.coreutils}/bin/install -v -m 0777 -d /var/tmp
|
||||
'';
|
||||
};
|
||||
} // mapAttrs (_name: mkUniworxDocker) {
|
||||
mapAttrs (_name: mkUniworxDocker) {
|
||||
uniworxDemoDocker = { isDemo = true; };
|
||||
uniworxDocker = { isDemo = false; };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user