forked from jan-leila/nix-config
		
	added enables to modules and made base module that imports all other modules
This commit is contained in:
		
							parent
							
								
									eaa19be741
								
							
						
					
					
						commit
						bf0686a14b
					
				
					 7 changed files with 79 additions and 55 deletions
				
			
		|  | @ -1,4 +1,4 @@ | ||||||
| {pkgs, ...}: { | {...}: { | ||||||
|   imports = []; |   imports = []; | ||||||
| 
 | 
 | ||||||
|   nix = { |   nix = { | ||||||
|  |  | ||||||
|  | @ -8,10 +8,7 @@ | ||||||
|     inputs.disko.nixosModules.disko |     inputs.disko.nixosModules.disko | ||||||
|     ../../enviroments/server |     ../../enviroments/server | ||||||
| 
 | 
 | ||||||
|     ../../modules/hardware.nix |     ../../modules | ||||||
|     ../../modules/users.nix |  | ||||||
|     ../../modules/desktop.nix |  | ||||||
|     ../../modules/nix-development.nix |  | ||||||
|   ]; |   ]; | ||||||
| 
 | 
 | ||||||
|   nixpkgs.config.allowUnfree = true; |   nixpkgs.config.allowUnfree = true; | ||||||
|  |  | ||||||
|  | @ -3,10 +3,7 @@ | ||||||
|     inputs.nixos-hardware.nixosModules.framework-11th-gen-intel |     inputs.nixos-hardware.nixosModules.framework-11th-gen-intel | ||||||
| 
 | 
 | ||||||
|     ../../enviroments/client |     ../../enviroments/client | ||||||
|     ../../modules/hardware.nix |     ../../modules | ||||||
|     ../../modules/users.nix |  | ||||||
|     ../../modules/desktop.nix |  | ||||||
|     ../../modules/nix-development.nix |  | ||||||
|   ]; |   ]; | ||||||
| 
 | 
 | ||||||
|   nixpkgs.config.allowUnfree = true; |   nixpkgs.config.allowUnfree = true; | ||||||
|  |  | ||||||
|  | @ -2,10 +2,7 @@ | ||||||
|   imports = [ |   imports = [ | ||||||
|     ../../enviroments/client |     ../../enviroments/client | ||||||
| 
 | 
 | ||||||
|     ../../modules/hardware.nix |     ../../modules | ||||||
|     ../../modules/users.nix |  | ||||||
|     ../../modules/desktop.nix |  | ||||||
|     ../../modules/nix-development.nix |  | ||||||
|   ]; |   ]; | ||||||
| 
 | 
 | ||||||
|   nixpkgs.config.allowUnfree = true; |   nixpkgs.config.allowUnfree = true; | ||||||
|  |  | ||||||
							
								
								
									
										8
									
								
								modules/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								modules/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | ||||||
