remote builds

This commit is contained in:
ari committed 2026-03-22 22:24:44 -04:00
1 parent 95a90109db
commit fd5c5e9a77
5 files changed
+12 -8

No files matched your search

+2 -2
View File
@@ -31,7 +31,7 @@ def "main build" [] {
# Switch configuration
def "main switch" [] {
nh os switch | print
nh os switch --ask | print
}
# test configuration
@@ -73,7 +73,7 @@ def "main remote" [cmd:string, target:string = ""] {
return $valid_cmds
}
$"($cmd) on ($target_host) with ($profile)" | print
mut runcmd = $"nixos-rebuild ($cmd) --target-host ($target_host) --sudo --flake .#($profile)"
mut runcmd = $"nh os ($cmd) --target-host ($target_host) --ask .#($profile)"
$runcmd | print
bash -c $runcmd
}
+2 -2
View File
@@ -8,11 +8,11 @@
jellyfin-backups = {
OnCalendar = "daily";
wantedBy = [
"mnt-terra1-Data-apps.mount"
"homelab-terra1-Data-apps.mount"
];
script = ''
set -eu
${pkgs.rsync}/bin/rsync -avpzP --delete /opt/jellyfin /mnt/terra1/Data/apps/
${pkgs.rsync}/bin/rsync -avpzP --delete /opt/jellyfin /homelab/terra1/Data/apps/
'';
};
};
+2
View File
@@ -6,8 +6,10 @@
programs.nix-ld.enable = true;
nixpkgs.config.allowUnfree = true;
nix = {
enable = true;
optimise.automatic = true;
settings.experimental-features = [ "nix-command" "flakes" ];
clean.enable = true;
};
environment.systemPackages = with pkgs; [
# nix utils
+3 -1
View File
@@ -20,6 +20,9 @@ in
settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false;
settings.PermitRootLogin = "yes";
# Keep connections alive during large transfers
settings.ClientAliveInterval = 15;
settings.ClientAliveCountMax = 8;
};
users.users.${config.skyg.user.name}.openssh.authorizedKeys.keys = [
cfg.masterPubKey
@@ -29,4 +32,3 @@ in
];
};
}
+3 -3
View File
@@ -29,11 +29,11 @@ in
scrypted-backups = {
OnCalendar = "daily";
wantedBy = [
"mnt-terra1-Data-apps.mount"
"homelab-terra1-Data-apps.mount"
];
script = ''
set -eu
${pkgs.rsync}/bin/rsync -avpzP --delete /opt/homelab/scrypted /mnt/terra1/Data/apps/
${pkgs.rsync}/bin/rsync -avpzP --delete /opt/homelab/scrypted /homelab/terra1/Data/apps/
'';
};
scrypted-autoupdate = {
@@ -48,7 +48,7 @@ in
virtualisation.oci-containers = {
containers = {
scrypted = {
autoStart = false;
autoStart = true;
image = "ghcr.io/koush/scrypted";
extraOptions = [ "--network=host" ];
volumes = [