feat: initial macos setup

This commit is contained in:
2026-08-02 00:29:15 -04:00
parent fc86577c27
commit 925dd4114a
12 changed files with 210 additions and 47 deletions
+43 -19
View File
@@ -9,6 +9,12 @@
inputs.nixpkgs.follows = "nixpkgs";
};
# macOS system management (paired with nixpkgs 26.05).
nix-darwin = {
url = "github:nix-darwin/nix-darwin/nix-darwin-26.05";
inputs.nixpkgs.follows = "nixpkgs";
};
globalprotect-openconnect.url = "github:yuezk/GlobalProtect-openconnect";
plasma-manager = {
@@ -28,44 +34,62 @@
};
};
outputs = { self, nixpkgs, home-manager, globalprotect-openconnect, ... }@inputs:
outputs = { self, nixpkgs, home-manager, nix-darwin, globalprotect-openconnect, ... }@inputs:
let
system = "x86_64-linux";
linuxSystem = "x86_64-linux";
# Home Manager wiring shared by the NixOS (Linux) hosts.
# plasma-manager is Linux-only, so it lives here rather than in the
# darwin block below.
nixosHome = {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "backup";
users.alex = import ./home/alex;
extraSpecialArgs = { inherit inputs; isDarwin = false; };
sharedModules = [ inputs.plasma-manager.homeModules.plasma-manager ];
};
};
in {
nixosConfigurations = {
# To add a new machine, duplicate this block and change the name
# To add a new Linux machine, duplicate this block and change the name.
whitegrizzly = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
system = linuxSystem;
specialArgs = { inherit inputs; };
modules = [
./hosts/whitegrizzly
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.alex = import ./home/alex;
extraSpecialArgs = { inherit inputs; };
sharedModules = [ inputs.plasma-manager.homeModules.plasma-manager ];
};
}
nixosHome
];
};
oreo = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
system = linuxSystem;
specialArgs = { inherit inputs; };
modules = [
./hosts/oreo
home-manager.nixosModules.home-manager
nixosHome
];
};
};
darwinConfigurations = {
seasoned = nix-darwin.lib.darwinSystem {
specialArgs = { inherit inputs; };
modules = [
./hosts/seasoned
home-manager.darwinModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "backup";
users.alex = import ./home/alex;
extraSpecialArgs = { inherit inputs; };
sharedModules = [ inputs.plasma-manager.homeModules.plasma-manager ];
extraSpecialArgs = { inherit inputs; isDarwin = true; };
};
}
];