diff --git a/flake.lock b/flake.lock index 81abb88..516e6f1 100644 --- a/flake.lock +++ b/flake.lock @@ -20,6 +20,149 @@ "type": "github" } }, + "hy3": { + "inputs": { + "hyprland": [ + "hyprland" + ] + }, + "locked": { + "lastModified": 1711094856, + "narHash": "sha256-2TL7tbLLsh2xWhszubVU2xDv8dx1fUMmPnEXlERu+m4=", + "owner": "outfoxxed", + "repo": "hy3", + "rev": "315e7902c9637e66352c9a26f6dff15c602fc85c", + "type": "github" + }, + "original": { + "owner": "outfoxxed", + "repo": "hy3", + "type": "github" + } + }, + "hyprcursor": { + "inputs": { + "hyprlang": "hyprlang", + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1711035742, + "narHash": "sha256-5vvhCSUGG9TA2G1eIRgokuYizhRnZu0ZbcU1MXfHsUE=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "6a92473237f430399a417e1c2da9d7fcd4970086", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, + "hyprland": { + "inputs": { + "hyprcursor": "hyprcursor", + "hyprland-protocols": "hyprland-protocols", + "hyprlang": "hyprlang_2", + "nixpkgs": "nixpkgs", + "systems": "systems_2", + "wlroots": "wlroots", + "xdph": "xdph" + }, + "locked": { + "lastModified": 1711152198, + "narHash": "sha256-wT8UTS22HIm+Sbkim+IMqESW9SP+EB0FAjroyPnAovY=", + "owner": "hyprwm", + "repo": "Hyprland", + "rev": "0dfdb6678f5362fda449694639e8fee806ca1ae4", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "Hyprland", + "type": "github" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1691753796, + "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "hyprlang": { + "inputs": { + "nixpkgs": [ + "hyprland", + "hyprcursor", + "nixpkgs" + ], + "systems": "systems" + }, + "locked": { + "lastModified": 1709914708, + "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprlang_2": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1710960526, + "narHash": "sha256-tt0UgVKWeLQ+tFzvqrm4uAZbzONwdGshpfiLHAQ1P2c=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "a2f39421144d42541c057be235154ce21b76c0f6", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1709410583, @@ -37,6 +180,22 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1711001935, + "narHash": "sha256-URtGpHue7HHZK0mrHnSf8wJ6OmMKYSsoLmJybrOLFSQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "20f77aa09916374aa3141cbc605c955626762c9a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1709961763, "narHash": "sha256-6H95HGJHhEZtyYA3rIQpvamMKAGoa8Yh2rFV29QnuGw=", @@ -55,8 +214,92 @@ "root": { "inputs": { "home-manager": "home-manager", + "hy3": "hy3", + "hyprland": "hyprland", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" + } + }, + "systems": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "wlroots": { + "flake": false, + "locked": { + "host": "gitlab.freedesktop.org", + "lastModified": 1709983277, + "narHash": "sha256-wXWIJLd4F2JZeMaihWVDW/yYXCLEC8OpeNJZg9a9ly8=", + "owner": "wlroots", + "repo": "wlroots", + "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", + "type": "gitlab" + }, + "original": { + "host": "gitlab.freedesktop.org", + "owner": "wlroots", + "repo": "wlroots", + "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", + "type": "gitlab" + } + }, + "xdph": { + "inputs": { + "hyprland-protocols": [ + "hyprland", + "hyprland-protocols" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1709299639, + "narHash": "sha256-jYqJM5khksLIbqSxCLUUcqEgI+O2LdlSlcMEBs39CAU=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "2d2fb547178ec025da643db57d40a971507b82fe", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index 9033e07..dfdf0ad 100644 --- a/flake.nix +++ b/flake.nix @@ -1,32 +1,29 @@ { description = "Nix los hier"; inputs = { - - # TODO enable ability to switch between stable and unstable - # TODO enable ability to include or exclude unfree software - - #nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - #nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; - #nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; - #home-manager.url = "github:nix-community/home-manager/release-23.05"; - #home-manager.inputs.nixpkgs.follows = "nixpkgs"; - #home-manager-unstable.url = "github:nix-community/home-manager"; - #home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable"; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; + hyprland.url = "github:hyprwm/Hyprland"; + hy3 = { + url = "github:outfoxxed/hy3"; + inputs.hyprland.follows = "hyprland"; + }; + }; - outputs = { self, nixpkgs, nixos-hardware, home-manager, ... }@inputs: { + outputs = { self, nixpkgs, nixos-hardware, home-manager, hyprland, hy3, ... }@inputs: { nixosConfigurations = { W530 = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = inputs; modules = [ + hyprland.nixosModules.default + ./modules ./hosts/W530 @@ -43,6 +40,8 @@ specialArgs = inputs; modules = [ + hyprland.nixosModules.default + ./modules ./hosts/T430 @@ -56,6 +55,24 @@ ]; }; + IROH = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = inputs; + modules = [ + + hyprland.nixosModules.default + + ./modules + ./hosts/IROH + + home-manager.nixosModules.home-manager + + { + imports = [ ./users/gandalf ]; + } + + ]; + }; }; }; } diff --git a/hosts/IROH/default.nix b/hosts/IROH/default.nix new file mode 100755 index 0000000..baf1293 --- /dev/null +++ b/hosts/IROH/default.nix @@ -0,0 +1,26 @@ +{ ... }: { + + imports = [ ./hardware.nix ]; + + networking.hostName = "IROH"; + + bchmnn = { + + gui = { + enable = true; + greeter.enable = true; + flavour = [ "Hyprland" "sway" "i3" ]; + }; + nvidia.enable = true; + audio.enable = true; + bluetooth.enable = true; + printing.enable = true; + vpn.enable = true; + + devenv.enable = true; + virtualisation.enable = true; + games.enable = true; + + }; + +} diff --git a/hosts/IROH/hardware.nix b/hosts/IROH/hardware.nix new file mode 100644 index 0000000..59a6482 --- /dev/null +++ b/hosts/IROH/hardware.nix @@ -0,0 +1,90 @@ +{ config, lib, modulesPath, pkgs, ... }: + +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ]; + boot.extraModulePackages = [ ]; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + boot.extraModprobeConfig = '' + options nvidia NVreg_RegistryDwords="PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerLevel=0x3; PowerMizerDefault=0x3; PowerMizerDefaultAC=0x3" + ''; + + boot.kernelParams = [ + "resume_offset=533760" + "nvidia_drm.modeset=1" + "nvidia.NVreg_PreserveVideoMemoryAllocations=1" + ]; + + # TODO once the 550 drivers are better, switch to them + hardware.nvidia.package = + let + rcu_patch = pkgs.fetchpatch { + url = "https://github.com/gentoo/gentoo/raw/c64caf53/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.223.02-gpl-pfn_valid.patch"; + hash = "sha256-eZiQQp2S/asE7MfGvfe6dA/kdCvek9SYa/FFGp24dVg="; + }; + in + config.boot.kernelPackages.nvidiaPackages.mkDriver { + version = "535.154.05"; + sha256_64bit = "sha256-fpUGXKprgt6SYRDxSCemGXLrEsIA6GOinp+0eGbqqJg="; + sha256_aarch64 = "sha256-G0/GiObf/BZMkzzET8HQjdIcvCSqB1uhsinro2HLK9k="; + openSha256 = "sha256-wvRdHguGLxS0mR06P5Qi++pDJBCF8pJ8hr4T8O6TJIo="; + settingsSha256 = "sha256-9wqoDEWY4I7weWW05F4igj1Gj9wjHsREFMztfEmqm10="; + persistencedSha256 = "sha256-d0Q3Lk80JqkS1B54Mahu2yY/WocOqFFbZVBh+ToGhaE="; + patches = [ rcu_patch ]; + }; + + boot.resumeDevice = "/dev/disk/by-label/ROOT"; + + fileSystems."/" = + { + device = "/dev/disk/by-label/ROOT"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + fileSystems."/nix" = + { + device = "/dev/disk/by-label/ROOT"; + fsType = "btrfs"; + options = [ "subvol=@nix" ]; + }; + + fileSystems."/swap" = + { + device = "/dev/disk/by-label/ROOT"; + fsType = "btrfs"; + options = [ "subvol=@swap" ]; + }; + + fileSystems."/boot" = + { + device = "/dev/disk/by-label/EFI"; + fsType = "vfat"; + }; + + fileSystems."/home" = + { + device = "/dev/disk/by-label/HOME"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + fileSystems."/media/STORE" = + { + device = "/dev/disk/by-label/MS"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + swapDevices = [{ device = "/swap/swapfile"; }]; + + networking.useDHCP = lib.mkDefault true; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} + diff --git a/hosts/T430/default.nix b/hosts/T430/default.nix index 060c6d5..434f0e1 100755 --- a/hosts/T430/default.nix +++ b/hosts/T430/default.nix @@ -8,7 +8,8 @@ gui = { enable = true; - flavour = [ "sway" "hyprland" ]; + greeter.enable = true; + flavour = [ "sway" "Hyprland" ]; }; nvidia.enable = false; audio.enable = true; diff --git a/hosts/W530/default.nix b/hosts/W530/default.nix index eb3dca1..0226203 100644 --- a/hosts/W530/default.nix +++ b/hosts/W530/default.nix @@ -8,6 +8,7 @@ gui = { enable = true; + greeter.enable = true; flavour = [ "sway" "i3" ]; }; nvidia.enable = false; diff --git a/modules/ausweisapp.nix b/modules/ausweisapp.nix new file mode 100644 index 0000000..5e9f655 --- /dev/null +++ b/modules/ausweisapp.nix @@ -0,0 +1,6 @@ +{ config, lib, ... }: lib.mkIf config.bchmnn.gui.enable { + programs.ausweisapp = { + enable = true; + openFirewall = true; + }; +} diff --git a/modules/default.nix b/modules/default.nix index 08cb07e..72f6326 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -5,10 +5,13 @@ gui = { enable = mkEnableOption "gui"; + greeter = { + enable = mkEnableOption "greeter"; + }; flavour = mkOption { type = types.listOf types.str; default = [ "sway" ]; - example = [ "sway" "i3" "hyprland" ]; + example = [ "sway" "i3" "Hyprland" ]; description = '' The flavour (WM) for your system to use ''; @@ -51,6 +54,7 @@ imports = [ ./audio.nix + ./ausweisapp.nix ./bluetooth.nix ./dbus.nix ./fonts.nix diff --git a/modules/greetd.nix b/modules/greetd.nix index 1f34581..356012d 100644 --- a/modules/greetd.nix +++ b/modules/greetd.nix @@ -3,7 +3,7 @@ environment.pathsToLink = [ "/libexec" ]; # links /libexec from derivations to /run/current-system/sw programs.sway.enable = builtins.elem "sway" gui.flavour; - programs.hyprland.enable = builtins.elem "hyprland" gui.flavour; + programs.hyprland.enable = builtins.elem "Hyprland" gui.flavour; services.xserver.windowManager.i3.enable = builtins.elem "i3" gui.flavour; services.xserver = { @@ -13,17 +13,25 @@ }; }; + environment.systemPackages = with pkgs; [ + (writeShellScriptBin "sway-run" '' + export WLR_NO_HARDWARE_CURSORS=1 + exec ${sway}/bin/sway "$@" + '') + ]; + environment = { etc = { - "greetd/environments".text = '' - sway - Hyprland - ''; + "greetd/environments".text = (lib.strings.concatLines gui.flavour); "greetd/kanshi-config".text = '' profile nomad { output "LVDS-1" enable } - + profile iroh { + output "DP-3" enable mode 2560x1440 position 0,0 + output "DP-2" enable mode 2560x1440 position 2560,0 + output "DP-1" enable mode 2560x1440 position 5120,0 + } profile station { output "LVDS-1" disable output "Dell Inc. DELL U2515H 9X2VY5490XUL" enable mode 1920x1080 position 0,0 @@ -47,10 +55,10 @@ }; services.greetd = { - enable = true; + enable = gui.greeter.enable; settings = { default_session = { - command = "${pkgs.sway}/bin/sway --config /etc/greetd/sway-config"; + command = "sway-run --config /etc/greetd/sway-config" + lib.optionals nvidia.enable " --unsupported-gpu"; }; }; }; diff --git a/modules/nvidia.nix b/modules/nvidia.nix index 3d1097b..9f660dc 100644 --- a/modules/nvidia.nix +++ b/modules/nvidia.nix @@ -1,18 +1,11 @@ -{ config, lib, pkgs, ... }: lib.mkIf config.bchmnn.nvidia.enable { +{ config, lib, ... }: lib.mkIf config.bchmnn.nvidia.enable { - services.xserver.videoDrivers = [ "nouveau" ]; - - # services.xserver.videoDrivers = [ "nvidia" ]; + services.xserver.videoDrivers = [ "nvidia" ]; hardware.nvidia = { - # Modesetting is needed for most Wayland compositors modesetting.enable = true; - # Use the open source version of the kernel module - # Only available on driver 515.43.04+ - open = false; - # Enable the nvidia settings menu + powerManagement.enable = true; nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.legacy_390; }; } diff --git a/modules/packages.nix b/modules/packages.nix index 29bceeb..e1f01f5 100644 --- a/modules/packages.nix +++ b/modules/packages.nix @@ -19,6 +19,7 @@ inotify-tools # a C library and a set of command-line programs providing a simple interface to inotify ghostscript # postscript interpreter (mainline version) ventoy-full # bootable usb solution + fio # flexible io tester - an io benchmark tool ] ++ lib.optionals (devenv.enable) [ # languages gcc13 @@ -44,5 +45,7 @@ ] ++ lib.optionals (gui.enable && lib.elem "sway" gui.flavour) [ qt5.qtwayland qt6.qtwayland + ] ++ lib.optionals (nvidia.enable) [ + nvtop ]; } diff --git a/modules/xdg-portal.nix b/modules/xdg-portal.nix index bfa353a..4438990 100644 --- a/modules/xdg-portal.nix +++ b/modules/xdg-portal.nix @@ -2,13 +2,9 @@ xdg.portal = { enable = true; wlr.enable = true; - # gtk portal needed to make gtk apps happy - # upper has been replaced by following config.common.default = "*"; - extraPortals = with lib; with config.bchmnn; optionals (elem "sway" gui.flavour) [ + extraPortals = with lib; with config.bchmnn; optionals (elem "sway" gui.flavour || elem "Hyprland" gui.flavour) [ pkgs.xdg-desktop-portal-wlr - ] ++ optionals (elem "hyprland" gui.flavour) [ - pkgs.xdg-desktop-portal-hyprland ]; }; } diff --git a/users/gandalf/default.nix b/users/gandalf/default.nix index f67ab96..7eb2933 100644 --- a/users/gandalf/default.nix +++ b/users/gandalf/default.nix @@ -1,4 +1,4 @@ -{ unstable, ... }: +{ unstable, hyprland, hy3, ... }: let aliases = import ../../modules/aliases.nix; in @@ -12,10 +12,15 @@ in home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit unstable; + inherit hyprland; + inherit hy3; }; home-manager.users.gandalf = { pkgs, ... }: { - imports = [ ./modules ]; + imports = [ + hyprland.homeManagerModules.default + ./modules + ]; config = { home = { diff --git a/users/gandalf/modules/gui/default.nix b/users/gandalf/modules/gui/default.nix index 36e70e1..dc3bc94 100644 --- a/users/gandalf/modules/gui/default.nix +++ b/users/gandalf/modules/gui/default.nix @@ -6,7 +6,7 @@ ./programs ] ++ optionals (gui.enable && elem "sway" gui.flavour) [ ./sway - ] ++ optionals (gui.enable && elem "hyprland" gui.flavour) [ + ] ++ optionals (gui.enable && elem "Hyprland" gui.flavour) [ ./hyprland ] ++ optionals (gui.enable && elem "i3" gui.flavour) [ ./i3 diff --git a/users/gandalf/modules/gui/hyprland/default.nix b/users/gandalf/modules/gui/hyprland/default.nix index 267606a..c7ced6d 100644 --- a/users/gandalf/modules/gui/hyprland/default.nix +++ b/users/gandalf/modules/gui/hyprland/default.nix @@ -1,18 +1,78 @@ -{ pkgs, lib, nixosConfig, ... }: +{ pkgs, lib, nixosConfig, hy3, ... }: let common = (import ../common.nix) { pkgs = pkgs; lib = lib; }; + + dropterm = rec { + class = "alacritty-dropterm"; + name = "toggle-${class}"; + package = pkgs.writeShellScriptBin name '' + TOGGLE=/tmp/${class} + WINDOW=$(${pkgs.hyprland}/bin/hyprctl -j clients | ${pkgs.jq}/bin/jq 'any(.[]; .class == "${class}")') + if [ -f "$TOGGLE" ]; then + if [ $WINDOW == "true" ]; then + ${pkgs.hyprland}/bin/hyprctl --batch \ + "dispatch movewindowpixel 0 -700,${class}; dispatch pin ${class}; dispatch cyclenext" + rm $TOGGLE + else + ${pkgs.alacritty}/bin/alacritty --class=${class} & disown + fi + else + if [ $WINDOW == "true" ]; then + ${pkgs.hyprland}/bin/hyprctl --batch \ + "dispatch movewindowpixel 0 700,${class}; dispatch pin ${class}; dispatch focuswindow ${class}" + else + ${pkgs.alacritty}/bin/alacritty --class=${class} & disown + fi + touch $TOGGLE + fi + ''; + bin = "${package}/bin/${name}"; + }; + in { imports = [ ../sway/waybar.nix ../sway/wofi.nix ]; + + home.packages = with pkgs; [ + brightnessctl # this program allows you read and control device brightness + pavucontrol # pulseaudio volume control + playerctl # command-line utility and library for controlling media players that implement mpris + networkmanagerapplet # networkmanager control applet for gnome + udiskie # removable disk automounter for udisks + dracula-theme # dracula variant of the ant theme + gnome3.adwaita-icon-theme + wl-clipboard # command-line copy/paste utilities for wayland + sway-contrib.grimshot # a helper for screenshots within sway + wdisplays # a graphical application for configuring displays in wayland compositors + wlr-randr # an xrandr clone for wlroots compositors + kanshi # dynamic display configuration tool + nextcloud-client # nextcloud themed desktop client + libsForQt5.kdeconnect-kde # kde connect provides several features to integrate your phone and your computer + system-config-printer # graphical user interface for cups administration + emote # modern emoji picker for linux + ]; + + programs.swaylock = { + enable = true; + # package = pkgs.swaylock-effects; + }; + wayland.windowManager.hyprland = { enable = true; - enableNvidiaPatches = nixosConfig.bchmnn.nvidia.enable; - # plugins = [ hy3.packages.x86_64-linux.hy3 ]; + plugins = [ hy3.packages.x86_64-linux.hy3 ]; settings = { + env = with lib; with nixosConfig.bchmnn; optionals nvidia.enable [ + "LIBVA_DRIVER_NAME,nvidia" + "env = XDG_SESSION_TYPE,wayland" + "GBM_BACKEND,nvidia-drm" + "__GLX_VENDOR_LIBRARY_NAME,nvidia" + "WLR_NO_HARDWARE_CURSORS,1" + ]; "exec-once" = with pkgs; [ + "${swaybg}/bin/swaybg -m fill -i ${common.wallpaper}" "${waybar}/bin/waybar" "${dbus}/bin/dbus-update-activation-environment --all" "${kanshi}/bin/kanshi" @@ -33,6 +93,7 @@ in }; }; general = { + layout = "hy3"; border_size = "2"; gaps_out = "5"; gaps_in = "5"; @@ -46,15 +107,38 @@ in shadow_scale = "0.5"; # float [0.0-1.0] "col.shadow" = "rgba(00000099)"; }; + plugin = { + hy3 = { + tabs = { + height = 20; + text_font = common.font; + text_height = 12; + "col.active" = "0xffffdeeb"; # common.colorschemes.default.active; + "col.urgent" = "0xffc92a2a"; # common.colorschemes.default.alert; + "col.inactive" = "0xff212529"; # common.colorschemes.default.inactiveDark; + "col.text.active" = "0xff000000"; # common.colorschemes.default.black; + "col.text.urgent" = "0xffffffff"; # common.colorschemes.default.white; + "col.text.inactive" = "0xffffffff"; # common.colorschemes.default.white; + }; + }; + }; "$terminal" = "${pkgs.alacritty}/bin/alacritty"; "$fileManager" = "${pkgs.gnome.nautilus}/bin/nautilus"; "$menu" = "${pkgs.wofi}/bin/wofi"; "$mod" = "SUPER"; + windowrule = [ + "float, ${dropterm.class}" + "size 96% 33%, ${dropterm.class}" + "move 2% 50, ${dropterm.class}" + ]; bind = [ + "$mod, grave, exec, ${dropterm.bin}" + "$mod, escape, exec, ${dropterm.bin}" "$mod, Q, killactive," "$mod, return, exec, $terminal" "$mod SHIFT, Q, exit," "$mod SHIFT, E, exec, $fileManager" + "$mod, F, fullscreen," "$mod, D, togglefloating," "$mod, space, exec, $menu" "$mod CONTROL SHIFT, L, exec, ${pkgs.swaylock-effects}/bin/swaylock --screenshots --clock --indicator --indicator-radius 100 --indicator-thickness 7 --effect-blur 7x5 --effect-vignette 0.5:0.5 --ring-color ffffff --key-hl-color ${common.colorschemes.default._activeDark} --line-color 00000000 --inside-color 00000088 --inside-ver-color ${common.colorschemes.default._activeDark} --separator-color 00000000 --text-color ${common.colorschemes.default._activeDark} --fade-in 0.1" @@ -63,23 +147,21 @@ in "$mod SHIFT, N, exec, ${pkgs.networkmanagerapplet}/bin/nm-connection-editor" "$mod SHIFT, A, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw" "$mod, period, exec, ${pkgs.emote}/bin/emote" - # bind = $mod, P, pseudo, # dwindle - # bind = $mod, J, togglesplit, # dwindle # Move focus - "$mod, H, movefocus, l" - "$mod, L, movefocus, r" - "$mod, K, movefocus, u" - "$mod, J, movefocus, d" + "$mod, H, hy3:movefocus, l" + "$mod, L, hy3:movefocus, r" + "$mod, K, hy3:movefocus, u" + "$mod, J, hy3:movefocus, d" "$mod, P, focusmonitor, l" "$mod, N, focusmonitor, r" # Move windows - "$mod SHIFT, H, movewindow, l" - "$mod SHIFT, J, movewindow, d" - "$mod SHIFT, K, movewindow, u" - "$mod SHIFT, L, movewindow, r" + "$mod SHIFT, H, hy3:movewindow, l" + "$mod SHIFT, J, hy3:movewindow, d" + "$mod SHIFT, K, hy3:movewindow, u" + "$mod SHIFT, L, hy3:movewindow, r" # Switch workspaces "$mod, 1, workspace, 1" @@ -111,7 +193,10 @@ in "$mod CONTROL SHIFT, J, movecurrentworkspacetomonitor, l" "$mod CONTROL SHIFT, K, movecurrentworkspacetomonitor, r" - "$mod, W, togglegroup," + "$mod, W, hy3:changegroup, toggletab" + + "$mod, B, hy3:makegroup, h" + "$mod, V, hy3:makegroup, v" ", print, exec, ${pkgs.sway-contrib.grimshot}/bin/grimshot copy area" ]; diff --git a/users/gandalf/modules/gui/programs/chromium.nix b/users/gandalf/modules/gui/programs/chromium.nix index e11d185..21ae54a 100644 --- a/users/gandalf/modules/gui/programs/chromium.nix +++ b/users/gandalf/modules/gui/programs/chromium.nix @@ -9,7 +9,7 @@ let }; spotify = pkgs.fetchurl { url = "https://upload.wikimedia.org/wikipedia/commons/thumb/8/84/Spotify_icon.svg/232px-Spotify_icon.svg.png"; - sha256 = "0568b108bf4533e7382e0f3526e211308868d2d2aa35ab8f0cc7beb464e70d5f"; + sha256 = "4251a663072b97fe5434638d9c58bbe20c2aea6da44e8d614f664b324ffe9e73"; meta.licenses = lib.licenses.publicDomain; }; teams = pkgs.fetchurl { @@ -84,3 +84,4 @@ in }; } + diff --git a/users/gandalf/modules/gui/sway/kanshi.nix b/users/gandalf/modules/gui/sway/kanshi.nix index 7059db8..58b6a49 100644 --- a/users/gandalf/modules/gui/sway/kanshi.nix +++ b/users/gandalf/modules/gui/sway/kanshi.nix @@ -14,30 +14,28 @@ ]; }; - /* - gaming = { + iroh = { outputs = [ { - criteria = "LVDS-1"; - status = "disable"; - } - { - criteria = "Dell Inc. DELL U2515H 9X2VY5490XUL"; - status = "disable"; - } - { - criteria = "Dell Inc. DELL U2515H 9X2VY5C7138L"; + criteria = "DP-3"; status = "enable"; - mode = "1920x1080"; + mode = "2560x1440"; position = "0,0"; } { - criteria = "HJW VGA TO HDMI 0x00000100"; - status = "disable"; + criteria = "DP-2"; + status = "enable"; + mode = "2560x1440"; + position = "2560,0"; + } + { + criteria = "DP-1"; + status = "enable"; + mode = "2560x1440"; + position = "5120,0"; } ]; }; - */ station = { outputs = [ diff --git a/users/gandalf/modules/gui/sway/waybar.nix b/users/gandalf/modules/gui/sway/waybar.nix index 120adcb..06644eb 100644 --- a/users/gandalf/modules/gui/sway/waybar.nix +++ b/users/gandalf/modules/gui/sway/waybar.nix @@ -5,8 +5,12 @@ settings.mainBar = { layer = "top"; margin = "5 5 5 5"; - modules-left = [ "sway/workspaces" "sway/window" "sway/mode" - # "hyprland/workspaces" "hyprland/window" + modules-left = [ + "sway/workspaces" + "sway/window" + "sway/mode" + "hyprland/workspaces" + "hyprland/window" ]; modules-center = [ "clock" ]; modules-right = [ "tray" "network" "pulseaudio" "custom/mem" "temperature" "backlight" "battery" ];