nixos/system/desktop.nix

100 lines
2.3 KiB
Nix

{ pkgs, username, ... }:
{
home-manager.users.${username}.imports = [ ./home/desktop/default.nix ];
nixpkgs.config.chromium.commandLineArgs = "--password-store='gnome-libsecret' --enable-features=UseOzonePlatform --ozone-platform=wayland";
hardware.bluetooth.enable = true;
environment = {
sessionVariables = {
NIXOS_OZONE_WL = "1";
MOZ_ENABLE_WAYLAND = "1";
WEBKIT_DISABLE_COMPOSITING_MODE = "1";
XDG_SESSION_TYPE = "wayland";
QT_QPA_PLATFORM = "wayland";
};
systemPackages = with pkgs; [
libsecret
libnotify
xdg-utils
hunspell
hunspellDicts.en_GB-large
gnome.nautilus
];
};
security = {
polkit.enable = true;
pam.loginLimits = [
{
domain = "@users";
item = "rtprio";
type = "-";
value = 1;
}
];
};
programs = {
dconf.enable = true;
noisetorch.enable = true;
seahorse.enable = true;
file-roller.enable = true;
kdeconnect.enable = true;
hyprland.enable = true;
xwayland.enable = true;
};
gtk.iconCache.enable = true;
qt = {
enable = true;
style = "adwaita";
platformTheme = "gnome";
};
services = {
gnome.gnome-keyring.enable = true;
flatpak.enable = true;
printing.enable = true;
tumbler.enable = true;
udisks2.enable = true;
gnome.sushi.enable = true;
gvfs = {
enable = true;
package = pkgs.gnome3.gvfs;
};
kanata = {
enable = true;
keyboards.main = {
config = builtins.readFile ./kanata.kbd;
extraDefCfg = "process-unmapped-keys yes";
};
};
pipewire = {
enable = true;
pulse.enable = true;
alsa = {
enable = true;
support32Bit = true;
};
};
greetd = {
enable = true;
settings =
let
default_session.command = "Hyprland";
in
{
inherit default_session;
initial_session = {
inherit (default_session) command;
user = username;
};
};
};
xserver = {
enable = true;
xkb.layout = "gb";
};
};
xdg.portal = {
enable = true;
config.common.default = "*"; # TODO change for xdg-desktop-portal > 1.17 changes
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
}