chore: tinkering with colmena
Some checks failed
/ check (push) Failing after 4m17s

This commit is contained in:
Daniel Flanagan 2025-03-01 14:41:26 -06:00
parent 9b26900450
commit ea67672d70
5 changed files with 171 additions and 14 deletions

103
flake.lock generated
View file

@ -1,5 +1,31 @@
{
"nodes": {
"colmena": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nix-github-actions": "nix-github-actions",
"nixpkgs": [
"nixpkgs-unstable"
],
"stable": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1739900653,
"narHash": "sha256-hPSLvw6AZQYrZyGI6Uq4XgST7benF/0zcCpugn/P0yM=",
"owner": "zhaofengli",
"repo": "colmena",
"rev": "2370d4336eda2a9ef29fce10fa7076ae011983ab",
"type": "github"
},
"original": {
"owner": "zhaofengli",
"repo": "colmena",
"type": "github"
}
},
"crane": {
"locked": {
"lastModified": 1737563566,
@ -39,11 +65,11 @@
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
@ -55,11 +81,11 @@
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
@ -84,7 +110,38 @@
"type": "github"
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems"
},
@ -102,7 +159,7 @@
"type": "github"
}
},
"flake-utils_2": {
"flake-utils_3": {
"inputs": {
"systems": "systems_2"
},
@ -122,8 +179,8 @@
},
"ghostty": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_2",
"nixpkgs-stable": [
"nixpkgs"
],
@ -149,7 +206,7 @@
},
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-compat": "flake-compat_3",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs-unstable"
@ -171,7 +228,7 @@
},
"git-hooks_2": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-compat": "flake-compat_4",
"gitignore": "gitignore_2",
"nixpkgs": [
"slippi",
@ -254,7 +311,7 @@
"helix": {
"inputs": {
"crane": "crane",
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs-unstable"
],
@ -332,6 +389,27 @@
"type": "github"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
"colmena",
"nixpkgs"
]
},
"locked": {
"lastModified": 1729742964,
"narHash": "sha256-B4mzTcQ0FZHdpeWcpDYPERtyjJd/NIuaQ9+BV1h+MpA=",
"owner": "nix-community",
"repo": "nix-github-actions",
"rev": "e04df33f62cdcf93d73e9a04142464753a16db67",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-github-actions",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1739357830,
@ -382,6 +460,7 @@
},
"root": {
"inputs": {
"colmena": "colmena",
"disko": "disko",
"ghostty": "ghostty",
"git-hooks": "git-hooks",

View file

@ -24,6 +24,9 @@
formatter = uGenPkgs (p: p.nixfmt-rfc-style);
colmena = import ./lib/colmena inputs;
colmenaHive = inputs.colmena.lib.makeHive inputs.self.outputs.colmena;
/*
TODO: nix-on-droid for phone terminal usage? mobile-nixos?
TODO: nix-darwin for work?
@ -72,6 +75,10 @@
ghostty.inputs.nixpkgs-unstable.follows = "nixpkgs-unstable";
ghostty.inputs.nixpkgs-stable.follows = "nixpkgs";
colmena.url = "github:zhaofengli/colmena";
colmena.inputs.nixpkgs.follows = "nixpkgs-unstable";
colmena.inputs.stable.follows = "nixpkgs";
# nnf.url = "github:thelegy/nixos-nftables-firewall?rev=71fc2b79358d0dbacde83c806a0f008ece567b7b";
mobile-nixos = {

70
lib/colmena/default.nix Normal file
View file

@ -0,0 +1,70 @@
{
home-manager,
nixpkgs-unstable,
self,
...
}@inputs:
{
meta =
let
nixpkgsSet =
nixpkgs:
(import nixpkgs {
system = "x86_64-linux";
overlays = [ self.outputs.flakeLib.forSelfOverlay ];
});
nixpkgs = nixpkgsSet nixpkgs-unstable;
stable = nixpkgsSet nixpkgs;
in
{
inherit nixpkgs;
nodeNixpkgs = {
# router = stable;
beefcake = stable;
};
specialArgs = {
inherit home-manager;
hardware = inputs.hardware.outputs.nixosModules;
diskoConfigurations = inputs.self.outputs.diskoConfigurations;
};
};
# TODO: setup builders?
foxtrot =
{
# name,
# nodes,
# pkgs,
...
}:
{
deployment = {
# Allow local deployment with `colmena apply-local`
allowLocalDeployment = true;
# Disable SSH deployment. This node will be skipped in a
# normal`colmena apply`.
targetHost = null;
};
imports = [
inputs.self.outputs.nixosModules.default
(import ./../../packages/hosts/foxtrot.nix)
];
# boot.isContainer = true;
# time.timeZone = nodes.host-b.config.time.timeZone;
};
beefcake =
{ ... }:
{
deployment = {
buildOnTarget = true;
};
imports = [
inputs.self.outputs.nixosModules.default
(import ./../../packages/hosts/beefcake.nix)
];
};
}

View file

@ -1,5 +1,4 @@
{
self,
nixpkgs,
nixpkgs-unstable,
...
@ -21,11 +20,12 @@ rec {
modifications =
final: prev:
let
inherit (inputs) helix ghostty;
inherit (inputs) helix ghostty colmena;
in
{
ghostty = ghostty.outputs.packages.${prev.system}.default;
helix = helix.outputs.packages.${prev.system}.default;
colmena = colmena.outputs.packages.${prev.system}.colmena;
bitwarden = prev.bitwarden.overrideAttrs (old: {
preBuild = ''

View file

@ -4,6 +4,7 @@
default = pkgs.mkShell {
inherit (self.outputs.checks.${pkgs.system}.git-hooks) shellHook;
packages = with pkgs; [
colmena
nil
nixd
nixfmt-rfc-style