From 259c93009835c8ae8fce1e7b5328ae24d65db1f9 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Mon, 18 Nov 2024 12:12:06 +0100 Subject: [PATCH] talos: restart sway setup --- hosts/talos/default.nix | 12 +++--- hosts/talos/home.nix | 94 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 98 insertions(+), 8 deletions(-) diff --git a/hosts/talos/default.nix b/hosts/talos/default.nix index 5264e2b..9a042c0 100644 --- a/hosts/talos/default.nix +++ b/hosts/talos/default.nix @@ -152,22 +152,20 @@ LC_TELEPHONE = "fr_FR.UTF-8"; }; - # Enable the X11 windowing system. - services.xserver.enable = true; - # Enable the KDE Plasma Desktop Environment. services.desktopManager.plasma6.enable = true; services.power-profiles-daemon.enable = true; environment.systemPackages = [ pkgs.unstable.zed-editor + pkgs.foot ]; #programs.hyprland.enable = true; - #programs.sway = { - # enable = true; - # wrapperFeatures.gtk = true; - #}; + programs.sway = { + enable = true; + wrapperFeatures.gtk = true; + }; # Copy the NixOS configuration file and link it from the resulting system # (/run/current-system/configuration.nix). This is useful in case you diff --git a/hosts/talos/home.nix b/hosts/talos/home.nix index f445684..476df1c 100644 --- a/hosts/talos/home.nix +++ b/hosts/talos/home.nix @@ -1,8 +1,14 @@ { config, + lib, pkgs, ... -}: { +}: let + inherit + (lib) + mkOptionDefault + ; +in { home-manager.users.alarsyo = { home.stateVersion = "23.11"; @@ -33,5 +39,91 @@ spot ; }; + + wayland.windowManager.sway = { + enable = true; + swaynag.enable = true; + wrapperFeatures.gtk = true; + config = { + modifier = "Mod4"; + input = { + "type:keyboard" = { + xkb_layout = "fr"; + xkb_variant = "us"; + }; + "type:touchpad" = { + dwt = "enabled"; + tap = "enabled"; + middle_emulation = "enabled"; + natural_scroll = "enabled"; + }; + }; + output = { + "eDP-1" = { + scale = "1.5"; + }; + }; + fonts = { + names = ["Iosevka Fixed" "FontAwesome6Free"]; + size = 9.0; + }; + bars = [ + { + mode = "dock"; + hiddenState = "hide"; + position = "top"; + workspaceButtons = true; + workspaceNumbers = true; + statusCommand = "${pkgs.i3status}/bin/i3status"; + fonts = { + names = ["Iosevka Fixed" "FontAwesome6Free"]; + size = 9.0; + }; + trayOutput = "primary"; + colors = { + background = "#000000"; + statusline = "#ffffff"; + separator = "#666666"; + focusedWorkspace = { + border = "#4c7899"; + background = "#285577"; + text = "#ffffff"; + }; + activeWorkspace = { + border = "#333333"; + background = "#5f676a"; + text = "#ffffff"; + }; + inactiveWorkspace = { + border = "#333333"; + background = "#222222"; + text = "#888888"; + }; + urgentWorkspace = { + border = "#2f343a"; + background = "#900000"; + text = "#ffffff"; + }; + bindingMode = { + border = "#2f343a"; + background = "#900000"; + text = "#ffffff"; + }; + }; + } + ]; + + keybindings = mkOptionDefault { + "Mod4+i" = "exec emacsclient --create-frame"; + }; + }; + }; + programs = { + fuzzel.enable = true; + swaylock.enable = true; + waybar = { + enable = true; + }; + }; }; }