From 8e941f60ea103cb044083f79cb4bebe1ff281097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Fri, 15 Jul 2022 09:44:37 +0200 Subject: [PATCH] fix(ci): add support for pure evaluation mode the errors were caused by https://github.com/NixOS/nix/pull/6698 fix taken from https://github.com/hercules-ci/gitignore.nix/pull/58/files --- flake.nix | 8 ++++++-- lib/home.nix | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 lib/home.nix diff --git a/flake.nix b/flake.nix index 8a31d0d..8cb8f61 100644 --- a/flake.nix +++ b/flake.nix @@ -84,6 +84,10 @@ } @ inputs: let system = "x86_64-linux"; pkgs = nixos-stable.legacyPackages.${system}; + home = + if nixos-stable.lib.inPureEvalMode or false + then _: /nonexistent + else import lib/home.nix; source = { sources, unstable, @@ -93,11 +97,11 @@ niveum.file = toString ./.; nixos-config.symlink = "niveum/systems/${name}/configuration.nix"; system-secrets.pass = { - dir = toString ~/.password-store; + dir = toString (home /.password-store); name = "systems/${name}"; }; secrets.pass = { - dir = toString ~/.password-store; + dir = toString (home /.password-store); name = "shared"; }; nixpkgs.file = toString ( diff --git a/lib/home.nix b/lib/home.nix new file mode 100644 index 0000000..56ae511 --- /dev/null +++ b/lib/home.nix @@ -0,0 +1,2 @@ +# https://github.com/hercules-ci/gitignore.nix/pull/58/files +path: ~/. + path