From cea4219bff6f0e28b64cfa03abc2c8dc6004e36e Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Sat, 25 Mar 2023 11:40:36 +0100 Subject: [PATCH] Move shell to fish --- common.nix | 14 +++++++++++++- home/fish/fish.nix | 5 +++++ home/modules/programs/my-sway/default.nix | 4 ++-- nki-home/configuration.nix | 6 ------ 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/common.nix b/common.nix index 6d5b4ed..da98c24 100644 --- a/common.nix +++ b/common.nix @@ -1,9 +1,21 @@ +let + # Default shell + defaultShell = { lib, pkgs, config, ... }: with lib; { + environment.shells = with pkgs; [ bash fish ]; + users.users = mkMerge [ + { nki.shell = pkgs.fish; } + # (mkIf (builtins.hasAttr "natsukagami" config.users.users) { natsukagami.shell = pkgs.fish; }) + ]; + }; +in # Common stuff { lib, pkgs, config, ... }: with lib; { + imports = [ defaultShell ]; # swaync disable notifications on screencast - xdg.portal.wlr.settings.screencast = { + config.xdg.portal.wlr.settings.screencast = { exec_before = ''which swaync-client && swaync-client --inhibitor-add "xdg-desktop-portal-wlr" || true''; exec_after = ''which swaync-client && swaync-client --inhibitor-remove "xdg-desktop-portal-wlr" || true''; }; + } diff --git a/home/fish/fish.nix b/home/fish/fish.nix index d548a8d..5ea882d 100644 --- a/home/fish/fish.nix +++ b/home/fish/fish.nix @@ -154,6 +154,11 @@ set -q PERL_LOCAL_LIB_ROOT; or set -x PERL_LOCAL_LIB_ROOT ${config.home.homeDirectory}/perl5; set -x PERL_MB_OPT --install_base\ \"${config.home.homeDirectory}/perl5\"; set -x PERL_MM_OPT INSTALL_BASE=${config.home.homeDirectory}/perl5; + + # Sway! + if status --is-login; and which sway >/dev/null; and test -z $DISPLAY; and test (tty) = "/dev/tty1" + read -P "Press enter to start sway..."; and exec sway + end ''; plugins = [ { diff --git a/home/modules/programs/my-sway/default.nix b/home/modules/programs/my-sway/default.nix index 4d8dcec..d40e831 100644 --- a/home/modules/programs/my-sway/default.nix +++ b/home/modules/programs/my-sway/default.nix @@ -288,10 +288,10 @@ in focus.mouseWarping = true; focus.newWindow = "urgent"; # Gaps - gaps.outer = 3; + gaps.outer = 4; gaps.inner = 4; gaps.smartBorders = "off"; # until swayfx fixes clipping bug - gaps.smartGaps = true; + gaps.smartGaps = false; ### Bars # Let systemd manage it diff --git a/nki-home/configuration.nix b/nki-home/configuration.nix index 5f530e8..7e333bc 100644 --- a/nki-home/configuration.nix +++ b/nki-home/configuration.nix @@ -89,12 +89,6 @@ # keyMap = "us"; # }; - # Enable sway on login. - environment.loginShellInit = '' - if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then - exec sway - fi - ''; # Configure keymap in X11 # services.xserver.layout = "jp"; # services.xserver.xkbOptions = "";