From c2ec169a17fd468665f9197add837ece87c94a21 Mon Sep 17 00:00:00 2001 From: 514fpv <koishi@514fpv.one> Date: Thu, 4 Jan 2024 11:46:31 +0800 Subject: [PATCH] refactor(gui): remove unrelated configuration --- home/gui/home.nix | 50 ---------------------------------------------- home/gui/nixos.nix | 24 +--------------------- 2 files changed, 1 insertion(+), 73 deletions(-) diff --git a/home/gui/home.nix b/home/gui/home.nix index dd8472cd..152d48a4 100644 --- a/home/gui/home.nix +++ b/home/gui/home.nix @@ -2,56 +2,6 @@ , lib , config , ... }: with lib; mkIf config.passthrough.gui { - wayland.windowManager.sway = { - enable = true; - swaynag.enable = true; - config = { - modifier = "Mod4"; - keybindings = let - modifier = config.wayland.windowManager.sway.config.modifier; - in mkOptionDefault { - XF86MonBrightnessUp = "light -A 5"; - XF86MonBrightnessDown = "light -U 5"; - - "Control+Alt+l" = "exec ${pkgs.swaylock}/bin/swaylock -c 000000"; - "Print" = "exec ${pkgs.grim}/bin/grim - | ${pkgs.wl-clipboard}/bin/wl-copy"; - "${modifier}+Print" = "exec ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" - | ${pkgs.wl-clipboard}/bin/wl-copy"; - "${modifier}+q" = "exec google-chrome-stable"; - }; - - menu = "wofi -show drun -modi drun"; - bars = [ { - mode = "dock"; - position = "bottom"; - workspaceButtons = true; - workspaceNumbers = true; - statusCommand = "${pkgs.i3status}/bin/i3status"; - fonts = { - names = [ "monospace" ]; - size = 8.0; - }; - trayOutput = "primary"; - # sets transparency - colors.background = "00000000"; - } ]; - gaps.inner = 12; - gaps.outer = 5; - # dodge the status bar - gaps.bottom = 0; - - input."*".natural_scroll = "enabled"; - input."type:touchpad".tap = "enabled"; - output."*".bg = "${../../share/54345906_p0.jpg} fill"; - }; - }; - - # application menu setup - programs.wofi = { - enable = true; - settings.mode = "drun"; - settings.allow_images = true; - }; - # cursor theme home.pointerCursor = { package = pkgs.bibata-cursors; diff --git a/home/gui/nixos.nix b/home/gui/nixos.nix index 1d4f32e5..35370e5a 100644 --- a/home/gui/nixos.nix +++ b/home/gui/nixos.nix @@ -2,49 +2,27 @@ , lib , config , ... }: with lib; let - cfg = config.home.sway; gui = with config.faucet.gui; ( enable && session ); in { - options.home = { - sway = {}; - }; - config = { users.homeModules = [ # this module passes gui configuration to home-manager { passthrough.gui = gui; } - # this module passes sway-specific config values - { passthrough.sway = cfg; } ]; users.adminGroups = mkIf gui [ "video" ]; # themes and icons - environment.systemPackages = with pkgs; [ + environment.systemPackages = with pkgs; mkIf gui [ whitesur-gtk-theme whitesur-icon-theme bibata-cursors ]; - services.xserver.displayManager.sessionPackages = - mkIf gui [ (pkgs.writeTextFile { - name = "sway-session"; - destination = "/share/wayland-sessions/sway.desktop"; - text = '' - [Desktop Entry] - Name=Sway - Comment=An i3-compatible Wayland compositor - Exec=sway --unsupported-gpu - Type=Application - ''; - } // { providedSessions = [ pkgs.sway.meta.mainProgram ]; }) ]; - security = mkIf gui { polkit.enable = true; - pam.services.swaylock = { }; }; fonts.enableDefaultPackages = mkIf gui true; programs = mkIf gui { dconf.enable = true; - light.enable = true; }; }; }