Files
nix-cli/flake.nix
2025-10-08 21:28:56 +02:00

41 lines
1016 B
Nix

{
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
system = (nixpkgs.lib.findFirst (p: p.name == profile) null profiles).architecture;
pkgs = nixpkgs.legacyPackages.${system};
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
extraSpecialArgs = {
username = (nixpkgs.lib.findFirst (p: p.name == profile) null profiles).username;
homeDirectory = (nixpkgs.lib.findFirst (p: p.name == profile) null profiles).homeDirectory;
};
}
);
};
}