| 22 Aug 2021 |
Robert Hensing (roberth) | sadly because if it were, we could have a more efficient NixOS evaluation, but that's another story | 14:00:34 |
Robert Hensing (roberth) | bit of a tangent there, imports in defaults is the best place in this situation even if NixOS were different | 14:01:18 |
CRTified | In reply to @roberthensing:matrix.org the alternative is to import wherever you read or write them, but that's not idiomatic, sadly Top level would be generally fine for me, I'll probably put the options under some deployment.machineSpecs attribute and import it in the file where I define the deployment targets (I'm using two different files here, one with a libvirtd target for testing the setup, and one for the physical machines) | 14:01:56 |
CRTified | In reply to @roberthensing:matrix.org bit of a tangent there, imports in defaults is the best place in this situation even if NixOS were different I'm already in a place where I'm using nixops even for my private machines (yes, I deploy to ::1 😀 ) | 14:02:31 |
Robert Hensing (roberth) | cool. I use a mix of tools including nixops, arion and remote NixOS via Hercules CI effects | 14:03:33 |
Robert Hensing (roberth) | oh and I have a one node terraform deployment as well | 14:04:06 |
CRTified | Robert Hensing (roberth) it works, here's my module:
{ config, name, pkgs, lib, ... }: {
options = with lib; {
deployment = {
slurmNodeConfig = mkOption {
type = types.str;
description = "Node configuration for Slurm";
readOnly = true;
};
slurm = mkOption {
type = with types; attrsOf (oneOf [ int str ]);
description =
"Attribute set that is coerced into the Slurm Node config";
default = { };
example = {
CPUs = 2;
RealMemory = 2000;
TmpDisk = 64000;
};
};
};
};
config = {
deployment.slurmNodeConfig = "NodeName=${name} "
+ (lib.concatStringsSep " "
(lib.mapAttrsToList (n: v: "${n}=${toString v}")
config.deployment.slurm));
};
}
And in the libvirtd target I'm using it like this:
{
defaults = { config, ... }: {
imports = [
./options/deployment.nix
];
deployment = {
targetEnv = "libvirtd";
libvirtd = {
vcpu = 2;
memorySize = 1024;
headless = false;
baseImageSize = 10;
};
slurm = {
CPUs = config.deployment.libvirtd.vcpu - 1;
RealMemory = config.deployment.libvirtd.memorySize;
MemSpecLimit = 256;
};
};
};
}
| 19:29:38 |
CRTified | So this works fine and is available on all nodes in a proper way | 19:29:55 |
CRTified | I just noticed that the slurm module in nixpkgs has a bug | 19:30:07 |
CRTified | * I just noticed that the slurm module in nixpkgs has a bug (but that's not a deployment problem) | 19:30:20 |
CRTified | * ~~I just noticed that the slurm module in nixpkgs has a bug (but that's not a deployment problem)~~ Ok, I used it wrong... | 19:33:28 |
CRTified | * ~I just noticed that the slurm module in nixpkgs has a bug (but that's not a deployment problem)~ Ok, I used it wrong... | 19:33:37 |
CRTified | * I just noticed that the slurm module in nixpkgs has a bug (but that's not a deployment problem) Ok, I used it wrong... | 19:33:57 |
CRTified | Is deployment.owners in use somewhere? | 20:39:07 |
CRTified | Searching through the nixops source only shows three locations in the code, and they all just define that option | 20:39:33 |
| 23 Aug 2021 |
zaphar_ps | CRTified: I think that's just metadata | 17:36:12 |
| 24 Aug 2021 |
| nate5824 joined the room. | 22:46:24 |
nate5824 | Redacted or Malformed Event | 22:48:01 |
nate5824 | In reply to @zaphar_ps:matrix.org Hrmmm so it seems importing <nixpkgs/nixos/modules/virtualisation/google-compute-image.nix>causes the boto error not nixops. https://github.com/NixOS/nixpkgs/pull/135505 | 22:49:01 |
hexa | boto is dead, things should migrate to boto3 | 23:53:03 |
| 25 Aug 2021 |
zaphar_ps | I fixed it by pinning to an older version of nixops than I was previously pinning to. | 13:10:59 |
zaphar_ps | * I fixed it by pinning to an older version of nixpkgs than I was previously pinning to. | 13:11:08 |
zaphar_ps | But yeah people should upgrade and all. | 13:11:20 |
| 26 Aug 2021 |
| Max joined the room. | 01:26:57 |
| clemjvdm joined the room. | 22:03:50 |
| 28 Aug 2021 |
| lvkm joined the room. | 06:28:07 |
| lvkm changed their display name from Istvan Ruzman to lvkm. | 06:30:24 |
Robert Hensing (roberth) | who's familiar with the ssh code in nixops? | 15:08:00 |
Robert Hensing (roberth) | I'm looking for a reviewer to help make ssh automatic and safe in combination with remote state | 15:09:40 |
Robert Hensing (roberth) | https://github.com/NixOS/nixops/pull/1464 | 15:09:48 |