93 lines
2.3 KiB
Nix
93 lines
2.3 KiB
Nix
{
|
|
description = "A personal Nix flake for system and home configurations";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
nix-darwin = {
|
|
url = "github:LnL7/nix-darwin";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
home-manager,
|
|
nix-darwin,
|
|
flake-utils,
|
|
...
|
|
}:
|
|
flake-utils.lib.eachDefaultSystem (system: let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
};
|
|
|
|
homeManagerModule = {
|
|
# home.stateVersion = "24.05";
|
|
};
|
|
in {
|
|
nixosConfigurations = {
|
|
"my-nixos-desktop" = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
modules = [
|
|
./hosts/nixos/my-nixos-desktop/configuration.nix
|
|
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.users.youruser = homeManagerModule;
|
|
# home-manager.users.youruser = import ./home/youruser/home.nix;
|
|
}
|
|
];
|
|
|
|
specialArgs = {
|
|
inherit self pkgs;
|
|
};
|
|
};
|
|
};
|
|
|
|
homeConfigurations = {
|
|
"youruser-standalone" = home-manager.lib.homeManagerConfiguration {
|
|
inherit pkgs;
|
|
modules = [
|
|
homeManagerModule
|
|
# ./home/youruser/home.nix
|
|
];
|
|
|
|
# specialArgs = { inherit self; };
|
|
};
|
|
};
|
|
|
|
darwinConfigurations = {
|
|
"my-macbook-pro" = nix-darwin.lib.darwinSystem {
|
|
inherit system;
|
|
modules = [
|
|
./hosts/darwin/my-macbook-pro/configuration.nix
|
|
|
|
home-manager.darwinModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.users.youruser = homeManagerModule;
|
|
# home-manager.users.youruser = import ./home/youruser/home.nix;
|
|
}
|
|
];
|
|
|
|
specialArgs = {
|
|
inherit self pkgs;
|
|
};
|
|
};
|
|
};
|
|
});
|
|
}
|