mirror of
https://github.com/srid/nixos-config.git
synced 2026-02-22 21:05:22 +08:00
Add ci to remotely build on two CI machines
This commit is contained in:
parent
74dd679cc4
commit
70ff74d24e
5 changed files with 42 additions and 1 deletions
3
.vscode/extensions.json
vendored
3
.vscode/extensions.json
vendored
|
|
@ -4,6 +4,7 @@
|
|||
"b4dm4n.nixpkgs-fmt",
|
||||
"jnoortheen.nix-ide",
|
||||
"mattn.lisp",
|
||||
"mkhl.direnv"
|
||||
"mkhl.direnv",
|
||||
"kdl-org.kdl"
|
||||
]
|
||||
}
|
||||
|
|
@ -14,6 +14,7 @@
|
|||
# Useful for Nix development
|
||||
nixci
|
||||
nixci-build-remote
|
||||
ci
|
||||
nix-health
|
||||
nixpkgs-fmt
|
||||
just
|
||||
|
|
|
|||
15
packages/ci/default.nix
Normal file
15
packages/ci/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ writeShellApplication, nixci-build-remote, zellij, ... }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "ci";
|
||||
runtimeInputs = [ nixci-build-remote zellij ];
|
||||
meta.description = ''
|
||||
Run CI locally.
|
||||
|
||||
Powered by nixci, zellij and your beefy machines over SSH.
|
||||
'';
|
||||
text = ''
|
||||
PRJ=$(basename "$(pwd)")
|
||||
zellij --layout ${./layout.kdl} attach --create "$PRJ"-ci --force-run-commands
|
||||
'';
|
||||
}
|
||||
23
packages/ci/layout.kdl
Normal file
23
packages/ci/layout.kdl
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
// TODO: Make it a nix module?
|
||||
// - Don't't hardcode hostnames/ systems
|
||||
// - Use nix store path for nixci-build-remote
|
||||
layout {
|
||||
pane size=1 borderless=true {
|
||||
plugin location="tab-bar"
|
||||
}
|
||||
pane split_direction="vertical" {
|
||||
pane {
|
||||
name "x86_64-linux"
|
||||
command "nixci-build-remote"
|
||||
args "nix-infra@dosa"
|
||||
}
|
||||
pane {
|
||||
name "aaarch64-linux"
|
||||
command "nixci-build-remote"
|
||||
args "nix-infra@sambar"
|
||||
}
|
||||
}
|
||||
pane size=2 borderless=true {
|
||||
plugin location="status-bar"
|
||||
}
|
||||
}
|
||||
|
|
@ -5,6 +5,7 @@ self: super: {
|
|||
twitter-convert = self.callPackage ./twitter-convert { };
|
||||
sshuttle-via = self.callPackage ./sshuttle-via.nix { };
|
||||
nixci-build-remote = self.callPackage (import ./nixci-build-remote.nix { inherit (flake) inputs; }) { };
|
||||
ci = self.callPackage ./ci { };
|
||||
nixci = flake.inputs.nixci.packages.${system}.default;
|
||||
# nix-health = flake.inputs.nix-browser.packages.${system}.nix-health;
|
||||
actualism-app = flake.inputs.actualism-app.packages.${system}.default;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue