mirror of
https://github.com/cupcakearmy/nix-cli.git
synced 2025-12-11 08:15:03 +00:00
new files
This commit is contained in:
40
flake.nix
Normal file
40
flake.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
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 (user: user.username) profiles) (
|
||||
user:
|
||||
let
|
||||
system = (nixpkgs.lib.findFirst (u: u.username == user) null profiles).architecture;
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
modules = [ ./home.nix ];
|
||||
|
||||
extraSpecialArgs = {
|
||||
username = user;
|
||||
homeDirectory = (nixpkgs.lib.findFirst (u: u.username == user) null profiles).homeDirectory;
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user