From f8216eb2fa68489f998e2c74ccdd65f0ba9ba574 Mon Sep 17 00:00:00 2001 From: Alexandre1a Date: Wed, 3 Dec 2025 18:20:11 +0100 Subject: [PATCH] Added Home-Manager --- flake.nix | 2 ++ hosts/macos/configuration.nix | 20 ++++++++++++++++++-- hosts/macos/home.nix | 14 ++++++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 hosts/macos/home.nix diff --git a/flake.nix b/flake.nix index e4efb7c..70953a9 100644 --- a/flake.nix +++ b/flake.nix @@ -30,8 +30,10 @@ }; darwinConfigurations.macOS = nix-darwin.lib.darwinSystem { + specialArgs = {inherit inputs;}; modules = [ ./hosts/macos/configuration.nix + inputs.home-manager.darwinModules.default ]; }; }; diff --git a/hosts/macos/configuration.nix b/hosts/macos/configuration.nix index 1358861..0b12335 100644 --- a/hosts/macos/configuration.nix +++ b/hosts/macos/configuration.nix @@ -1,10 +1,12 @@ -{ pkgs, ... }: +{ pkgs, inputs, ... }: { # All imports go here imports = [ ./modules.nix + # HomeManager + inputs.home-manager.darwinModules.default ]; # All System packages @@ -12,7 +14,21 @@ [ pkgs.vim ]; - + + # HomeManager + home-manager = { + extraSpecialArgs = { inherit inputs; }; + users = { + "alex" = import ./home.nix; + }; + }; + # Use ZSH as the shell + programs = { + zsh = { + enable = true; + enableAutosuggestions = true; + }; + }; # Enable required settings # Flakes nix.settings.experimental-features = [ "nix-command" "flakes" ]; diff --git a/hosts/macos/home.nix b/hosts/macos/home.nix new file mode 100644 index 0000000..0bb92dc --- /dev/null +++ b/hosts/macos/home.nix @@ -0,0 +1,14 @@ +{ + # Refer to the nixOS host for info about home-manager + home.username = "alex"; + home.homeDirecotry = "/Users/alex"; + + home.stateVersion = "25.11"; + + home.packages = [ + pkgs.hello + ]; + + programs.home-manager.enable = true; + +}