nixos/configuration/desktop.nix

198 lines
5.1 KiB
Nix
Raw Normal View History

2024-01-30 14:21:50 +00:00
{
lib,
2024-01-30 14:21:50 +00:00
pkgs,
...
}: {
imports = [./default.nix];
nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
environment = {
sessionVariables = {
NIXOS_OZONE_WL = "1";
GRIM_DEFAULT_DIR = "$HOME/Pictures/Grim";
};
systemPackages = with pkgs; [
wtype
wl-clipboard
xdg-utils
libnotify
libcamera
glib
gsettings-desktop-schemas
hunspell
hunspellDicts.en_GB-large
swaybg
swayimg
swaylock-effects
pamixer
pavucontrol
playerctl
brightnessctl
mpv
xarchiver
libreoffice-fresh
inkscape
signal-desktop
nomachine-client
];
};
security = {
polkit.enable = true;
rtkit.enable = true;
pam = {
services.swaylock = {};
loginLimits = [
{
domain = "@users";
item = "rtprio";
type = "-";
value = 1;
}
];
};
};
sound.enable = false;
hardware.bluetooth.enable = true;
programs = {
dconf.enable = true;
light.enable = true;
noisetorch.enable = true;
thunar = {
enable = true;
plugins = with pkgs.xfce; [thunar-archive-plugin thunar-volman];
};
sway = {
enable = true;
package =
pkgs.swayfx.overrideAttrs
(old: {passthru.providedSessions = ["sway"];});
wrapperFeatures.gtk = true;
};
};
gtk.iconCache.enable = true;
qt = {
enable = true;
platformTheme = "gtk2";
style = "gtk2";
};
services = {
2024-05-10 06:08:13 +01:00
flatpak.enable = true;
blueman.enable = true;
gvfs = {
enable = true;
package = lib.mkForce pkgs.gnome3.gvfs;
};
accounts-daemon.enable = true;
2024-01-30 14:21:50 +00:00
dbus.packages = with pkgs; [gcr];
greetd = {
enable = true;
settings = let
command = "sway";
in {
initial_session = {inherit command;};
default_session = {inherit command;};
};
};
pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
audio.enable = true;
jack.enable = true;
pulse.enable = true;
wireplumber.enable = true;
};
tumbler.enable = true;
udisks2.enable = true;
xserver = {
enable = false;
xkb = {
layout = "gb";
variant = "";
options = "ctrl:nocaps";
};
};
};
xdg = {
portal = {
enable = true;
config.common.default = "*"; # TODO change for xdg-desktop-portal > 1.17 changes
extraPortals = [pkgs.xdg-desktop-portal-gtk];
};
mime = let
emacs = ["emacsclient.desktop" "emacs.desktop"];
browser = ["firefox.desktop" "nyxt.desktop"];
applications = {
"inode/directory" = ["thunar.desktop"];
"inode/symlink" = ["thunar.desktop"];
"image/jpeg" = ["swayimg.desktop"];
"image/png" = ["swayimg.desktop"];
"video/mp4" = ["mpv.desktop"];
"text/plain" = emacs;
"text/richtext" = emacs;
"text/org" = emacs;
"text/markdown" = emacs;
"text/rust" = emacs;
"text/csv" = emacs;
"text/html" = emacs;
"text/css" = emacs;
"text/tab-separated-values" = emacs;
"text/x-emacs-lisp" = emacs;
"text/x-fortran" = emacs;
"text/x-idl" = emacs;
"text/x-log" = emacs;
"text/x-lua" = emacs;
"text/x-makefile" = emacs;
"text/x-python" = emacs;
"text/x-python3" = emacs;
"text/x-readme" = emacs;
"text/x-scheme" = emacs;
"text/x-tex" = emacs;
"text/x-texinfo" = emacs;
"application/json" = emacs;
"application/toml" = emacs;
"application/yaml" = emacs;
"application/xml" = emacs;
"application/rss+xml" = emacs;
"application/xhtml+xml" = emacs;
"application/oxps" = emacs;
"application/x-shellscript" = emacs;
2024-05-13 15:39:26 +01:00
"application/pdf" = emacs;
"application/epub+zip" = emacs;
"application/msword" = ["writer.desktop"];
"application/zip" = ["xarchiver.desktop"];
"application/x-extension-htm" = browser;
"application/x-extension-html" = browser;
"application/x-extension-shtml" = browser;
"application/x-extension-xhtml" = browser;
"application/x-extension-xht" = browser;
"application/x-mozilla-bookmarks" = browser;
"x-scheme-handler/http" = browser;
"x-scheme-handler/https" = browser;
"x-scheme-handler/about" = browser;
"x-scheme-handler/chrome" = browser;
"x-scheme-handler/webcal" = browser;
"x-scheme-handler/unknown" = emacs;
"x-scheme-handler/ms-word" = ["writer.desktop"];
"x-scheme-handler/ms-powerpoint" = ["impress.desktop"];
"x-scheme-handler/ms-excel" = ["calc.desktop"];
"x-scheme-handler/msteams" = ["teams-for-linux.desktop"];
};
in {
enable = true;
defaultApplications = applications;
addedAssociations = applications;
removedAssociations = {"x-scheme-handler/zoomus" = browser;};
};
2023-11-09 11:48:40 +00:00
};
}