Skip to content

Commit

Permalink
feat: use nix profile to install Attic
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanccn committed Oct 6, 2024
1 parent 5619ef4 commit 55e6e8d
Show file tree
Hide file tree
Showing 9 changed files with 340 additions and 297 deletions.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 24 additions & 21 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,32 @@
description = "Github Action for caching Nix derivations with attic";

inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};

outputs = {nixpkgs, ...}: let
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
outputs =
{ nixpkgs, ... }:
let
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];

forAllSystems = fn: nixpkgs.lib.genAttrs systems (system: fn nixpkgs.legacyPackages.${system});
in {
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
actionlint
nodejs_20
(nodePackages_latest.pnpm.override {nodejs = nodejs_20;})
];
};
});
forAllSystems = fn: nixpkgs.lib.genAttrs systems (system: fn nixpkgs.legacyPackages.${system});
in
{
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
actionlint
nodejs_20
(nodePackages_latest.pnpm.override { nodejs = nodejs_20; })
];
};
});

formatter = forAllSystems (p: p.alejandra);
};
formatter = forAllSystems (p: p.nixfmt-rfc-style);
};
}
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
"author": "Ryan Cao <[email protected]>",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"just-split": "^3.2.0"
},
"devDependencies": {
"@types/node": "^16.18.38",
"esbuild": "^0.18.14",
"prettier": "3.0.0",
"typescript": "^5.1.6"
"@types/node": "^20.16.10",
"esbuild": "^0.24.0",
"prettier": "3.3.3",
"typescript": "^5.6.2"
},
"packageManager": "pnpm@8.7.5"
"packageManager": "pnpm@9.12.0+sha512.4abf725084d7bcbafbd728bfc7bee61f2f791f977fd87542b3579dcb23504d170d46337945e4c66485cd12d588a0c0e570ed9c477e7ccdd8507cf05f3f92eaca"
}
Loading

0 comments on commit 55e6e8d

Please sign in to comment.