[feat] Add darwin configs as well

This commit is contained in:
Uttarayan
2024-02-14 23:46:42 +05:30
parent 465a237519
commit dcd0b6b936
7 changed files with 316 additions and 262 deletions

View File

@@ -8,30 +8,57 @@
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
};
outputs = { nixpkgs, home-manager, ... }@inputs:
let
outputs = {
nixpkgs,
home-manager,
darwin,
...
} @ inputs: {
homeConfigurations = let
system = "x86_64-linux";
overlays = [ inputs.neovim-nightly-overlay.overlay ];
overlays = [inputs.neovim-nightly-overlay.overlay];
pkgs = nixpkgs.legacyPackages.${system};
in
{
homeConfigurations."fs0c131y" = home-manager.lib.homeManagerConfiguration {
in {
"fs0c131y" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [
./home.nix
({
{
nixpkgs.overlays = overlays;
})
}
];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
};
};
darwinConfigurations = let
system = "aarch64-darwin";
pkgs = nixpkgs.legacyPackages.${system};
in {
"Uttarayans-MacBook-Pro" = darwin.lib.darwinSystem {
modules = [
home-manager.darwinModules.home-manager
./darwin.nix
({config, ...}: {
home-manager = {
users = {
fs0c131y = {
home = "/Users/fs0c131y";
stateVersion = "21.05";
configuration = home-manager.configurations.fs0c131y;
};
};
};
})
];
};
};
};
}