mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-10 04:49:19 -08:00
40 lines
948 B
Nix
40 lines
948 B
Nix
{ pkgs, config, lib, sources, witch, options, hostName, ... }:
|
|
|
|
let
|
|
nixosModules = witch.modList {
|
|
modulesDir = ./profiles;
|
|
defaultFile = "nixos.nix";
|
|
};
|
|
in {
|
|
|
|
imports = lib.attrValues nixosModules ++ [ ./private/profile/nixos ];
|
|
|
|
options.home-manager.users = lib.mkOption {
|
|
type = lib.types.attrsOf (lib.types.submoduleWith {
|
|
modules = [ ];
|
|
specialArgs = {
|
|
inherit sources witch hostName;
|
|
superConfig = config;
|
|
modulesPath = sources.home-manager + "/modules";
|
|
};
|
|
});
|
|
};
|
|
|
|
config = {
|
|
|
|
home-manager = {
|
|
useUserPackages = true;
|
|
useGlobalPkgs = true;
|
|
|
|
users = {
|
|
kat = {
|
|
imports = [ ./home.nix (import (./hosts + "/${hostName}/home")) ];
|
|
|
|
deploy.profile = lib.mkMerge (map (prof: {
|
|
${if options ? deploy.profile.${prof} then prof else null} = true;
|
|
}) config.deploy.profiles);
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|