Nix: fix binary cache CI and introduce module aliases (#48)

* nix: module aliases

* CI: bump install-nix-action
This commit is contained in:
NotAShelf
2023-06-21 19:23:05 +03:00
committed by GitHub
parent 099e1a08fd
commit 63fd38d3da
2 changed files with 7 additions and 20 deletions

View File

@@ -33,7 +33,7 @@ jobs:
remove-dotnet: true
remove-haskell: true
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
- uses: cachix/install-nix-action@v22
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}

View File

@@ -100,28 +100,15 @@
name = "translate";
};
};
checks = {
format =
pkgs.runCommand "check-format" {
buildInputs = with pkgs; [
rustfmt
cargo
];
} ''
${pkgs.rustfmt}/bin/cargo-fmt fmt --manifest-path ./anyrun/Cargo.toml -- --check
${getExe pkgs.alejandra} --check ./
touch $out # it worked!
'';
"anyrun-format-check" = self'.packages.anyrun;
};
};
flake = _: {
# TODO: Make a NixOS module
nixosModules.default = null;
flake = _: rec {
nixosModules.home-manager = homeManagerModules.default;
homeManagerModules.default = import ./nix/hm-module.nix inputs.self;
homeManagerModules = rec {
anyrun = import ./nix/hm-module.nix inputs.self;
default = anyrun;
};
};
};
}