From 79dfeea3f736f658839f8cb45e57dbfeb89b9535 Mon Sep 17 00:00:00 2001 From: Leah Amelia Chen Date: Sun, 11 Feb 2024 21:06:57 +0100 Subject: [PATCH] reorganize(users/leah): split -> presets, programs --- users/leah/default.nix | 70 +++------------- users/leah/presets/hyprland/clipboard.nix | 17 ++++ users/leah/presets/hyprland/default.nix | 39 +++++++++ users/leah/presets/hyprland/greetd.nix | 26 ++++++ users/leah/{ => presets}/hyprland/mako.nix | 0 users/leah/presets/hyprland/media.nix | 35 ++++++++ .../default.nix => presets/hyprland/qt.nix} | 10 ++- users/leah/presets/hyprland/screenshots.nix | 39 +++++++++ .../hyprland/settings.nix} | 83 +------------------ .../{ => presets}/hyprland/waybar/default.nix | 2 + .../{ => presets}/hyprland/waybar/style.css | 0 users/leah/presets/plasma/default.nix | 17 ++++ users/leah/presets/plasma/fusuma.nix | 32 +++++++ users/leah/presets/plasma/sddm.nix | 7 ++ .../plasma/settings.nix} | 22 +++-- .../leah/{ => programs}/1password/default.nix | 0 .../{programs.nix => programs/default.nix} | 34 +++++++- users/leah/{ => programs}/discord/default.nix | 0 users/leah/{ => programs}/discord/vencord.css | 0 users/leah/{ => programs}/fcitx5/default.nix | 0 users/leah/{ => programs}/firefox/default.nix | 64 ++++++++++---- users/leah/{ => programs}/nvim/.stylua.toml | 0 users/leah/{ => programs}/nvim/LICENSE | 0 users/leah/{ => programs}/nvim/default.nix | 0 users/leah/{ => programs}/nvim/init.lua | 0 .../nvim/lua/core/bootstrap.lua | 0 .../nvim/lua/core/default_config.lua | 0 .../{ => programs}/nvim/lua/core/init.lua | 0 .../{ => programs}/nvim/lua/core/mappings.lua | 0 .../{ => programs}/nvim/lua/core/utils.lua | 0 .../{ => programs}/nvim/lua/custom/chadrc.lua | 0 .../lua/custom/configs/format-on-save.lua | 0 .../nvim/lua/custom/configs/lspconfig.lua | 0 .../nvim/lua/custom/configs/rust-tools.lua | 0 .../nvim/lua/custom/mappings.lua | 0 .../nvim/lua/custom/neovide.lua | 0 .../nvim/lua/custom/plugins.lua | 0 .../nvim/lua/plugins/configs/cmp.lua | 0 .../nvim/lua/plugins/configs/lazy_nvim.lua | 0 .../nvim/lua/plugins/configs/lspconfig.lua | 0 .../nvim/lua/plugins/configs/mason.lua | 0 .../nvim/lua/plugins/configs/nvimtree.lua | 0 .../nvim/lua/plugins/configs/others.lua | 0 .../nvim/lua/plugins/configs/telescope.lua | 0 .../nvim/lua/plugins/configs/treesitter.lua | 0 .../{ => programs}/nvim/lua/plugins/init.lua | 0 users/leah/{ => programs}/nvim/plugins.nix | 0 users/leah/{ => programs}/nvim/settings.nix | 0 users/leah/{ => programs}/rust/default.nix | 0 users/leah/{ => programs}/starship.toml | 0 50 files changed, 330 insertions(+), 167 deletions(-) create mode 100644 users/leah/presets/hyprland/clipboard.nix create mode 100644 users/leah/presets/hyprland/default.nix create mode 100644 users/leah/presets/hyprland/greetd.nix rename users/leah/{ => presets}/hyprland/mako.nix (100%) create mode 100644 users/leah/presets/hyprland/media.nix rename users/leah/{qt/default.nix => presets/hyprland/qt.nix} (82%) create mode 100644 users/leah/presets/hyprland/screenshots.nix rename users/leah/{hyprland/default.nix => presets/hyprland/settings.nix} (59%) rename users/leah/{ => presets}/hyprland/waybar/default.nix (99%) rename users/leah/{ => presets}/hyprland/waybar/style.css (100%) create mode 100644 users/leah/presets/plasma/default.nix create mode 100644 users/leah/presets/plasma/fusuma.nix create mode 100644 users/leah/presets/plasma/sddm.nix rename users/leah/{plasma/default.nix => presets/plasma/settings.nix} (65%) rename users/leah/{ => programs}/1password/default.nix (100%) rename users/leah/{programs.nix => programs/default.nix} (74%) rename users/leah/{ => programs}/discord/default.nix (100%) rename users/leah/{ => programs}/discord/vencord.css (100%) rename users/leah/{ => programs}/fcitx5/default.nix (100%) rename users/leah/{ => programs}/firefox/default.nix (79%) rename users/leah/{ => programs}/nvim/.stylua.toml (100%) rename users/leah/{ => programs}/nvim/LICENSE (100%) rename users/leah/{ => programs}/nvim/default.nix (100%) rename users/leah/{ => programs}/nvim/init.lua (100%) rename users/leah/{ => programs}/nvim/lua/core/bootstrap.lua (100%) rename users/leah/{ => programs}/nvim/lua/core/default_config.lua (100%) rename users/leah/{ => programs}/nvim/lua/core/init.lua (100%) rename users/leah/{ => programs}/nvim/lua/core/mappings.lua (100%) rename users/leah/{ => programs}/nvim/lua/core/utils.lua (100%) rename users/leah/{ => programs}/nvim/lua/custom/chadrc.lua (100%) rename users/leah/{ => programs}/nvim/lua/custom/configs/format-on-save.lua (100%) rename users/leah/{ => programs}/nvim/lua/custom/configs/lspconfig.lua (100%) rename users/leah/{ => programs}/nvim/lua/custom/configs/rust-tools.lua (100%) rename users/leah/{ => programs}/nvim/lua/custom/mappings.lua (100%) rename users/leah/{ => programs}/nvim/lua/custom/neovide.lua (100%) rename users/leah/{ => programs}/nvim/lua/custom/plugins.lua (100%) rename users/leah/{ => programs}/nvim/lua/plugins/configs/cmp.lua (100%) rename users/leah/{ => programs}/nvim/lua/plugins/configs/lazy_nvim.lua (100%) rename users/leah/{ => programs}/nvim/lua/plugins/configs/lspconfig.lua (100%) rename users/leah/{ => programs}/nvim/lua/plugins/configs/mason.lua (100%) rename users/leah/{ => programs}/nvim/lua/plugins/configs/nvimtree.lua (100%) rename users/leah/{ => programs}/nvim/lua/plugins/configs/others.lua (100%) rename users/leah/{ => programs}/nvim/lua/plugins/configs/telescope.lua (100%) rename users/leah/{ => programs}/nvim/lua/plugins/configs/treesitter.lua (100%) rename users/leah/{ => programs}/nvim/lua/plugins/init.lua (100%) rename users/leah/{ => programs}/nvim/plugins.nix (100%) rename users/leah/{ => programs}/nvim/settings.nix (100%) rename users/leah/{ => programs}/rust/default.nix (100%) rename users/leah/{ => programs}/starship.toml (100%) diff --git a/users/leah/default.nix b/users/leah/default.nix index ad7c168..c0b5431 100644 --- a/users/leah/default.nix +++ b/users/leah/default.nix @@ -1,23 +1,12 @@ { config, - lib, pkgs, - nix-gaming, ... }: { imports = [ - ./1password ./containers - ./discord - ./fcitx5 - ./firefox - ./hyprland - ./nvim - #./plasma - ./qt - ./rust - - ./programs.nix + ./presets/plasma + ./programs ]; # Makes testing aarch64 packaging a lot easier @@ -35,10 +24,10 @@ flavour = "mocha"; accent = "maroon"; }; - roles.dolphin.enable = true; roles.email = let - migadu = { + realName = config.roles.base.fullName; + host = { imap = { host = "imap.migadu.com"; port = 993; @@ -52,13 +41,12 @@ enable = true; accounts = { "hi@pluie.me" = { + inherit realName host; primary = true; - realName = config.roles.base.fullName; - host = migadu; }; "acc@pluie.me" = { - realName = "${config.roles.base.fullName} [accounts]"; - host = migadu; + inherit host; + realName = "${realName} [accounts]"; }; }; }; @@ -70,13 +58,14 @@ noto-fonts noto-fonts-extra noto-fonts-emoji + libertinus lxgw-wenkai lxgw-neoxihei rubik ]; defaults = { - serif = ["Noto Serif" "LXGW WenKai"]; + serif = ["Libertinus Serif" "LXGW WenKai"]; sansSerif = ["Rubik" "LXGW Neo XiHei"]; emoji = ["Noto Color Emoji"]; monospace = ["Iosevka Nerd Font" "LXGW Neo XiHei"]; @@ -92,46 +81,7 @@ signing.key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC7uJGE2/25M4a3DIVxtnTA5INqWsFGw+49qHXaN/kqy"; }; - programs = { - steam = { - enable = true; - package = pkgs.steam.override { - extraProfile = '' - export STEAM_EXTRA_COMPAT_TOOLS_PATHS="${nix-gaming.packages.${pkgs.system}.proton-ge}" - ''; - }; - remotePlay.openFirewall = true; - }; - nix-ld.enable = true; - }; - - services.gnome.gnome-keyring.enable = true; - - services.greetd = { - enable = true; - settings.default_session = { - command = "${lib.getExe pkgs.greetd.tuigreet} --time --user-menu -r --remember-user-session -g 'Welcome back! <3' --asterisks --cmd ${lib.getExe pkgs.hyprland}"; - user = "greeter"; - }; - }; - - services.upower.enable = true; - - # Stop the damn TUI from bleeding - # https://www.reddit.com/r/NixOS/comments/u0cdpi/tuigreet_with_xmonad_how/ - # https://github.com/apognu/tuigreet/issues/68#issuecomment-1586359960 - systemd.services.greetd.serviceConfig = { - Type = "idle"; - StandardInput = "tty"; - StandardOutput = "tty"; - StandardError = "journal"; # Without this errors will spam on screen - # Without these bootlogs will spam on screen - TTYReset = true; - TTYVHangup = true; - TTYVTDisallocate = true; - }; - - environment.sessionVariables.NIXOS_OZONE_WL = "1"; + environment.variables.NIXOS_OZONE_WL = "1"; networking.firewall = { enable = true; diff --git a/users/leah/presets/hyprland/clipboard.nix b/users/leah/presets/hyprland/clipboard.nix new file mode 100644 index 0000000..5c61632 --- /dev/null +++ b/users/leah/presets/hyprland/clipboard.nix @@ -0,0 +1,17 @@ +{ + pkgs, + lib, + ... +}: { + hm.services.cliphist.enable = true; + + hm.wayland.windowManager.hyprland.settings = { + exec-once = let + wl-paste = lib.getExe' pkgs.wl-clipboard "wl-paste"; + cliphist = lib.getExe pkgs.cliphist; + in [ + "${wl-paste} --type text --watch ${cliphist} store" + "${wl-paste} --type image --watch ${cliphist} store" + ]; + }; +} diff --git a/users/leah/presets/hyprland/default.nix b/users/leah/presets/hyprland/default.nix new file mode 100644 index 0000000..d64ac98 --- /dev/null +++ b/users/leah/presets/hyprland/default.nix @@ -0,0 +1,39 @@ +{pkgs, ...}: { + imports = [ + ./waybar + + ./clipboard.nix + ./greetd.nix + ./mako.nix + ./media.nix + ./qt.nix + ./screenshots.nix + ./settings.nix + ]; + + roles.hyprland.enable = true; + roles.dolphin.enable = true; + + hm.home.packages = with pkgs; [ + networkmanagerapplet # necessary for icons + ]; + + hm.programs = { + kitty.enable = true; + + wpaperd.enable = true; + + fuzzel = { + enable = true; + settings.main = { + font = "Iosevka Nerd Font:size=13"; + dpi-aware = true; + }; + }; + }; + + hm.services.blueman-applet.enable = true; + + services.gnome.gnome-keyring.enable = true; + services.upower.enable = true; +} diff --git a/users/leah/presets/hyprland/greetd.nix b/users/leah/presets/hyprland/greetd.nix new file mode 100644 index 0000000..1d48d5a --- /dev/null +++ b/users/leah/presets/hyprland/greetd.nix @@ -0,0 +1,26 @@ +{ + lib, + pkgs, + ... +}: { + services.greetd = { + enable = true; + settings.default_session = { + command = "${lib.getExe pkgs.greetd.tuigreet} --time --user-menu -r --remember-user-session -g 'Welcome back! <3' --asterisks --cmd ${lib.getExe pkgs.hyprland}"; + user = "greeter"; + }; + }; + # Stop the damn TUI from bleeding + # https://www.reddit.com/r/NixOS/comments/u0cdpi/tuigreet_with_xmonad_how/ + # https://github.com/apognu/tuigreet/issues/68#issuecomment-1586359960 + systemd.services.greetd.serviceConfig = { + Type = "idle"; + StandardInput = "tty"; + StandardOutput = "tty"; + StandardError = "journal"; # Without this errors will spam on screen + # Without these bootlogs will spam on screen + TTYReset = true; + TTYVHangup = true; + TTYVTDisallocate = true; + }; +} diff --git a/users/leah/hyprland/mako.nix b/users/leah/presets/hyprland/mako.nix similarity index 100% rename from users/leah/hyprland/mako.nix rename to users/leah/presets/hyprland/mako.nix diff --git a/users/leah/presets/hyprland/media.nix b/users/leah/presets/hyprland/media.nix new file mode 100644 index 0000000..ba4111d --- /dev/null +++ b/users/leah/presets/hyprland/media.nix @@ -0,0 +1,35 @@ +{ + config, + lib, + pkgs, + ... +}: { + hm.services = { + mpris-proxy.enable = true; + mpd = { + enable = true; + musicDirectory = "${config.hm.home.homeDirectory}/music"; + }; + mpd-mpris.enable = true; + }; + + hm.wayland.windowManager.hyprland.settings = { + "$pamixer" = lib.getExe pkgs.pamixer; + "$brightnessctl" = lib.getExe pkgs.brightnessctl; + + bind = [ + ", XF86AudioMute, exec, $pamixer -t" + ", XF86AudioMicMute, exec, $pamixer --default-source -t" + ]; + + # Media keys + binde = [ + ", XF86AudioLowerVolume, exec, $pamixer -ud 5" + ", XF86AudioRaiseVolume, exec, $pamixer -ui 5" + ", XF86MonBrightnessDown, exec, $brightnessctl --device=intel_backlight set 5%-" + ", XF86MonBrightnessUp, exec, $brightnessctl --device=intel_backlight set +5%" + ", XF86KbdBrightnessDown, exec, $brightnessctl --device=asus::kbd_backlight set 1-" + ", XF86KbdBrightnessUp, exec, $brightnessctl --device=asus::kbd_backlight set +1" + ]; + }; +} diff --git a/users/leah/qt/default.nix b/users/leah/presets/hyprland/qt.nix similarity index 82% rename from users/leah/qt/default.nix rename to users/leah/presets/hyprland/qt.nix index c40bb7a..89c4d0b 100644 --- a/users/leah/qt/default.nix +++ b/users/leah/presets/hyprland/qt.nix @@ -43,7 +43,11 @@ in { qt6.qtwayland ]; - roles.qt.qt5.settings = settings; - # TODO: wait till someone packages Plasma 6 - roles.qt.qt6.settings = lib.recursiveUpdate settings {Appearance.style = "Fusion";}; + roles.qt = { + platform = "qt5ct"; + + qt5ct.settings = settings; + # TODO: wait till someone packages Plasma 6 + qt6ct.settings = lib.recursiveUpdate settings {Appearance.style = "Fusion";}; + }; } diff --git a/users/leah/presets/hyprland/screenshots.nix b/users/leah/presets/hyprland/screenshots.nix new file mode 100644 index 0000000..6f898c8 --- /dev/null +++ b/users/leah/presets/hyprland/screenshots.nix @@ -0,0 +1,39 @@ +{ + config, + pkgs, + lib, + ... +}: { + hm.home.packages = with pkgs; [ + hyprpicker + grimblast + satty + ]; + + hm.wayland.windowManager.hyprland.settings = { + "$grimblast" = "${lib.getExe pkgs.grimblast} --freeze --notify --cursor"; + + env = [ + "GRIMBLAST_EDITOR,${pkgs.writeShellScript "edit.sh" '' + cp $1 ${config.hm.home.homeDirectory}/Pictures/screenshots + ${lib.getExe pkgs.satty} --copy-command ${lib.getExe' pkgs.wl-clipboard "wl-copy"} -f $1 + ''}" + ]; + + bind = [ + "CTRL_R, Delete, exec, $grimblast edit area" + "SHIFT_R, Delete, exec, $grimblast edit active" + "CTRL_R SHIFT_R, Delete, exec, $grimblast edit output" + ", Print, exec, $grimblast edit area" + "SHIFT, Print, exec, $grimblast edit active" + "CTRL SHIFT, Print, exec, $grimblast edit output" + + # Because of how cursed ASUS's laptop keyboard works + # (Fn+F6 produces a sequence of keystrokes that correspond to Windows+Shift+S on Windows), + # I need to do this to make it do what it's intended to do + "SUPER SHIFT, S, exec, $grimblast edit area" + "CTRL SUPER SHIFT, S, exec, $grimblast edit output" + "ALT SUPER SHIFT, S, exec, $grimblast edit active" + ]; + }; +} diff --git a/users/leah/hyprland/default.nix b/users/leah/presets/hyprland/settings.nix similarity index 59% rename from users/leah/hyprland/default.nix rename to users/leah/presets/hyprland/settings.nix index 66fcba9..1a8e3f9 100644 --- a/users/leah/hyprland/default.nix +++ b/users/leah/presets/hyprland/settings.nix @@ -1,66 +1,18 @@ { - config, - pkgs, lib, + pkgs, ... }: { - imports = [ - ./mako.nix - ./waybar - ]; - - roles.hyprland.enable = true; - - hm.home.packages = with pkgs; [ - hyprpicker - font-awesome - networkmanagerapplet # necessary for icons - grimblast - satty - ]; - - hm.programs = { - kitty.enable = true; - - wpaperd.enable = true; - - fuzzel = { - enable = true; - settings.main = { - font = "Iosevka Nerd Font:size=13"; - dpi-aware = true; - }; - }; - }; - - hm.services = { - cliphist.enable = true; - mpris-proxy.enable = true; - mpd = { - enable = true; - musicDirectory = "${config.hm.home.homeDirectory}/music"; - }; - mpd-mpris.enable = true; - }; - hm.wayland.windowManager.hyprland.settings = let - inherit (lib) getExe getExe' flatten mod range pipe; + inherit (lib) getExe flatten mod range pipe; in with pkgs; { "$mod" = "SUPER"; - "$grimblast" = "${getExe grimblast} --freeze --notify --cursor"; - "$pamixer" = getExe pamixer; - "$brightnessctl" = getExe brightnessctl; - "$wl-paste" = getExe' wl-clipboard "wl-paste"; monitor = "eDP-1,2560x1600@165,0x0,1.25"; env = [ "WLR_DRM_DEVICES,/dev/dri/card0" # use iGPU - "GRIMBLAST_EDITOR,${writeShellScript "edit.sh" '' - cp $1 ${config.hm.home.homeDirectory}/Pictures/screenshots - ${getExe satty} --copy-command ${getExe' wl-clipboard "wl-copy"} -f $1 - ''}" ]; exec-once = [ @@ -68,9 +20,6 @@ (getExe config.hm.programs.waybar.package) "${polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1" - "$wl-paste --type text --watch ${getExe cliphist} store" - "$wl-paste --type image --watch ${getExe cliphist} store" - # FIXME: GTK 3 crashes with wayland IM module enabled right now. # Somehow using native wayland doesn't fix this, gonna do this for now # FIXME: Running without --disable-gpu results in a blank screen (see nixpkgs#278040) @@ -161,24 +110,6 @@ "$mod, P, pseudo," "$mod, J, togglesplit," - # Screenshotting - "CTRL_R, Delete, exec, $grimblast edit area" - "SHIFT_R, Delete, exec, $grimblast edit active" - "CTRL_R SHIFT_R, Delete, exec, $grimblast edit output" - ", Print, exec, $grimblast edit area" - "SHIFT, Print, exec, $grimblast edit active" - "CTRL SHIFT, Print, exec, $grimblast edit output" - - # Because of how cursed ASUS's laptop keyboard works - # (Fn+F6 produces a sequence of keystrokes that correspond to Windows+Shift+S on Windows), - # I need to do this to make it do what it's intended to do - "SUPER SHIFT, S, exec, $grimblast edit area" - "CTRL SUPER SHIFT, S, exec, $grimblast edit output" - "ALT SUPER SHIFT, S, exec, $grimblast edit active" - - ", XF86AudioMute, exec, $pamixer -t" - ", XF86AudioMicMute, exec, $pamixer --default-source -t" - # Move focus with mod + arrow keys "$mod, left, movefocus, l" "$mod, right, movefocus, r" @@ -207,16 +138,6 @@ "$mod, Super_L, exec, pkill fuzzel || ${getExe fuzzel}" ]; - # Media keys - binde = [ - ", XF86AudioLowerVolume, exec, $pamixer -ud 5" - ", XF86AudioRaiseVolume, exec, $pamixer -ui 5" - ", XF86MonBrightnessDown, exec, $brightnessctl --device=intel_backlight set 5%-" - ", XF86MonBrightnessUp, exec, $brightnessctl --device=intel_backlight set +5%" - ", XF86KbdBrightnessDown, exec, $brightnessctl --device=asus::kbd_backlight set 1-" - ", XF86KbdBrightnessUp, exec, $brightnessctl --device=asus::kbd_backlight set +1" - ]; - bindm = [ # Move/resize windows with mod + LMB/RMB and dragging "$mod, mouse:272, movewindow" diff --git a/users/leah/hyprland/waybar/default.nix b/users/leah/presets/hyprland/waybar/default.nix similarity index 99% rename from users/leah/hyprland/waybar/default.nix rename to users/leah/presets/hyprland/waybar/default.nix index 7f31361..ba4705c 100644 --- a/users/leah/hyprland/waybar/default.nix +++ b/users/leah/presets/hyprland/waybar/default.nix @@ -7,6 +7,8 @@ # Kill and restart waybar if running onChange = "(ps aux | grep waybar | grep -v grep) && (${lib.getExe' pkgs.procps "pkill"} -u $USER waybar) && (${lib.getExe pkgs.waybar})"; in { + hm.home.packages = with pkgs; [font-awesome]; + hm.xdg.configFile = { "waybar/config" = {inherit onChange;}; "waybar/style.css" = {inherit onChange;}; diff --git a/users/leah/hyprland/waybar/style.css b/users/leah/presets/hyprland/waybar/style.css similarity index 100% rename from users/leah/hyprland/waybar/style.css rename to users/leah/presets/hyprland/waybar/style.css diff --git a/users/leah/presets/plasma/default.nix b/users/leah/presets/plasma/default.nix new file mode 100644 index 0000000..8d53a90 --- /dev/null +++ b/users/leah/presets/plasma/default.nix @@ -0,0 +1,17 @@ +{ + krunner-nix, + pkgs, + ... +}: { + imports = [ + ./fusuma.nix + ./sddm.nix + ./settings.nix + ]; + + boot.plymouth.enable = true; + roles.plasma.enable = true; + roles.qt.platform = "kde"; + + hm.home.packages = [krunner-nix.packages.${pkgs.system}.default]; +} diff --git a/users/leah/presets/plasma/fusuma.nix b/users/leah/presets/plasma/fusuma.nix new file mode 100644 index 0000000..7fec7dd --- /dev/null +++ b/users/leah/presets/plasma/fusuma.nix @@ -0,0 +1,32 @@ +{pkgs, ...}: { + users.groups.input = {}; + roles.base.user.extraGroups = ["input"]; + hm.services.fusuma = { + enable = true; + extraPackages = with pkgs; [xdotool wmctrl coreutils]; + settings.swipe."3" = { + left = { + workspace = "next"; # Switch to next workspace + keypress = { + LEFTSHIFT.window = "next"; # Move window to next workspace + LEFTMETA.command = "xdotool key --clearmodifiers super+ctrl+Left"; # Move window to left side + }; + }; + right = { + workspace = "prev"; # Switch to previous workspace + keypress = { + LEFTSHIFT.window = "prev"; # Move window to previous workspace + LEFTMETA.command = "xdotool key --clearmodifiers super+ctrl+Right"; # Move window to right side + }; + }; + up = { + command = "xdotool key Control_L+F10"; # Workspace overview + keypress.LEFTMETA.window.maximized = "toggle"; # Toggle Maximize/Unmaximize Window + }; + down = { + command = "xdotool key Control_L+F12"; # Workspace overview + keypress.LEFTMETA.window = "close"; # Toggle Maximize/Unmaximize Window + }; + }; + }; +} diff --git a/users/leah/presets/plasma/sddm.nix b/users/leah/presets/plasma/sddm.nix new file mode 100644 index 0000000..3ae76cb --- /dev/null +++ b/users/leah/presets/plasma/sddm.nix @@ -0,0 +1,7 @@ +{ + services.xserver.displayManager.sddm = { + enable = true; + # TODO: use ibus if ibus is enabled, or fallback to compose, NEVER use virtual keyboard + settings.General.InputMethod = "compose"; + }; +} diff --git a/users/leah/plasma/default.nix b/users/leah/presets/plasma/settings.nix similarity index 65% rename from users/leah/plasma/default.nix rename to users/leah/presets/plasma/settings.nix index 65c53dc..906ac21 100644 --- a/users/leah/plasma/default.nix +++ b/users/leah/presets/plasma/settings.nix @@ -1,4 +1,6 @@ -{ +{pkgs, ...}: { + hm.home.packages = with pkgs; [lightly-qt]; + hm.programs.plasma.configFile = { kdeglobals = { General = { @@ -8,14 +10,20 @@ smallestReadableFont = "Rubik,8,-1,5,50,0,0,0,0,0"; toolBarFont = "Rubik,10,-1,5,50,0,0,0,0,0"; }; - KDE.SingleClick = false; + KDE = { + SingleClick = false; + widgetStyle = "Lightly"; + }; KScreen.ScaleFactor = 1.25; }; - kwinrc.NightColor = { - Active = true; - EveningBeginFixed = 2200; - Mode = "Times"; - TransitionTime = 120; + kwinrc = { + Tiling.padding = 2; + NightColor = { + Active = true; + EveningBeginFixed = 2200; + Mode = "Times"; + TransitionTime = 120; + }; }; # Make KRunner appear in the center of the screen, like macOS Spotlight krunnerrc.General.FreeFloating = true; diff --git a/users/leah/1password/default.nix b/users/leah/programs/1password/default.nix similarity index 100% rename from users/leah/1password/default.nix rename to users/leah/programs/1password/default.nix diff --git a/users/leah/programs.nix b/users/leah/programs/default.nix similarity index 74% rename from users/leah/programs.nix rename to users/leah/programs/default.nix index f87a210..b0adda0 100644 --- a/users/leah/programs.nix +++ b/users/leah/programs/default.nix @@ -3,8 +3,18 @@ pkgs, lib, blender-bin, + nix-gaming, ... }: { + imports = [ + ./1password + ./discord + ./fcitx5 + ./firefox + ./nvim + ./rust + ]; + virtualisation.docker.enable = true; nixpkgs.overlays = [blender-bin.overlays.default]; @@ -33,8 +43,28 @@ # Java stuff jetbrains.idea-community jdk17 - glfw ]; + + programs = { + steam = { + enable = true; + package = pkgs.steam.override { + extraEnv = { + # nvidia-offload + __NV_PRIME_RENDER_OFFLOAD = 1; + __NV_PRIME_RENDER_OFFLOAD_PROVIDER = "NVIDIA-G0"; + __GLX_VENDOR_LIBRARY_NAME = "nvidia"; + __VK_LAYER_NV_optimus = "NVIDIA_only"; + + # Use Proton GE + STEAM_EXTRA_COMPAT_TOOLS_PATHS = "${nix-gaming.packages.${pkgs.system}.proton-ge}"; + }; + }; + remotePlay.openFirewall = true; + }; + nix-ld.enable = true; + }; + hm.programs = { bat = { enable = true; @@ -83,6 +113,8 @@ }; }; + kitty.enable = true; + nix-index.enable = true; obs-studio.enable = true; ripgrep.enable = true; diff --git a/users/leah/discord/default.nix b/users/leah/programs/discord/default.nix similarity index 100% rename from users/leah/discord/default.nix rename to users/leah/programs/discord/default.nix diff --git a/users/leah/discord/vencord.css b/users/leah/programs/discord/vencord.css similarity index 100% rename from users/leah/discord/vencord.css rename to users/leah/programs/discord/vencord.css diff --git a/users/leah/fcitx5/default.nix b/users/leah/programs/fcitx5/default.nix similarity index 100% rename from users/leah/fcitx5/default.nix rename to users/leah/programs/fcitx5/default.nix diff --git a/users/leah/firefox/default.nix b/users/leah/programs/firefox/default.nix similarity index 79% rename from users/leah/firefox/default.nix rename to users/leah/programs/firefox/default.nix index 048a7d7..b656c8f 100644 --- a/users/leah/firefox/default.nix +++ b/users/leah/programs/firefox/default.nix @@ -12,9 +12,6 @@ isDefault = true; name = config.roles.base.realName; - # HiDPI shenanigans - settings."layout.css.devPixelsPerPx" = 2; - extensions = let # FIXME: firefox-addons currently receives free-only nixpkgs, # and so unfree plugins are blocked from evaluation. @@ -26,26 +23,63 @@ in with firefox-addons.packages.${pkgs.system}; map gaslight [ - augmented-steam + # Essentials auto-tab-discard - darkreader - decentraleyes - disconnect - firefox-color - furiganaize - languagetool onepassword-password-manager - pronoundb + ublock-origin + + # Avoid annoyances + consent-o-matic + don-t-fuck-with-paste + enhanced-h264ify + fastforwardteam + faststream + gaoptout + istilldontcareaboutcookies + link-cleaner + musescore-downloader + native-mathml + privacy-possum + re-enable-right-click + sponsorblock + terms-of-service-didnt-read + youtube-nonstop + + # Redirectors + indie-wiki-buddy + libredirect + localcdn + modrinthify + + # Augmentations + augmented-steam + github-file-icons + octolinker protondb-for-steam refined-github + widegithub + wikiwand-wikipedia-modernized + + # Language + furiganaize + immersive-translate + languagetool + + # Styling + darkreader + firefox-color + stylus + + # Dev + a11ycss + header-editor rust-search-extension + + disconnect + pronoundb search-by-image - sponsorblock - terms-of-service-didnt-read - ublock-origin unpaywall wayback-machine - youtube-nonstop ]; search = let diff --git a/users/leah/nvim/.stylua.toml b/users/leah/programs/nvim/.stylua.toml similarity index 100% rename from users/leah/nvim/.stylua.toml rename to users/leah/programs/nvim/.stylua.toml diff --git a/users/leah/nvim/LICENSE b/users/leah/programs/nvim/LICENSE similarity index 100% rename from users/leah/nvim/LICENSE rename to users/leah/programs/nvim/LICENSE diff --git a/users/leah/nvim/default.nix b/users/leah/programs/nvim/default.nix similarity index 100% rename from users/leah/nvim/default.nix rename to users/leah/programs/nvim/default.nix diff --git a/users/leah/nvim/init.lua b/users/leah/programs/nvim/init.lua similarity index 100% rename from users/leah/nvim/init.lua rename to users/leah/programs/nvim/init.lua diff --git a/users/leah/nvim/lua/core/bootstrap.lua b/users/leah/programs/nvim/lua/core/bootstrap.lua similarity index 100% rename from users/leah/nvim/lua/core/bootstrap.lua rename to users/leah/programs/nvim/lua/core/bootstrap.lua diff --git a/users/leah/nvim/lua/core/default_config.lua b/users/leah/programs/nvim/lua/core/default_config.lua similarity index 100% rename from users/leah/nvim/lua/core/default_config.lua rename to users/leah/programs/nvim/lua/core/default_config.lua diff --git a/users/leah/nvim/lua/core/init.lua b/users/leah/programs/nvim/lua/core/init.lua similarity index 100% rename from users/leah/nvim/lua/core/init.lua rename to users/leah/programs/nvim/lua/core/init.lua diff --git a/users/leah/nvim/lua/core/mappings.lua b/users/leah/programs/nvim/lua/core/mappings.lua similarity index 100% rename from users/leah/nvim/lua/core/mappings.lua rename to users/leah/programs/nvim/lua/core/mappings.lua diff --git a/users/leah/nvim/lua/core/utils.lua b/users/leah/programs/nvim/lua/core/utils.lua similarity index 100% rename from users/leah/nvim/lua/core/utils.lua rename to users/leah/programs/nvim/lua/core/utils.lua diff --git a/users/leah/nvim/lua/custom/chadrc.lua b/users/leah/programs/nvim/lua/custom/chadrc.lua similarity index 100% rename from users/leah/nvim/lua/custom/chadrc.lua rename to users/leah/programs/nvim/lua/custom/chadrc.lua diff --git a/users/leah/nvim/lua/custom/configs/format-on-save.lua b/users/leah/programs/nvim/lua/custom/configs/format-on-save.lua similarity index 100% rename from users/leah/nvim/lua/custom/configs/format-on-save.lua rename to users/leah/programs/nvim/lua/custom/configs/format-on-save.lua diff --git a/users/leah/nvim/lua/custom/configs/lspconfig.lua b/users/leah/programs/nvim/lua/custom/configs/lspconfig.lua similarity index 100% rename from users/leah/nvim/lua/custom/configs/lspconfig.lua rename to users/leah/programs/nvim/lua/custom/configs/lspconfig.lua diff --git a/users/leah/nvim/lua/custom/configs/rust-tools.lua b/users/leah/programs/nvim/lua/custom/configs/rust-tools.lua similarity index 100% rename from users/leah/nvim/lua/custom/configs/rust-tools.lua rename to users/leah/programs/nvim/lua/custom/configs/rust-tools.lua diff --git a/users/leah/nvim/lua/custom/mappings.lua b/users/leah/programs/nvim/lua/custom/mappings.lua similarity index 100% rename from users/leah/nvim/lua/custom/mappings.lua rename to users/leah/programs/nvim/lua/custom/mappings.lua diff --git a/users/leah/nvim/lua/custom/neovide.lua b/users/leah/programs/nvim/lua/custom/neovide.lua similarity index 100% rename from users/leah/nvim/lua/custom/neovide.lua rename to users/leah/programs/nvim/lua/custom/neovide.lua diff --git a/users/leah/nvim/lua/custom/plugins.lua b/users/leah/programs/nvim/lua/custom/plugins.lua similarity index 100% rename from users/leah/nvim/lua/custom/plugins.lua rename to users/leah/programs/nvim/lua/custom/plugins.lua diff --git a/users/leah/nvim/lua/plugins/configs/cmp.lua b/users/leah/programs/nvim/lua/plugins/configs/cmp.lua similarity index 100% rename from users/leah/nvim/lua/plugins/configs/cmp.lua rename to users/leah/programs/nvim/lua/plugins/configs/cmp.lua diff --git a/users/leah/nvim/lua/plugins/configs/lazy_nvim.lua b/users/leah/programs/nvim/lua/plugins/configs/lazy_nvim.lua similarity index 100% rename from users/leah/nvim/lua/plugins/configs/lazy_nvim.lua rename to users/leah/programs/nvim/lua/plugins/configs/lazy_nvim.lua diff --git a/users/leah/nvim/lua/plugins/configs/lspconfig.lua b/users/leah/programs/nvim/lua/plugins/configs/lspconfig.lua similarity index 100% rename from users/leah/nvim/lua/plugins/configs/lspconfig.lua rename to users/leah/programs/nvim/lua/plugins/configs/lspconfig.lua diff --git a/users/leah/nvim/lua/plugins/configs/mason.lua b/users/leah/programs/nvim/lua/plugins/configs/mason.lua similarity index 100% rename from users/leah/nvim/lua/plugins/configs/mason.lua rename to users/leah/programs/nvim/lua/plugins/configs/mason.lua diff --git a/users/leah/nvim/lua/plugins/configs/nvimtree.lua b/users/leah/programs/nvim/lua/plugins/configs/nvimtree.lua similarity index 100% rename from users/leah/nvim/lua/plugins/configs/nvimtree.lua rename to users/leah/programs/nvim/lua/plugins/configs/nvimtree.lua diff --git a/users/leah/nvim/lua/plugins/configs/others.lua b/users/leah/programs/nvim/lua/plugins/configs/others.lua similarity index 100% rename from users/leah/nvim/lua/plugins/configs/others.lua rename to users/leah/programs/nvim/lua/plugins/configs/others.lua diff --git a/users/leah/nvim/lua/plugins/configs/telescope.lua b/users/leah/programs/nvim/lua/plugins/configs/telescope.lua similarity index 100% rename from users/leah/nvim/lua/plugins/configs/telescope.lua rename to users/leah/programs/nvim/lua/plugins/configs/telescope.lua diff --git a/users/leah/nvim/lua/plugins/configs/treesitter.lua b/users/leah/programs/nvim/lua/plugins/configs/treesitter.lua similarity index 100% rename from users/leah/nvim/lua/plugins/configs/treesitter.lua rename to users/leah/programs/nvim/lua/plugins/configs/treesitter.lua diff --git a/users/leah/nvim/lua/plugins/init.lua b/users/leah/programs/nvim/lua/plugins/init.lua similarity index 100% rename from users/leah/nvim/lua/plugins/init.lua rename to users/leah/programs/nvim/lua/plugins/init.lua diff --git a/users/leah/nvim/plugins.nix b/users/leah/programs/nvim/plugins.nix similarity index 100% rename from users/leah/nvim/plugins.nix rename to users/leah/programs/nvim/plugins.nix diff --git a/users/leah/nvim/settings.nix b/users/leah/programs/nvim/settings.nix similarity index 100% rename from users/leah/nvim/settings.nix rename to users/leah/programs/nvim/settings.nix diff --git a/users/leah/rust/default.nix b/users/leah/programs/rust/default.nix similarity index 100% rename from users/leah/rust/default.nix rename to users/leah/programs/rust/default.nix diff --git a/users/leah/starship.toml b/users/leah/programs/starship.toml similarity index 100% rename from users/leah/starship.toml rename to users/leah/programs/starship.toml -- 2.51.2