mirror of
https://github.com/cupcakearmy/nix-macos.git
synced 2025-09-05 18:30:39 +00:00
clean repo
This commit is contained in:
48
flake.nix
Normal file
48
flake.nix
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
description = "Personal Nix configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
|
||||
nix-darwin.url = "github:LnL7/nix-darwin";
|
||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nix-darwin,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
}:
|
||||
let
|
||||
hosts = import ./hosts;
|
||||
inherit (builtins) listToAttrs;
|
||||
in
|
||||
{
|
||||
darwinConfigurations = listToAttrs (
|
||||
map (host: {
|
||||
name = host.hostName;
|
||||
value = nix-darwin.lib.darwinSystem {
|
||||
specialArgs = {
|
||||
inherit host;
|
||||
flake = self;
|
||||
};
|
||||
modules = [
|
||||
(import ./darwin.nix)
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.${host.username} = import ./home/home.nix { inherit host; };
|
||||
}
|
||||
];
|
||||
};
|
||||
}) hosts
|
||||
);
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user