From 63fd38d3da6d27ecfb2c5a97292a4a680697bd0c Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Wed, 21 Jun 2023 19:23:05 +0300 Subject: [PATCH] Nix: fix binary cache CI and introduce module aliases (#48) * nix: module aliases * CI: bump install-nix-action --- .github/workflows/cachix.yml | 2 +- flake.nix | 25 ++++++------------------- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/.github/workflows/cachix.yml b/.github/workflows/cachix.yml index ff05189..a42ba16 100644 --- a/.github/workflows/cachix.yml +++ b/.github/workflows/cachix.yml @@ -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 }} diff --git a/flake.nix b/flake.nix index 7690549..feb30c1 100644 --- a/flake.nix +++ b/flake.nix @@ -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; + }; }; }; }