mirror of
https://github.com/cupcakearmy/nix-cli.git
synced 2025-12-07 22:35:03 +00:00
41 lines
1016 B
Nix
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;
|
|
};
|
|
}
|
|
);
|
|
};
|
|
}
|