!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

You have reached the beginning of time (for this room).


SenderMessageTime
24 Dec 2024
@justinas:nixos.devJustinas Stankevičius
In reply to @dmoonfire:matrix.org
I tried putting it in the package and it doesn't seem to be picking it up.

      colmena = {
        meta = {
          # Figure out the default nixpkgs to use for each node.
          nixpkgs = import inputs.nixpkgs {
            system = "x86_64-linux";
            config.permittedInsecurePackages = insecure-packages;
          };

Putting it as config. in various places get the error where you can't configure a setting and a service in the same (unknown boot or services depending on where).

get the error where you can't configure a setting and a service in the same (unknown boot or services depending on where).

I'm not sure what that means

10:43:46
@karlthane:matrix.org@karlthane:matrix.org joined the room.13:58:22
@karlthane:matrix.org@karlthane:matrix.org left the room.14:03:18
@dmoonfire:matrix.orgdmoonfire
In reply to@justinas:nixos.dev

get the error where you can't configure a setting and a service in the same (unknown boot or services depending on where).

I'm not sure what that means

Adding the configuration option to the top-level file for a host (in example/default.nix with example = import ./src/nodes/example/default.nix; in flake.nix), such as:

config.permittedInsecurePackages = ["dotnet-sdk-6.0.428"];

gives the following error:

       error: Module `:anon-1766:anon-1' has an unsupported attribute `boot'. This is caused by introducing a top-level `config' or `options' attribute. Add configuration attributes immediately on the top level instead, or move all of them (namely: boot deployment environment networking services sops system time) into the explicit `config' attribute.

Putting this in the top-level file:

nixpkgs.config.permittedInsecurePackages = ["dotnet-sdk-6.0.428"];

doesn't pick up the insecure packages entry. "Doesn't pick up" being "gives me an error that I need to add dotnet-sdk-6.0.428 to the permittedInsecurePackages" error.

Putting the nixpkgs.config... in flake.nix:outputs.colmena.defaults is what used to work before I upgraded to 24.11.

Putting the config... in flake.nix:outputs.colmena.meta.nixpkgs = import inputs.nixpkgs { ...; config.permitted... } doesn't pick it up.

Putting the nixpkgs.config... in flake.nix:outputs.colmena.meta.nixpkgs = import inputs.nixpkgs { ...; config.permitted... } doesn't pick it up (but you already said that, just being complete).
23:17:23
@justinas:nixos.devJustinas Stankevičius

Alright, I see. The This is caused by introducing a top-level config' or options' attribute. issue is because you misunderstood me, I'll try to be a bit more clear.

When you're importing / calling nixpkgs explicitly, its options are under an argument called config. In full, import nixpkgs { config = { permittedInsecurePackages = ... } };.

However, when you're configuring nixpkgs in a modular way through the NixOS machine config, then that same thing is nested under nixpkgs, e.g. the option to set is nixpkgs.config. In full, nixpkgs.config.permittedInsecurePackages = { ... }. https://search.nixos.org/options?channel=24.11&show=nixpkgs.config&from=0&size=50&sort=relevance&type=packages&query=nixpkgs.config

In the context of a NixOS configuration module, config refers to the system configuration itself.

23:21:35
@justinas:nixos.devJustinas Stankevičius *

Alright, I see. The This is caused by introducing a top-level config' or options' attribute. issue is because you misunderstood me, I'll try to be a bit more clear.

When you're importing / calling nixpkgs explicitly, its options are under an argument called config. In full, import nixpkgs { config = { permittedInsecurePackages = ... } };.

However, when you're configuring nixpkgs in a modular way through the NixOS machine config, then that same thing is nested under nixpkgs, e.g. the option to set is nixpkgs.config. In full, nixpkgs.config.permittedInsecurePackages = [ ... ]. https://search.nixos.org/options?channel=24.11&show=nixpkgs.config&from=0&size=50&sort=relevance&type=packages&query=nixpkgs.config

In the context of a NixOS configuration module, config refers to the system configuration itself.

23:24:09
@dmoonfire:matrix.orgdmoonfire So, in the metadata, then this should work from what I'm understanding.

      colmena = {
        meta = {
          nixpkgs = import inputs.nixpkgs {
            system = "x86_64-linux";
            config = { permittedInsecurePackages = [ "dotnet-sdk-6.0.428" ]; };
          };

But I still get the error that I need to allow "dotnet-sdk-6.0.428".
23:26:06

Show newer messages


Back to Room ListRoom Version: 6