about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-09-14 17:18:09 -0700
committerFranck Cuny <franck@fcuny.net>2023-09-14 17:36:58 -0700
commit17a8f86782b773c77880e34b6a02e53def4015e8 (patch)
treeee611470d040b90331865b7e519b7e737ea70c29
parentbuild(deps): bump cachix/install-nix-action from 22 to 23 (#2) (diff)
downloadworld-17a8f86782b773c77880e34b6a02e53def4015e8.tar.gz
more configuration for darwin
-rw-r--r--flake.lock72
-rw-r--r--flake.nix3
-rw-r--r--home/profiles/darwin.nix33
-rw-r--r--home/profiles/dev.nix16
-rw-r--r--home/profiles/git.nix7
-rw-r--r--home/profiles/zsh.nix9
-rw-r--r--hosts/mba/default.nix13
7 files changed, 93 insertions, 60 deletions
diff --git a/flake.lock b/flake.lock
index 11ff499..e129199 100644
--- a/flake.lock
+++ b/flake.lock
@@ -71,11 +71,11 @@
         "nixpkgs-stable": "nixpkgs-stable"
       },
       "locked": {
-        "lastModified": 1690568535,
-        "narHash": "sha256-V8nsU/3pWjw9C+JH3Xn0aPWgXU9/ztHB00C2aBT2ag8=",
+        "lastModified": 1694459075,
+        "narHash": "sha256-3+sHHMLyzjc+y7VtELdNuvroFlGCW4TYEZdFeeLOVGU=",
         "owner": "nix-community",
         "repo": "emacs-overlay",
-        "rev": "7ad10dd0d14aa95e7644a9177978b40c69a1363e",
+        "rev": "d532507e854bbfb3f311a9f30dcbffaeceeff83f",
         "type": "github"
       },
       "original": {
@@ -105,11 +105,11 @@
         "systems": "systems"
       },
       "locked": {
-        "lastModified": 1689068808,
-        "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
+        "lastModified": 1692799911,
+        "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
         "owner": "numtide",
         "repo": "flake-utils",
-        "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
+        "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
         "type": "github"
       },
       "original": {
@@ -141,11 +141,11 @@
         "systems": "systems_2"
       },
       "locked": {
-        "lastModified": 1689068808,
-        "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
+        "lastModified": 1692799911,
+        "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
         "owner": "numtide",
         "repo": "flake-utils",
-        "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
+        "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
         "type": "github"
       },
       "original": {
@@ -203,11 +203,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1687871164,
-        "narHash": "sha256-bBFlPthuYX322xOlpJvkjUBz0C+MOBjZdDOOJJ+G2jU=",
+        "lastModified": 1694465129,
+        "narHash": "sha256-8BQiuobMrCfCbGM7w6Snx+OBYdtTIm0+cGVaKwQ5BFg=",
         "owner": "nix-community",
         "repo": "home-manager",
-        "rev": "07c347bb50994691d7b0095f45ebd8838cf6bc38",
+        "rev": "9787dffff5d315c9593d3f9fb0f9bf2097e1b57b",
         "type": "github"
       },
       "original": {
@@ -242,11 +242,11 @@
         "nixpkgs": "nixpkgs_2"
       },
       "locked": {
-        "lastModified": 1690373729,
-        "narHash": "sha256-e136hTT7LqQ2QjOTZQMW+jnsevWwBpMj78u6FRUsH9I=",
+        "lastModified": 1694081375,
+        "narHash": "sha256-vzJXOUnmkMCm3xw8yfPP5m8kypQ3BhAIRe4RRCWpzy8=",
         "owner": "nix-community",
         "repo": "naersk",
-        "rev": "d9a33d69a9c421d64c8d925428864e93be895dcc",
+        "rev": "3f976d822b7b37fc6fb8e6f157c2dd05e7e94e89",
         "type": "github"
       },
       "original": {
@@ -257,11 +257,11 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1690367991,
-        "narHash": "sha256-2VwOn1l8y6+cu7zjNE8MgeGJNNz1eat1HwHrINeogFA=",
+        "lastModified": 1694183432,
+        "narHash": "sha256-YyPGNapgZNNj51ylQMw9lAgvxtM2ai1HZVUu3GS8Fng=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "c9cf0708f00fbe553319258e48ca89ff9a413703",
+        "rev": "db9208ab987cdeeedf78ad9b4cf3c55f5ebd269b",
         "type": "github"
       },
       "original": {
@@ -273,11 +273,11 @@
     },
     "nixpkgs-stable": {
       "locked": {
-        "lastModified": 1690470004,
-        "narHash": "sha256-l57RmPhPz9r1LGDg/0v8bYgJO8R+GGTQZtkIxE7negU=",
+        "lastModified": 1694304580,
+        "narHash": "sha256-5tIpNodDpEKT8mM/F5zCzWEAnidOg8eb1/x3SRaaBLs=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "9462344318b376e157c94fa60c20a25b913b2381",
+        "rev": "4c8cf44c5b9481a4f093f1df3b8b7ba997a7c760",
         "type": "github"
       },
       "original": {
@@ -289,11 +289,11 @@
     },
     "nixpkgs_2": {
       "locked": {
-        "lastModified": 1690569970,
-        "narHash": "sha256-Lf1LLHyi+hajpj3dJqjMRgLMU2Fr++JEOdJyhBaxaWQ=",
+        "lastModified": 1694343207,
+        "narHash": "sha256-jWi7OwFxU5Owi4k2JmiL1sa/OuBCQtpaAesuj5LXC8w=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "66ce081fafa2dca0038006ec7c6482d7a11d13d8",
+        "rev": "78058d810644f5ed276804ce7ea9e82d92bee293",
         "type": "github"
       },
       "original": {
@@ -303,11 +303,11 @@
     },
     "nixpkgs_3": {
       "locked": {
-        "lastModified": 1690558459,
-        "narHash": "sha256-5W7y1l2cLYPkpJGNlAja7XW2X2o9rjf0O1mo9nxS9jQ=",
+        "lastModified": 1694304580,
+        "narHash": "sha256-5tIpNodDpEKT8mM/F5zCzWEAnidOg8eb1/x3SRaaBLs=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "48e82fe1b1c863ee26a33ce9bd39621d2ada0a33",
+        "rev": "4c8cf44c5b9481a4f093f1df3b8b7ba997a7c760",
         "type": "github"
       },
       "original": {
@@ -319,11 +319,11 @@
     },
     "nur": {
       "locked": {
-        "lastModified": 1690591356,
-        "narHash": "sha256-nv/59EpKSBL8WIaii0sSQvsktED/UZG9N/2qBnE3KM4=",
+        "lastModified": 1694483827,
+        "narHash": "sha256-vm2oy+RuQsYmAU2fQ1X7YliwRc/E1QRbKBKjBX/hCVY=",
         "owner": "nix-community",
         "repo": "NUR",
-        "rev": "d6945b9ba30cc36b6e5cfa89ad9d7fe052aaaa20",
+        "rev": "edcd2fecb43eb52963423348caa1301e443eb392",
         "type": "github"
       },
       "original": {
@@ -347,11 +347,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1690464206,
-        "narHash": "sha256-38V4kmOh6ikpfGiAS+Kt2H/TA2DubSqE66veP/jmB4Q=",
+        "lastModified": 1694364351,
+        "narHash": "sha256-oadhSCqopYXxURwIA6/Anpe5IAG11q2LhvTJNP5zE6o=",
         "owner": "cachix",
         "repo": "pre-commit-hooks.nix",
-        "rev": "9289996dcac62fd45836db7c07b87d2521eb526d",
+        "rev": "4f883a76282bc28eb952570afc3d8a1bf6f481d7",
         "type": "github"
       },
       "original": {
@@ -384,11 +384,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1690596958,
-        "narHash": "sha256-SWqxUiEP9O2gvlWtR4Ku6rIMGM7PuNZreAPrU2yAjsk=",
+        "lastModified": 1694452381,
+        "narHash": "sha256-IQl0hBUHDDoaC1UmFGNelO1OPMgrS+8RvVjCxgE667Q=",
         "owner": "oxalica",
         "repo": "rust-overlay",
-        "rev": "5c06b0ed7bfb00f3a925af6c4acd1636596381c1",
+        "rev": "f77e108350b821d62b7c2ee43fe411a9f4738099",
         "type": "github"
       },
       "original": {
diff --git a/flake.nix b/flake.nix
index 6a2cfa5..b305ac5 100644
--- a/flake.nix
+++ b/flake.nix
@@ -63,7 +63,7 @@
     let
       myLib = import ./nix inputs;
       lib = inputs.nixpkgs.lib // builtins;
-      supportedSystems = [ "x86_64-linux" ];
+      supportedSystems = [ "x86_64-linux" "aarch64-darwin" ];
       forAllSystems = lib.genAttrs supportedSystems;
 
       # Nixpkgs instantiated for supported system types.
@@ -165,6 +165,7 @@
         "mba-fcuny" = darwin.lib.darwinSystem {
           system = "aarch64-darwin";
           modules = [
+              home-manager.darwinModules.home-manager
               ./hosts/mba
           ];
         };
diff --git a/home/profiles/darwin.nix b/home/profiles/darwin.nix
new file mode 100644
index 0000000..4575176
--- /dev/null
+++ b/home/profiles/darwin.nix
@@ -0,0 +1,33 @@
+{ config, pkgs, ... }:
+{
+  home.stateVersion = "23.05";
+
+  imports = [
+    ./git.nix
+    ./zsh.nix
+    ./dev.nix
+    ./tmux.nix
+  ];
+
+  home.packages = with pkgs; [
+    jq
+    direnv
+    nix-direnv
+    tree
+    nixfmt
+    nixpkgs-fmt
+    rnix-lsp
+  ];
+
+  programs = {
+    direnv = {
+      enable = true;
+      nix-direnv.enable = true;
+      enableZshIntegration = true;
+      config = {
+        global.disable_stdin = true;
+        global.strict_env = true;
+      };
+    };
+  };
+}
diff --git a/home/profiles/dev.nix b/home/profiles/dev.nix
index e2806ab..dd9409d 100644
--- a/home/profiles/dev.nix
+++ b/home/profiles/dev.nix
@@ -1,13 +1,5 @@
 { pkgs, config, ... }:
 let
-  ruststable = (pkgs.rust-bin.stable.latest.default.override {
-    extensions = [
-      "rust-src"
-      "rust-analyzer-preview"
-      "rust-analysis"
-      "rustfmt-preview"
-    ];
-  });
   pythonEnv = pkgs.python3.withPackages (p: with p; [
     black
     click
@@ -25,20 +17,19 @@ in
     enable = true;
     goPath = ".local/share/pkg.go";
     goBin = ".local/bin.go";
-    goPrivate = [ "git.fcuny.net" "golang.fcuny.net" ];
-    package = pkgs.go_1_18;
+    package = pkgs.go_1_20;
   };
 
   home.packages = with pkgs; [
     go-tools
     pythonEnv
     google-cloud-sdk
-    ruststable
+    golangci-lint
+    gopls
   ];
 
   home.sessionPath = [
     config.home.sessionVariables.GOBIN
-    "$CARGO_HOME/bin"
   ];
 
   home.sessionVariables = with config.xdg; {
@@ -47,6 +38,5 @@ in
     PYLINTHOME = "${cacheHome}/pylint";
     PYTHON_EGG_CACHE = "${cacheHome}/python-eggs";
     MYPY_CACHE_DIR = "${cacheHome}/mypy";
-    CARGO_HOME = "${dataHome}/cargo";
   };
 }
diff --git a/home/profiles/git.nix b/home/profiles/git.nix
index cf90da6..6846a08 100644
--- a/home/profiles/git.nix
+++ b/home/profiles/git.nix
@@ -1,7 +1,7 @@
-{ self, lib, pkgs, config, ... }:
+{ lib, pkgs, config, ... }:
 let
   sshPub = builtins.fromTOML (
-    builtins.readFile "${self}/configs/ssh-pubkeys.toml"
+    builtins.readFile ../../configs/ssh-pubkeys.toml
   );
 in
 {
@@ -14,7 +14,7 @@ in
 
     signing = {
       key = "key::${sshPub.ykey-laptop}";
-      signByDefault = true;
+      signByDefault = false;
     };
 
     extraConfig = {
@@ -68,7 +68,6 @@ in
 '';
 
   home.packages = with pkgs; [
-    tools.git-blame-stats
     gitAndTools.pre-commit
   ];
 }
diff --git a/home/profiles/zsh.nix b/home/profiles/zsh.nix
index 82e0057..756ee9d 100644
--- a/home/profiles/zsh.nix
+++ b/home/profiles/zsh.nix
@@ -39,13 +39,10 @@
       dhcp-leasese = "xdg-open http://192.168.6.1:8067/";
     };
 
-    prezto = {
+    oh-my-zsh = {
       enable = true;
-      prompt.theme = "minimal";
-      pmodules = [
-        "prompt"
-        "git"
-      ];
+      plugins = ["git"];
+      theme = "robbyrussell";
     };
   };
 }
diff --git a/hosts/mba/default.nix b/hosts/mba/default.nix
index 89e703e..4431df2 100644
--- a/hosts/mba/default.nix
+++ b/hosts/mba/default.nix
@@ -2,6 +2,13 @@
 {
   services.nix-daemon.enable = true;
 
+  nix = {
+    package = pkgs.nixFlakes;
+    settings = {
+      experimental-features = [ "nix-command" "flakes" ];
+    };
+  };
+
   programs.zsh.enable = true;
 
   homebrew = {
@@ -20,4 +27,10 @@
       "wireshark"
     ];
   };
+
+  users.users.fcuny.home = "/Users/fcuny";
+
+  home-manager.useGlobalPkgs = true;
+  home-manager.useUserPackages = true;
+  home-manager.users.fcuny = import ../../home/profiles/darwin.nix;
 }