From fc267e49f176357b23fc83bc6703f6b97e63dc9b Mon Sep 17 00:00:00 2001 From: James Walker Date: Mon, 6 Jun 2022 23:39:53 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20=20starting=20base=20darwin=20co?= =?UTF-8?q?nfig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.lock | 36 +++++++++++------------ hosts/heraclitus/darwin-configuration.nix | 2 ++ modules/base/darwin.nix | 12 ++++++++ 3 files changed, 32 insertions(+), 18 deletions(-) create mode 100644 modules/base/darwin.nix diff --git a/flake.lock b/flake.lock index b2c3373..df4eb77 100644 --- a/flake.lock +++ b/flake.lock @@ -109,11 +109,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1654113406, - "narHash": "sha256-70esZvhal+FsyU89mJRcAb+cDGHKt0sgZ6MlRr9Cplg=", + "lastModified": 1654422613, + "narHash": "sha256-ZxkMM13AnrMwYOV99ohzcqeTkAOqD9Q2SBdZ9WoFE9Y=", "owner": "nix-community", "repo": "home-manager", - "rev": "684e85d01d333be91c4875baebb05b93c7d2ffaa", + "rev": "20703892473d01c70fb10248442231fe94f4ceb4", "type": "github" }, "original": { @@ -140,11 +140,11 @@ }, "nixpkgs-21_11": { "locked": { - "lastModified": 1653819578, - "narHash": "sha256-a1vaUl6VZz1NsWxMw0i5lRyHIOVUIuMZdQzV+4s+rY8=", + "lastModified": 1654346688, + "narHash": "sha256-Y7QtZkfdxTvACCvWmDjpN6qOf4OKkZATufHcJP2VMKM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "baa82d4b626288c7439eeea073a18aabbe435991", + "rev": "2de556c4cd46a59e8ce2f85ee4dd400983213d45", "type": "github" }, "original": { @@ -156,11 +156,11 @@ }, "nixpkgs-22_05": { "locked": { - "lastModified": 1653822412, - "narHash": "sha256-xZwMDQ8MdNiTwE8dcKAX1h3qCmLtuudNGxmFUX3xIes=", + "lastModified": 1654373220, + "narHash": "sha256-3vKFnZz2oYHo4YcelaNOhO4XQ2jiIEXrp1s4w+e773c=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "db78278ff296cf21eca7e8c08ee99707387a54fa", + "rev": "d6cb04299ce8964290ae7fdcb87aa50da0500b5c", "type": "github" }, "original": { @@ -172,11 +172,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1654126564, - "narHash": "sha256-sgDXDKGmUG4h7OPDOHyQggFQ08ZqVzUIPi8351yhugY=", + "lastModified": 1654398695, + "narHash": "sha256-Kw/KeoFXszNsF5mORP45mrxCP+k9Aq03hWcuWCL9sdI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f1c9c23aad972787f00f175651e4cb0d7c7fd5ea", + "rev": "c5d810f4c74c824ae0fb788103003c6c9d366a08", "type": "github" }, "original": { @@ -186,11 +186,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1654019511, - "narHash": "sha256-s3fcwUxa2rV2ZmSbdOtisNmXqeqnF9IFrvhPQL5GCBU=", + "lastModified": 1654230545, + "narHash": "sha256-8Vlwf0x8ow6pPOK2a04bT+pxIeRnM1+O0Xv9/CuDzRs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "692517bf851f2d8d999f0ad50f53fa1d2dd5c8f9", + "rev": "236cc2971ac72acd90f0ae3a797f9f83098b17ec", "type": "github" }, "original": { @@ -221,11 +221,11 @@ "nixpkgs-22_05": "nixpkgs-22_05" }, "locked": { - "lastModified": 1653827546, - "narHash": "sha256-va51HFf7UwktvriIbe9pjRPMr7p8IaxrwcDlZe7twzI=", + "lastModified": 1654401128, + "narHash": "sha256-uCdQ2fzIPGakHw2TkvOncUvCl7Fo7z/vagpDWYooO7s=", "owner": "Mic92", "repo": "sops-nix", - "rev": "36b5901782e7fbfc191cace910f67f8b8743f678", + "rev": "f075361ecbde21535b38e41dfaa28a28f160855c", "type": "github" }, "original": { diff --git a/hosts/heraclitus/darwin-configuration.nix b/hosts/heraclitus/darwin-configuration.nix index 3786bc7..68c8e73 100644 --- a/hosts/heraclitus/darwin-configuration.nix +++ b/hosts/heraclitus/darwin-configuration.nix @@ -2,6 +2,8 @@ { imports = [ ./homebrew.nix + + ../../modules/base/darwin.nix ../../modules/builder ]; diff --git a/modules/base/darwin.nix b/modules/base/darwin.nix new file mode 100644 index 0000000..1afe135 --- /dev/null +++ b/modules/base/darwin.nix @@ -0,0 +1,12 @@ +{ pkgs, config, ... }: { + system.activationScripts.applications.text = pkgs.lib.mkForce ( + '' + rm -rf /Applications/Nix + mkdir -p /Applications/Nix + for app in $(find ${config.system.build.applications}/Applications -maxdepth 1 -type l); do + src="$(/usr/bin/stat -f%Y "$app")" + cp -r "$src" /Applications/Nix + done + '' + ); +}