nixos-config/modules/workstation/default.nix

55 lines
1.2 KiB
Nix
Raw Normal View History

2024-04-11 20:15:47 +02:00
{
config,
pkgs,
machineProps,
2024-04-11 20:15:47 +02:00
sopsHmModule,
...
}:
{
imports = [
../common
./sound.nix
./desktop.nix
./bluetooth.nix
2024-08-03 22:17:23 +02:00
./wireshark.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");
};
2024-08-02 21:05:28 +02:00
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;
2024-04-11 20:15:47 +02:00
}
2024-08-01 21:40:51 +02:00
else
{ }
);
}