Skip to content

Instantly share code, notes, and snippets.

@LnL7

LnL7/build.sh Secret

Last active January 4, 2019 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LnL7/0896a9a4fd7bc4d6bba3cb915e877ce5 to your computer and use it in GitHub Desktop.
Save LnL7/0896a9a4fd7bc4d6bba3cb915e877ce5 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -e
darwin-rebuild switch --arg configuration "$(hostname -s).nix"
{ config, lib, pkgs, ... }:
with lib;
let
host = config.networking.hostName;
in
{
environment.systemPackages = mkIf (host == "foo") [
curl
];
nix.nixPath = [ "darwin-config=${./. + host}.nix" ];
}
{
imports = [ ./configuration.nix ];
networking.hostName = "foo";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment