Implement better remote build script

This commit is contained in:
Alexander
2026-07-27 20:21:10 +02:00
parent e9ac72d162
commit 20963732a5
6 changed files with 1472 additions and 1 deletions
+2 -1
View File
@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ ... }:
{
imports = [
@@ -16,5 +16,6 @@
./jenkins
./gaming
./yubikey
./scripts
];
}
+52
View File
@@ -0,0 +1,52 @@
{
config,
lib,
pkgs,
username,
...
}:
{
environment.systemPackages = [
(pkgs.writeShellScriptBin "pve-build" ''
export PATH="${
lib.makeBinPath [
pkgs.jq
pkgs.openssh
]
}:$PATH"
${builtins.readFile ./pve-build.sh}
'')
];
home-manager.users.${username} = {
programs.nushell.extraConfig =
lib.mkIf config.home-manager.users.${username}.programs.nushell.enable
''
def "nu-complete pve-build-cmds" [] {
[build test switch boot check-image deploy-image update-image start-builder build-on activate destroy-builder info]
}
def "nu-complete pve-build-activate" [] {
[test switch boot]
}
extern pve-build [
command?: string@"nu-complete pve-build-cmds"
--machine: string
--pve-host: string
--pve-storage: string
--rootfs-storage: string
--bridge: string
--vmid-start: int
--vmid-floor: int
--rootfs-gib: int
--keep
--local-build
--show-trace
--verbose
--debug
--help(-h)
]
'';
};
}
+1103
View File
File diff suppressed because it is too large Load Diff