nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

waybar: make the systemd target that pulls in waybar configurable (#399673)

authored by

Wolfgang Walther and committed by
GitHub
85b066ea 9bec1bbb

+8 -1
+8 -1
nixos/modules/programs/wayland/waybar.nix
··· 16 16 // lib.mkOption { 17 17 apply = pkg: pkg.override { systemdSupport = true; }; 18 18 }; 19 + systemd.target = lib.mkOption { 20 + type = lib.types.str; 21 + description = '' 22 + The systemd target that will automatically start the Waybar service. 23 + ''; 24 + default = "graphical-session.target"; 25 + }; 19 26 }; 20 27 21 28 config = lib.mkIf cfg.enable { 22 29 environment.systemPackages = [ cfg.package ]; 23 30 systemd = { 24 31 packages = [ cfg.package ]; 25 - user.services.waybar.wantedBy = [ "graphical-session.target" ]; 32 + user.services.waybar.wantedBy = [ cfg.systemd.target ]; 26 33 }; 27 34 }; 28 35