nixos-config/modules/workstation/default.nix

58 lines
1.3 KiB
Nix
Raw Normal View History

2024-04-11 20:15:47 +02:00
{
lib,
config,
pkgs,
machineProps,
2024-04-11 20:15:47 +02:00
sopsHmModule,
...
}:
with lib;
{
imports = [
../common
./sound.nix
./desktop.nix
./bluetooth.nix
];
2024-08-01 21:40:51 +02:00
config =
{
programs.dconf.enable = true;
security.polkit.enable = true;
services.dbus.enable = true;
2024-08-01 21:40:51 +02:00
fonts.fontconfig.enable = true;
2024-08-01 21:40:51 +02:00
services.gnome.gnome-keyring.enable = true;
}
// (
if machineProps.enableHomeManager then
2024-04-11 20:15:47 +02:00
{
2024-08-01 21:40:51 +02:00
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:
{
home.username = name;
home.homeDirectory = "/home/${name}";
home.stateVersion = machineProps.stateVersion;
programs.home-manager.enable = true;
programs.fish.enable = value.shell == pkgs.fish;
}
// value.hmConfig
) config.my.users;
2024-04-11 20:15:47 +02:00
}
2024-08-01 21:40:51 +02:00
else
{ }
);
}