services: home-manager init with kdeconnect and pkgsets integration

This commit is contained in:
Kevin Baensch 2025-07-12 12:57:33 +02:00
parent 1861afd4a7
commit 15cb1af8ac
Signed by: derped
GPG key ID: C0F1D326C7626543
4 changed files with 75 additions and 0 deletions

45
services/home.nix Normal file
View file

@ -0,0 +1,45 @@
{
lib,
fn,
pkgs,
config,
home-manager,
...
}:
with lib;
{
imports = [
home-manager.nixosModules.home-manager
];
}
// mkIf (elem "home" config.machine.services) {
home-manager = {
users =
let
homeFiles = fn.lsfRec (toString ./home) true;
in
listToAttrs (
map (user: {
name = user.name;
value =
{ pkgs, ... }:
{
home.stateVersion = "25.05";
imports = homeFiles;
};
}) config.machine.users
);
extraSpecialArgs = {
inherit (config.machine) pkgsets;
# config.machine.users as set (user name as key)
users = (
listToAttrs (
map (user: {
name = user.name;
value = user;
}) config.machine.users
)
);
};
};
}