Added power (plus minor refactor)
This commit is contained in:
		
							parent
							
								
									d0bbf94623
								
							
						
					
					
						commit
						3b12f8d66d
					
				| 
						 | 
					@ -15,11 +15,9 @@ in with lib; {
 | 
				
			||||||
  config = mkIf cfg.enable {
 | 
					  config = mkIf cfg.enable {
 | 
				
			||||||
    environment.sessionVariables = {
 | 
					    environment.sessionVariables = {
 | 
				
			||||||
      MOZ_USE_XINPUT2 = "1";
 | 
					      MOZ_USE_XINPUT2 = "1";
 | 
				
			||||||
    } // (if graphical.protocol == "Wayland" then {
 | 
					    } // optionals (graphical.protocol == "Wayland") {
 | 
				
			||||||
      MOZ_ENABLE_WAYLAND = "1";
 | 
					      MOZ_ENABLE_WAYLAND = "1";
 | 
				
			||||||
    } else
 | 
					    } // optionals (sway_cfg.enable) { XDG_CURRENT_DESKTOP = "sway"; };
 | 
				
			||||||
      { })
 | 
					 | 
				
			||||||
      // (if sway_cfg.enable then { XDG_CURRENT_DESKTOP = "sway"; } else { });
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    home-manager.users.james = {
 | 
					    home-manager.users.james = {
 | 
				
			||||||
      programs.firefox = {
 | 
					      programs.firefox = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,9 +1,12 @@
 | 
				
			||||||
{ config, lib, pkgs, ... }:
 | 
					{ config, lib, pkgs, ... }:
 | 
				
			||||||
let graphical = config.this.graphical;
 | 
					let
 | 
				
			||||||
 | 
					  graphical = config.this.graphical;
 | 
				
			||||||
 | 
					  power = config.this.system.power;
 | 
				
			||||||
in with lib; {
 | 
					in with lib; {
 | 
				
			||||||
  config = mkIf graphical.enable {
 | 
					  config = mkIf graphical.enable {
 | 
				
			||||||
    home-manager.users.james = {
 | 
					    home-manager.users.james = {
 | 
				
			||||||
      home.packages = with pkgs.gnome; [
 | 
					      home.packages = with pkgs.gnome;
 | 
				
			||||||
 | 
					        [
 | 
				
			||||||
          #gnome-common
 | 
					          #gnome-common
 | 
				
			||||||
          cheese
 | 
					          cheese
 | 
				
			||||||
          file-roller
 | 
					          file-roller
 | 
				
			||||||
| 
						 | 
					@ -21,14 +24,13 @@ in with lib; {
 | 
				
			||||||
          gnome-keyring
 | 
					          gnome-keyring
 | 
				
			||||||
          gnome-maps
 | 
					          gnome-maps
 | 
				
			||||||
          gnome-music
 | 
					          gnome-music
 | 
				
			||||||
        gnome-power-manager # conditioanl if upower is used
 | 
					 | 
				
			||||||
          iagno
 | 
					          iagno
 | 
				
			||||||
          libgnome-keyring
 | 
					          libgnome-keyring
 | 
				
			||||||
          nautilus
 | 
					          nautilus
 | 
				
			||||||
          pomodoro
 | 
					          pomodoro
 | 
				
			||||||
          seahorse
 | 
					          seahorse
 | 
				
			||||||
          sushi
 | 
					          sushi
 | 
				
			||||||
      ];
 | 
					        ] ++ optionals (power.enable) [ gnome-power-manager ];
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,10 @@
 | 
				
			||||||
    ./minimal.nix
 | 
					    ./minimal.nix
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  this.graphical.enable = true;
 | 
					  this = {
 | 
				
			||||||
 | 
					    graphical.enable = true;
 | 
				
			||||||
 | 
					    system.power.enable = true;
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Enable sound.
 | 
					  # Enable sound.
 | 
				
			||||||
  sound.enable = true;
 | 
					  sound.enable = true;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,6 +6,7 @@
 | 
				
			||||||
    ./flatpak.nix
 | 
					    ./flatpak.nix
 | 
				
			||||||
    ./fonts.nix
 | 
					    ./fonts.nix
 | 
				
			||||||
    ./gtk.nix
 | 
					    ./gtk.nix
 | 
				
			||||||
 | 
					    ./power.nix
 | 
				
			||||||
    ./xdg.nix
 | 
					    ./xdg.nix
 | 
				
			||||||
    ./zfs.nix
 | 
					    ./zfs.nix
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in New Issue
	
	Block a user