about summary refs log tree commit diff
path: root/hosts
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2024-02-17 23:06:44 +0100
committerBaitinq <manuelpalenzuelamerino@gmail.com>2024-02-17 23:06:44 +0100
commit91c3d91d25d92ecc281b5a7afd1a50293e04aae6 (patch)
tree774100dfb87355f47d3963a26d70878096feeeca /hosts
parentDotfiles: Emacs: Use straight as package manager (diff)
downloadnixos-config-91c3d91d25d92ecc281b5a7afd1a50293e04aae6.tar.gz
nixos-config-91c3d91d25d92ecc281b5a7afd1a50293e04aae6.tar.bz2
nixos-config-91c3d91d25d92ecc281b5a7afd1a50293e04aae6.zip
Nix: Add home-manager to darwin
Diffstat (limited to 'hosts')
-rw-r--r--hosts/darwin.nix8
-rw-r--r--hosts/default.nix15
-rw-r--r--hosts/home-darwin.nix56
3 files changed, 77 insertions, 2 deletions
diff --git a/hosts/darwin.nix b/hosts/darwin.nix
index 5c17eea..ada5ee3 100644
--- a/hosts/darwin.nix
+++ b/hosts/darwin.nix
@@ -1,4 +1,10 @@
-{...}:
+{ pkgs, user, ...}:
 {
+    users.users."${user}".home = "/Users/${user}";
+
+    environment.systemPackages =
+    [
+    ];
+
     services.nix-daemon.enable = true;
 }
\ No newline at end of file
diff --git a/hosts/default.nix b/hosts/default.nix
index 0fc93e7..6808208 100644
--- a/hosts/default.nix
+++ b/hosts/default.nix
@@ -48,8 +48,21 @@ let
       nix-darwin.lib.darwinSystem
       {
         inherit system;
-        modules = [ ./darwin.nix ];
         specialArgs = extraArgs;
+        modules = [
+          ./darwin.nix
+          home-manager.darwinModules.home-manager
+          {
+            home-manager.useGlobalPkgs = true;
+            home-manager.useUserPackages = true;
+            home-manager.extraSpecialArgs = extraArgs;
+            home-manager.users."manuel.palenzuela" = {
+              imports = [
+                ./home-darwin.nix
+              ];
+            };
+          }
+        ];
       }
     else
       home-manager.lib.homeManagerConfiguration
diff --git a/hosts/home-darwin.nix b/hosts/home-darwin.nix
new file mode 100644
index 0000000..4c177c0
--- /dev/null
+++ b/hosts/home-darwin.nix
@@ -0,0 +1,56 @@
+{  pkgs, stateVersion, lib, dotfiles, user, ... }:
+{
+  imports = [
+  ];
+
+  home = {
+    username = "${user}";
+    homeDirectory = "/Users/${user}";
+
+    packages = with pkgs; [
+      git-crypt
+    ];
+  };
+
+  services = {
+  };
+
+  programs = {
+    emacs = {
+      enable = true;
+      extraPackages = epkgs: with epkgs; [
+        use-package
+
+        direnv
+
+        evil
+        evil-collection
+
+        doom-modeline
+        dashboard
+
+        projectile
+        lsp-ui
+
+        manualPackages.custom.lsp-bridge
+        rust-mode
+        rustic
+        company
+        flycheck
+        lsp-haskell
+
+        nix-mode
+        haskell-mode
+        typescript-mode
+        jq-mode
+
+        doom-themes
+
+        dired-sidebar
+      ];
+      extraConfig = builtins.readFile "${dotfiles}/.emacs";
+    };
+  };
+
+  home.stateVersion = stateVersion;
+}