From 746d49fb23b66297c2d86ffb955d4bfabc79af77 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sat, 16 Apr 2022 11:53:27 -0400 Subject: [PATCH] `make` should just work --- Makefile | 11 +++++++---- README.md | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index fdb1786..c35e8b4 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,12 @@ -OS := $(shell uname) - -# TODO: Automatically detect platform. all: - $(error Choose a platform (eg: 'make macos')) + if [[ "`uname`" == 'Darwin' ]]; then \ + echo macOS; \ + make macos; \ + else \ + echo NixOS; \ + make nixos; \ + fi nixos: sudo nixos-rebuild switch -j auto diff --git a/README.md b/README.md index 4219b52..f3142db 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,13 @@ This repository contains the Nix / NixOS configuration for all of my systems. St ### NixOS ```sh-session -make nixos +make nixos # Or, just `make` ``` ### macOS ```sh-session -make darwin +make darwin # Or, just `make` ``` ## Install notes