mirror of
				https://github.com/Stunkymonkey/nixos.git
				synced 2025-10-31 01:32:11 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
	
		
			375 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			375 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
| { config, lib, ... }:
 | |
| let
 | |
|   cfg = config.my.profiles.sway-autostart;
 | |
| in
 | |
| {
 | |
|   options.my.profiles.sway-autostart = with lib; {
 | |
|     enable = mkEnableOption "sway-autostart profile";
 | |
|   };
 | |
| 
 | |
|   config = lib.mkIf cfg.enable {
 | |
| 
 | |
|     # start sway if login happens
 | |
|     environment.interactiveShellInit = ''
 | |
|       if test `tty` = /dev/tty1; then
 | |
|         exec sway
 | |
|       fi
 | |
|     '';
 | |
|   };
 | |
| }
 | 
