From 6be6a8400cf06e0eedec2e706dc070665b30146b Mon Sep 17 00:00:00 2001 From: iFargle Date: Fri, 15 Dec 2023 13:56:53 +0900 Subject: [PATCH] Update bashrc --- home-manager/common/software/cli/bash.nix | 43 +++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/home-manager/common/software/cli/bash.nix b/home-manager/common/software/cli/bash.nix index 9f93d1f8..7104b9f0 100644 --- a/home-manager/common/software/cli/bash.nix +++ b/home-manager/common/software/cli/bash.nix @@ -46,6 +46,17 @@ }; bashrcExtra = '' # Build ISOs/SD Card Images + nixos-build-all-images-verbose() { + echo "Building Linode image..." + nixos-build-linode-img-verbose + echo "Building Raspberry Pi image..." + nixos-build-pi-img-verbose + echo "Building ISO Console image..." + nixos-build-console-verbose + echo "Building ISO Desktop image..." + nixos-build-desktop-verbose + ls -lah ~/ | grep nixos + } nixos-build-all-images() { echo "Building Linode image..." nixos-build-linode-img @@ -57,6 +68,38 @@ nixos-build-desktop ls -lah ~/ | grep nixos } + nixos-build-pi-img-verbose() { + pushd /etc/nixos/git + git pull + nix build .#imageConfigurations.nixos-rpi4-img --show-trace --verbose + cp result/sd-image/nixos-sd-image* ~/. + rm -f result + popd + } + nixos-build-linode-img-verbose() { + pushd /etc/nixos/git + git pull + nix build .#imageConfigurations.nixos-linode-img --show-trace --verbose + cp result/nixos.img.gz ~/nixos-linode-`ddate`-`git rev-parse HEAD | cut -b 1-7`.img.gz + rm -f result + popd + } + nixos-build-console-verbose() { + pushd /etc/nixos/git + git pull + nix build .#imageConfigurations.nixos-iso-console --show-trace --verbose + cp result/iso/nixos.iso ~/nixos-console-`ddate`-`git rev-parse HEAD | cut -b 1-7`.iso + rm -f result + popd + } + nixos-build-desktop-verbose() { + pushd /etc/nixos/git + git pull + nix build .#imageConfigurations.nixos-iso-desktop --show-trace --verbose + cp result/iso/nixos.iso ~/nixos-desktop-`ddate`-`git rev-parse HEAD | cut -b 1-7`.iso + rm -f result + popd + } nixos-build-pi-img() { pushd /etc/nixos/git git pull