Colmena | 300 Members | |
| A simple, stateless NixOS deployment tool - https://github.com/zhaofengli/colmena | 104 Servers |
| Sender | Message | Time |
|---|---|---|
| 3 Feb 2022 | ||
*
| 14:30:17 | |
*
| 14:30:53 | |
*
| 14:31:31 | |
| only this works to me. If I import nixosModules.deploymentOptions and move deployment directive to nixosConfiguration I get this error: | 14:33:32 | |
error: The option deployment.allowLocalDeployment' in <unknown-file>' is already declared in /nix/store/rz7wzrgh4fpdgab95dgrx46ig2gc2nym-source/flake.nix'.` | 14:38:23 | |
* error: The option 'deployment.allowLocalDeployment' in '<unknown-file>' is already declared in '/nix/store/rz7wzrgh4fpdgab95dgrx46ig2gc2nym-source/flake.nix'. | 14:38:45 | |
* only this works to me. If I import nixosModules.deploymentOptions and move deployment directive to nixosConfiguration I get this error running colmena apply-local | 14:39:27 | |
* only this works to me. If I import nixosModules.deploymentOptions and move deployment directive to nixosConfiguration I get this error running colmena apply-local | 14:39:46 | |
| 15:15:09 | ||
| Im also realize while playing with colmena/nixosConfigurations outputs that colmena are impure builds. Is there some option to force pure builds?? | 15:35:17 | |
In reply to @janejasperous:one.ems.hostthere isn't, but you can just remove this line: https://github.com/zhaofengli/colmena/blob/f674ddf1739aa79ac9dcad38771cc89c662eaa6a/src/nix/evaluator/nix_eval_jobs.rs#L84 | 16:42:07 | |
| but i'm curious why impure is passed by default, i only see it mentioned there and in a test, cc Zhaofeng Li | 16:42:30 | |
hello, is it possible to define specialArgs per node? I'd like to "inject" some attributes which depend on different values of system | 16:58:07 | |
In reply to @pacien:pacien.netApart from specialArgs, there are also normal arguments. For example, you can set the _module.args.someArg option in node configs. | 18:35:56 | |
In reply to @winterqt:nixos.devCurrently, there is an eval.nix that takes a normal hive.nix or a flake URI, evaluated in a normal impure context. If a flake URI is passed, then it's fetched using builtins.getFlake. | 18:40:37 | |
In reply to @zhaofeng:zhaofeng.li thank you, that works! By the way, what is | 18:42:23 | |
In reply to @pacien:pacien.netIt should be the platform that you are deploying to, not the one running Colmena itself. | 18:44:26 | |
ok! I'm setting this with nodeNixpkgs explicitly for each node. Would it be possible to make nixpkgs not mandatory in this case? | 18:47:11 | |
In reply to @pacien:pacien.netSadly not, because we still rely on some helper functions from lib of the top-level pinned nixpkgs. We could use the ones from an arbitrary nodeNixpkgs but it doesn't seem ideal. | 18:51:19 | |
In reply to @winterqt:nixos.dev* Currently, there is an eval.nix that takes a normal hive.nix or a flake URI, evaluated in a normal impure context. If a flake URI is passed, then it's fetched using And this setup (importing a file outside of a flake context) sadly doesn't work in pure evaluation. | 18:53:26 | |
In reply to @winterqt:nixos.devMissed 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 | |
In reply to @zhaofeng:zhaofeng.ligot it -- what information is it meant to convey? | 23:22:00 | |
In reply to @winterqt:nixos.devthat 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 | |
| wait but what is it even evaling if the two modes of eval are impure? yeah i'm admittedly confused | 23:32:56 | |
In reply to @winterqt:nixos.devRephrase your question? | 23:35:35 | |
| 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 | |
In reply to @zhaofeng:zhaofeng.liguess i'm just confused by this | 23:37:16 | |
| 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 | |
| Right, I understand that. | 23:42:48 | |
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 | |