nixos/system/desktop.nix

99 lines
2.1 KiB
Nix

{ pkgs, username, ... }:
{
home-manager.users.${username}.imports = [ ./home/desktop.nix ];
nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
hardware.bluetooth.enable = true;
environment = {
sessionVariables = {
NIXOS_OZONE_WL = "1";
QT_QPA_PLATFORM = "wayland";
GRIM_DEFAULT_DIR = "$HOME/Pictures/Screenshots";
};
systemPackages = with pkgs; [
libsecret
libnotify
xdg-utils
hunspell
hunspellDicts.en_GB-large
];
};
security = {
polkit.enable = true;
pam.loginLimits = [
{
domain = "@users";
item = "rtprio";
type = "-";
value = 1;
}
];
};
programs = {
dconf.enable = true;
noisetorch.enable = true;
kdeconnect.enable = true;
file-roller.enable = true;
thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
sway.enable = true;
xwayland.enable = true;
};
gtk.iconCache.enable = true;
services = {
dbus.packages = [ pkgs.gcr ];
flatpak.enable = true;
printing.enable = true;
tumbler.enable = true;
udisks2.enable = true;
gvfs = {
enable = true;
package = pkgs.gnome3.gvfs;
};
pipewire = {
enable = true;
pulse.enable = true;
alsa = {
enable = true;
support32Bit = true;
};
};
greetd = {
enable = true;
settings =
let
default_session.command = "sway";
in
{
inherit default_session;
initial_session = {
inherit (default_session) command;
user = username;
};
};
};
xserver = {
enable = true;
xkb = {
layout = "gb";
variant = "";
options = "ctrl:nocaps";
};
};
};
qt = {
enable = true;
style = "adwaita";
platformTheme = "gnome";
};
xdg.portal = {
enable = true;
config.common.default = "*"; # TODO change for xdg-desktop-portal > 1.17 changes
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
}