| 18 Jul 2022 |
rendakuenthusiast | I wrote a helper function that woudl generate an nginx vhost set of the form { services.nginx.virtualHosts."hostname.example.com" = <nginx configuration> } | 04:56:34 |
rendakuenthusiast | so that I could define the vhost for a service in the same module I define the service in | 04:56:58 |
rendakuenthusiast | so I have my helper function return the above set, and then use \\ helperFunction { hostname="hostname"; } to merge it into the config set that was already being returned for each service I'm running | 04:57:32 |
rendakuenthusiast | and this is causing existing configuration to stop appearing in ways I don't understand | 04:57:52 |
rendakuenthusiast | if I have a set a and a set b with no keys in common, a \\ b will just merge them without overwriting anything, right? | 04:58:12 |
Winter (she/her) | you mean //, right? | 05:00:49 |
rendakuenthusiast | er, yes, // | 05:04:09 |
rendakuenthusiast | I didn't type it wrong in my code | 05:04:33 |
rendakuenthusiast | okay, I have a minimal example: https://privatebin.net/?849782ab0b96f528#9W3j2DCQz6fRo57akit3xWHGk3XquY9g5zE7tB6qotDi | 05:41:57 |
rendakuenthusiast | when I say "works", I mean the first version there creates the nginx vhost host.example.com, and the second version doesn't create it | 05:42:21 |
rendakuenthusiast | and I"m not sure why, I woudl expect those two expressions to be equivalent | 05:42:35 |
| 19 Jul 2022 |
Zhaofeng Li | // only does shallow merging. For example, { fruits.apple = 1; } // { fruits.banana = 2; } returns { fruits.banana = 2; }. What you want for configurations is lib.mkMerge: https://nixos.org/manual/nixos/stable/#sec-option-definitions-merging | 08:18:55 |
| 21 Jul 2022 |
rendakuenthusiast | huh, I did not know those were the semantics of // | 20:25:08 |
rendakuenthusiast | I wish that documentation had been easier to find | 20:25:46 |
rendakuenthusiast | so, if I use lib.mkMerge in my code, I get this error:
error: You're trying to declare a value of type `lambda'
rather than an attribute-set for the option
`'!
This usually happens if `' has option
definitions inside that are not matched. Please check how to properly define
this option by e.g. referring to `man 5 configuration.nix'!
(use '--show-trace' to show detailed location information)
| 20:44:30 |
rendakuenthusiast | I'm not sure why | 20:44:33 |
rendakuenthusiast | is there a way I can have colmena use --show-trace? | 20:44:43 |
rendakuenthusiast | or in general if I"m trying to deploy something with colmena, is there a way I can get better debug information? | 20:44:58 |
Zhaofeng Li | Just --show-trace should do it | 20:45:22 |
Zhaofeng Li | And also use -v to get the full output instead of the spinners | 20:45:40 |
rendakuenthusiast | oh I need to wrap my function call in parens, then it works | 20:48:20 |
| 22 Jul 2022 |
| Chris Portela joined the room. | 20:51:59 |
| 24 Jul 2022 |
rendakuenthusiast | if I deploy with colmena, and a derivation fails, I see an error message saying that a log should appear at /tmp/nix-build<pkgname> | 06:45:57 |
rendakuenthusiast | and I don't see this file existing, either on my local system or the system colmena should be deploying to | 06:46:11 |
Winter (she/her) | In reply to @rendakuenthusiast:imperishable.name if I deploy with colmena, and a derivation fails, I see an error message saying that a log should appear at /tmp/nix-build you'll want to run nix log /nix/store/the.drv, that'll provide build logs | 17:41:16 |
| 25 Jul 2022 |
@grahamc:nixos.org | can colmena handle a network of mixed architectures? | 15:38:52 |
Linux Hackerman | yes, using it for that myself :) | 15:39:05 |
@grahamc:nixos.org | oh sorry, half-asked question | 15:41:05 |
@grahamc:nixos.org | where I'm also using its flake.nix support | 15:41:12 |
Linux Hackerman | In reply to @linus:schreibt.jetzt yes, using it for that myself :) still :D | 15:41:24 |