!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

314 Members
A simple, stateless NixOS deployment tool - https://github.com/zhaofengli/colmena112 Servers

Load older messages


SenderMessageTime
19 Jun 2023
@rendakuenthusiast:imperishable.namerendakuenthusiast joined the room.05:24:50
@rendakuenthusiast:imperishable.namerendakuenthusiastI'm trying to convert my colmena setup to flakes and am running into errors that I can't debug05:26:12
@rendakuenthusiast:imperishable.namerendakuenthusiast I have nixpkgs pinned to a specific hash on github with nixpkgs.url = "github:NixOS/nixpkgs/a12a82e90bcbff3f6fa72fc4e708d850da7e5e8b"; (same hash I had with my previous non-flakes setup) 05:26:57
@rendakuenthusiast:imperishable.namerendakuenthusiast

and then my colmena.meta.nixpkgs is:
```
nixpkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [];
}

```

05:27:27
@rendakuenthusiast:imperishable.namerendakuenthusiastas per the documentation05:27:30
@rendakuenthusiast:imperishable.namerendakuenthusiast * and then my colmena.meta.nixpkgs is:
```
nixpkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [];
}
```
05:27:39
@rendakuenthusiast:imperishable.namerendakuenthusiast *

and then my colmena.meta.nixpkgs is:

            nixpkgs = import nixpkgs {
               system = "x86\_64-linux";
               overlays = \[];
             }
05:27:58
@rendakuenthusiast:imperishable.namerendakuenthusiast

I'm seeing the error:

       error: The option `system' does not exist. Definition values:
       - In `<unknown-file>': "x86_64-linux"
05:28:24
@rendakuenthusiast:imperishable.namerendakuenthusiasthm, not sure how those escapes got into the above file, they don't exist in my flake.nix05:28:56
@rendakuenthusiast:imperishable.namerendakuenthusiast oh, hm, I may have solved my own problem - I had colmena.meta.system = "x86_64-linux"; defined for some reason 05:30:38
@rendakuenthusiast:imperishable.namerendakuenthusiastif I remove that it seems to deploy05:30:45
@rendakuenthusiast:imperishable.namerendakuenthusiast

okay it seems that if I do pass -f flake.nix as an argument, colmena fails with the error message:

error: '' is not a valid URL
05:34:04
@rendakuenthusiast:imperishable.namerendakuenthusiastwhich is very confusing05:34:07
@rendakuenthusiast:imperishable.namerendakuenthusiastbut if I omit that it seems to work fine05:34:13
@zhaofeng:zhaofeng.liZhaofeng Li Interesting, what does nix flake metadata --json ./flake.nix | jq show? 05:37:43
@zhaofeng:zhaofeng.liZhaofeng Li Specifically, what's in originalUrl and resolveUrl? 05:38:04
@zhaofeng:zhaofeng.liZhaofeng Li Also is flake.nix tracked by git? You need to git add flake.nix flake.lock 05:38:37
@rendakuenthusiast:imperishable.namerendakuenthusiast @Zhaofeng Li my colmena config was previously being tracked in git, I'm currently live-editing files in that repo 05:48:19
@rendakuenthusiast:imperishable.namerendakuenthusiastI think I did add flake.nix and flake.lock but their current state was different than what was checked in05:48:30
@zhaofeng:zhaofeng.liZhaofeng LiThat should be fine, it should work as long as they are tracked (either clean or dirty)05:49:08
@rendakuenthusiast:imperishable.namerendakuenthusiast there is no resolveUrl; the originalUrl is a "git+file:///path/to/my/colmena/repo" 05:49:40
@rendakuenthusiast:imperishable.namerendakuenthusiastwhich is just a dir on my system05:49:53
@zhaofeng:zhaofeng.liZhaofeng Li Sorry, should be resolvedUrl with a d 05:50:19
@zhaofeng:zhaofeng.liZhaofeng LiAlso not there?05:50:28
@rendakuenthusiast:imperishable.namerendakuenthusiast no, it's exactly the same path as originalUrl 05:50:37
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @rendakuenthusiast:imperishable.name
no, it's exactly the same path as originalUrl
Hmm, then it should be correct
05:50:54
@rendakuenthusiast:imperishable.namerendakuenthusiast well the deploy works now, as long as I don't put -f flake.nix 05:51:18
@rendakuenthusiast:imperishable.namerendakuenthusiastI was more mentioning that b/c the error message was confusing05:51:25
@rendakuenthusiast:imperishable.namerendakuenthusiast anyway, I have a new question: currently I have my colmena config set up such that outputs.colmena.<system-name> = { deployment.targetHost = <url>; imports = [./system-name.nix]; } 05:52:37
@rendakuenthusiast:imperishable.namerendakuenthusiast so that each machine's configuration is in its own file in this repo and I don't have one giant flake.nix (or previously default.nix) 05:52:53

Show newer messages


Back to Room ListRoom Version: 6