update piped and update flake outputs to make building overlay packages easier
This commit is contained in:
parent
6bf38a1524
commit
ad0e3f9b8b
83
outputs.nix
83
outputs.nix
|
@ -1,29 +1,60 @@
|
|||
{
|
||||
self,
|
||||
nixpkgs-unstable,
|
||||
...
|
||||
} @ inputs: let
|
||||
pkgs-x86_64-linux = nixpkgs-unstable.legacyPackages.x86_64-linux;
|
||||
{self, ...} @ inputs: let
|
||||
nixpkgs = inputs.nixpkgs-unstable;
|
||||
lib = nixpkgs.lib;
|
||||
|
||||
hosts = import ./hosts inputs;
|
||||
in {
|
||||
nixosConfigurations = hosts.nixosConfigurations;
|
||||
#darwinConfigurations = hosts.darswinConfigurations;
|
||||
in
|
||||
{
|
||||
nixosConfigurations = hosts.nixosConfigurations;
|
||||
#darwinConfigurations = hosts.darswinConfigurations;
|
||||
|
||||
deploy.nodes = import ./deployNodes.nix {
|
||||
nixosConfigurations = self.nixosConfigurations;
|
||||
deploy-rs = inputs.deploy-rs;
|
||||
};
|
||||
deploy.nodes = import ./deployNodes.nix {
|
||||
nixosConfigurations = self.nixosConfigurations;
|
||||
deploy-rs = inputs.deploy-rs;
|
||||
};
|
||||
}
|
||||
// (inputs.flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
(import ./overlay)
|
||||
];
|
||||
};
|
||||
in {
|
||||
devShell = pkgs.mkShell {
|
||||
VAULT_API_ADDR = "https://vault.owo.monster";
|
||||
packages =
|
||||
(with pkgs; [
|
||||
git
|
||||
nano
|
||||
bat
|
||||
exa
|
||||
#inputs.deploy-rs.packages."x86_64-linux".deploy-rs
|
||||
(pkgs.callPackage ./extras/mk-enc-usb.nix {})
|
||||
(pkgs.callPackage ./extras/mk-normal-enc-ssd.nix {})
|
||||
])
|
||||
++ (with self.packages."${system}"; [
|
||||
mk-enc-usb
|
||||
mk-normal-enc-ssd
|
||||
]);
|
||||
};
|
||||
|
||||
devShell."x86_64-linux" = pkgs-x86_64-linux.mkShell {
|
||||
VAULT_API_ADDR = "https://vault.owo.monster";
|
||||
packages = with pkgs-x86_64-linux; [
|
||||
git
|
||||
nano
|
||||
bat
|
||||
exa
|
||||
#inputs.deploy-rs.packages."x86_64-linux".deploy-rs
|
||||
(pkgs-x86_64-linux.callPackage ./extras/mk-enc-usb.nix {})
|
||||
(pkgs-x86_64-linux.callPackage ./extras/mk-normal-enc-ssd.nix {})
|
||||
];
|
||||
};
|
||||
}
|
||||
apps = let
|
||||
packages = self.packages."${system}";
|
||||
in {
|
||||
mk-enc-usb = {
|
||||
type = "app";
|
||||
program = "${packages.mk-enc-usb}/bin/mk-enc-usb";
|
||||
};
|
||||
mk-normal-enc-ssd = {
|
||||
type = "app";
|
||||
program = "${packages.mk-normal-enc-ssd}/bin/mk-normal-enc-ssd";
|
||||
};
|
||||
};
|
||||
|
||||
packages = {
|
||||
inherit (pkgs) comic-code comic-sans;
|
||||
inherit (pkgs) piped-frontend piped-backend piped-proxy;
|
||||
inherit (pkgs) mk-enc-usb mk-normal-enc-ssd;
|
||||
};
|
||||
}))
|
||||
|
|
|
@ -9,4 +9,6 @@ final: _prev: {
|
|||
};
|
||||
piped-frontend = final.callPackage ./piped/frontend {};
|
||||
piped-proxy = final.callPackage ./piped/proxy {};
|
||||
mk-enc-usb = final.callPackage ../extras/mk-enc-usb.nix {};
|
||||
mk-normal-enc-ssd = final.callPackage ../extras/mk-normal-enc-ssd.nix {};
|
||||
}
|
||||
|
|
|
@ -56,5 +56,5 @@ in
|
|||
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
outputHash = "sha256-qTwBcpCjD+4Ejhp6V55wGnCBaKImEaK/L0zFxNkp19o=";
|
||||
outputHash = "${meta.backend.deps-sha256}";
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,14 +1,15 @@
|
|||
{
|
||||
"frontend": {
|
||||
"rev": "8df66abb0202372ef9b3e58b778586f709764e87",
|
||||
"sha256": "sha256-xU4FxmMbt2T2s2J8fc86cUMup/wSI53F4VEqrb4O6L8="
|
||||
"rev": "4de41cd819d4bf49723de03a70ff48b2e5972fde",
|
||||
"sha256": "sha256-ehFJp2X8UMu4Y/i1TgT85fQPrBzet2896sDXKJc5A+A="
|
||||
},
|
||||
"backend": {
|
||||
"rev": "93a5b8478e7783a7fbf697e405de943212cf6aa2",
|
||||
"sha256": "sha256-BdBSWNXt6Q+xwGezk0E51cu2V24Pp/64HslyDegvN4k="
|
||||
"rev": "8e2564bc1d3acab50f4a0734f01b81447a716121",
|
||||
"sha256": "sha256-TpIXwrkSbhU/w6suukiLQyajw59NvW0dqQWHoscpFio=",
|
||||
"deps-sha256": "sha256-GUkweG2ftIdalX20mQ9xkHiDP5aQ5WYNkB8shblKC/M="
|
||||
},
|
||||
"proxy": {
|
||||
"rev": "831d7da257caef233347beb0c0f004ba084d3425",
|
||||
"sha256": "sha256-x+nNGhYfXDyL8KKrgd18AJmeis13W5KMaGeJiSJepIM="
|
||||
"rev": "fe8fef85c63f9c54ef167fe77ef42e5fb52ef8a9",
|
||||
"sha256": "sha256-vlR+pbm8J32F/BKsmSlgEhb8JJ/8WNiF7cYXJKEmSsQ="
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq git moreutils yarn2nix nodejs_20 yarn nix nix-prefetch
|
||||
#!nix-shell -i bash -p curl jq git moreutils nodejs_20 yarn2nix yarn nix
|
||||
set -euo pipefail
|
||||
|
||||
BASE_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
@ -19,19 +19,21 @@ new_frontend_rev=$(curl -L "https://api.github.com/repos/TeamPiped/Piped/commits
|
|||
if [ "$new_frontend_rev" != "$old_frontend_rev" ] || [ "${FORCE_UPDATE-}" != "" ]; then
|
||||
echo "Frontend is out of date. Updating..."
|
||||
json_set '.frontend.rev' "$new_frontend_rev"
|
||||
#new_frontend_sha256=$(nix-prefetch fetchFromGitHub --owner TeamPiped --repo Piped --rev "$new_frontend_rev")
|
||||
#json_set '.frontend.sha256' "$new_frontend_sha256"
|
||||
json_set '.frontend.sha256' ""
|
||||
|
||||
TMP=$(mktemp -d)
|
||||
pushd "$TMP"
|
||||
git clone https://github.com/TeamPiped/Piped
|
||||
pushd Piped
|
||||
git reset --hard "$new_frontend_rev"
|
||||
# Missing from generated lockfile,
|
||||
yarn install --no-lockfile
|
||||
yarn install --mode update-lockfile
|
||||
nix run "github:NixOS/nixpkgs/nixos-unstable#yarn2nix" > "${BASE_DIR}/frontend/yarn.nix"
|
||||
cp yarn.lock "${BASE_DIR}/frontend/yarn.lock"
|
||||
popd
|
||||
popd
|
||||
rm -rf "$TMP"
|
||||
fi
|
||||
|
||||
# Backend
|
||||
|
@ -40,8 +42,8 @@ new_backend_rev=$(curl -L "https://api.github.com/repos/TeamPiped/Piped-Backend/
|
|||
if [ "$new_backend_rev" != "$old_backend_rev" ] || [ "${FORCE_UPDATE-}" != "" ]; then
|
||||
echo "Backend is out of date. Updating..."
|
||||
json_set '.backend.rev' "$new_backend_rev"
|
||||
#new_backend_sha256=$(nix-prefetch fetchFromGitHub --owner TeamPiped --repo Piped-Backend --rev "$new_backend_rev")
|
||||
#json_set '.backend.sha256' "$new_backend_sha256"
|
||||
json_set '.backend.sha256' ""
|
||||
json_set '.backend.deps-sha256' ""
|
||||
fi
|
||||
|
||||
# Proxy
|
||||
|
@ -50,8 +52,7 @@ new_proxy_rev=$(curl -L "https://api.github.com/repos/TeamPiped/piped-proxy/comm
|
|||
if [ "$new_proxy_rev" != "$old_proxy_rev" ] || [ "${FORCE_UPDATE-}" != "" ]; then
|
||||
echo "Proxy is out of date. Updating..."
|
||||
json_set '.proxy.rev' "$new_proxy_rev"
|
||||
#new_proxy_sha256=$(nix-prefetch fetchFromGitHub --owner TeamPiped --repo piped-proxy --rev "$new_proxy_rev")
|
||||
#json_set '.proxy.sha256' "$new_proxy_sha256"
|
||||
json_set '.proxy.sha256' ""
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue