feat(meta): Remove default values for nixpkgs version
Some checks failed
Check meta / check_dns (push) Successful in 20s
Check meta / check_meta (push) Successful in 22s
Build all the nodes / bridge01 (push) Failing after 21s
Build all the nodes / compute01 (push) Failing after 21s
Build all the nodes / geo01 (push) Failing after 24s
Build all the nodes / geo02 (push) Failing after 23s
Build all the nodes / rescue01 (push) Failing after 22s
Build all the nodes / storage01 (push) Failing after 21s
Build all the nodes / vault01 (push) Failing after 23s
Build all the nodes / web01 (push) Failing after 23s
Build all the nodes / web02 (push) Failing after 21s
Build all the nodes / web03 (push) Failing after 21s
Run pre-commit on all files / check (push) Successful in 24s
Some checks failed
Check meta / check_dns (push) Successful in 20s
Check meta / check_meta (push) Successful in 22s
Build all the nodes / bridge01 (push) Failing after 21s
Build all the nodes / compute01 (push) Failing after 21s
Build all the nodes / geo01 (push) Failing after 24s
Build all the nodes / geo02 (push) Failing after 23s
Build all the nodes / rescue01 (push) Failing after 22s
Build all the nodes / storage01 (push) Failing after 21s
Build all the nodes / vault01 (push) Failing after 23s
Build all the nodes / web01 (push) Failing after 23s
Build all the nodes / web02 (push) Failing after 21s
Build all the nodes / web03 (push) Failing after 21s
Run pre-commit on all files / check (push) Successful in 24s
They are considered harmful, and it simplifies the code.
This commit is contained in:
parent
1821104e8e
commit
eb5b8740a8
4 changed files with 25 additions and 34 deletions
18
hive.nix
18
hive.nix
|
@ -23,17 +23,19 @@ let
|
|||
nixpkgs' = import ./meta/nixpkgs.nix;
|
||||
# All supported nixpkgs versions × systems, instanciated
|
||||
nixpkgs = nix-lib.mapSingleFuse (
|
||||
s: nix-lib.mapSingleFuse (mkSystemNixpkgs s) nixpkgs'.versions.supported
|
||||
) nixpkgs'.systems.supported;
|
||||
s: nix-lib.mapSingleFuse (mkSystemNixpkgs s) nixpkgs'.versions
|
||||
) nixpkgs'.systems;
|
||||
|
||||
# Get the configured nixos version for the node,
|
||||
# defaulting to the one defined in meta/nixpkgs
|
||||
version = node: nodes'.${node}.nixpkgs.version or nixpkgs'.versions.default;
|
||||
systemType =
|
||||
version = node: nodes'.${node}.nixpkgs.version;
|
||||
system =
|
||||
node:
|
||||
nodes'.${node}.nixpkgs.system
|
||||
or (warn "${node}: Not specifying the `deployment.systemType` is deprecated!" "nixos");
|
||||
|
||||
nodePkgs = node: nixpkgs.${system node}.${version node};
|
||||
|
||||
# Builds a patched version of nixpkgs, only as the source
|
||||
mkNixpkgs' =
|
||||
v:
|
||||
|
@ -73,11 +75,11 @@ let
|
|||
# Function to create arguments based on the node
|
||||
#
|
||||
mkArgs = node: rec {
|
||||
lib = nixpkgs.${systemType node}.${version node}.lib // {
|
||||
lib = nodePkgs.lib // {
|
||||
extra = nix-lib;
|
||||
};
|
||||
|
||||
sourcePkgs = nixpkgs.${systemType node}.${version node};
|
||||
nodePkgs = nodePkgs node;
|
||||
meta = (import ./meta) lib;
|
||||
|
||||
nodeMeta = meta.nodes.${node};
|
||||
|
@ -86,7 +88,7 @@ in
|
|||
|
||||
{
|
||||
meta = {
|
||||
nodeNixpkgs = nix-lib.mapSingleFuse (n: nixpkgs.${systemType n}.${version n}) nodes;
|
||||
nodeNixpkgs = nix-lib.mapSingleFuse nodePkgs nodes;
|
||||
|
||||
specialArgs = {
|
||||
inherit nixpkgs sources;
|
||||
|
@ -99,7 +101,7 @@ in
|
|||
|
||||
registry = {
|
||||
nixos = {
|
||||
evalConfig = args: import "${args.specialArgs.sourcePkgs.path}/nixos/lib/eval-config.nix" args;
|
||||
evalConfig = args: import "${args.specialArgs.nodePkgs.path}/nixos/lib/eval-config.nix" args;
|
||||
defaults =
|
||||
{ name, nodeMeta, ... }:
|
||||
{
|
||||
|
|
|
@ -32,7 +32,7 @@ TODO.
|
|||
|
||||
# Nixpkgs
|
||||
|
||||
Machines can use different versions of NixOS, the supported and default ones are specified here.
|
||||
Machines can use different versions of NixOS, the supported ones are specified here.
|
||||
|
||||
## How to add a new version
|
||||
|
||||
|
@ -55,7 +55,7 @@ The nodes are declared statically, several options can be configured:
|
|||
|
||||
- `deployment`, the colmena deployment option
|
||||
- `stateVersion`, the state version of the node
|
||||
- `nixpkgs`, the version of NixOS to use
|
||||
- `nixpkgs`, the version and sytem of NixOS to use
|
||||
- `admins`, the list of administrators specific to this node, they will be given root access
|
||||
- `adminGroups`, a list of groups whose members will be added to `admins`
|
||||
- `site`, the physical location of the node
|
||||
|
|
|
@ -1,25 +1,15 @@
|
|||
{
|
||||
versions = {
|
||||
# Default version of nixpkgs to use
|
||||
default = "24.05";
|
||||
|
||||
versions = [
|
||||
# Supported nixpkgs versions
|
||||
supported = [
|
||||
"unstable"
|
||||
"23.11"
|
||||
"24.05"
|
||||
"24.11"
|
||||
];
|
||||
};
|
||||
|
||||
systems = {
|
||||
# Default system for our deployments
|
||||
default = "nixos";
|
||||
"unstable"
|
||||
"23.11"
|
||||
"24.05"
|
||||
"24.11"
|
||||
];
|
||||
|
||||
systems = [
|
||||
# Supported system types
|
||||
supported = [
|
||||
"zyxel-nwa50ax"
|
||||
"nixos"
|
||||
];
|
||||
};
|
||||
"zyxel-nwa50ax"
|
||||
"nixos"
|
||||
];
|
||||
}
|
||||
|
|
|
@ -141,16 +141,15 @@ in
|
|||
|
||||
nixpkgs = {
|
||||
version = mkOption {
|
||||
type = enum nixpkgs.versions.supported;
|
||||
inherit (nixpkgs.versions) default;
|
||||
type = enum nixpkgs.versions;
|
||||
description = ''
|
||||
Version of nixpkgs to use.
|
||||
'';
|
||||
example = "unstable";
|
||||
};
|
||||
|
||||
system = mkOption {
|
||||
type = enum nixpkgs.systems.supported;
|
||||
inherit (nixpkgs.systems) default;
|
||||
type = enum nixpkgs.systems;
|
||||
description = ''
|
||||
Type of system for this node, will impact how it is evaluated and deployed.
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue