summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKleidi Bujari <mail@4kb.net>2025-07-18 11:16:51 -0400
committerKleidi Bujari <mail@4kb.net>2025-07-18 11:16:51 -0400
commit9ba211dfbdf77ac8c336f3f2eaf32b80da7727c1 (patch)
tree83006e33626d5b0e8621ccc36890103f6a913d41
parentc65d00f9b263c14fbf2627bd9014ea4508731279 (diff)
downloaddepot-9ba211dfbdf77ac8c336f3f2eaf32b80da7727c1.tar.gz
depot-9ba211dfbdf77ac8c336f3f2eaf32b80da7727c1.tar.bz2
depot-9ba211dfbdf77ac8c336f3f2eaf32b80da7727c1.zip
add treesitter grammars and properly handle idle desktop
-rw-r--r--modules/desktop.nix49
1 files changed, 34 insertions, 15 deletions
diff --git a/modules/desktop.nix b/modules/desktop.nix
index f8e7f95..ff63cf9 100644
--- a/modules/desktop.nix
+++ b/modules/desktop.nix
@@ -23,9 +23,10 @@ in
xwayland-satellite
zathura
- ((emacsPackagesFor emacs-pgtk).emacsWithPackages (
- epkgs: [ epkgs.mu4e ]
- ))
+ ((emacsPackagesFor emacs-pgtk).emacsWithPackages (epkgs: [
+ epkgs.mu4e
+ epkgs.treesit-grammars.with-all-grammars
+ ]))
];
documentation = {
@@ -68,6 +69,23 @@ in
waybar = afterGraphical "${pkgs.waybar}/bin/waybar";
udiskie = afterGraphical "${pkgs.udiskie}/bin/udiskie";
xwayland = afterGraphical "${pkgs.xwayland-satellite}/bin/xwayland-satellite";
+ swayidle =
+ let
+ swaylock = ''
+ ${pkgs.swaylock}/bin/swaylock \
+ --color 2b3328 \
+ --indicator-caps-lock \
+ --ignore-empty-password \
+ --daemonize'';
+ in
+ afterGraphical (
+ pkgs.writeShellScript "start-swayidle" ''
+ ${pkgs.swayidle}/bin/swayidle -w \
+ timeout 601 '${pkgs.niri}/bin/niri msg action power-off-monitors' \
+ timeout 600 '${swaylock}' \
+ before-sleep '${swaylock}'
+ ''
+ );
};
qt = {
@@ -112,23 +130,24 @@ in
# GTK settings
dconf = {
enable = true;
- profiles.user.databases = [{
- lockAll = true;
- settings = {
- "org/gnome/desktop/interface" = {
- color-scheme = "prefer-dark";
- gtk-font-name = "System-ui 10";
- icon-theme = "Pop";
- theme-name = "Adwaita-dark";
+ profiles.user.databases = [
+ {
+ lockAll = true;
+ settings = {
+ "org/gnome/desktop/interface" = {
+ color-scheme = "prefer-dark";
+ gtk-font-name = "System-ui 10";
+ icon-theme = "Pop";
+ theme-name = "Adwaita-dark";
+ };
};
- };
- }];
+ }
+ ];
};
};
# Helper for managing dotfiles
- environment.shellAliases.dots =
- "git --git-dir=$HOME/.local/cfg/ --work-tree=$HOME";
+ environment.shellAliases.dots = "git --git-dir=$HOME/.local/cfg/ --work-tree=$HOME";
# Enable yubikey for SSH and more
services = {