From e2cb67573509e4bde23c2ca5aa093794ddfb69b1 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Sat, 17 Feb 2024 22:51:13 +0100 Subject: Nix: Initial darwin setup --- flake.nix | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 1f474c1..d51c66d 100644 --- a/flake.nix +++ b/flake.nix @@ -9,6 +9,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + nix-darwin = { + url = "github:LnL7/nix-darwin"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + hardware.url = "github:NixOS/nixos-hardware"; impermanence.url = "github:nix-community/impermanence"; @@ -40,7 +45,7 @@ }; }; - outputs = inputs @ { self, nixpkgs, home-manager, ... }: + outputs = inputs @ { self, nixpkgs, home-manager, nix-darwin, ... }: let user = "baitinq"; @@ -71,25 +76,35 @@ commonInherits = { inherit (nixpkgs) lib; - inherit inputs nixpkgs home-manager; + inherit inputs nixpkgs home-manager nix-darwin; inherit user secrets dotfiles hosts hardwares systems; }; in { nixosConfigurations = import ./hosts (commonInherits // { isNixOS = true; + isMacOS = false; + isIso = false; + isHardware = true; + }); + + darwinConfigurations = import ./hosts (commonInherits // { + isNixOS = false; + isMacOS = true; isIso = false; isHardware = true; }); homeConfigurations = import ./hosts (commonInherits // { isNixOS = false; + isMacOS = false; isIso = false; isHardware = false; }); isoConfigurations = import ./hosts (commonInherits // { isNixOS = true; + isMacOS = false; isIso = true; isHardware = false; user = "nixos"; @@ -97,6 +112,7 @@ nixosNoHardwareConfigurations = import ./hosts (commonInherits // { isNixOS = true; + isMacOS = false; isIso = false; isHardware = false; }); -- cgit 1.4.1