mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-24 10:21:43 +01:00
feat: simplify flake.nix
This commit is contained in:
25
lib/macosSystem.nix
Normal file
25
lib/macosSystem.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
nix-darwin,
|
||||
home-manager,
|
||||
system,
|
||||
specialArgs,
|
||||
darwin-modules,
|
||||
home-module,
|
||||
}: let
|
||||
username = specialArgs.username;
|
||||
in
|
||||
nix-darwin.lib.darwinSystem {
|
||||
inherit system specialArgs;
|
||||
modules =
|
||||
darwin-modules
|
||||
++ [
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
|
||||
home-manager.extraSpecialArgs = specialArgs;
|
||||
home-manager.users."${username}" = home-module;
|
||||
}
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user