| 3 Feb 2022 |
Zhaofeng Li | In reply to @winterqt:nixos.dev there isn't, but you can just remove this line: https://github.com/zhaofengli/colmena/blob/f674ddf1739aa79ac9dcad38771cc89c662eaa6a/src/nix/evaluator/nix_eval_jobs.rs#L84 Missed this one. Removing this line will not make the evaluation pure (it does nothing). It's only there for informational purposes, and both modes of evaluation (nix-instantiate and nix-eval-jobs) are initiated from "normal Nix" in an impure context. | 22:22:13 |
Winter (she/her) | In reply to @zhaofeng:zhaofeng.li Missed this one. Removing this line will not make the evaluation pure (it does nothing). It's only there for informational purposes, and both modes of evaluation (nix-instantiate and nix-eval-jobs) are initiated from "normal Nix" in an impure context. got it -- what information is it meant to convey? | 23:22:00 |
Zhaofeng Li | In reply to @winterqt:nixos.dev got it -- what information is it meant to convey? that it is actually impure and not the --flake mode in nix-eval-jobs, though in this case it has apparently led to more confusion | 23:31:49 |
Winter (she/her) | wait but what is it even evaling if the two modes of eval are impure?
yeah i'm admittedly confused | 23:32:56 |
Zhaofeng Li | In reply to @winterqt:nixos.dev wait but what is it even evaling if the two modes of eval are impure?
yeah i'm admittedly confused Rephrase your question? | 23:35:35 |
Winter (she/her) | What is the nix-eval-jobs invocation evaling? like, you said the two eval modes are doing it purely, so i guess i'm just confused | 23:36:48 |
Winter (she/her) | In reply to @zhaofeng:zhaofeng.li Missed this one. Removing this line will not make the evaluation pure (it does nothing). It's only there for informational purposes, and both modes of evaluation (nix-instantiate and nix-eval-jobs) are initiated from "normal Nix" in an impure context. guess i'm just confused by this | 23:37:16 |
Zhaofeng Li | Colmena can use nix-instantiate or nix-eval-jobs (experimental), and the code you referred to was the nix-eval-jobs flow | 23:38:13 |
Winter (she/her) | Right, I understand that. | 23:42:48 |
Winter (she/her) | So looking at the nix-eval-jobs source, you're right in that the the value of evalSettings.pureEval isn't used at all... why does the flag exist then? | 23:46:00 |
Zhaofeng Li | In reply to @winterqt:nixos.dev So looking at the nix-eval-jobs source, you're right in that the the value of evalSettings.pureEval isn't used at all... why does the flag exist then? nix-eval-jobs can do pure eval with --flake (which we are not using), and --impure is needed if you use a --flake with impurity | 23:49:06 |
Zhaofeng Li | evalSettings is a global variable used by Nix | 23:49:28 |
Winter (she/her) | In reply to @zhaofeng:zhaofeng.li evalSettings is a global variable used by Nix didn't even notice this linked to nix, whoops | 23:52:45 |
Winter (she/her) | In reply to @zhaofeng:zhaofeng.li nix-eval-jobs can do pure eval with --flake (which we are not using), and --impure is needed if you use a --flake with impurity so it is impure? | 23:52:57 |
Winter (she/her) | wait, yes, i guess so | 23:53:24 |
Winter (she/her) | i misread your original answer | 23:55:02 |
Winter (she/her) | apologies | 23:55:04 |
Winter (she/her) | so why is impurity needed when using flakes? | 23:55:42 |
Zhaofeng Li | In reply to @winterqt:nixos.dev so it is impure? Yes, and we could make it work with pure-eval if we change our setup. The major obstable is that we have a separate eval.nix file that contains our logic, and that file is the entrypoint of the evaluation. | 23:56:25 |
| 4 Feb 2022 |
Winter (she/her) | ah, i see now. | 00:01:28 |
Zhaofeng Li | ... and to expand on that, you can play around with the machinery like nix-instantiate --eval --pure-eval anything.nix and also --restrict-eval which is more relaxed and allows for things in the NIX_PATH to be accessed, but it seems that the pure-eval is never intended to be used like this outside of the new Flake-based nix CLI | 00:06:16 |
Winter (she/her) | got it | 00:16:20 |
Winter (she/her) | Zhaofeng Li: why do you exit with 0 when the file doesn't exist in https://github.com/zhaofengli/colmena/pull/51/files#diff-c5cb072f3843e65103369a68e92494e5ab2915080d0930c0c4fd6b7cb2620a96R502? | 00:16:51 |
Winter (she/her) | doesn't this defeat the point of the services | 00:16:58 |
Zhaofeng Li | In reply to @winterqt:nixos.dev Zhaofeng Li: why do you exit with 0 when the file doesn't exist in https://github.com/zhaofengli/colmena/pull/51/files#diff-c5cb072f3843e65103369a68e92494e5ab2915080d0930c0c4fd6b7cb2620a96R502? The service is supposed to die when it doesn't exist. The activation of the service is triggered by the path unit. | 00:19:00 |
Zhaofeng Li | In reply to @winterqt:nixos.dev Zhaofeng Li: why do you exit with 0 when the file doesn't exist in https://github.com/zhaofengli/colmena/pull/51/files#diff-c5cb072f3843e65103369a68e92494e5ab2915080d0930c0c4fd6b7cb2620a96R502? * The service is supposed to die when the key file ceases to exist. The activation of the service is triggered by the path unit. | 00:19:12 |
Zhaofeng Li | * The service is supposed to die when the key file doesn't exist or ceases to exist. The activation of the service is triggered by the path unit. | 00:19:36 |
Winter (she/her) | In reply to @zhaofeng:zhaofeng.li The service is supposed to die when the key file doesn't exist or ceases to exist. The activation of the service is triggered by the path unit. got it.
why Restart = "on-failure"; btw? | 00:27:38 |
Winter (she/her) | like, when would it want to be restarted? if inotifywait fails? | 00:27:53 |
Zhaofeng Li | In reply to @winterqt:nixos.dev like, when would it want to be restarted? if inotifywait fails? Yes | 00:28:02 |