From 7e1d2412efed67fc6fcdb6097b9dc18741f74085 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Mon, 5 Jun 2023 19:57:19 +0200 Subject: [PATCH] initial config --- TODO | 2 + hosts/thinkpad/default.nix | 2 +- hosts/thinkpad/modules/greetd/default.nix | 2 +- users/rouven/modules/default.nix | 3 +- users/rouven/modules/sway/default.nix | 46 +++++++++++++++++++ .../modules/{hyprland => sway}/session.nix | 1 - .../modules/{hyprland => sway}/waybar.nix | 15 +++--- 7 files changed, 60 insertions(+), 11 deletions(-) create mode 100644 TODO rename users/rouven/modules/{hyprland => sway}/session.nix (97%) rename users/rouven/modules/{hyprland => sway}/waybar.nix (92%) diff --git a/TODO b/TODO new file mode 100644 index 0000000..0c65b30 --- /dev/null +++ b/TODO @@ -0,0 +1,2 @@ +grimshot for screenshots +swaynotificationcenter diff --git a/hosts/thinkpad/default.nix b/hosts/thinkpad/default.nix index 0e7a5d5..5e266d2 100755 --- a/hosts/thinkpad/default.nix +++ b/hosts/thinkpad/default.nix @@ -101,7 +101,7 @@ xdg.portal = { enable = true; extraPortals = [ - pkgs.xdg-desktop-portal-hyprland + pkgs.xdg-desktop-portal-wlr ]; }; diff --git a/hosts/thinkpad/modules/greetd/default.nix b/hosts/thinkpad/modules/greetd/default.nix index f011f3d..bf0616a 100644 --- a/hosts/thinkpad/modules/greetd/default.nix +++ b/hosts/thinkpad/modules/greetd/default.nix @@ -4,7 +4,7 @@ enable = true; settings = { default_session = { - command = "${pkgs.greetd.tuigreet}/bin/tuigreet --cmd Hyprland"; + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --cmd sway"; }; }; }; diff --git a/users/rouven/modules/default.nix b/users/rouven/modules/default.nix index 69ecf24..5a1d442 100644 --- a/users/rouven/modules/default.nix +++ b/users/rouven/modules/default.nix @@ -6,7 +6,8 @@ ./git ./gpg ./helix - ./hyprland + # ./hyprland + ./sway ./mpv ./sops ./spotify diff --git a/users/rouven/modules/sway/default.nix b/users/rouven/modules/sway/default.nix index e69de29..a470441 100644 --- a/users/rouven/modules/sway/default.nix +++ b/users/rouven/modules/sway/default.nix @@ -0,0 +1,46 @@ +{ config, pkgs, ... }: + +{ + imports = [ + # ./hyprpaper.nix + ./session.nix + ./waybar.nix + ]; + wayland.windowManager.sway = { + enable = true; + config = { + + modifier = "Mod4"; + menu = "${pkgs.fuzzel}/bin/fuzzel"; + terminal = "${pkgs.foot}/bin/footclient"; + bars = [ ]; + gaps = { + outer = 5; + inner = 12; + }; + input = { + "*" = { + xkb_layout = "us"; + xkb_variant = "dvorak-alt-intl"; + }; + }; + }; + }; + xdg.configFile = { + "fuzzel/fuzzel.ini".text = '' + [main] + icon-theme=${config.gtk.iconTheme.name} + show-actions=yes + width=80 + terminal=${pkgs.foot}/bin/foot + + [colors] + background=${config.colorScheme.colors.base00}ff + text=${config.colorScheme.colors.base05}ff + match=${config.colorScheme.colors.base08}ff + selection=${config.colorScheme.colors.base02}ff + selection-text=${config.colorScheme.colors.base04}ff + border=${config.colorScheme.colors.base01}ff + ''; + }; +} diff --git a/users/rouven/modules/hyprland/session.nix b/users/rouven/modules/sway/session.nix similarity index 97% rename from users/rouven/modules/hyprland/session.nix rename to users/rouven/modules/sway/session.nix index 87f30f8..87be49b 100644 --- a/users/rouven/modules/hyprland/session.nix +++ b/users/rouven/modules/sway/session.nix @@ -7,7 +7,6 @@ services.swayidle = { enable = true; - systemdTarget = "hyprland-session.target"; events = [ { event = "before-sleep"; command = "${pkgs.swaylock-effects}/bin/swaylock"; } { event = "lock"; command = "${pkgs.swaylock-effects}/bin/swaylock"; } diff --git a/users/rouven/modules/hyprland/waybar.nix b/users/rouven/modules/sway/waybar.nix similarity index 92% rename from users/rouven/modules/hyprland/waybar.nix rename to users/rouven/modules/sway/waybar.nix index 6534dc0..488eb7f 100644 --- a/users/rouven/modules/hyprland/waybar.nix +++ b/users/rouven/modules/sway/waybar.nix @@ -1,16 +1,17 @@ -{ self, config, pkgs, hyprland, ... }: +{ self, config, pkgs, ... }: { - systemd.user.services.waybar.Service.Environment = "PATH=${pkgs.hyprland}/bin"; + # systemd.user.services.waybar.Service.Environment = "PATH=${pkgs.hyprland}/bin"; programs.waybar = { enable = true; systemd.enable = true; - package = hyprland.packages.x86_64-linux.waybar-hyprland; + # package = hyprland.packages.x86_64-linux.waybar-hyprland; settings = { mainBar = { layer = "top"; position = "top"; height = 26; - modules-left = [ "wlr/workspaces" "custom/spotifytitle" "hyprland/window" ]; + # modules-left = [ "wlr/workspaces" "custom/spotifytitle" "hyprland/window" ]; + modules-left = [ "sway/workspaces" "custom/spotifytitle" "sway/window" ]; modules-right = [ "network" "cpu" "temperature" "pulseaudio" "battery" "tray" "clock" ]; network = { format-wifi = " {essid} ({signalStrength}%)"; @@ -20,13 +21,13 @@ format-disconnected = "Disconnected ⚠"; format-alt = "{ifname}: {ipaddr}/{cidr}"; }; - "wlr/workspaces" = { + "sway/workspaces" = { format = "{icon}"; on-click = "activate"; }; - "hyprland/window" = { + "sway/window" = { format = " {}"; - separate-outputs = true; + # separate-outputs = true; }; "custom/spotifytitle" = {