sway: modular config

This commit is contained in:
js0ny 2025-11-04 08:47:41 +00:00
parent 93a6613abc
commit 050799b77f
17 changed files with 264 additions and 193 deletions

View file

@ -4,7 +4,7 @@
environment.systemPackages = with pkgs; [
swaybg
swayidle
mako
dunst
rofi
rofimoji
rofi-power-menu

View file

@ -0,0 +1,10 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs.kdePackages; [
dolphin
dolphin-plugins
konsole
kio-admin
];
# See: https://github.com/NixOS/nixpkgs/issues/409986
environment.etc."xdg/menus/applications.menu".source = "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
}

View file

@ -24,6 +24,7 @@
# "com.vivaldi.Vivaldi"
"com.getpostman.Postman"
"us.zoom.Zoom"
"com.ticktick.Ticktick"
];
services.flatpak.overrides = {
global = {
@ -48,6 +49,7 @@
};
};
"md.obsidian.Obsidian".Context.sockets = ["wayland"];
"com.ticktick.Ticktick".Context.sockets = ["wayland"];
"com.getpostman.Postman".Context.persistent = ["Postman"];
};
}

View file

@ -0,0 +1,43 @@
# See also: ~/.dotfiles/home/dot_config/sway
# https://d19qhx4ioawdt7.cloudfront.net/docs/nix-home-manager-sway.html
{
lib,
pkgs,
...
}: let
mod = "Mod4";
in {
wayland.windowManager.sway = {
checkConfig = true;
# config = {
# modifier = mod;
# keybindings = lib.attrsets.mergeAttrsList [
# (lib.attrsets.mergeAttrsList (map (num: let
# ws = toString num;
# in {
# "${mod}+${ws}" = "workspace ${ws}";
# "${mod}+Ctrl+${ws}" = "move container to workspace ${ws}";
# }) [1 2 3 4 5 6 7 8 9 0]))
#
# (lib.attrsets.concatMapAttrs (key: direction: {
# "${mod}+${key}" = "focus ${direction}";
# "${mod}+Ctrl+${key}" = "move ${direction}";
# }) {
# h = "left";
# j = "down";
# k = "up";
# l = "right";
# })
# ];
# };
swaynag.enable = true;
};
home.packages = with pkgs; [
grim
slurp
grim
dunst
sway-contrib.grimshot
];
}

View file

@ -35,8 +35,8 @@
./programs/ollama.nix
# Desktop Linux
./programs/plasma.nix
./programs/niri.nix
./programs/desktop/plasma.nix
./programs/desktop/sway.nix
# General Program config
../../modules/home/programs/eza.nix