Personal Nix setup
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Move greetd/regreet over to hyprland rather than cage

+71 -39
+52 -37
modules/desktop/hyprland.nix
··· 3 3 with lib; 4 4 let 5 5 cfg = config.modules.desktop; 6 + 7 + mkConfig = input: monitor: pkgs.writeText "hyprland.conf" '' 8 + debug { 9 + error_position=1 10 + } 11 + 12 + general { 13 + allow_tearing=true 14 + } 15 + 16 + input { 17 + touchpad { 18 + clickfinger_behavior=true 19 + scroll_factor=0.180000 20 + tap-and-drag=false 21 + tap-to-click=false 22 + } 23 + kb_options=ctrl:nocaps,lv3:ralt_switch 24 + kb_layout=${cfg.hyprland.input.kb_layout} 25 + kb_model=${cfg.hyprland.input.kb_model} 26 + kb_variant=${cfg.hyprland.input.kb_variant} 27 + sensitivity=${toString cfg.hyprland.input.sensitivity} 28 + } 29 + 30 + misc { 31 + disable_hyprland_logo=true 32 + disable_splash_rendering=true 33 + vrr=1 34 + } 35 + 36 + render { 37 + direct_scanout=1 38 + expand_undersized_textures=false 39 + } 40 + 41 + cursor { 42 + sync_gsettings_theme=false 43 + } 44 + 45 + ecosystem { 46 + no_update_news = true 47 + no_donation_nag = true 48 + } 49 + 50 + ${concatMapStringsSep "\n" (x: "monitor=${x}") cfg.hyprland.monitor} 51 + monitor=, preferred, auto, 1 52 + ''; 6 53 in { 7 54 options.modules.desktop.hyprland = { 8 55 enable = mkOption { ··· 41 88 default = [ ]; 42 89 type = lib.types.listOf lib.types.str; 43 90 }; 91 + 92 + configFile = mkOption { 93 + default = mkConfig cfg.hyprland.input cfg.hyprland.monitor; 94 + }; 44 95 }; 45 96 46 97 config = mkIf cfg.hyprland.enable { ··· 64 115 ]; 65 116 }; 66 117 67 - environment.etc."hypr/hyprland.conf".text = '' 68 - debug { 69 - error_position=1 70 - } 71 - 72 - general { 73 - allow_tearing=true 74 - } 75 - 76 - input { 77 - touchpad { 78 - clickfinger_behavior=true 79 - scroll_factor=0.180000 80 - tap-and-drag=false 81 - tap-to-click=false 82 - } 83 - kb_options=ctrl:nocaps,lv3:ralt_switch 84 - kb_layout=${cfg.hyprland.input.kb_layout} 85 - kb_model=${cfg.hyprland.input.kb_model} 86 - kb_variant=${cfg.hyprland.input.kb_variant} 87 - sensitivity=${toString cfg.hyprland.input.sensitivity} 88 - } 89 - 90 - misc { 91 - disable_hyprland_logo=true 92 - disable_splash_rendering=true 93 - vrr=1 94 - } 95 - 96 - render { 97 - direct_scanout=1 98 - expand_undersized_textures=false 99 - } 100 - 101 - ${concatMapStringsSep "\n" (x: "monitor=${x}") cfg.hyprland.monitor} 102 - monitor=, preferred, auto, 1 103 - ''; 118 + environment.etc."hypr/hyprland.conf".source = cfg.hyprland.configFile; 104 119 }; 105 120 }
+19 -2
modules/desktop/session.nix
··· 34 34 services = { 35 35 greetd = { 36 36 enable = true; 37 - settings.terminal.vt = 1; 37 + settings = { 38 + terminal.vt = 1; 39 + default_session.command = let 40 + hyprConfig = pkgs.writeTextFile { 41 + name = "hyprland-greeter.conf"; 42 + text = '' 43 + source=${toString cfg.hyprland.configFile} 44 + exec-once = ${getExe config.programs.regreet.package}; hyprctl dispatch exit 45 + animations { 46 + enabled = false 47 + } 48 + ''; 49 + }; 50 + in escapeShellArgs [ 51 + "${pkgs.dbus}/bin/dbus-run-session" 52 + "${getExe pkgs.hyprland}" 53 + "-c" (toString hyprConfig) 54 + ]; 55 + }; 38 56 }; 39 57 upower.enable = true; 40 58 gvfs.enable = true; ··· 48 66 programs = { 49 67 regreet = { 50 68 enable = true; 51 - cageArgs = [ "-s" "-mlast" ]; 52 69 inherit cursorTheme iconTheme; 53 70 font = defaultFont; 54 71 theme = gtkTheme;