nixos-config/modules/workstation/default.nix
2024-08-02 21:05:28 +02:00

55 lines
1.2 KiB
Nix

{
lib,
config,
pkgs,
machineProps,
sopsHmModule,
...
}:
{
imports = [
../common
./sound.nix
./desktop.nix
./bluetooth.nix
];
config =
{
programs.dconf.enable = true;
security.polkit.enable = true;
services.dbus.enable = true;
fonts.fontconfig.enable = true;
services.gnome.gnome-keyring.enable = true;
}
// (
if machineProps.enableHomeManager then
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.sharedModules = [
./home-manager
sopsHmModule
];
home-manager.extraSpecialArgs = {
keymap = config.console.keyMap;
isNvidiaGpu = (config.my.hardware.gpu == "nvidia");
};
home-manager.users = builtins.mapAttrs (name: value: {
imports = [ value.hmConfig ];
home.username = name;
home.homeDirectory = "/home/${name}";
home.stateVersion = machineProps.stateVersion;
programs.home-manager.enable = true;
programs.fish.enable = value.shell == pkgs.fish;
}) config.my.users;
}
else
{ }
);
}