Remove duplicate specialisation
Saves 16s on eval time
This commit is contained in:
parent
17f0ba3370
commit
d5917b1264
|
@ -2,9 +2,9 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
phases = [
|
||||
{ command = "jour"; polarity = "light"; }
|
||||
{ command = "crepuscule"; polarity = "dark"; }
|
||||
{ command = "nuit"; polarity = "dark"; }
|
||||
{ command = "jour"; specialisation = null; }
|
||||
{ command = "crepuscule"; specialisation = "dark"; }
|
||||
{ command = "nuit"; specialisation = "dark"; }
|
||||
];
|
||||
phasesBrightness = config.frogeye.desktop.phasesBrightness;
|
||||
in
|
||||
|
@ -17,7 +17,7 @@ in
|
|||
text = (lib.optionalString phasesBrightness.enable ''
|
||||
brightnessctl set ${builtins.getAttr phase.command phasesBrightness}
|
||||
'') + ''
|
||||
switch="/nix/var/nix/profiles/system/specialisation/${phase.polarity}/bin/switch-to-configuration"
|
||||
switch="/nix/var/nix/profiles/system${lib.strings.optionalString (phase.specialisation != null) "/specialisation/${phase.specialisation}"}/bin/switch-to-configuration"
|
||||
if [ -x "$switch" ]
|
||||
then
|
||||
# In two steps to get the visual changes slightly earlier
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
|
||||
specialisation = {
|
||||
dark.configuration.frogeye.polarity = "dark";
|
||||
light.configuration.frogeye.polarity = "light";
|
||||
};
|
||||
|
||||
# Fix https://nix-community.github.io/home-manager/index.html#_why_do_i_get_an_error_message_about_literal_ca_desrt_dconf_literal_or_literal_dconf_service_literal
|
||||
|
|
Loading…
Reference in a new issue