diff --git a/home-manager/default.nix b/home-manager/default.nix index 49aa561..e073166 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -27,6 +27,7 @@ in modules/foot.nix modules/manual.nix modules/tig.nix + modules/mako.nix modules/nm-applet.nix modules/blueman-applet.nix ../secrets/ssh-config.nix @@ -77,6 +78,8 @@ in usbutils pciutils + swaylock + swayidle brightnessctl wl-clipboard sway-contrib.grimshot @@ -129,27 +132,10 @@ in gtk = { enable = true; - font.name = "TeX Gyre Adventor 12"; theme = { - name = "Juno"; - package = pkgs.juno-theme; + name = "Adwaita"; + package = pkgs.adwaita-icon-theme; }; - iconTheme = { - name = "Papirus-Dark"; - package = pkgs.papirus-icon-theme; - }; - - gtk3.extraConfig = { - Settings = '' - gtk-application-prefer-dark-theme=1 - ''; - }; - - gtk4.extraConfig = { - Settings = '' - gtk-application-prefer-dark-theme=1 - ''; - }; }; xdg = { diff --git a/home-manager/modules/kanshi.nix b/home-manager/modules/kanshi.nix index e0d7c7c..2c07b36 100644 --- a/home-manager/modules/kanshi.nix +++ b/home-manager/modules/kanshi.nix @@ -1,18 +1,15 @@ { nixosConfig, ... }: let machines = { - smithers = [ - { - profile.name = "laptop-only"; - profile.outputs = [ - { - criteria = "eDP-1"; - status = "enable"; - scale = 1.3; - mode = "2256x1504@59.999Hz"; - } - ]; - } + smithers = [{ + profile.name = "laptop-only"; + profile.outputs = [ + { + criteria = "eDP-1"; + scale = 1.3; + } + ]; + } { profile.name = "homeoffice"; profile.outputs = [ @@ -21,20 +18,17 @@ let status = "disable"; } { - criteria = "Samsung Electric Company U28E590 HTPJ109320"; - scale = 1.4; + criteria = "DP-10"; + scale = 1.3; position = "0,0"; - mode = "3840x2160@60.000Hz"; } { - criteria = "Samsung Electric Company U28E590 HTPM402579"; - scale = 1.4; - position = "2743,0"; - mode = "3840x2160@60.000Hz"; + criteria = "DP-9"; + scale = 1.3; + position = "2952,0"; } ]; - } - ]; + }]; }; in { diff --git a/home-manager/modules/mako.nix b/home-manager/modules/mako.nix new file mode 100644 index 0000000..7bfcd94 --- /dev/null +++ b/home-manager/modules/mako.nix @@ -0,0 +1,14 @@ +{ + services.mako = { + enable = true; + groupBy = "app-name"; + defaultTimeout = 5000; + extraConfig = '' + font=Inconsolata 10 + background-color=#1d2021 + border-color=#ebdbb2 + border-radius=10 + text-color=#ebdbb2 + ''; + }; +} diff --git a/home-manager/modules/sway.nix b/home-manager/modules/sway.nix index dc5088d..6318966 100644 --- a/home-manager/modules/sway.nix +++ b/home-manager/modules/sway.nix @@ -1,11 +1,6 @@ -{ - pkgs, - nixosConfig, - lib, - ... -}: +{ pkgs, nixosConfig, lib, ... }: let - lockCmd = "${pkgs.gtklock}/bin/gtklock"; + lockCmd = "${pkgs.swaylock}/bin/swaylock -i /etc/nixos/lockscreen.png"; in { wayland.windowManager.sway = { @@ -21,36 +16,36 @@ in focus.followMouse = false; input = { - "type:keyboard" = { - xkb_layout = "eu"; - }; - "type:mouse" = { - pointer_accel = "-1"; - }; - "type:touchpad" = { - tap = "enabled"; + "type:keyboard" = { xkb_layout = "eu"; }; + "type:mouse" = { pointer_accel = "-1"; }; + "type:touchpad" = { tap = "enabled"; }; + "1:1:AT_Translated_Set_2_keyboard" = { + # Remap borken ctrl key on internal keyboard for XPS + xkb_options = "caps:ctrl_modifier"; }; }; - output = - { - "*".bg = "/etc/nixos/wallpaper.jpg fill"; - } - // lib.optionalAttrs (nixosConfig.networking.hostName == "cray") { - "DP-1" = { - mode = "3840x2160"; - scale = "1.3"; - position = "0,0"; - }; - "DP-3" = { - mode = "3840x2160"; - scale = "1.3"; - position = "2953,0"; - }; + output = { + "*".bg = "/etc/nixos/wallpaper.jpg fill"; + } // lib.optionalAttrs (nixosConfig.networking.hostName == "cray") { + "DP-1" = { + mode = "3840x2160"; + scale = "1.3"; + position = "0,0"; }; + "DP-3" = { + mode = "3840x2160"; + scale = "1.3"; + position = "2953,0"; + }; + } // lib.optionalAttrs (nixosConfig.networking.hostName == "smithers") { + "eDP-1" = { + mode = "2256x1504"; + scale = "1.2"; + position = "0,0"; + }; + }; - gaps = { - inner = 5; - }; + gaps = { inner = 5; }; window.border = 2; window.hideEdgeBorders = "smart"; workspaceAutoBackAndForth = true; @@ -94,20 +89,21 @@ in }; }; + bars = [{ command = "${pkgs.waybar}/bin/waybar"; }]; startup = [ - { command = "${pkgs.swaynotificationcenter}/bin/swaync"; } { - command = '' - ${pkgs.swayidle}/bin/swayidle -w \ - timeout 600 "${lockCmd}" \ - timeout 900 "${pkgs.sway}/bin/swaymsg output * dpms off" \ - resume "${pkgs.sway}/bin/swaymsg output * dpms on" \ - before-sleep "${lockCmd}"''; + command = ''${pkgs.swayidle}/bin/swayidle -w \ + timeout 600 "${lockCmd}" \ + timeout 900 "${pkgs.sway}/bin/swaymsg output * dpms off" \ + resume "${pkgs.sway}/bin/swaymsg output * dpms on" \ + before-sleep "${lockCmd}"''; } ]; + + keybindings = let mod = "Mod4"; @@ -116,14 +112,13 @@ in in { "${mod}+Return" = "exec foot"; - "${mod}+p" = "exec ${pkgs.nwg-drawer}/bin/nwg-drawer"; + "${mod}+p" = "exec ${pkgs.wofi}/bin/wofi --show drun --gtk-dark"; "${mod}+Shift+c" = "reload"; "${mod}+Shift+q" = "kill"; "${mod}+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'"; "${mod}+x" = "move workspace to output right"; - "${mod}+n" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t"; "${mod}+h" = "focus left"; "${mod}+j" = "focus down"; @@ -170,11 +165,14 @@ in # Print, Pause, AudioRaiseVolume "Print" = "exec grimshot save area"; "Pause" = "exec systemctl suspend"; - "XF86AudioRaiseVolume" = "exec ${pactl} set-sink-volume @DEFAULT_SINK@ +5%"; + "XF86AudioRaiseVolume" = + "exec ${pactl} set-sink-volume @DEFAULT_SINK@ +5%"; # Tools, AudioMute, AudioLowerVolume "XF86Tools" = "exec ${lockCmd}"; - "XF86AudioMute" = "exec ${pactl} set-sink-mute @DEFAULT_SINK@ toggle"; - "XF86AudioLowerVolume" = "exec ${pactl} set-sink-volume @DEFAULT_SINK@ -5%"; + "XF86AudioMute" = + "exec ${pactl} set-sink-mute @DEFAULT_SINK@ toggle"; + "XF86AudioLowerVolume" = + "exec ${pactl} set-sink-volume @DEFAULT_SINK@ -5%"; # AudioPrev, AudioPlay, AudioNext "XF86AudioNext" = "exec ${playerctl} next"; diff --git a/modules/sway.nix b/modules/sway.nix index 47aa37a..d5a8dec 100644 --- a/modules/sway.nix +++ b/modules/sway.nix @@ -3,8 +3,6 @@ programs.sway.enable = true; programs.sway.package = null; - security.pam.services.gtklock = {}; - # autologin services.greetd = { enable = true;