|  | {...}: { | ||||||
|  |   imports = [ | ||||||
|  |     ./hardware.nix | ||||||
|  |     ./users.nix | ||||||
|  |     ./desktop.nix | ||||||
|  |     ./nix-development.nix | ||||||
|  |   ]; | ||||||
|  | } | ||||||
|  | @ -1,41 +1,55 @@ | ||||||
| {pkgs, ...}: { | { | ||||||
|   services = { |   lib, | ||||||
|     # Enable CUPS to print documents. |   pkgs, | ||||||
|     printing.enable = true; |   config, | ||||||
|  |   ... | ||||||
|  | }: { | ||||||
|  |   options.host.desktop.enable = lib.mkEnableOption "should desktop configuration be enabled"; | ||||||
| 
 | 
 | ||||||
|     xserver = { |   config = lib.mkMerge [ | ||||||
|       # Enable the X11 windowing system. |     { | ||||||
|       enable = true; |       host.desktop.enable = lib.mkDefault true; | ||||||
|  |     } | ||||||
|  |     (lib.mkIf config.host.desktop.enable { | ||||||
|  |       services = { | ||||||
|  |         # Enable CUPS to print documents. | ||||||
|  |         printing.enable = true; | ||||||
| 
 | 
 | ||||||
|       # Enable the GNOME Desktop Environment. |         xserver = { | ||||||
|       displayManager.gdm.enable = true; |           # Enable the X11 windowing system. | ||||||
|       desktopManager = { |           enable = true; | ||||||
|         gnome.enable = true; | 
 | ||||||
|  |           # Enable the GNOME Desktop Environment. | ||||||
|  |           displayManager.gdm.enable = true; | ||||||
|  |           desktopManager = { | ||||||
|  |             gnome.enable = true; | ||||||
|  |           }; | ||||||
|  | 
 | ||||||
|  |           # Get rid of xTerm | ||||||
|  |           desktopManager.xterm.enable = false; | ||||||
|  |           excludePackages = [pkgs.xterm]; | ||||||
|  |         }; | ||||||
|  | 
 | ||||||
|  |         pipewire = { | ||||||
|  |           enable = true; | ||||||
|  |           alsa.enable = true; | ||||||
|  |           alsa.support32Bit = true; | ||||||
|  |           pulse.enable = true; | ||||||
|  | 
 | ||||||
|  |           # If you want to use JACK applications, uncomment this | ||||||
|  |           #jack.enable = true; | ||||||
|  | 
 | ||||||
|  |           # use the example session manager (no others are packaged yet so this is enabled by default, | ||||||
|  |           # no need to redefine it in your config for now) | ||||||
|  |           #media-session.enable = true; | ||||||
|  |         }; | ||||||
|       }; |       }; | ||||||
| 
 | 
 | ||||||
|       # Get rid of xTerm |       # Enable sound with pipewire. | ||||||
|       desktopManager.xterm.enable = false; |       hardware.pulseaudio.enable = false; | ||||||
|       excludePackages = [pkgs.xterm]; |  | ||||||
|     }; |  | ||||||
| 
 | 
 | ||||||
|     pipewire = { |       # enable RealtimeKit for pulse audio | ||||||
|       enable = true; |       security.rtkit.enable = true; | ||||||
|       alsa.enable = true; |     }) | ||||||
|       alsa.support32Bit = true; |   ]; | ||||||
|       pulse.enable = true; |  | ||||||
| 
 |  | ||||||
|       # If you want to use JACK applications, uncomment this |  | ||||||
|       #jack.enable = true; |  | ||||||
| 
 |  | ||||||
|       # use the example session manager (no others are packaged yet so this is enabled by default, |  | ||||||
|       # no need to redefine it in your config for now) |  | ||||||
|       #media-session.enable = true; |  | ||||||
|     }; |  | ||||||
|   }; |  | ||||||
| 
 |  | ||||||
|   # Enable sound with pipewire. |  | ||||||
|   hardware.pulseaudio.enable = false; |  | ||||||
| 
 |  | ||||||
|   # enable RealtimeKit for pulse audio |  | ||||||
|   security.rtkit.enable = true; |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,14 +1,25 @@ | ||||||
| { | { | ||||||
|   inputs, |   lib, | ||||||
|  |   config, | ||||||
|   pkgs, |   pkgs, | ||||||
|  |   inputs, | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   nix = { |   options.host.nix-development.enable = lib.mkEnableOption "should desktop configuration be enabled"; | ||||||
|     nixPath = ["nixpkgs=${inputs.nixpkgs}"]; |  | ||||||
|   }; |  | ||||||
| 
 | 
 | ||||||
|   environment.systemPackages = with pkgs; [ |   config = lib.mkMerge [ | ||||||
|     # nix langauge server |     { | ||||||
|     nixd |       host.nix-development.enable = lib.mkDefault true; | ||||||
|  |     } | ||||||
|  |     (lib.mkIf config.host.nix-development.enable { | ||||||
|  |       nix = { | ||||||
|  |         nixPath = ["nixpkgs=${inputs.nixpkgs}"]; | ||||||
|  |       }; | ||||||
|  | 
 | ||||||
|  |       environment.systemPackages = with pkgs; [ | ||||||
|  |         # nix langauge server | ||||||
|  |         nixd | ||||||
|  |       ]; | ||||||
|  |     }) | ||||||
|   ]; |   ]; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue