Add home-manager
This commit is contained in:
parent
7ecb185ea6
commit
21a8bd3cb3
2 changed files with 42 additions and 0 deletions
14
modules/home-manager/base.nix
Normal file
14
modules/home-manager/base.nix
Normal 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";
|
||||||
|
};
|
||||||
|
}
|
||||||
28
modules/home-manager/nixos.nix
Normal file
28
modules/home-manager/nixos.nix
Normal 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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue