2024-07-26 23:07:07 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
inputs,
|
|
|
|
self,
|
|
|
|
...
|
|
|
|
}: let
|
2024-03-24 11:24:00 +00:00
|
|
|
myHmConf = config.myOptions.home-manager;
|
2024-03-23 22:06:58 +00:00
|
|
|
username = config.myOptions.system.username;
|
2024-07-26 23:07:07 +00:00
|
|
|
in {
|
2024-04-07 14:54:36 +00:00
|
|
|
home-manager = lib.mkIf myHmConf.enable {
|
2024-03-23 22:06:58 +00:00
|
|
|
# Use verbose mode for home-manager
|
|
|
|
verbose = true;
|
|
|
|
|
|
|
|
# Should home-manager use the same pkgs as system's pkgs?
|
|
|
|
# If disabled, home-manager will independently evaluate and use
|
|
|
|
# its own set of packages. Note that this could increase disk usage
|
|
|
|
# and it might lead to inconsistencies.
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
|
|
|
|
# Use NixOS user packages (users.users.<name>.packages)
|
|
|
|
# instead of home-manager's own shell init config files to
|
|
|
|
# get packages to install
|
|
|
|
useUserPackages = true;
|
|
|
|
|
|
|
|
# Move existing files to .old suffix rather than exiting with error
|
|
|
|
backupFileExtension = "hm.old";
|
|
|
|
|
|
|
|
# These will be passed to all hm modules
|
2024-07-26 23:07:07 +00:00
|
|
|
extraSpecialArgs = {inherit inputs self;};
|
2024-03-23 22:06:58 +00:00
|
|
|
|
|
|
|
users.${username} = {
|
2024-03-24 12:18:51 +00:00
|
|
|
# These imports will be scoped under this key so all settings
|
|
|
|
# in them will be added to `home-manager.users.${username}`..
|
|
|
|
imports = [
|
2024-06-19 16:26:16 +00:00
|
|
|
./misc
|
2024-03-24 12:18:51 +00:00
|
|
|
./packages
|
|
|
|
./programs
|
2024-06-19 15:41:40 +00:00
|
|
|
./impermanence
|
2024-06-20 20:04:05 +00:00
|
|
|
./themes
|
2024-06-21 11:09:02 +00:00
|
|
|
./services
|
2024-03-24 12:18:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
config = {
|
|
|
|
# Let home-manager manage itself in standalone mode
|
|
|
|
programs.home-manager.enable = true;
|
2024-03-23 22:06:58 +00:00
|
|
|
|
2024-03-24 12:18:51 +00:00
|
|
|
# Basic user config
|
|
|
|
home = {
|
|
|
|
inherit username;
|
|
|
|
homeDirectory = "/home/${username}";
|
|
|
|
stateVersion = myHmConf.stateVersion;
|
|
|
|
};
|
2024-03-23 22:06:58 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|