From 9921e719edc430fea58d4ba5a0bbfa51ca4e3f60 Mon Sep 17 00:00:00 2001 From: Phillip Klein Date: Wed, 16 Oct 2024 15:55:16 +0200 Subject: [PATCH] free target env of seal-off command --- README | 4 +++- final/configuration.nix | 11 +---------- sealoff.sh | 5 +++++ 3 files changed, 9 insertions(+), 11 deletions(-) create mode 100644 sealoff.sh diff --git a/README b/README index 492113f..5165501 100644 --- a/README +++ b/README @@ -10,5 +10,7 @@ On target device: * Copy device database to ~/artiq * Set timezone and kb layout * Comment out openssh.authorizedKeys.keys -* sudo seal-off * history clear + +On build device: +* cat sealoff.sh | ssh rabi@artiq "sudo sh" diff --git a/final/configuration.nix b/final/configuration.nix index 93ae2db..fe5e163 100644 --- a/final/configuration.nix +++ b/final/configuration.nix @@ -1,14 +1,6 @@ { config, pkgs, artiq, ... }: -let - sealOff = pkgs.writeShellScriptBin "seal-off" - '' - set -e - nixos-rebuild boot - nix-collect-garbage -d - ''; - -in { +{ imports = [ ./hardware-configuration.nix @@ -44,7 +36,6 @@ in { nixpkgs.config.allowUnfree = true; environment.systemPackages = with pkgs; [ - sealOff wget vim gitAndTools.gitFull diff --git a/sealoff.sh b/sealoff.sh new file mode 100644 index 0000000..48ae35b --- /dev/null +++ b/sealoff.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +set -e +nixos-rebuild boot +nix-collect-garbage -d