Fix Makefile

This commit is contained in:
Sridhar Ratnakumar 2022-04-30 11:58:50 -04:00
parent d6ff55fea6
commit 10add30249
2 changed files with 6 additions and 14 deletions

View file

@ -3,16 +3,16 @@ HOSTNAME := $(shell hostname -s)
all:
if [[ "`uname`" == 'Darwin' ]]; then \
echo macOS; \
make macos; \
make macos-system; \
else \
echo NixOS; \
make nixos; \
make nixos-system; \
fi
nixos:
nixos-system:
sudo nixos-rebuild switch -j auto
macos:
macos-system:
sudo ls # cache sudo
# The `TERM` needs to be set to workaround kitty issue: `tput: unknown terminal "xterm-kitty"`
TERM=xterm $$(nix build --extra-experimental-features "flakes nix-command" .#darwinConfigurations.$(HOSTNAME).system --no-link --json | nix --extra-experimental-features "flakes nix-command" run ${WITHEXP} nixpkgs#jq -- -r '.[].outputs.out')/sw/bin/darwin-rebuild switch --flake .

View file

@ -1,17 +1,9 @@
This repository contains the Nix / NixOS configuration for all of my systems. Start from `flakes.nix` (see [Flakes](https://nixos.wiki/wiki/Flakes)).
## Platforms
### NixOS
To build,
```sh-session
make nixos # Or, just `make`
```
### macOS
```sh-session
make darwin # Or, just `make`
make
```
## Install notes