refactor: clean up nixFastBuild
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-10-28 08:18:00 -04:00
parent c2bb1a264a
commit 6bb2b3c8c2
4 changed files with 22 additions and 14 deletions

View file

@ -1,8 +1,8 @@
pkgs: pkgs:
pkgs.dockerTools.pullImage rec { pkgs.dockerTools.pullImage rec {
imageName = "21hsmw/flaresolverr"; imageName = "21hsmw/flaresolverr";
imageDigest = "sha256:a85e675e7b4e980e142d58e440dd3e1b6fa6bc10aabcc612727f81e34c28db80"; imageDigest = "sha256:506b7f26aaf10e8c07ab22f74a7eea31eca66e263fe52d570b7bc0ef29952db9";
sha256 = "1wn32jl4za7y4sj5ljz5m87z46maz65c4ckznz84mp15f008c5y4"; sha256 = "1ll5f62r69hzizli0irpp1z1r4hmv9ps3pqzb1s8klvjrdgaxd22";
finalImageName = imageName; finalImageName = imageName;
finalImageTag = "nodriver"; finalImageTag = "nodriver";
} }

View file

@ -7,7 +7,7 @@
inherit (config.vars) mainUser; inherit (config.vars) mainUser;
inherit (config.sops) secrets; inherit (config.sops) secrets;
nix-fast-buildPkg = nix-fast-build.packages.${pkgs.system}.nix-fast-build.override { nix-fast-build-pkg = nix-fast-build.packages.${pkgs.system}.nix-fast-build.override {
nix-eval-jobs = nix-eval-jobs =
pkgs.nix-eval-jobs.override { pkgs.nix-eval-jobs.override {
nix = config.nix.package; nix = config.nix.package;
@ -16,19 +16,23 @@
nix = config.nix.package; nix = config.nix.package;
}; };
}; };
nixFastBuild = pkgs.writeShellApplication {
name = "nixFastBuild";
runtimeInputs = with pkgs; [gnugrep nix-fast-build-pkg];
text = ''
cd "$FLAKE" || return
nix-fast-build -f .#nixFastChecks
'';
};
in { in {
services.nix-serve = { services.nix-serve = {
enable = true; enable = true;
secretKeyFile = secrets.binary-cache-key.path; secretKeyFile = secrets.binary-cache-key.path;
}; };
environment.systemPackages = [ environment.systemPackages = [nix-fast-build-pkg nixFastBuild];
nix-fast-buildPkg
];
home-manager.users.${mainUser}.programs.bash.shellAliases = {
nix-fast-build = "nix-fast-build -f $FLAKE/.#nixFastChecks";
};
# Populate cache # Populate cache
systemd = { systemd = {
@ -41,7 +45,7 @@ in {
path = path =
[ [
nix-fast-buildPkg nix-fast-build-pkg
config.nix.package config.nix.package
] ]
++ (builtins.attrValues { ++ (builtins.attrValues {
@ -55,12 +59,16 @@ in {
script = '' script = ''
cd /tmp cd /tmp
if [[ -d ./nix-clone ]]; then if [[ -d ./nix-clone ]]; then
rm -r ./nix-clone rm -r ./nix-clone
fi fi
git clone https://git.nelim.org/matt1432/nixos-configs.git nix-clone git clone https://git.nelim.org/matt1432/nixos-configs.git nix-clone
cd nix-clone cd nix-clone
nix-fast-build -f .#nixFastChecks nix-fast-build -f .#nixFastChecks
cd .. cd ..
rm -r nix-clone rm -r nix-clone

Binary file not shown.

View file

@ -204,10 +204,10 @@
}; };
"return-youtube-dislikes" = buildFirefoxXpiAddon { "return-youtube-dislikes" = buildFirefoxXpiAddon {
pname = "return-youtube-dislikes"; pname = "return-youtube-dislikes";
version = "3.0.0.17"; version = "3.0.0.18";
addonId = "{762f9885-5a13-4abd-9c77-433dcd38b8fd}"; addonId = "{762f9885-5a13-4abd-9c77-433dcd38b8fd}";
url = "https://addons.mozilla.org/firefox/downloads/file/4342747/return_youtube_dislikes-3.0.0.17.xpi"; url = "https://addons.mozilla.org/firefox/downloads/file/4371820/return_youtube_dislikes-3.0.0.18.xpi";
sha256 = "c9115baa653c22390089fd6f028c88b9ca9c56f25112ff13e497caba984df841"; sha256 = "2d33977ce93276537543161f8e05c3612f71556840ae1eb98239284b8f8ba19e";
meta = with lib; { meta = with lib; {
description = "Returns ability to see dislike statistics on youtube"; description = "Returns ability to see dislike statistics on youtube";
license = licenses.gpl3; license = licenses.gpl3;