From b156564a821d6923e437f418b8b9f7ae76009698 Mon Sep 17 00:00:00 2001 From: iFargle Date: Sat, 30 Sep 2023 14:03:08 +0900 Subject: [PATCH] test --- home-manager/common/software/cli/bash.nix | 26 +++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/home-manager/common/software/cli/bash.nix b/home-manager/common/software/cli/bash.nix index 76832ecb..2a7d0606 100644 --- a/home-manager/common/software/cli/bash.nix +++ b/home-manager/common/software/cli/bash.nix @@ -40,13 +40,32 @@ # GTK_THEME = "Gruvbox-Dark-BL"; XDG_DATA_HOME = "$HOME/.local/share"; # Disable askpass for cli auth: - # SSH_ASKPASS = ""; + SSH_ASKPASS = ""; }; bashrcExtra = '' + # Build ISOs/SD Card Images + nixos-build-pi-img() { + pushd /etc/nixos/git + git pull + nix build .#imageConfigurations.nixos-rpi4-img + popd + } + nixos-build-console() { + pushd /etc/nixos/git + git pull + nix build .#imageConfigurations.nixos-iso-console + cp result/iso/nixos.iso ~/nixos-console-`ddate`-`git rev-parse HEAD | cut -b 1-7`.iso + rm -f result + popd + } + + # NixOS Related nix-clean-all() { sudo nix-env -u --always sudo nix-collect-garbage -d } + + # Update SOPS Secrets install-secrets() { pushd /etc/nixos/git nix develop -c update-repo @@ -108,11 +127,6 @@ rebuild-home = "git -C /etc/nixos/git pull && home-manager switch -b backup --flake /etc/nixos/git"; rebuild-host = "git -C /etc/nixos/git pull && sudo nixos-rebuild switch --flake /etc/nixos/git"; rebuild-all = "rebuild-home && rebuild-host"; - - # Build ISOs/SD Card Images - nixos-build-pi-img = "pushd /etc/nixos/git && git pull && nix build .#imageConfigurations.nixos-rpi4-img && popd"; - nixos-build-console = "pushd /etc/nixos/git && git pull && nix build .#imageConfigurations.nixos-iso-console && cp result/iso/nixos.iso ~/nixos-console-`ddate`.iso && rm -f result && popd"; - # nixos-build-desktop = "pushd /etc/nixos/git && git pull && nix build .#nixosConfigurations.nixos-iso-desktop && popd"; }; }; };