Nix: fix binary cache CI and introduce module aliases (#48)
* nix: module aliases * CI: bump install-nix-action
This commit is contained in:
2
.github/workflows/cachix.yml
vendored
2
.github/workflows/cachix.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
|||||||
remove-dotnet: true
|
remove-dotnet: true
|
||||||
remove-haskell: true
|
remove-haskell: true
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: cachix/install-nix-action@v20
|
- uses: cachix/install-nix-action@v22
|
||||||
with:
|
with:
|
||||||
extra_nix_config: |
|
extra_nix_config: |
|
||||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||||
|
25
flake.nix
25
flake.nix
@@ -100,28 +100,15 @@
|
|||||||
name = "translate";
|
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 = _: {
|
flake = _: rec {
|
||||||
# TODO: Make a NixOS module
|
nixosModules.home-manager = homeManagerModules.default;
|
||||||
nixosModules.default = null;
|
|
||||||
|
|
||||||
homeManagerModules.default = import ./nix/hm-module.nix inputs.self;
|
homeManagerModules = rec {
|
||||||
|
anyrun = import ./nix/hm-module.nix inputs.self;
|
||||||
|
default = anyrun;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user