mirror of
https://github.com/cupcakearmy/nix-macos.git
synced 2025-12-08 06:55:04 +00:00
add cli to main nix repo
This commit is contained in:
42
cli/flake.nix
Normal file
42
cli/flake.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
description = "Server Shell";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
...
|
||||
}:
|
||||
let
|
||||
profiles = import ./profiles.nix;
|
||||
in
|
||||
{
|
||||
homeConfigurations = nixpkgs.lib.genAttrs (builtins.map (p: p.name) profiles) (
|
||||
profile:
|
||||
let
|
||||
p = (nixpkgs.lib.findFirst (p: p.name == profile) null profiles);
|
||||
system = p.architecture;
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
modules = [ ./home.nix ];
|
||||
|
||||
extraSpecialArgs = {
|
||||
username = p.username;
|
||||
homeDirectory = p.homeDirectory;
|
||||
name = p.name;
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user