diff --git a/dots/.config/bspwm/scripts/system.ini b/dots/.config/bspwm/scripts/system.ini deleted file mode 100644 index 950c907e7..000000000 --- a/dots/.config/bspwm/scripts/system.ini +++ /dev/null @@ -1,15 +0,0 @@ -; ╔═╗╦ ╦╔═╗╔╦╗╔═╗╔╦╗ ╦ ╦╔═╗╦═╗╦╔═╗╔╗ ╦ ╔═╗╔═╗ -; ╚═╗╚╦╝╚═╗ ║ ║╣ ║║║ ╚╗╔╝╠═╣╠╦╝║╠═╣╠╩╗║ ║╣ ╚═╗ -; ╚═╝ ╩ ╚═╝ ╩ ╚═╝╩ ╩ ╚╝ ╩ ╩╩╚═╩╩ ╩╚═╝╩═╝╚═╝╚═╝ -; The variables for the polybar modules are taken from this file. - -;; Edit according to your system -;; Run `ls -1 /sys/class/power_supply/` to list list batteries and adapters. -;; Run `ls -1 /sys/class/backlight/` to list available graphics cards. -;; Run `ip link | awk '/state UP/ {print $2}' | tr -d :` to get active network interface. - -[system] -sys_adapter = AC -sys_battery = BAT0 -sys_graphics_card = intel_backlight -sys_network_interface = enp1s0 diff --git a/install.sh b/install.sh index 58ddf01ee..1552838e1 100755 --- a/install.sh +++ b/install.sh @@ -100,7 +100,7 @@ fi sed -i "/^\s*host[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$host_name\"/" ./flake.nix echo "using the following host name: $host_name" -if sudo nixos-rebuild switch --flake .#"$host_name"; then +if sudo nixos-rebuild switch --flake .#"$host_name" --show-trace; then echo "-----" echo "$PROJECT_NAME Has Been Installed!" fi diff --git a/nix-config/hosts/nix-deskstar/options.nix b/nix-config/hosts/nix-deskstar/options.nix index bde6a0e91..c0caf393c 100644 --- a/nix-config/hosts/nix-deskstar/options.nix +++ b/nix-config/hosts/nix-deskstar/options.nix @@ -78,4 +78,6 @@ in { # Enable SyncThing syncthing = true; + # Power profiles daemon + powerprofiles = false; } diff --git a/nix-config/hosts/nix-lappy/options.nix b/nix-config/hosts/nix-lappy/options.nix index 8c3aa2027..e1ebeb9f5 100644 --- a/nix-config/hosts/nix-lappy/options.nix +++ b/nix-config/hosts/nix-lappy/options.nix @@ -79,4 +79,6 @@ in { # Xorg scaling xrandrScale = "0.8x0.8"; + # Power profiles daemon + powerprofiles = true; } diff --git a/nix-config/hosts/nix-vm/options.nix b/nix-config/hosts/nix-vm/options.nix index c6c4eadfb..ecd7e36cf 100644 --- a/nix-config/hosts/nix-vm/options.nix +++ b/nix-config/hosts/nix-vm/options.nix @@ -78,4 +78,7 @@ in { # Enable SyncThing syncthing = true; + # Power profiles daemon + powerprofiles = false; } + diff --git a/nix-config/system/default.nix b/nix-config/system/default.nix index 5fc20dee3..b576a8d3f 100644 --- a/nix-config/system/default.nix +++ b/nix-config/system/default.nix @@ -20,6 +20,7 @@ ./opengl.nix ./packages.nix ./polkit.nix + ./power-profiles-daemon.nix ./services.nix ./syncthing.nix ./vm.nix diff --git a/nix-config/system/power-profiles-daemon.nix b/nix-config/system/power-profiles-daemon.nix new file mode 100644 index 000000000..856fad140 --- /dev/null +++ b/nix-config/system/power-profiles-daemon.nix @@ -0,0 +1,6 @@ +{ config, lib, host, ... }: + +let inherit (import ../hosts/${host}/options.nix) powerprofiles; in +lib.mkIf (powerprofiles == true) { + services.power-profiles-daemon.enable = true; +} diff --git a/nix-config/system/services.nix b/nix-config/system/services.nix index e85ba18d1..88a9c9ad1 100644 --- a/nix-config/system/services.nix +++ b/nix-config/system/services.nix @@ -31,7 +31,6 @@ hardware.bluetooth.powerOnBoot = false; # powers up the default Bluetooth controller on boot services.blueman.enable = true; - services.power-profiles-daemon.enable = true; services.gnome.gnome-keyring.enable=true; security.pam.services.sddm.enableGnomeKeyring = true; #security.pam.services.login.enableGnomeKeyring = true; diff --git a/nix-config/system/xorgScale.nix b/nix-config/system/xorgScale.nix index 703344ee9..094021769 100644 --- a/nix-config/system/xorgScale.nix +++ b/nix-config/system/xorgScale.nix @@ -1,7 +1,7 @@ { config, lib, host, ... }: let inherit (import ../hosts/${host}/options.nix) xrandrScale; in -lib.mkIf ("${xrandrScale}" != null && "${host}" == "nix-lappy") { +lib.mkIf ("${host}" == "nix-lappy" && "${xrandrScale}" != null) { services.xserver.displayManager.sessionCommands = '' xrandr --output eDP-1 --scale ${xrandrScale} --mode 2880x1800 '';