| 3 Feb 2022 |
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 |
Winter (she/her) | got it, thanks | 00:28:22 |
Zhaofeng Li | You can also take a look at NixOps' implementation which uses inotifywait both ways: https://github.com/NixOS/nixops/blob/ce1c57ec104636954296c229468bb65fa4ec7f8d/nix/keys.nix#L234-L262 | 00:28:54 |
Zhaofeng Li | If the key file doesn't exist, the service is stuck in "activating" (ExecStartPre) with an infinite timeout | 00:29:39 |
Winter (she/her) | In reply to @zhaofeng:zhaofeng.li If the key file doesn't exist, the service is stuck in "activating" (ExecStartPre) with an infinite timeout so did you go the path unit route for simplicity? | 00:33:43 |
Zhaofeng Li | In reply to @winterqt:nixos.dev so did you go the path unit route for simplicity? Yeah, feels cleaner to me, though path units don't support deactivation so I still ended up doing an inotifywait in the service itself. | 00:35:57 |
Linux Hackerman is moving: @linus:schreibt.jetzt | In reply to @buckley310:matrix.org because colmena was created before flakes were stable Flakes still isn't stable. | 08:39:16 |
Linux Hackerman is moving: @linus:schreibt.jetzt | That's why it's guarded behind experimental-features, breaking changes can still happen. | 08:45:39 |
Buckley | That' true. | 15:17:37 |
Buckley | I just mean like, the output attribute name for machine configs probably isnt going to change anymore now, so that aspect has stabilized | 15:18:35 |
Buckley | But yeah, flakes, totally not officially "stable" yet. | 15:19:04 |
CRTified | Buckley: Regarding your colmena/nixosConfigurations-shim, how did you get it working at all? My flakes don't have an extraArgs.modules attribute, so I seem to be missing something. The configs build properly with nixos-rebuild --flake .#hostname build | 17:46:12 |
Buckley | Each machine should have the extraArga attribute, not the flake itself. Not sure if that’s what you mean | 17:47:23 |