From e5f1f9beaf29b3f43cd7fe0c89a7696068e374c8 Mon Sep 17 00:00:00 2001 From: Tyler Mayoff Date: Tue, 8 Apr 2025 18:36:48 -0400 Subject: [PATCH] Started adding a hyprland config --- dot_config/flake/flake.nix | 8 +++- dot_config/flake/home/hyprland/default.nix | 41 +++++++++++++++++++ .../flake/machines/wash/configuration.nix | 5 ++- dot_config/flake/machines/wash/home.nix | 7 ++++ 4 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 dot_config/flake/home/hyprland/default.nix diff --git a/dot_config/flake/flake.nix b/dot_config/flake/flake.nix index 43eb7b0..3d6a27e 100644 --- a/dot_config/flake/flake.nix +++ b/dot_config/flake/flake.nix @@ -21,6 +21,10 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + nixpkgs-bitwarden.url = "github:nixos/nixpkgs/6fd0382c80e18f0883709fb5a6bf9f40bc671a62"; + + hyprland.url = "github:hyprwm/Hyprland"; + cosmic = { url = "github:lilyinstarlight/nixos-cosmic"; }; @@ -30,12 +34,14 @@ self, nixpkgs, nixpkgs-unstable, + nixpkgs-bitwarden, lix-module, home-manager, darwin, helix, stylix, cosmic, + hyprland, ... } @ inputs: let inherit (self) outputs; @@ -88,7 +94,7 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - # home-manager.backupFileExtension = "bak"; + home-manager.backupFileExtension = "bak"; home-manager.extraSpecialArgs = {inherit inputs outputs;}; home-manager.users.tyler = import ./machines/wash/home.nix; } diff --git a/dot_config/flake/home/hyprland/default.nix b/dot_config/flake/home/hyprland/default.nix new file mode 100644 index 0000000..45c2411 --- /dev/null +++ b/dot_config/flake/home/hyprland/default.nix @@ -0,0 +1,41 @@ +{...}: { + imports = [ + ../sway/rofi.nix + ]; + + wayland.windowManager.hyprland = { + enable = true; + + # package = null; + # portalPackage = null; + + settings = { + "$mod" = "SUPER"; + + monitor = "eDP-1,2256x1504@59.99900,0x0,1.0"; + + input.touchpad.natural_scroll = true; + + bind = + [ + "$mod, Q, killactive" + "$mod, F, exec, firefox" + ", Print, exec, grimblast copy area" + "$mod, Space, exec, rofi -combi-modi window,drun,ssh -show combi -show-icons" + ] + ++ ( + # workspaces + # binds $mod + [shift +] {1..9} to [move to] workspace {1..9} + builtins.concatLists (builtins.genList ( + i: let + ws = i + 1; + in [ + "$mod, code:1${toString i}, workspace, ${toString ws}" + "$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}" + ] + ) + 9) + ); + }; + }; +} diff --git a/dot_config/flake/machines/wash/configuration.nix b/dot_config/flake/machines/wash/configuration.nix index 82a53f9..e8ee9f5 100644 --- a/dot_config/flake/machines/wash/configuration.nix +++ b/dot_config/flake/machines/wash/configuration.nix @@ -1,4 +1,5 @@ { + inputs, outputs, pkgs, ... @@ -77,7 +78,7 @@ }; services.desktopManager.cosmic.enable = true; - services.displayManager.cosmic-greeter.enable = true; + services.xserver.displayManager.gdm.enable = true; # Configure keymap in X11 services.xserver.xkb = { @@ -134,7 +135,7 @@ }; environment.systemPackages = with pkgs; [ - unstable.bitwarden-desktop + inputs.nixpkgs-bitwarden.legacyPackages.x86_64-linux.bitwarden-desktop sqlite vscode.fhs lm_sensors diff --git a/dot_config/flake/machines/wash/home.nix b/dot_config/flake/machines/wash/home.nix index 3b30507..5365094 100644 --- a/dot_config/flake/machines/wash/home.nix +++ b/dot_config/flake/machines/wash/home.nix @@ -8,6 +8,8 @@ # ../../home/waybar/mechabar # ../../home/sway + # ../../home/hyprland + ../../home/home-backup.nix ../../home/gui.nix @@ -26,4 +28,9 @@ stateVersion = "23.11"; }; + + xdg.portal = { + enable = true; + extraPortals = [pkgs.xdg-desktop-portal-gtk]; + }; }