| 30 May 2023 |
@the_observer:fairydust.space | Thank you! :) | 17:38:51 |
Zhaofeng Li | Note they are just regular NixOS modules, which means you can do
mkdir hosts
cp -r /etc/nixos ./hosts/web
And then
web = ./hosts/web/configuration.nix;
| 17:42:06 |
| 1 Jun 2023 |
| raphi changed their display name from raphi to raphi (element unread channel fix when). | 13:03:27 |
| @solomon:cofree.coffee joined the room. | 18:38:18 |
| 2 Jun 2023 |
| Alexander joined the room. | 16:43:44 |
Alexander | Hi there. Have a question about nixpkgs per node inside a flake. I'm trying following configuration likewise in manual for a hive:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/7076110064c09f0b3942f609f2134c1358ef2e50";
};
outputs = { nixpkgs, ... }: {
colmena = {
meta = {
nixpkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [];
};
nodeNixpkgs.desktop = ./nixpkgs-23.05;
};
desktop = import ./desktop.nix;
};
};
}
But it does not work:
error: Passing a path to Nixpkgs as meta.nodeNixpkgs.pc is no longer accepted with Flakes.
Please initialize Nixpkgs like the following:
{
# ...
outputs = { nixpkgs, ... }: {
colmena = {
meta.nodeNixpkgs.pc = import nixpkgs {
system = "x86_64-linux"; # Set your desired system here
overlays = [];
};
};
};
}
Is it possible somehow to pin specific version of nixpkgs for a host in flake configuration?
| 16:53:06 |
Alexander | * Hi there. Have a question about nixpkgs per node inside a flake. I'm trying following configuration likewise in manual for a hive:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/7076110064c09f0b3942f609f2134c1358ef2e50";
};
outputs = { nixpkgs, ... }: {
colmena = {
meta = {
nixpkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [];
};
nodeNixpkgs.desktop = ./nixpkgs-23.05;
};
desktop = import ./desktop.nix;
};
};
}
But it does not work:
error: Passing a path to Nixpkgs as meta.nodeNixpkgs.pc is no longer accepted with Flakes.
Please initialize Nixpkgs like the following:
{
# ...
outputs = { nixpkgs, ... }: {
colmena = {
meta.nodeNixpkgs.desktop = import nixpkgs {
system = "x86_64-linux"; # Set your desired system here
overlays = [];
};
};
};
}
Is it possible somehow to pin specific version of nixpkgs for a host in flake configuration?
| 16:53:51 |
Zhaofeng Li | nodeNixpkgs.desktop has to be an initialized package set (see the error message), not a path | 17:00:00 |
Zhaofeng Li | It accepts the exact type as meta.nixpkgs | 17:00:18 |
Alexander | There is only example for hive.nix:
nodeNixpkgs = {
node-b = ./another-nixos-checkout;
};
I cannot find out where I should place a path to a nixpkgs when using flake
| 17:04:21 |
Zhaofeng Li | Just copy the nixpkgs pinning your have above | 17:05:27 |
Zhaofeng Li | But there is no need to pin separately when it's the only node | 17:05:37 |
Zhaofeng Li | * Just copy the nixpkgs pinning you have above | 17:05:45 |
Zhaofeng Li | In other words
nodeNixpkgs.desktop = import nixpkgs {
system = "x86_64-linux";
overlays = [];
};
| 17:06:16 |
Alexander | I have another nodes in my flake.nix and I want to upgrade some of them to 23.05 | 17:07:18 |
Alexander | Oh, I understand how it should be assembled (I don't have a lot of experience with a NixOS):
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/7076110064c09f0b3942f609f2134c1358ef2e50";
nixpkgs-23-05.url = "github:NixOS/nixpkgs/551a52bfdd02e7b75be5faf9b42f864112d88654";
};
outputs = { nixpkgs, nixpkgs-23-05, ... }: {
colmena = {
meta = {
nixpkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [];
};
};
meta.nodeNixpkgs.desktop = import nixpkgs-23-05 {
system = "x86_64-linux";
overlays = [];
};
desktop = import ./desktop.nix;
};
};
}
| 17:21:25 |
| 3 Jun 2023 |
| @rendakuenthusiast:imperishable.name left the room. | 08:09:06 |
| 5 Jun 2023 |
raitobezarius | is it possible to have the deployment options in a vanilla nixosConfigurations? | 16:11:46 |
raitobezarius | by passing the appropriate module | 16:12:15 |
raitobezarius | indeed, it is as a flake input | 16:16:06 |