swtch displayManager from gdm to greetd
This commit is contained in:
		
							parent
							
								
									11c79bbe01
								
							
						
					
					
						commit
						e94dee0c7f
					
				
					 6 changed files with 104 additions and 21 deletions
				
			
		
							
								
								
									
										16
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										16
									
								
								README.md
									
										
									
									
									
								
							|  | @ -14,17 +14,17 @@ Hey, you. This is my nixos configurations. | |||
| 
 | ||||
| - david@Tytonidae | ||||
| 
 | ||||
| | Specialisation | DE / WM   | Shell       | Editor      | Terminal | Launcher        | Browser | DM             | | ||||
| | -------------- | --------- | ----------- | ----------- | -------- | --------------- | ------- | -------------- | | ||||
| | default        | niri      | fish + bash | helix + zed | ghostty  | fuzzel          | firefox | gdm            | | ||||
| | cosmic         | cosmic de | fish + bash | helix + zed | ghostty  | cosmic-launcher | firefox | cosmic-greeter | | ||||
| | kde            | kde       | fish + bash | helix + zed | ghostty  | -               | firefox | sddm           | | ||||
| | Specialisation | DE / WM   | Shell       | Editor      | Terminal | Launcher        | Browser | DM               | | ||||
| | -------------- | --------- | ----------- | ----------- | -------- | --------------- | ------- | ---------------- | | ||||
| | default        | niri      | fish + bash | helix + zed | ghostty  | fuzzel          | firefox | greetd + regreet | | ||||
| | cosmic         | cosmic de | fish + bash | helix + zed | ghostty  | cosmic-launcher | firefox | cosmic-greeter   | | ||||
| | kde            | kde       | fish + bash | helix + zed | ghostty  | -               | firefox | sddm             | | ||||
| 
 | ||||
| - david@Akun | ||||
| 
 | ||||
| | Specialisation | DE / WM | Shell       | Editor      | Terminal | Launcher | Browser | DM             | | ||||
| | -------------- | ------- | ----------- | ----------- | -------- | -------- | ------- | -------------- | | ||||
| | default        | cosmic  | fish + bash | helix + zed | ghostty  | -        | firefox | cosmic-greeter | | ||||
| | Specialisation | DE / WM | Shell       | Editor      | Terminal | Launcher | Browser | DM               | | ||||
| | -------------- | ------- | ----------- | ----------- | -------- | -------- | ------- | ---------------- | | ||||
| | default        | niri    | fish + bash | helix + zed | ghostty  | -        | firefox | greetd + regreet | | ||||
| 
 | ||||
| - alice@Cape | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,5 +1,6 @@ | |||
| {pkgs, ...}: { | ||||
|   imports = [ | ||||
|     ./gui.nix | ||||
|     ./hardware-configuration.nix | ||||
|     ./stylix.nix | ||||
|     ./users | ||||
|  | @ -21,7 +22,6 @@ | |||
|       kanata.enable = true; | ||||
|       tailscale.enable = true; | ||||
|     }; | ||||
|     gui.enabled = "niri"; | ||||
|   }; | ||||
|   programs.gnupg.agent = { | ||||
|     enable = true; | ||||
|  |  | |||
							
								
								
									
										20
									
								
								nixos/configurations/Akun/gui.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								nixos/configurations/Akun/gui.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,20 @@ | |||
| {...}: let | ||||
|   extraConfig = '' | ||||
|     output "eDP-1" { | ||||
|       mode "1920x1200@60.018" | ||||
|       scale 1.0 | ||||
|       focus-at-startup | ||||
|       position x=0 y=0 | ||||
|       transform "normal" | ||||
|     } | ||||
|     window-rule { | ||||
|       match app-id="apps.regreet" | ||||
|       open-on-output "eDP-1" | ||||
|     } | ||||
|   ''; | ||||
| in { | ||||
|   youthlic.gui = { | ||||
|     enabled = "niri"; | ||||
|     niri.extraConfig = extraConfig; | ||||
|   }; | ||||
| } | ||||
|  | @ -2,6 +2,7 @@ | |||
|   lib, | ||||
|   pkgs, | ||||
|   inputs, | ||||
|   config, | ||||
|   ... | ||||
| }: { | ||||
|   imports = | ||||
|  | @ -11,6 +12,7 @@ | |||
|     ++ [ | ||||
|       ./users | ||||
|       ./stylix.nix | ||||
|       ./gui.nix | ||||
| 
 | ||||
|       # Include the hardware related config | ||||
|       ./hardware-configuration.nix | ||||
|  | @ -44,7 +46,6 @@ | |||
|       owncast.enable = true; | ||||
|       minio.enable = true; | ||||
|     }; | ||||
|     gui.enabled = "niri"; | ||||
|   }; | ||||
| 
 | ||||
