feat(flake): add nix-darwin config for macOS 🍎
This commit is contained in:
parent
44070bb012
commit
6eb2da277f
1 changed files with 20 additions and 4 deletions
|
|
@ -3,6 +3,12 @@
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
|
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
|
||||||
vscode-server.url = "github:nix-community/nixos-vscode-server";
|
vscode-server.url = "github:nix-community/nixos-vscode-server";
|
||||||
|
|
||||||
|
# nix-darwin for macOS
|
||||||
|
# (follows nixpkgs so both use the same channel)
|
||||||
|
nix-darwin.url = "github:nix-darwin/nix-darwin/master";
|
||||||
|
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
# for later
|
# for later
|
||||||
# home-manager.url = "github:nix-community/home-manager";
|
# home-manager.url = "github:nix-community/home-manager";
|
||||||
# home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
# home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
@ -12,18 +18,18 @@
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
nixos-wsl,
|
nixos-wsl,
|
||||||
vscode-server,
|
vscode-server,
|
||||||
|
nix-darwin,
|
||||||
self,
|
self,
|
||||||
# home-manager,
|
# home-manager,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
|
|
||||||
wsl = nixpkgs.lib.nixosSystem {
|
wsl = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
nixos-wsl.nixosModules.default
|
nixos-wsl.nixosModules.default
|
||||||
vscode-server.nixosModules.default
|
vscode-server.nixosModules.default
|
||||||
./hosts/wsl.nix # previously configuration.nix
|
./hosts/wsl.nix
|
||||||
./tmux.nix
|
./tmux.nix
|
||||||
./neovim.nix
|
./neovim.nix
|
||||||
./fish.nix
|
./fish.nix
|
||||||
|
|
@ -35,17 +41,27 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
vscode-server.nixosModules.default
|
vscode-server.nixosModules.default
|
||||||
./hosts/macbookair.nix # previously configuration.nix
|
./hosts/macbookair.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./tmux.nix
|
./tmux.nix
|
||||||
./neovim.nix
|
./neovim.nix
|
||||||
./fish.nix
|
./fish.nix
|
||||||
# home-manager.nixosModules.default
|
# home-manager.nixosModules.default
|
||||||
# ./configuration.nix # shouldn't this be necessary???
|
# ./configuration.nix
|
||||||
# ./uxplay.nix
|
# ./uxplay.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# macOS (nix-darwin) configuration
|
||||||
|
darwinConfigurations."Daniel-Macbook-Air" = nix-darwin.lib.darwinSystem {
|
||||||
|
modules = [
|
||||||
|
# Ensure Apple Silicon platform
|
||||||
|
{ nixpkgs.hostPlatform = "aarch64-darwin"; }
|
||||||
|
|
||||||
|
# Your macOS module (you created it under nixos/hosts/macos.nix)
|
||||||
|
./nixos/hosts/macos.nix
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue