nixos-config/modules/workstation/default.nix

64 lines
1.5 KiB
Nix
Raw Normal View History

2024-04-11 20:15:47 +02:00
{
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;
nvidiaGPU = (config.hwAccelerationGPU == "nvidia");
};
2024-04-11 20:15:47 +02:00
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;
2024-04-11 20:15:47 +02:00
}
// value.homeManagerConfig
)
2024-04-11 20:15:47 +02:00
) config.machineUsers;
programs.dconf.enable = true;
security.polkit.enable = true;
services.dbus.enable = true;
fonts.fontconfig.enable = true;
services.gnome.gnome-keyring.enable = true;
};
}