[modules] add plasma nixos module, modify gnome nixos module
feat(modules): add plasma module refactor(module): gnome module has to be explicitly enabled now
This commit is contained in:
		
							parent
							
								
									d218f5a13c
								
							
						
					
					
						commit
						32ab43f7dd
					
				
					 7 changed files with 117 additions and 67 deletions
				
			
		|  | @ -1,50 +0,0 @@ | |||
| { | ||||
|   lib, | ||||
|   pkgs, | ||||
|   inputs, | ||||
| 
 | ||||
|   namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal". | ||||
|   system, # The system architecture for this host (eg. `x86_64-linux`). | ||||
|   target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). | ||||
|   format, # A normalized name for the system target (eg. `iso`). | ||||
|   virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. | ||||
|   systems, # An attribute map of your defined hosts. | ||||
| 
 | ||||
|   config, | ||||
|   ... | ||||
| }: { | ||||
|   services.xserver.enable = true; | ||||
| 
 | ||||
|   # Enable GNOME and GDM. | ||||
|   services.xserver.displayManager.gdm.enable = true; | ||||
|   services.xserver.desktopManager.gnome.enable = true; | ||||
| 
 | ||||
|   environment.gnome.excludePackages =  (with pkgs; [ | ||||
|     gnome-tour | ||||
|     gedit | ||||
|     cheese | ||||
|     geary | ||||
|     yelp # Help view | ||||
|     epiphany # Gnome web | ||||
|   ]) ++ (with pkgs.gnome; [ | ||||
|     gnome-music | ||||
|     tali # Poker game | ||||
|     iagno # Go game | ||||
|     hitori # Sudoku game | ||||
|     gnome-contacts | ||||
|     gnome-initial-setup | ||||
|   ]); | ||||
| 
 | ||||
|   programs.dconf.enable = true; | ||||
| 
 | ||||
|   services.gnome.gnome-keyring.enable = true; | ||||
| 
 | ||||
|   programs.kdeconnect = { | ||||
|     enable = true; | ||||
|     package = pkgs.gnomeExtensions.gsconnect; | ||||
|   }; | ||||
| 
 | ||||
|   environment.systemPackages = with pkgs; [ | ||||
|     gnome-tweaks | ||||
|   ]; | ||||
| } | ||||
							
								
								
									
										57
									
								
								modules/nixos/desktop/gnome/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								modules/nixos/desktop/gnome/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,57 @@ | |||
| { | ||||
|   lib, | ||||
|   pkgs, | ||||
|   inputs, | ||||
| 
 | ||||
|   namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal". | ||||
|   system, # The system architecture for this host (eg. `x86_64-linux`). | ||||
|   target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). | ||||
|   format, # A normalized name for the system target (eg. `iso`). | ||||
|   virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. | ||||
|   systems, # An attribute map of your defined hosts. | ||||
| 
 | ||||
|   config, | ||||
|   ... | ||||
| }: with lib; with lib.${namespace}; | ||||
| let | ||||
|   cfg = config.${namespace}.desktop.gnome; | ||||
| in { | ||||
|   options.${namespace}.desktop.gnome = { enable = mkEnableOption "gnome"; }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     services.xserver.enable = true; | ||||
| 
 | ||||
|     # Enable GNOME and GDM. | ||||
|     services.xserver.displayManager.gdm.enable = true; | ||||
|     services.xserver.desktopManager.gnome.enable = true; | ||||
| 
 | ||||
|     environment.gnome.excludePackages =  (with pkgs; [ | ||||
|       gnome-tour | ||||
|       gedit | ||||
|       cheese | ||||
|       geary | ||||
|       yelp # Help view | ||||
|       epiphany # Gnome web | ||||
|     ]) ++ (with pkgs.gnome; [ | ||||
|       gnome-music | ||||
|       tali # Poker game | ||||
|       iagno # Go game | ||||
|       hitori # Sudoku game | ||||
|       gnome-contacts | ||||
|       gnome-initial-setup | ||||
|     ]); | ||||
| 
 | ||||
|     programs.dconf.enable = true; | ||||
| 
 | ||||
|     services.gnome.gnome-keyring.enable = true; | ||||
| 
 | ||||
|     programs.kdeconnect = { | ||||
|       enable = true; | ||||
|       package = pkgs.gnomeExtensions.gsconnect; | ||||
|     }; | ||||
| 
 | ||||
|     environment.systemPackages = with pkgs; [ | ||||
|       gnome-tweaks | ||||
|     ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										29
									
								
								modules/nixos/desktop/plasma/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								modules/nixos/desktop/plasma/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,29 @@ | |||
| { | ||||
|   lib, | ||||
|   pkgs, | ||||
|   inputs, | ||||
| 
 | ||||
|   namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal". | ||||
|   system, # The system architecture for this host (eg. `x86_64-linux`). | ||||
|   target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). | ||||
|   format, # A normalized name for the system target (eg. `iso`). | ||||
|   virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. | ||||
|   systems, # An attribute map of your defined hosts. | ||||
| 
 | ||||
|   config, | ||||
|   ... | ||||
| }: with lib; with lib.${namespace}; | ||||
| let | ||||
|   cfg = config.${namespace}.desktop.plasma; | ||||
| in { | ||||
|   options.${namespace}.desktop.plasma = { enable = mkEnableOption "Whether to enable the KDE Plasma desktop environment"; }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     services.xserver.enable = true; | ||||
| 
 | ||||
|     services.desktopManager.plasma6.enable = true; | ||||
|     services.displayManager.sddm.enable = true; | ||||
| 
 | ||||
|     programs.kdeconnect.enable = true; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue