This commit is contained in:
2025-11-15 23:17:12 +08:00
parent 6f3ea7bb47
commit 389e780660
18 changed files with 1597 additions and 90 deletions
+34 -2
View File
@@ -22,6 +22,7 @@
self,
nixpkgs,
home-manager,
darwin,
...
} @ inputs: let
# Supported systems for your flake packages, shell, etc.
@@ -61,17 +62,48 @@
modules = [
# > Our main nixos configuration file <
./nixos/configuration.nix
# Integrate home-manager as a NixOS module
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {inherit inputs;};
# FIXME: Replace with your username
home-manager.users.your-username = import ./home-manager/home.nix;
}
];
};
};
# nix-darwin configuration entrypoint
# Available through 'darwin-rebuild switch --flake .#your-hostname'
darwinConfigurations = {
# FIXME replace with your hostname
your-hostname = darwin.lib.darwinSystem {
specialArgs = {inherit inputs;};
modules = [
# > Our main darwin configuration file <
./darwin/configuration.nix
# Integrate home-manager as a darwin module
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {inherit inputs;};
# FIXME: Replace with your username
home-manager.users.your-username = import ./home-manager/home.nix;
}
];
};
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
# Useful for systems where you don't have root access
homeConfigurations = {
# FIXME replace with your username@hostname
"your-username@your-hostname" = home-manager.lib.homeManagerConfiguration {
# Home-manager requires 'pkgs' instance
pkgs = nixpkgs.legacyPackages.x86_64-linux; # FIXME replace x86_64-linux with your architecure
pkgs = nixpkgs.legacyPackages.x86_64-linux; # FIXME: Set to your architecture
extraSpecialArgs = {inherit inputs;};
modules = [
# > Our main home-manager configuration file <