From 85b5df3d1f17e47344d7d2274494f69f9843d76b Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Mon, 24 Apr 2023 08:25:18 +0200 Subject: [PATCH] Load .env file --- .envrc | 2 ++ Justfile | 22 +++++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.envrc b/.envrc index 3550a30..0568783 100644 --- a/.envrc +++ b/.envrc @@ -1 +1,3 @@ +dotenv_if_exists + use flake diff --git a/Justfile b/Justfile index 20e9559..f059fdf 100644 --- a/Justfile +++ b/Justfile @@ -1,11 +1,19 @@ -build: - nixos-rebuild --flake .# build +set dotenv-load + +default: + @just --choose + +build machine="": + nixos-rebuild --flake .#{{machine}} build diff: - nvd diff /run/current-system ./result + nvd diff /run/current-system ./result -switch: - nixos-rebuild --flake .# --use-remote-sudo switch +switch machine="": + nixos-rebuild --flake .#{{machine}} --use-remote-sudo switch -deploy HOST: - nix run ".#apps.nixinate.{{HOST}}" +fmt: + nix fmt + +deploy host: + nix run ".#apps.nixinate.{{host}}"