52 lines
1.4 KiB
Nix
52 lines
1.4 KiB
Nix
{ lib, config, pkgs, machineInfos, sopsHmModule, ... }:
|
|
with lib;
|
|
{
|
|
|
|
imports = [
|
|
./sound.nix
|
|
./desktop.nix
|
|
./bluetooth.nix
|
|
];
|
|
|
|
options.enableHomeManager = mkOption {
|
|
type = types.bool;
|
|
default = true;
|
|
example = false;
|
|
description = ''
|
|
Whether to install and use home-manager on this machine.
|
|
'';
|
|
};
|
|
|
|
config = {
|
|
enableHomeManager = machineInfos.enableHomeManager;
|
|
|
|
home-manager.useGlobalPkgs = mkIf config.enableHomeManager true;
|
|
home-manager.useUserPackages = mkIf config.enableHomeManager true;
|
|
home-manager.sharedModules = mkIf config.enableHomeManager [
|
|
./home-manager
|
|
sopsHmModule
|
|
];
|
|
home-manager.extraSpecialArgs.keymap = config.keymap;
|
|
home-manager.users = builtins.mapAttrs
|
|
(name: value:
|
|
mkIf value.enableHomeManagerProfile ({
|
|
home.username = name;
|
|
home.homeDirectory = "/home/${name}";
|
|
home.stateVersion = machineInfos.stateVersion;
|
|
programs.home-manager.enable = true;
|
|
enableFishShell = value.shell == pkgs.fish;
|
|
isProfessional = config.isProfessional;
|
|
} // value.homeManagerConfig)
|
|
)
|
|
config.machineUsers;
|
|
|
|
programs.dconf.enable = true;
|
|
security.polkit.enable = true;
|
|
services.dbus.enable = true;
|
|
|
|
fonts.fontconfig.enable = true;
|
|
|
|
services.gnome.gnome-keyring.enable = true;
|
|
};
|
|
}
|