Added power (plus minor refactor)

This commit is contained in:
James Patrick 2022-03-24 18:02:46 -04:00
parent d0bbf94623
commit 3b12f8d66d
4 changed files with 36 additions and 32 deletions

View File

@ -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 = {

View File

@ -1,34 +1,36 @@
{ 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 [
cheese #gnome-common
file-roller cheese
gnome-bluetooth file-roller
gnome-books gnome-bluetooth
gnome-boxes gnome-books
gnome-calendar gnome-boxes
gnome-characters gnome-calendar
gnome-color-manager gnome-characters
gnome-contacts gnome-color-manager
gnome-control-center gnome-contacts
gnome-dictionary gnome-control-center
#gnome-documents gnome-dictionary
gnome-font-viewer #gnome-documents
gnome-keyring gnome-font-viewer
gnome-maps gnome-keyring
gnome-music gnome-maps
gnome-power-manager # conditioanl if upower is used gnome-music
iagno iagno
libgnome-keyring libgnome-keyring
nautilus nautilus
pomodoro pomodoro
seahorse seahorse
sushi sushi
]; ] ++ optionals (power.enable) [ gnome-power-manager ];
}; };
}; };
} }

View File

@ -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;

View File

@ -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
]; ];