lix: use the lix module

This is primarily to banish CppNix from Colmena's closure among other
places.
This commit is contained in:
jade 2024-10-18 19:22:11 -07:00 committed by raito
parent 7248adf458
commit 4ae36d6b79
4 changed files with 103 additions and 12 deletions

View file

@ -3,6 +3,7 @@ let
inherit inherit
(self.inputs) (self.inputs)
nixpkgs nixpkgs
lix-module
home-manager home-manager
agenix agenix
nur nur
@ -44,6 +45,9 @@ let
# srvos.nixosModules.mixins-telegraf # srvos.nixosModules.mixins-telegraf
# srvos.nixosModules.mixins-terminfo # srvos.nixosModules.mixins-terminfo
# use lix
lix-module.nixosModules.default
agenix.nixosModules.default agenix.nixosModules.default
({ pkgs ({ pkgs
, config , config
@ -102,6 +106,12 @@ in
flake.colmena = { flake.colmena = {
meta.nixpkgs = import nixpkgs { meta.nixpkgs = import nixpkgs {
system = "x86_64-linux"; system = "x86_64-linux";
# yikes, this overlay has to be listed twice since colmena makes us
# import nixpkgs explicitly here
overlays = [
# bonking cppnix out of the closure as much as possible
lix-module.overlays.default
];
}; };
epyc = { epyc = {
imports = imports =

View file

@ -245,6 +245,39 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_3": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flakey-profile": {
"locked": {
"lastModified": 1712898590,
"narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=",
"owner": "lf-",
"repo": "flakey-profile",
"rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d",
"type": "github"
},
"original": {
"owner": "lf-",
"repo": "flakey-profile",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -313,14 +346,37 @@
"url": "https://git.lix.systems/lix-project/lix.git" "url": "https://git.lix.systems/lix-project/lix.git"
} }
}, },
"lix-module": {
"inputs": {
"flake-utils": "flake-utils_3",
"flakey-profile": "flakey-profile",
"lix": [
"lix"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1727752861,
"narHash": "sha256-jowmo2aEzrEpPSM96IWtajuogdJm7DjAWxFTEb7Ct0s=",
"rev": "fd186f535a4ac7ae35d98c1dd5d79f0a81b7976d",
"type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/fd186f535a4ac7ae35d98c1dd5d79f0a81b7976d.tar.gz?rev=fd186f535a4ac7ae35d98c1dd5d79f0a81b7976d"
},
"original": {
"type": "tarball",
"url": "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz"
}
},
"nix2container": { "nix2container": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1720642556, "lastModified": 1724996935,
"narHash": "sha256-qsnqk13UmREKmRT7c8hEnz26X3GFFyIQrqx4EaRc1Is=", "narHash": "sha256-njRK9vvZ1JJsP8oV2OgkBrpJhgQezI03S7gzskCcHos=",
"owner": "nlewo", "owner": "nlewo",
"repo": "nix2container", "repo": "nix2container",
"rev": "3853e5caf9ad24103b13aa6e0e8bcebb47649fe4", "rev": "fa6bb0a1159f55d071ba99331355955ae30b3401",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -426,11 +482,11 @@
"pre-commit-hooks": { "pre-commit-hooks": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1721042469, "lastModified": 1726745158,
"narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=", "narHash": "sha256-D5AegvGoEjt4rkKedmxlSEmC+nNLMBPWFxvmYnVLhjk=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "f451c19376071a90d8c58ab1a953c6e9840527fd", "rev": "4e743a6920eab45e8ba0fbe49dc459f1423a4b74",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -449,6 +505,7 @@
"flake-registry": "flake-registry", "flake-registry": "flake-registry",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"lix": "lix", "lix": "lix",
"lix-module": "lix-module",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"nur": "nur", "nur": "nur",
@ -505,6 +562,21 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -7,6 +7,10 @@
lix.url = "git+https://git.lix.systems/lix-project/lix.git?ref=refs/heads/main&rev=60578b4d7d0dfc296c61cae963b6b2763422788e"; lix.url = "git+https://git.lix.systems/lix-project/lix.git?ref=refs/heads/main&rev=60578b4d7d0dfc296c61cae963b6b2763422788e";
lix.inputs.nixpkgs.follows = "nixpkgs"; lix.inputs.nixpkgs.follows = "nixpkgs";
lix-module.url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz";
lix-module.inputs.nixpkgs.follows = "nixpkgs";
lix-module.inputs.lix.follows = "lix";
disko.url = "github:nix-community/disko"; disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs"; disko.inputs.nixpkgs.follows = "nixpkgs";
@ -61,9 +65,19 @@
# ./pkgs/flake-module.nix # ./pkgs/flake-module.nix
# ./templates # ./templates
]; ];
# provide debug, allSystems, currentSystem in the resulting flake
debug = true;
perSystem = perSystem =
{ self', pkgs, ... }: { self', pkgs, system, ... }:
{ {
# apply the lix overlay to banish CppNix
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ inputs.lix-module.overlays.default ];
};
devShells.default = pkgs.mkShellNoCC { devShells.default = pkgs.mkShellNoCC {
buildInputs = [ buildInputs = [
pkgs.ipmitool pkgs.ipmitool

View file

@ -1,7 +1,6 @@
{ lib { lib
, config , config
, pkgs , pkgs
, inputs
, ... , ...
}: }:
@ -57,10 +56,6 @@ in
# Randomize GC to avoid thundering herd effects. # Randomize GC to avoid thundering herd effects.
gc.randomizedDelaySec = "1800"; gc.randomizedDelaySec = "1800";
# A much better choice.
# Raito: We use this machine as a testing bed for cutting edge Lix features.
package = inputs.lix.packages.x86_64-linux.default;
# should be enough? # should be enough?
nrBuildUsers = 128; nrBuildUsers = 128;