-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
49 lines (40 loc) · 1.29 KB
/
Justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# just is a command runner, Justfile is very similar to Makefile, but simpler.
# Use nushell for shell commands
# To usage this justfile, you need to enter a shell with just & nushell installed:
#
# nix shell nixpkgs#just nixpkgs#nushell
set shell := ["nu", "-c"]
############################################################################
#
# Common commands(suitable for all machines)
#
############################################################################
# List all the just commands
default:
@just --list
# Update all the flake inputs
[group('nix')]
up:
nix flake update
# Update specific input
# Usage: just upp nixpkgs
[group('nix')]
upp input:
nix flake update {{input}}
# Open a nix shell with the flake
[group('nix')]
repl:
nix repl -f flake:nixpkgs
############################################################################
#
# Build Commands
#
############################################################################
# Build a bootable SD card image for Raspberry Pi
[group('build')]
build-pi:
nix --experimental-features 'nix-command flakes' build './boot/#nixosConfigurations.pi.config.system.build.sdImage'
# Build a bootable raw-efi image for Linux servers
[group('build')]
build-linux:
nix --experimental-features 'nix-command flakes' build './boot/#diskImage'