diff --git a/home-manager/default.nix b/home-manager/default.nix index e073166..49aa561 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -27,7 +27,6 @@ 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 @@ -78,8 +77,6 @@ in usbutils pciutils - swaylock - swayidle brightnessctl wl-clipboard sway-contrib.grimshot @@ -132,10 +129,27 @@ in gtk = { enable = true; + font.name = "TeX Gyre Adventor 12"; theme = { - name = "Adwaita"; - package = pkgs.adwaita-icon-theme; + name = "Juno"; + package = pkgs.juno-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 2c07b36..e0d7c7c 100644 --- a/home-manager/modules/kanshi.nix +++ b/home-manager/modules/kanshi.nix @@ -1,15 +1,18 @@ { nixosConfig, ... }: let machines = { - smithers = [{ - profile.name = "laptop-only"; - profile.outputs = [ - { - criteria = "eDP-1"; - scale = 1.3; - } - ]; - } + smithers = [ + { + profile.name = "laptop-only"; + profile.outputs = [ + { + criteria = "eDP-1"; + status = "enable"; + scale = 1.3; + mode = "2256x1504@59.999Hz"; + } + ]; + } { profile.name = "homeoffice"; profile.outputs = [ @@ -18,17 +21,20 @@ let status = "disable"; } { - criteria = "DP-10"; - scale = 1.3; + criteria = "Samsung Electric Company U28E590 HTPJ109320"; + scale = 1.4; position = "0,0"; + mode = "3840x2160@60.000Hz"; } { - criteria = "DP-9"; - scale = 1.3; - position = "2952,0"; + criteria = "Samsung Electric Company U28E590 HTPM402579"; + scale = 1.4; + position = "2743,0"; + mode = "3840x2160@60.000Hz"; } ]; - }]; + } + ]; }; in { diff --git a/home-manager/modules/mako.nix b/home-manager/modules/mako.nix deleted file mode 100644 index 7bfcd94..0000000 --- a/home-manager/modules/mako.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - 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 6318966..dc5088d 100644 --- a/home-manager/modules/sway.nix +++ b/home-manager/modules/sway.nix @@ -1,6 +1,11 @@ -{ pkgs, nixosConfig, lib, ... }: +{ + pkgs, + nixosConfig, + lib, + ... +}: let - lockCmd = "${pkgs.swaylock}/bin/swaylock -i /etc/nixos/lockscreen.png"; + lockCmd = "${pkgs.gtklock}/bin/gtklock"; in { wayland.windowManager.sway = { @@ -16,36 +21,36 @@ in focus.followMouse = false; input = { - "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"; + "type:keyboard" = { + xkb_layout = "eu"; + }; + "type:mouse" = { + pointer_accel = "-1"; + }; + "type:touchpad" = { + tap = "enabled"; }; }; - output = { - "*".bg = "/etc/nixos/wallpaper.jpg fill"; - } // lib.optionalAttrs (nixosConfig.networking.hostName == "cray") { - "DP-1" = { - mode = "3840x2160"; - scale = "1.3"; - position = "0,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"; + }; }; - "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; @@ -89,21 +94,20 @@ 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"; @@ -112,13 +116,14 @@ in in { "${mod}+Return" = "exec foot"; - "${mod}+p" = "exec ${pkgs.wofi}/bin/wofi --show drun --gtk-dark"; + "${mod}+p" = "exec ${pkgs.nwg-drawer}/bin/nwg-drawer"; "${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"; @@ -165,14 +170,11 @@ 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 d5a8dec..47aa37a 100644 --- a/modules/sway.nix +++ b/modules/sway.nix @@ -3,6 +3,8 @@ programs.sway.enable = true; programs.sway.package = null; + security.pam.services.gtklock = {}; + # autologin services.greetd = { enable = true;