2023-03-17 04:50:52 +01:00
|
|
|
# vim:ft=just:fdm=marker
|
2023-03-02 17:17:36 +01:00
|
|
|
|
2023-05-14 10:15:06 +02:00
|
|
|
[private]
|
2023-03-17 04:50:52 +01:00
|
|
|
default:
|
|
|
|
@just --choose
|
2023-02-15 16:03:38 +01:00
|
|
|
|
2023-05-14 10:15:06 +02:00
|
|
|
# wrapper around {nixos,darwin}-rebuild, always taking the flake {{{
|
|
|
|
[private]
|
2023-03-02 17:17:36 +01:00
|
|
|
[macos]
|
2023-05-14 11:55:36 +02:00
|
|
|
rebuild *args:
|
2023-04-11 14:44:50 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -euxo pipefail
|
2023-05-15 00:23:46 +02:00
|
|
|
dir="{{join(env_var('TMPDIR'), 'nix-darwin')}}"
|
2023-05-14 11:55:36 +02:00
|
|
|
! [[ -x "$dir/sw/bin/darwin-rebuild" ]] && nix build .\#darwinConfigurations.`hostname`.system -o "$dir"
|
|
|
|
"$dir/sw/bin/darwin-rebuild" --flake . {{args}}
|
2023-02-10 06:29:23 +01:00
|
|
|
|
2023-05-14 10:15:06 +02:00
|
|
|
[private]
|
2023-03-02 17:17:36 +01:00
|
|
|
[linux]
|
2023-05-14 11:55:36 +02:00
|
|
|
rebuild *args:
|
|
|
|
sudo nixos-rebuild --flake . {{args}}
|
2023-03-17 04:50:52 +01:00
|
|
|
# }}}
|
2023-03-02 17:17:36 +01:00
|
|
|
|
2023-05-14 11:55:36 +02:00
|
|
|
build *args:
|
|
|
|
@just rebuild build {{args}}
|
2023-03-02 17:17:36 +01:00
|
|
|
|
|
|
|
[linux]
|
2023-05-14 11:55:36 +02:00
|
|
|
boot *args:
|
|
|
|
@just rebuild boot {{args}}
|
2023-03-17 04:50:52 +01:00
|
|
|
|
2023-05-16 16:21:38 +02:00
|
|
|
[macos]
|
2023-05-14 11:55:36 +02:00
|
|
|
check *args:
|
|
|
|
@just rebuild check {{args}}
|
2023-04-21 05:59:56 +02:00
|
|
|
|
2023-05-16 16:21:38 +02:00
|
|
|
[linux]
|
|
|
|
check *args:
|
|
|
|
@just rebuild test {{args}}
|
|
|
|
|
2023-05-14 11:55:36 +02:00
|
|
|
switch *args:
|
|
|
|
@just rebuild switch {{args}}
|
2023-05-14 10:15:06 +02:00
|
|
|
|
2023-03-24 02:52:41 +01:00
|
|
|
fetch:
|
2023-05-14 10:15:06 +02:00
|
|
|
@nix shell nixpkgs\#onefetch nixpkgs\#scc -c sh -c "onefetch --true-color never --no-bots -d lines-of-code && scc --no-cocomo ."
|