ci: eval deploy
This commit is contained in:
parent
273c0932b1
commit
efdd3de40e
2 changed files with 56 additions and 6 deletions
44
.github/workflows/eval.yaml
vendored
Normal file
44
.github/workflows/eval.yaml
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
name: Eval NixOS Configurations
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- deploy
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: deploy
|
||||
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v25
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config --global user.name "GitHub Actions Bot"
|
||||
git config --global user.email "actions@github.com"
|
||||
|
||||
- name: Process Configurations
|
||||
run: |
|
||||
git checkout -b deploy-comin-eval
|
||||
mkdir -p eval
|
||||
hosts=$(nix flake show --json | jq -r '.nixosConfigurations | keys[]')
|
||||
echo "Found hosts: $hosts"
|
||||
|
||||
for host in $hosts; do
|
||||
echo "Eval derivation for $host"
|
||||
nix show-derivation -L ".#nixosConfigurations.$host.config.system.build.toplevel" > "eval/$host.json"
|
||||
done
|
||||
|
||||
git add eval/
|
||||
git commit -m "Update deployment configurations for all hosts"
|
||||
|
||||
git push origin deploy-comin-eval
|
18
flake.nix
18
flake.nix
|
@ -43,7 +43,7 @@
|
|||
};
|
||||
|
||||
my-nixvim = {
|
||||
url = "git+https://git.xinyang.life/xin/nixvim";
|
||||
url = "git+https://git.xiny.li/xin/nixvim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
@ -286,16 +286,22 @@
|
|||
{
|
||||
imports = nodeNixosModules.biotite ++ sharedColmenaModules;
|
||||
};
|
||||
|
||||
osmium =
|
||||
{ ... }:
|
||||
{
|
||||
deployment = {
|
||||
targetHost = "osmium.coho-tet.ts.net";
|
||||
buildOnTarget = false;
|
||||
};
|
||||
imports = nodeNixosModules.osmium ++ sharedColmenaModules;
|
||||
};
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
calcite = mkNixos {
|
||||
hostname = "calcite";
|
||||
};
|
||||
|
||||
osmium = mkNixos {
|
||||
hostname = "osmium";
|
||||
};
|
||||
} // self.colmenaHive.nodes;
|
||||
|
||||
}
|
||||
|
@ -305,7 +311,7 @@
|
|||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
mkHomeConfiguration = user: host: {
|
||||
name = user;
|
||||
name = "${user}-${host}";
|
||||
value = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [
|
||||
|
|
Loading…
Add table
Reference in a new issue