[fix] *.nix: reformat with alejandra
This commit is contained in:
parent
876dc45719
commit
39c2fb096c
26 changed files with 565 additions and 562 deletions
|
@ -1,15 +1,16 @@
|
|||
{ config, pkgs }:
|
||||
let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
}: let
|
||||
cfg = config.jhome.gui.sway;
|
||||
modifier = "Mod4";
|
||||
terminal = config.jhome.gui.terminal;
|
||||
termCmd =
|
||||
if terminal == "wezterm" then
|
||||
"wezterm start"
|
||||
else if terminal == "alacritty" then
|
||||
"alacritty -e"
|
||||
else
|
||||
builtins.abort "no command configured for ${terminal}";
|
||||
if terminal == "wezterm"
|
||||
then "wezterm start"
|
||||
else if terminal == "alacritty"
|
||||
then "alacritty -e"
|
||||
else builtins.abort "no command configured for ${terminal}";
|
||||
menu = "${pkgs.fuzzel}/bin/fuzzel --terminal '${termCmd}'";
|
||||
# currently, there is some friction between sway and gtk:
|
||||
# https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
|
||||
|
@ -17,11 +18,10 @@ let
|
|||
# for gsettings to work, we need to tell it where the schemas are
|
||||
# using the XDG_DATA_DIR environment variable
|
||||
# run at the end of sway config
|
||||
configure-gtk =
|
||||
let
|
||||
schema = pkgs.gsettings-desktop-schemas;
|
||||
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
|
||||
in
|
||||
configure-gtk = let
|
||||
schema = pkgs.gsettings-desktop-schemas;
|
||||
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
|
||||
in
|
||||
pkgs.writers.writeDashBin "configure-gtk" ''
|
||||
export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS
|
||||
gnome_schema=org.gnome.desktop.interface
|
||||
|
@ -38,17 +38,16 @@ let
|
|||
${pkgs.glib}/bin/gsettings set "$gnome_schema" font-name "$font_name"
|
||||
${pkgs.glib}/bin/gsettings set "$gnome_schema" color-scheme prefer-dark
|
||||
'';
|
||||
cmdOnce = command: { inherit command; };
|
||||
cmdOnce = command: {inherit command;};
|
||||
cmdAlways = command: {
|
||||
inherit command;
|
||||
always = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
inherit modifier terminal menu;
|
||||
keybindings = import ./keybindings.nix { inherit config pkgs; };
|
||||
keybindings = import ./keybindings.nix {inherit config pkgs;};
|
||||
# Appearance
|
||||
bars = [ ]; # Waybar is started as a systemd service
|
||||
bars = []; # Waybar is started as a systemd service
|
||||
gaps = {
|
||||
smartGaps = true;
|
||||
smartBorders = "on";
|
||||
|
@ -73,9 +72,12 @@ in
|
|||
}
|
||||
];
|
||||
# Startup scripts
|
||||
startup = [
|
||||
(cmdAlways "${configure-gtk}/bin/configure-gtk")
|
||||
] ++ (builtins.map cmdAlways cfg.exec.always) ++ (builtins.map cmdOnce cfg.exec.once);
|
||||
startup =
|
||||
[
|
||||
(cmdAlways "${configure-gtk}/bin/configure-gtk")
|
||||
]
|
||||
++ (builtins.map cmdAlways cfg.exec.always)
|
||||
++ (builtins.map cmdOnce cfg.exec.once);
|
||||
# Keyboard configuration
|
||||
input."type:keyboard" = {
|
||||
repeat_delay = "300";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue