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 {
environment.sessionVariables = {
MOZ_USE_XINPUT2 = "1";
} // (if graphical.protocol == "Wayland" then {
} // optionals (graphical.protocol == "Wayland") {
MOZ_ENABLE_WAYLAND = "1";
} else
{ })
// (if sway_cfg.enable then { XDG_CURRENT_DESKTOP = "sway"; } else { });
} // optionals (sway_cfg.enable) { XDG_CURRENT_DESKTOP = "sway"; };
home-manager.users.james = {
programs.firefox = {

View File

@ -1,34 +1,36 @@
{ config, lib, pkgs, ... }:
let graphical = config.this.graphical;
let
graphical = config.this.graphical;
power = config.this.system.power;
in with lib; {
config = mkIf graphical.enable {
home-manager.users.james = {
home.packages = with pkgs.gnome; [
#gnome-common
cheese
file-roller
gnome-bluetooth
gnome-books
gnome-boxes
gnome-calendar
gnome-characters
gnome-color-manager
gnome-contacts
gnome-control-center
gnome-dictionary
#gnome-documents
gnome-font-viewer
gnome-keyring
gnome-maps
gnome-music
gnome-power-manager # conditioanl if upower is used
iagno
libgnome-keyring
nautilus
pomodoro
seahorse
sushi
];
home.packages = with pkgs.gnome;
[
#gnome-common
cheese
file-roller
gnome-bluetooth
gnome-books
gnome-boxes
gnome-calendar
gnome-characters
gnome-color-manager
gnome-contacts
gnome-control-center
gnome-dictionary
#gnome-documents
gnome-font-viewer
gnome-keyring
gnome-maps
gnome-music
iagno
libgnome-keyring
nautilus
pomodoro
seahorse
sushi
] ++ optionals (power.enable) [ gnome-power-manager ];
};
};
}

View File

@ -6,7 +6,10 @@
./minimal.nix
];
this.graphical.enable = true;
this = {
graphical.enable = true;
system.power.enable = true;
};
# Enable sound.
sound.enable = true;

View File

@ -6,6 +6,7 @@
./flatpak.nix
./fonts.nix
./gtk.nix
./power.nix
./xdg.nix
./zfs.nix
];