diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2024-02-17 22:51:13 +0100 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2024-02-17 22:51:13 +0100 |
commit | e2cb67573509e4bde23c2ca5aa093794ddfb69b1 (patch) | |
tree | a16f16c82e4c22bcc7c51f70105546b7347fbfb1 /hosts/default.nix | |
parent | Dotfiles: Emacs: Open file in same window on left click (diff) | |
download | nixos-config-e2cb67573509e4bde23c2ca5aa093794ddfb69b1.tar.gz nixos-config-e2cb67573509e4bde23c2ca5aa093794ddfb69b1.tar.bz2 nixos-config-e2cb67573509e4bde23c2ca5aa093794ddfb69b1.zip |
Nix: Initial darwin setup
Diffstat (limited to 'hosts/default.nix')
-rw-r--r-- | hosts/default.nix | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/hosts/default.nix b/hosts/default.nix index 7623863..0fc93e7 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,6 +1,6 @@ -{ lib, inputs, secrets, dotfiles, hosts, hardwares, systems, isNixOS, isIso, isHardware, user, nixpkgs, home-manager, ... }: +{ lib, inputs, secrets, dotfiles, hosts, hardwares, systems, isNixOS, isMacOS, isIso, isHardware, user, nixpkgs, home-manager, nix-darwin, ... }: let - mkHost = { host, hardware, stateVersion, system, timezone, location, extraOverlays, extraModules }: isNixOS: isIso: isHardware: + mkHost = { host, hardware, stateVersion, system, timezone, location, extraOverlays, extraModules }: isNixOS: isMacOS: isIso: isHardware: let pkgs = import nixpkgs { inherit system; @@ -43,6 +43,14 @@ let } ] ++ extraSpecialModules; } + else if isMacOS + then + nix-darwin.lib.darwinSystem + { + inherit system; + modules = [ ./darwin.nix ]; + specialArgs = extraArgs; + } else home-manager.lib.homeManagerConfiguration { @@ -63,4 +71,4 @@ in Map each element of the list applying the mkHost function to its elements and returning a set in the listToAttrs format builtins.listToAttrs on the result */ -builtins.listToAttrs (map (mInput@{ host, hardware, system, ... }: { name = host + "-" + hardware + "-" + system; value = mkHost mInput isNixOS isIso isHardware; }) permutatedHosts) +builtins.listToAttrs (map (mInput@{ host, hardware, system, ... }: { name = host + "-" + hardware + "-" + system; value = mkHost mInput isNixOS isMacOS isIso isHardware; }) permutatedHosts) |