nichts/nyx/homes/default.nix
2024-04-09 23:11:33 +02:00

49 lines
1.4 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
inputs',
self',
self,
config,
lib,
...
}: let
inherit (self) inputs;
inherit (lib.modules) mkIf;
inherit (lib.attrsets) genAttrs;
inherit (config) modules;
env = modules.usrEnv;
sys = modules.system;
defaults = sys.programs.default;
specialArgs = {inherit inputs self inputs' self' defaults;};
in {
home-manager = mkIf env.useHomeManager {
# tell home-manager to be as verbose as possible
verbose = true;
# use the system configurations pkgs argument
# this ensures parity between nixos' pkgs and hm's pkgs
useGlobalPkgs = true;
# enable the usage user packages through
# the users.users.<name>.packages option
useUserPackages = true;
# move existing files to the .hm.old suffix rather than failing
# with a very long error message about it
backupFileExtension = "hm.old";
# extra specialArgs passed to Home Manager
# for reference, the config argument in nixos can be accessed
# in home-manager through osConfig without us passing it
extraSpecialArgs = specialArgs;
# per-user Home Manager configuration
# the genAttrs function generates an attribute set of users
# as `user = ./user` where user is picked from a list of
# users in modules.system.users
# the system expects user directories to be found in the present
# directory, or will exit with directory not found errors
users = genAttrs config.modules.system.users (name: ./${name});
};
}