aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhongheng Liu <z.liu@outlook.com.gr>2024-08-08 18:03:40 +0800
committerZhongheng Liu <z.liu@outlook.com.gr>2024-08-08 18:03:40 +0800
commit065b1bac9d934802f327accb9fc3a5de33fbcea8 (patch)
treefd02865038ebb6638e8420a5e7c65d090a62608d
parente0537affdcf6f9e7368545f5e0358ec062c18ee7 (diff)
downloadnixos-configuration-065b1bac9d934802f327accb9fc3a5de33fbcea8.tar.gz
nixos-configuration-065b1bac9d934802f327accb9fc3a5de33fbcea8.tar.bz2
nixos-configuration-065b1bac9d934802f327accb9fc3a5de33fbcea8.zip
feat: changed wayland compositor configuration
- added hyprland initial configuration - added hyprland plugins - added kanshi profiles for docked modes - added misc home manager configuration options
-rw-r--r--home-manager/stvnliu/home.nix30
-rw-r--r--home-manager/stvnliu/hyprland.nix38
-rw-r--r--nixos/configuration.nix20
3 files changed, 71 insertions, 17 deletions
diff --git a/home-manager/stvnliu/home.nix b/home-manager/stvnliu/home.nix
index f8707de..db44749 100644
--- a/home-manager/stvnliu/home.nix
+++ b/home-manager/stvnliu/home.nix
@@ -59,7 +59,35 @@ in
programs.firefox.enable = true;
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
-
+ services.kanshi = {
+ enable = true;
+ profiles = {
+ undocked = {
+ outputs = [
+ {
+ criteria = "eDP-1";
+ scale = 1.0;
+ status = "enable";
+ }
+ ];
+ };
+ docked = {
+ outputs = [
+ {
+ criteria = "HDMI-A-1";
+ position = "0,0";
+ mode = "1920x1080@60Hz";
+ }
+ {
+ criteria = "eDP-1";
+ position = "0,0";
+ status = "enable";
+ }
+ ];
+ };
+ };
+ systemdTarget = "hyprland-session.target";
+ };
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "24.05";
}
diff --git a/home-manager/stvnliu/hyprland.nix b/home-manager/stvnliu/hyprland.nix
index 8be8a13..f6ebda3 100644
--- a/home-manager/stvnliu/hyprland.nix
+++ b/home-manager/stvnliu/hyprland.nix
@@ -1,23 +1,49 @@
{config, pkgs, ... }:
{
+ home.packages = with pkgs; [
+ foot
+ ];
wayland.windowManager.hyprland = {
# Whether to enable Hyprland wayland compositor
enable = true;
# The hyprland package to use
package = pkgs.hyprland;
+ plugins = with pkgs.hyprlandPlugins; [
+ hyprbars
+ hyprfocus
+ csgo-vulkan-fix
+ ];
# Whether to enable XWayland
xwayland.enable = true;
settings = {
"$mod" = "SUPER";
bind = [
- # foot terminal
- "$mod, ENTER, exec, ${pkgs.foot}/bin/foot -f 'BlexMono Nerd Font:size=24' zsh"
- ];
+ "$mod, D, exec, dmenu"
+# firefox quickstart
+ "$mod, F, exec, ${pkgs.firefox}/bin/firefox"
+# foot terminal
+ "$mod, Return, exec, ${pkgs.foot}/bin/foot -f 'BlexMono Nerd Font:size=16' zsh"
+ ] ++ (
+# workspaces
+# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
+ builtins.concatLists (builtins.genList (
+ x: let
+ ws = let
+ c = (x + 1) / 10;
+ in
+ builtins.toString (x + 1 - (c * 10));
+ in [
+ "$mod, ${ws}, workspace, ${toString (x + 1)}"
+ "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
+ ]
+ )
+ 10)
+ );
bindm = [
- # mouse movements
+# mouse movements
"$mod, mouse:272, movewindow"
- "$mod, mouse:273, resizewindow"
- "$mod ALT, mouse:272, resizewindow"
+ "$mod, mouse:273, resizewindow"
+ "$mod ALT, mouse:272, resizewindow"
];
};
# Optional
diff --git a/nixos/configuration.nix b/nixos/configuration.nix
index ba44553..90c1564 100644
--- a/nixos/configuration.nix
+++ b/nixos/configuration.nix
@@ -34,17 +34,17 @@
'';
};
};
- #services.displayManager.sddm = {
- # enable = true;
- # wayland.enable = true;
- #};
- systemd.user.services.kanshi = {
- description = "kanshi daemon";
- serviceConfig = {
- Type = "simple";
- ExecStart = ''${pkgs.kanshi}/bin/kanshi -c kanshi_config_file'';
- };
+ services.displayManager.sddm = {
+ enable = true;
+ wayland.enable = true;
};
+ #systemd.user.services.kanshi = {
+ # description = "kanshi daemon";
+ # serviceConfig = {
+ # Type = "simple";
+ # ExecStart = ''${pkgs.kanshi}/bin/kanshi -c kanshi_config_file'';
+ # };
+ #};
security.polkit.enable = true;
services.gnome.gnome-keyring.enable = true;