| 7 Nov 2022 |
David Arnold (blaggacao) | * Resume (from my adventure):
- ColmenaConfig -> https://github.com/divnix/hive/blob/7b307ca811bd743c6cc435ca19c94e5ecfc98e91/comb/lina2358/colmenaConfigurations.nix
- Imports NixosConfig -> https://github.com/divnix/hive/blob/7b307ca811bd743c6cc435ca19c94e5ecfc98e91/comb/lina2358/nixosConfigurations.nix (satifies
nixos-generator CLI fwiw)
- Imports HardwareProfile -> https://github.com/divnix/hive/blob/7b307ca811bd743c6cc435ca19c94e5ecfc98e91/comb/lina2358/hardwareProfiles.nix
- Which prototypes
disko's new NixOS module and CLI (still very WIP, both: upstream and adaption)
- Colmena & Nixos & Home Manager things are "harvested" for (tooling) compatibility onto the top level flake (whereby they are filtered for their "actual" system and all others are discarded) -> https://github.com/divnix/hive/blob/7b307ca811bd743c6cc435ca19c94e5ecfc98e91/flake.nix#L80-L105
- Otherwise initially deployed with -> https://gist.github.com/zhaofengli/e986fa7688d6c16872b86c6ae6215c9b (until it booted into the graphical iface on its own)
| 02:07:29 |
David Arnold (blaggacao) | * Resume (from my adventure):
- ColmenaConfig -> https://github.com/divnix/hive/blob/7b307ca811bd743c6cc435ca19c94e5ecfc98e91/comb/lina2358/colmenaConfigurations.nix
- Imports NixosConfig -> https://github.com/divnix/hive/blob/7b307ca811bd743c6cc435ca19c94e5ecfc98e91/comb/lina2358/nixosConfigurations.nix (satifies
nixos-generator CLI fwiw)
- Imports HardwareProfile -> https://github.com/divnix/hive/blob/7b307ca811bd743c6cc435ca19c94e5ecfc98e91/comb/lina2358/hardwareProfiles.nix
- Which prototypes
disko's new NixOS module and CLI (still very WIP, both: upstream and adaption)
- Colmena & Nixos & Home Manager things are "harvested" for (tooling) compatibility onto the top level flake (whereby they are filtered for their "actual" system and all others are discarded) -> https://github.com/divnix/hive/blob/7b307ca811bd743c6cc435ca19c94e5ecfc98e91/flake.nix#L80-L105
- Otherwise initially deployed with -> https://gist.github.com/zhaofengli/e986fa7688d6c16872b86c6ae6215c9b (until it booted into the graphical iface on its own)
- https://crates.io/crates/writedisk is written in
rust and could be made cheaply a sub-command of colmena (to cover the complete deployment cycle ootb)
| 02:09:18 |
David Arnold (blaggacao) | * Resume (from my adventure):
- ColmenaConfig -> https://github.com/divnix/hive/blob/7b307ca811bd743c6cc435ca19c94e5ecfc98e91/comb/lina2358/colmenaConfigurations.nix
- Imports NixosConfig -> https://github.com/divnix/hive/blob/7b307ca811bd743c6cc435ca19c94e5ecfc98e91/comb/lina2358/nixosConfigurations.nix (satifies
nixos-generator CLI fwiw)
- Imports HardwareProfile -> https://github.com/divnix/hive/blob/7b307ca811bd743c6cc435ca19c94e5ecfc98e91/comb/lina2358/hardwareProfiles.nix
- Which prototypes
disko's new NixOS module and CLI (still very WIP, both: upstream and adaption)
- Colmena & Nixos & Home Manager things are "harvested" for (tooling) compatibility onto the top level flake (whereby they are filtered for their "actual" system and all others are discarded) -> https://github.com/divnix/hive/blob/7b307ca811bd743c6cc435ca19c94e5ecfc98e91/flake.nix#L80-L105
- Otherwise initially deployed with -> https://gist.github.com/zhaofengli/e986fa7688d6c16872b86c6ae6215c9b (until it booted into the graphical iface on its own)
- https://crates.io/crates/writedisk is written in
rust and could be made cheaply a sub-command of colmena (to cover the complete deployment cycle ootb: incl. flashing the USB)
| 02:10:01 |
| 10 Nov 2022 |
mel (they/them) | Hi, I'm trying to convert a set of configs in a flake that all use lib.nixosSystem. I'd like to do them one by one, and keep outputs.nixosConfigurations as is for a bit.
Is it possible to use the result of nixosSystem with colmena? | 16:05:40 |
Zhaofeng Li | In reply to @plg:matrix.org Hi, I'm trying to convert a set of configs in a flake that all use lib.nixosSystem. I'd like to do them one by one, and keep outputs.nixosConfigurations as is for a bit.
Is it possible to use the result of nixosSystem with colmena? There's an adapter in https://github.com/zhaofengli/colmena/issues/60 | 20:02:21 |
mel (they/them) | Thanks, somehow missed that! | 20:07:31 |
| 12 Nov 2022 |
aanderse | am i missing some easy way to get output from colmena exec? might be nice if there were a --json flag that returns the output from each machine after being run... or some sort of way to get output easily | 18:33:14 |
Zhaofeng Li | Currently there's no clean way. You could use -v and strip out the prefixes but the output format isn't considered stable. I agree that a --json output (either streaming or one JSON at the end) would be a nice thing to have. | 21:46:16 |
| 16 Nov 2022 |
@yuka:yuka.dev | there were multiple efforts to support non-NixOS targets | 16:23:31 |
@yuka:yuka.dev | I would really support it if the actual deployment commands/logic for NixOS and non-NixOS was just part of a NixOS module system thing | 16:23:57 |
@yuka:yuka.dev | So that the cli is a dumb task runner | 16:24:04 |
@yuka:yuka.dev | basically a parallel version of nix run .#nixosConfigurations.xyz.config.system.build.deployScript | 16:24:27 |
@yuka:yuka.dev | And nix-darwin or nixos containers or completely custom targets can set this deployScript option in their nixos module system to override what happens on a deployment | 16:24:56 |
@yuka:yuka.dev | * basically a parallel version of nix run .#nixosConfigurations.xyz.config.system.build.deployScript | 16:25:07 |
| @omlet:matrix.org joined the room. | 20:34:25 |
| 17 Nov 2022 |
| shapr joined the room. | 22:14:10 |
| 20 Nov 2022 |
| Chinchilla Washington joined the room. | 04:41:30 |
Chinchilla Washington | Colmena is throwing this error message when I try to deploy a flake:
[ERROR] stderr) Failed assertions:
[ERROR] stderr) - The ‘fileSystems’ option does not specify your root file system.
[ERROR] stderr) - You must set the option ‘boot.loader.grub.devices’ or 'boot.loader.grub.mirroredBoots' to make the system bootable.
But the root filesystem is specified. I tried setting it directly in the colmena block like git shows and it's still complaining
| 04:51:24 |
Chinchilla Washington | just switching my flake directly works fine | 04:52:29 |
Chinchilla Washington | Any ideas? | 04:52:32 |
Zhaofeng Li | What does the config look like? | 05:34:10 |
Zhaofeng Li | * Chinchilla Washington: What does the config look like? | 05:34:34 |
Chinchilla Washington | In reply to @zhaofeng:zhaofeng.li Chinchilla Washington: What does the config look like? flake.nix
{
description = "the simplest flake for nixos-rebuild";
inputs = {
nixpkgs = {
# Using the nixos-unstable branch specifically, which is the
# closest you can get to following the channel with flakes.
url = "github:NixOS/nixpkgs/nixos-22.05";
};
# inputs.emacs-overlay.url = "github:nix-community/emacs-overlay";
# inputs.coricamu.url = "github:danth/coricamu";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
zero = {
url = "git+file:/home/cw/0x00";
# url = "git+https://gitea.kernelpanic.cafe/cw/0x00";
flake = false;
};
nix-doom-emacs = {
url = "github:nix-community/nix-doom-emacs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "unstable";
};
# alfis.url = "github:Revertron/Alfis";
sops-nix.url = "github:Mic92/sops-nix";
stylix.url = "github:danth/stylix";
deploy-rs.url = "github:serokell/deploy-rs";
};
# Outputs can be anything, but the wiki + some commands define their own
# specific keys. Wiki page: https://nixos.wiki/wiki/Flakes#Output_schema
outputs = {
self,
nixpkgs,
unstable,
home-manager,
stylix,
nix-doom-emacs,
# alfis,
sops-nix,
# colmena,
...
} @inputs: {
# packages."x86_64-linux".powerbook = "powerbook";
nixosConfigurations = {
powerbook = unstable.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs;
# Import our old system configuration.nix
modules = [
./hosts/powerbook.nix
home-manager.nixosModules.home-manager
stylix.nixosModules.stylix
sops-nix.nixosModules.sops
];
};
telescreen = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs;
# Import our old system configuration.nix
modules = [
./hosts/telescreen.nix
home-manager.nixosModules.home-manager
stylix.nixosModules.stylix
];
};
};
colmena = {
meta = {
nixpkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [];
};
};
powerbook = {
deployment = {
allowLocalDeployment = true;
targetHost = null;
};
};
telescreen = {
deployment = {
allowLocalDeployment = true;
targetHost = "10.200.1.35";
};
};
# boot.loader.grub.device = "/dev/disk/by-uuid/4864-3681";
# fileSystems."/" = {
# device = "/dev/disk/by-uuid/cbc949e8-303e-405a-97e1-6fcf7df3fdea";
# fsType = "ext4";
# };
};
};
}
| 05:38:47 |
Chinchilla Washington | (I'm trying to deploy on telescreen, but powerbook and deploy-local was used as a sanity check and it reports the same two errors) | 05:39:17 |
Chinchilla Washington | Relevant part of telescreen.nix:
{ pkgs, config, lib, unstable, zero, alfis, sops, ... }:
{
imports = [
../hardware/telescreen.nix
../hardware/wifi.nix
"${zero}/profiles/syncthing.nix"
];
| 05:40:23 |
Zhaofeng Li | In reply to @cw:kernelpanic.cafe
flake.nix
{
description = "the simplest flake for nixos-rebuild";
inputs = {
nixpkgs = {
# Using the nixos-unstable branch specifically, which is the
# closest you can get to following the channel with flakes.
url = "github:NixOS/nixpkgs/nixos-22.05";
};
# inputs.emacs-overlay.url = "github:nix-community/emacs-overlay";
# inputs.coricamu.url = "github:danth/coricamu";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
zero = {
url = "git+file:/home/cw/0x00";
# url = "git+https://gitea.kernelpanic.cafe/cw/0x00";
flake = false;
};
nix-doom-emacs = {
url = "github:nix-community/nix-doom-emacs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "unstable";
};
# alfis.url = "github:Revertron/Alfis";
sops-nix.url = "github:Mic92/sops-nix";
stylix.url = "github:danth/stylix";
deploy-rs.url = "github:serokell/deploy-rs";
};
# Outputs can be anything, but the wiki + some commands define their own
# specific keys. Wiki page: https://nixos.wiki/wiki/Flakes#Output_schema
outputs = {
self,
nixpkgs,
unstable,
home-manager,
stylix,
nix-doom-emacs,
# alfis,
sops-nix,
# colmena,
...
} @inputs: {
# packages."x86_64-linux".powerbook = "powerbook";
nixosConfigurations = {
powerbook = unstable.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs;
# Import our old system configuration.nix
modules = [
./hosts/powerbook.nix
home-manager.nixosModules.home-manager
stylix.nixosModules.stylix
sops-nix.nixosModules.sops
];
};
telescreen = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs;
# Import our old system configuration.nix
modules = [
./hosts/telescreen.nix
home-manager.nixosModules.home-manager
stylix.nixosModules.stylix
];
};
};
colmena = {
meta = {
nixpkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [];
};
};
powerbook = {
deployment = {
allowLocalDeployment = true;
targetHost = null;
};
};
telescreen = {
deployment = {
allowLocalDeployment = true;
targetHost = "10.200.1.35";
};
};
# boot.loader.grub.device = "/dev/disk/by-uuid/4864-3681";
# fileSystems."/" = {
# device = "/dev/disk/by-uuid/cbc949e8-303e-405a-97e1-6fcf7df3fdea";
# fsType = "ext4";
# };
};
};
}
Colmena itself doesn't use nixosSystems and you need to define the system configurations in outputs.colmena.<name> | 05:40:42 |
Chinchilla Washington | In reply to @zhaofeng:zhaofeng.li Colmena itself doesn't use nixosSystems and you need to define the system configurations in outputs.colmena.<name> lines 82-84 | 05:41:15 |
Chinchilla Washington | In reply to @zhaofeng:zhaofeng.li Colmena itself doesn't use nixosSystems and you need to define the system configurations in outputs.colmena.<name> * lines 82-87 | 05:41:25 |
Chinchilla Washington | (deleted extraneous allowLocalDeployment) | 05:42:18 |
Zhaofeng Li | It may be from the other two nodes | 05:42:24 |