|   # specialisation = { | ||||
|  |  | |||
							
								
								
									
										26
									
								
								nixos/configurations/Tytonidae/gui.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								nixos/configurations/Tytonidae/gui.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,26 @@ | |||
| {pkgs, ...}: let | ||||
|   extraConfig = '' | ||||
|     output "DP-1" { | ||||
|       mode "2560x1440@169.900" | ||||
|       scale 1.0 | ||||
|       position x=0 y=0 | ||||
|       transform "normal" | ||||
|       focus-at-startup | ||||
|     } | ||||
|     output "eDP-1" { | ||||
|       mode "2560x1440@165.003" | ||||
|       scale 1.5 | ||||
|       position x=2560 y=0 | ||||
|       transform "normal" | ||||
|     } | ||||
|     window-rule { | ||||
|       match app-id="apps.regreet" | ||||
|       open-on-output "DP-1" | ||||
|     } | ||||
|   ''; | ||||
| in { | ||||
|   youthlic.gui = { | ||||
|     enabled = "niri"; | ||||
|     niri.extraConfig = extraConfig; | ||||
|   }; | ||||
| } | ||||
|  | @ -6,6 +6,13 @@ | |||
| }: let | ||||
|   cfg = config.youthlic.gui; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.gui.niri = { | ||||
|       extraConfig = lib.mkOption { | ||||
|         type = lib.types.str; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
|   config = lib.mkIf (cfg.enabled == "niri") { | ||||
|     qt = { | ||||
|       enable = true; | ||||
|  | @ -61,20 +68,49 @@ in { | |||
|     hardware.bluetooth = { | ||||
|       enable = true; | ||||
|     }; | ||||
|     services.xserver = { | ||||
|       enable = true; | ||||
|       xkb = { | ||||
|         layout = "cn"; | ||||
|         variant = ""; | ||||
|       }; | ||||
|       displayManager.gdm = { | ||||
|     services = { | ||||
|       greetd = let | ||||
|         niriConfig = pkgs.writeText "greetd-niri-config.kdl" ('' | ||||
|             binds {} | ||||
|             hotkey-overlay { | ||||
|               skip-at-startup | ||||
|             } | ||||
|             gestures { | ||||
|               hot-corners { | ||||
|                 off | ||||
|               } | ||||
|             } | ||||
|             spawn-at-startup "${lib.getExe pkgs.swaybg}" "-i" "${config.stylix.image}" | ||||
|           '' | ||||
|           + config.youthlic.gui.niri.extraConfig); | ||||
|       in { | ||||
|         enable = true; | ||||
|         wayland = true; | ||||
|         settings = { | ||||
|           default_session = { | ||||
|             command = "env GTK_USE_PORTAL=0 GDK_DEBUG=no-portals ${lib.getExe' config.programs.niri.package "niri"} --config ${niriConfig} -- ${lib.getExe config.programs.regreet.package}"; | ||||
|           }; | ||||
|         }; | ||||
|       }; | ||||
|       xserver = { | ||||
|         enable = true; | ||||
|         xkb = { | ||||
|           layout = "us"; | ||||
|           variant = ""; | ||||
|         }; | ||||
|         # displayManager.gdm = { | ||||
|         #   enable = true; | ||||
|         #   wayland = true; | ||||
|         # }; | ||||
|       }; | ||||
|     }; | ||||
|     programs.niri = { | ||||
|       enable = true; | ||||
|       package = pkgs.niri-unstable; | ||||
|     programs = { | ||||
|       regreet = { | ||||
|         enable = true; | ||||
|       }; | ||||
|       niri = { | ||||
|         enable = true; | ||||
|         package = pkgs.niri-unstable; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue