mirror of
https://github.com/zoriya/flake.git
synced 2026-06-02 02:35:46 +00:00
Autologin
This commit is contained in:
@@ -34,7 +34,11 @@
|
||||
(import ./pkgs)
|
||||
];
|
||||
};
|
||||
inputs = rawInput // {inherit nixpkgs;};
|
||||
inputs =
|
||||
rawInput
|
||||
// {
|
||||
inherit nixpkgs user;
|
||||
};
|
||||
in
|
||||
rawInput.nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
user,
|
||||
...
|
||||
}: let
|
||||
cfg = config.modules.hyprland;
|
||||
@@ -10,7 +11,10 @@ in {
|
||||
config =
|
||||
lib.mkIf cfg.enable
|
||||
{
|
||||
home.packages = with pkgs; [nur.repos.ocfox.swww];
|
||||
home.packages = with pkgs; [
|
||||
nur.repos.ocfox.swww
|
||||
xorg.xprop
|
||||
];
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemdIntegration = true;
|
||||
@@ -27,6 +31,20 @@ in {
|
||||
source = ./wallpaper.sh;
|
||||
executable = true;
|
||||
};
|
||||
home.file.".config/startWayland.sh" = {
|
||||
source = ./start.sh;
|
||||
executable = true;
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
name = "Adwaita";
|
||||
package = pkgs.gnome.adwaita-icon-theme;
|
||||
size = 16;
|
||||
x11 = {
|
||||
enable = true;
|
||||
defaultCursor = "Adwaita";
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: zsh alias for wp
|
||||
};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
exec-once=xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2
|
||||
exec-once=discord
|
||||
exec-once=eww open bar
|
||||
exec-once=swww init
|
||||
exec-once=~/.config/hypr/wallpaper.sh
|
||||
exec-once=/home/zoriya/.config/hypr/wallpaper.sh init
|
||||
|
||||
autogenerated = 0
|
||||
|
||||
@@ -84,9 +85,9 @@ gestures {
|
||||
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
|
||||
windowrulev2=workspace 5,class:^(discord)$
|
||||
windowrulev2=workspace 5 silent,class:^(discord)$
|
||||
windowrulev2=float,title:^(Discord Updater)$
|
||||
windowrulev2=workspace 5,title:^(Discord Updater)$
|
||||
windowrulev2=workspace 5 silent,title:^(Discord Updater)$
|
||||
|
||||
windowrulev2=nofullscreenrequest,class:^(zoom)$
|
||||
windowrulev2=float,class:^(zoom)$
|
||||
@@ -139,16 +140,16 @@ bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 10
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||
bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
export GDK_SCALE=2
|
||||
export XCURSOR_SIZE=32
|
||||
Hyprland
|
||||
@@ -7,4 +7,6 @@ export SWWW_TRANSITION=grow
|
||||
|
||||
WP=$(find $WALLPAPERS -type f | shuf -n 1)
|
||||
ln -fs $WP ~/.cache/current-wallpaper
|
||||
|
||||
[[ "$1" = "init" ]] && swww init && sleep 1
|
||||
swww img "$WP"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
user,
|
||||
...
|
||||
}: let
|
||||
cfg = config.wayland;
|
||||
@@ -16,5 +18,20 @@ in {
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# Autostart hyprland and display lockscreen as greeter
|
||||
# See https://github.com/NixOS/nixpkgs/issues/140304 for why this looks weird
|
||||
services.getty = {
|
||||
loginProgram = "${pkgs.bash}/bin/sh";
|
||||
loginOptions = toString (pkgs.writeText "login-program.sh" ''
|
||||
if [[ "$(tty)" == '/dev/tty1' ]]; then
|
||||
${pkgs.shadow}/bin/login -f ${user};
|
||||
~/.config/startWayland.sh
|
||||
else
|
||||
${pkgs.shadow}/bin/login;
|
||||
fi
|
||||
'');
|
||||
extraArgs = ["--skip-login"];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user