about summary refs log tree commit diff
path: root/flake
diff options
context:
space:
mode:
Diffstat (limited to 'flake')
-rw-r--r--flake/devshell.nix55
-rw-r--r--flake/hosts.nix21
2 files changed, 52 insertions, 24 deletions
diff --git a/flake/devshell.nix b/flake/devshell.nix
index f096bfe..7b75417 100644
--- a/flake/devshell.nix
+++ b/flake/devshell.nix
@@ -5,37 +5,44 @@
     inputs.pre-commit-hooks.flakeModule
   ];
 
-  perSystem = { config, pkgs, inputs', ... }: {
-    devShells.default = pkgs.mkShell {
-      name = "dotfiles";
+  perSystem =
+    { config
+    , inputs'
+    , pkgs
+    , ...
+    }: {
+      devshells.default = {
+        name = "world";
 
-      packages = [
-      ];
+        packages = with pkgs; [
+        ];
 
-      TREEFMT_CONFIG_FILE = config.treefmt.build.configFile;
-    };
+        commands = [
+          { package = config.treefmt.build.wrapper; }
+        ];
+      };
 
-    treefmt = {
-      projectRootFile = ".git/config";
+      treefmt = {
+        projectRootFile = ".git/config";
 
-      # list of supported programs
-      # https://github.com/numtide/treefmt-nix
-      programs = {
-        nixpkgs-fmt.enable = true;
-        shfmt.enable = true;
-        yamlfmt.enable = true;
-        taplo.enable = true;
+        # list of supported programs
+        # https://github.com/numtide/treefmt-nix
+        programs = {
+          nixpkgs-fmt.enable = true;
+          shfmt.enable = true;
+          yamlfmt.enable = true;
+          taplo.enable = true;
+        };
       };
-    };
 
-    pre-commit = {
-      settings = {
-        hooks = {
-          # deadnix.enable = true;
-          shellcheck.enable = true;
-          treefmt.enable = true;
+      pre-commit = {
+        settings = {
+          hooks = {
+            # deadnix.enable = true;
+            shellcheck.enable = true;
+            treefmt.enable = true;
+          };
         };
       };
     };
-  };
 }
diff --git a/flake/hosts.nix b/flake/hosts.nix
new file mode 100644
index 0000000..b0bc74c
--- /dev/null
+++ b/flake/hosts.nix
@@ -0,0 +1,21 @@
+{ inputs, ... }:
+let
+  inherit (inputs) self nixpkgs darwin home-manager;
+  inherit (nixpkgs.lib) mkMerge;
+
+  mkDarwinConfig = system: path:
+    darwin.lib.darwinSystem {
+      inherit system;
+      modules = [ home-manager.darwinModule path ];
+      specialArgs = { inherit inputs; };
+    };
+in
+{
+  flake = mkMerge [
+    {
+      darwinConfigurations = {
+        mba-fcuny = mkDarwinConfig "aarch64-darwin" ../hosts/mba;
+      };
+    }
+  ];
+}