This commit is contained in:
Christoph Schmatzler
2025-08-11 14:24:47 +02:00
parent 725af4e937
commit 56eb83f0da
3 changed files with 16 additions and 4 deletions

15
apps/x86_64-linux/build Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/sh -e
GREEN='\033[1;32m'
YELLOW='\033[1;33m'
RED='\033[1;31m'
NC='\033[0m'
HOSTNAME="tahani"
export NIXPKGS_ALLOW_UNFREE=1
echo "${YELLOW}Starting build...${NC}"
nix --extra-experimental-features 'nix-command flakes' build --print-out-paths '.#nixosConfigurations."tahani".config.system.build.toplevel' --no-link $@
echo "${GREEN}Build complete!${NC}"

View File

@@ -12,6 +12,6 @@ HOSTNAME="tahani"
echo -e "${YELLOW}Starting...${NC}"
# We pass SSH from user to root so root can download secrets from our private Github
sudo SSH_AUTH_SOCK=$SSH_AUTH_SOCK /run/current-system/sw/bin/nixos-rebuild switch --flake .#$HOSTNAME $@
sudo SSH_AUTH_SOCK=$SSH_AUTH_SOCK NIXPKGS_ALLOW_UNFREE=1 /run/current-system/sw/bin/nixos-rebuild switch --flake .#$HOSTNAME $@
echo -e "${GREEN}Switch to new generation complete!${NC}"