aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranck Cuny <fcuny@mba-fcuny.localdomain>2023-09-11 16:55:36 -0700
committerFranck Cuny <fcuny@mba-fcuny.localdomain>2023-09-11 16:55:36 -0700
commitc5b1c207532dd29b14d3f1a7b6b25a01a2e4824b (patch)
treea1af5028b5aa4c5944fbbee2af1418f6d704f433
parentsome changes to GitHub action (diff)
downloadinfra-c5b1c207532dd29b14d3f1a7b6b25a01a2e4824b.tar.gz
add configuration for the M2 macbook air
Diffstat (limited to '')
-rw-r--r--flake.lock21
-rw-r--r--flake.nix14
-rw-r--r--hosts/mba/default.nix23
3 files changed, 57 insertions, 1 deletions
diff --git a/flake.lock b/flake.lock
index 568d419..11ff499 100644
--- a/flake.lock
+++ b/flake.lock
@@ -44,6 +44,26 @@
"type": "github"
}
},
+ "darwin_2": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1692248770,
+ "narHash": "sha256-tZeFpETKQGbgnaSIO1AGWD27IyTcBm4D+A9d7ulQ4NM=",
+ "owner": "lnl7",
+ "repo": "nix-darwin",
+ "rev": "511177ffe8226c78c9cf6a92a7b5f2df3684956b",
+ "type": "github"
+ },
+ "original": {
+ "owner": "lnl7",
+ "repo": "nix-darwin",
+ "type": "github"
+ }
+ },
"emacs-overlay": {
"inputs": {
"flake-utils": "flake-utils",
@@ -344,6 +364,7 @@
"root": {
"inputs": {
"agenix": "agenix",
+ "darwin": "darwin_2",
"emacs-overlay": "emacs-overlay",
"futils": "futils",
"home-manager": "home-manager_2",
diff --git a/flake.nix b/flake.nix
index 9ede1aa..6a2cfa5 100644
--- a/flake.nix
+++ b/flake.nix
@@ -42,6 +42,9 @@
inputs.nixpkgs.follows = "nixpkgs";
};
+ darwin.url = "github:lnl7/nix-darwin";
+ darwin.inputs.nixpkgs.follows = "nixpkgs";
+
pre-commit-hooks = {
type = "github";
owner = "cachix";
@@ -56,7 +59,7 @@
};
# Output config, or config for NixOS system
- outputs = inputs@{ self, ... }:
+ outputs = inputs@{ self, darwin, home-manager, ... }:
let
myLib = import ./nix inputs;
lib = inputs.nixpkgs.lib // builtins;
@@ -158,6 +161,15 @@
tahoe = myLib.mkSystem { hostname = "tahoe"; };
};
+ darwinConfigurations = {
+ "mba-fcuny" = darwin.lib.darwinSystem {
+ system = "aarch64-darwin";
+ modules = [
+ ./hosts/mba
+ ];
+ };
+ };
+
homeConfigurations = {
useGlobalPkgs = true;
useUserPackages = true;
diff --git a/hosts/mba/default.nix b/hosts/mba/default.nix
new file mode 100644
index 0000000..89e703e
--- /dev/null
+++ b/hosts/mba/default.nix
@@ -0,0 +1,23 @@
+{ pkgs, ... }:
+{
+ services.nix-daemon.enable = true;
+
+ programs.zsh.enable = true;
+
+ homebrew = {
+ enable = true;
+ onActivation.autoUpdate = true;
+
+ taps = [
+ "homebrew/cask-fonts"
+ ];
+
+ casks = [
+ "docker"
+ "emacs"
+ "font-source-code-pro"
+ "iterm2"
+ "wireshark"
+ ];
+ };
+}