-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(homeProfiels): add hyprland tests
- Loading branch information
Showing
9 changed files
with
122 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#+TITLE: yubikey | ||
#+AUTHOR: GuangTao Zhang | ||
#+EMAIL: gtrunsec@hardenedlinux.org | ||
#+DATE: 2023-10-11 Wed 14:37 | ||
|
||
|
||
* discussions | ||
- https://discourse.nixos.org/t/yubikey-udev-rules-and-group-permissions/34034/2 |
107 changes: 62 additions & 45 deletions
107
nixos/homeModules/wayland/windowManager/hyprland/config.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,63 @@ | ||
with lib; { | ||
config = mkIf cfg.enable ( | ||
mkMerge [ | ||
{ | ||
home.sessionVariables = { | ||
QT_QPA_PLATFORM = "wayland"; | ||
SDL_VIDEODRIVER = "wayland"; | ||
GDK_BACKEND = "wayland"; | ||
_JAVA_AWT_WM_NONREPARENTING = 1; | ||
MOZ_ENABLE_WAYLAND = "1"; | ||
XDG_CURRENT_DESKTOP = "Hyprland"; | ||
XDG_SESSION_DESKTOP = "Hyprland"; | ||
XDG_SESSION_TYPE = "wayland"; | ||
}; | ||
} | ||
(mkIf cfg.__profiles__.nvidia { | ||
wayland.windowManager.hyprland.enableNvidiaPatches = true; | ||
home.sessionVariables = { | ||
LIBVA_DRIVER_NAME = "nvidia"; | ||
GBM_BACKEND = "nvidia-drm"; | ||
__GLX_VENDOR_LIBRARY_NAME = "nvidia"; | ||
}; | ||
}) | ||
(mkIf cfg.__profiles__.autoLogin.enable { | ||
programs.${cfg.__profiles__.autoLogin.shell} = { | ||
loginExtra = '' | ||
# If running from tty1 start hyprland | ||
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then | ||
Hyprland | ||
fi | ||
''; | ||
}; | ||
}) | ||
(mkIf cfg.__profiles__.swww { | ||
home.packages = [ | ||
pkgs.swww | ||
(pkgs.writeShellApplication { | ||
name = "swww-random"; | ||
runtimeInputs = [ pkgs.swww ]; | ||
text = lib.fileContents ./swww_randomize.sh; | ||
}) | ||
]; | ||
}) | ||
] | ||
); | ||
{ | ||
config = | ||
with lib; | ||
mkIf cfg.enable ( | ||
mkMerge [ | ||
{ | ||
home.sessionVariables = { | ||
QT_QPA_PLATFORM = "wayland"; | ||
SDL_VIDEODRIVER = "wayland"; | ||
GDK_BACKEND = "wayland"; | ||
_JAVA_AWT_WM_NONREPARENTING = 1; | ||
MOZ_ENABLE_WAYLAND = "1"; | ||
XDG_CURRENT_DESKTOP = "Hyprland"; | ||
XDG_SESSION_DESKTOP = "Hyprland"; | ||
XDG_SESSION_TYPE = "wayland"; | ||
}; | ||
} | ||
(mkIf cfg.__profiles__.nvidia { | ||
wayland.windowManager.hyprland.enableNvidiaPatches = true; | ||
home.sessionVariables = { | ||
LIBVA_DRIVER_NAME = "nvidia"; | ||
GBM_BACKEND = "nvidia-drm"; | ||
__GLX_VENDOR_LIBRARY_NAME = "nvidia"; | ||
}; | ||
}) | ||
(mkIf cfg.__profiles__.autoLogin.enable { | ||
programs.${cfg.__profiles__.autoLogin.shell} = { | ||
loginExtra = '' | ||
# If running from tty1 start hyprland | ||
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then | ||
Hyprland | ||
fi | ||
''; | ||
}; | ||
}) | ||
(mkIf cfg.__profiles__.swww.enable { | ||
home.packages = [ | ||
pkgs.swww | ||
(pkgs.writeShellApplication { | ||
name = "swww-random"; | ||
runtimeInputs = [ pkgs.swww ]; | ||
text = | ||
'' | ||
${l.concatStringsSep "\n" ( | ||
l.mapAttrsToList (n: v: "export ${n}=${''"$''}{${n}:-${toString v}}${''"''}") ( | ||
{ | ||
# Edit bellow to control the images transition | ||
SWWW_TRANSITION_FPS = 60; | ||
SWWW_TRANSITION_STEP = 2; | ||
INTERVAL = 3000; | ||
} | ||
// cfg.__profiles__.swww.runtimeEnv | ||
) | ||
)} | ||
'' | ||
+ lib.fileContents ./swww_randomize.sh | ||
; | ||
}) | ||
]; | ||
}) | ||
] | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters