Add home-manager

This commit is contained in:
Oliver Davies 2025-07-22 20:55:21 +01:00
parent 7ecb185ea6
commit 21a8bd3cb3
2 changed files with 42 additions and 0 deletions

View file

@ -0,0 +1,14 @@
{ config, ... }:
{
flake.modules.homeManager.base = args: {
home = {
homeDirectory = "/home/${config.flake.meta.owner.username}";
username = config.flake.meta.owner.username;
};
programs.home-manager.enable = true;
systemd.user.startServices = "sd-switch";
};
}

View file

@ -0,0 +1,28 @@
{ config, inputs, ... }:
{
flake.modules.nixos.pc = {
imports = [ inputs.home-manager.nixosModules.home-manager ];
home-manager = {
useGlobalPkgs = true;
extraSpecialArgs.hasGlobalPkgs = true;
# https://github.com/nix-community/home-manager/issues/6770
# useUserPackages = true;
users.${config.flake.meta.owner.username}.imports = [
(
{ osConfig, ... }:
{
home.stateVersion = osConfig.system.stateVersion;
}
)
config.flake.modules.homeManager.base
# config.flake.modules.homeManager.gui
];
};
};
}