From 93d2427c14d4d7b53dcdefd016f93dfd52d3afea Mon Sep 17 00:00:00 2001 From: derped Date: Wed, 20 Nov 2024 11:53:00 +0100 Subject: [PATCH] Update desktop base config to use regreet+gvfs. --- services/desktop.nix | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/services/desktop.nix b/services/desktop.nix index b264817..91dfc73 100644 --- a/services/desktop.nix +++ b/services/desktop.nix @@ -16,9 +16,16 @@ in imports = desktopFiles; } // mkIf (elem "desktop" cfg.services) { - services.gvfs.enable = true; - services.xserver = { - xkb.layout = "de"; + xdg.portal = { + enable = true; + wlr.enable = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-gtk + xdg-desktop-portal-gnome + ]; + }; + services = { + gvfs.enable = true; libinput = { enable = true; touchpad = { @@ -29,6 +36,35 @@ in }; }; }; + programs = { + dconf.enable = true; + regreet = { + enable = true; + settings = { + GTK = { + application_prefer_dark_theme = true; + theme_name = lib.mkForce "Kanagawa-BL"; + }; + }; + }; + }; + + environment = { + systemPackages = with pkgs; [kanagawa]; + etc."xdg/gtk-2.0/gtkrc".text = '' + gtk-key-theme-name = "Kanagawa-BL" + ''; + etc."xdg/gtk-3.0/settings.ini".text = '' + [Settings] + gtk-key-theme-name = Kanagawa-BL + ''; + # Set keyboard layout for regreet cage + # see man cage or: + # https://man.archlinux.org/man/cage.1.en#ENVIRONMENT + variables.XKB_DEFAULT_LAYOUT = "de"; + }; + + # Allow users in the video group to change the display brightness services.udev.extraRules = '' ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness" ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chmod 664 /sys/class/backlight/%k/brightness"