conky: ship on sway
this probably causes double conky on sxmo, but i can fix in future patch
This commit is contained in:
parent
14b0d1bd37
commit
cddba3d35f
36
hosts/common/programs/conky/default.nix
Normal file
36
hosts/common/programs/conky/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
{
|
||||||
|
sane.programs.conky = {
|
||||||
|
fs.".config/conky/conky.conf".symlink.target =
|
||||||
|
let
|
||||||
|
battery_estimate = pkgs.static-nix-shell.mkBash {
|
||||||
|
pname = "battery_estimate";
|
||||||
|
src = ./.;
|
||||||
|
};
|
||||||
|
in pkgs.substituteAll {
|
||||||
|
src = ./conky.conf;
|
||||||
|
bat = "${battery_estimate}/bin/battery_estimate";
|
||||||
|
weather = "timeout 20 ${pkgs.sane-weather}/bin/sane-weather";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# TODO: give `sane.programs` native support for defining services
|
||||||
|
systemd.user.services.conky = lib.mkIf config.sane.programs.conky.enabled {
|
||||||
|
description = "conky dynamic desktop background";
|
||||||
|
wantedBy = [ "default.target" ];
|
||||||
|
# XXX: should be part of graphical-session.target, but whatever mix of greetd/sway
|
||||||
|
# i'm using means that target's never reached...
|
||||||
|
# wantedBy = [ "graphical-session.target" ];
|
||||||
|
# partOf = [ "graphical-session.target" ];
|
||||||
|
# TODO: might want `ConditionUser=!@system`
|
||||||
|
|
||||||
|
serviceConfig.ExecStart = "${pkgs.conky}/bin/conky";
|
||||||
|
serviceConfig.Type = "simple";
|
||||||
|
serviceConfig.Restart = "on-failure";
|
||||||
|
serviceConfig.RestartSec = "10s";
|
||||||
|
# serviceConfig.Slice = "session.slice";
|
||||||
|
|
||||||
|
# don't start conky until after sway
|
||||||
|
preStart = ''test -n "$SWAYSOCK"'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -7,6 +7,7 @@
|
||||||
./assorted.nix
|
./assorted.nix
|
||||||
./cantata.nix
|
./cantata.nix
|
||||||
./chatty.nix
|
./chatty.nix
|
||||||
|
./conky
|
||||||
./cozy.nix
|
./cozy.nix
|
||||||
./dino.nix
|
./dino.nix
|
||||||
./element-desktop.nix
|
./element-desktop.nix
|
||||||
|
|
|
@ -117,6 +117,7 @@ in
|
||||||
package = null;
|
package = null;
|
||||||
suggestedPrograms = [
|
suggestedPrograms = [
|
||||||
"guiApps"
|
"guiApps"
|
||||||
|
"conky" # for a nice background
|
||||||
"splatmoji" # used by us, but 'enabling' it gets us persistence & cfg
|
"splatmoji" # used by us, but 'enabling' it gets us persistence & cfg
|
||||||
"swaylock"
|
"swaylock"
|
||||||
"swayidle"
|
"swayidle"
|
||||||
|
|
|
@ -339,16 +339,8 @@ in
|
||||||
in
|
in
|
||||||
lib.generators.toKeyValue { inherit mkKeyValue; } cfg.settings;
|
lib.generators.toKeyValue { inherit mkKeyValue; } cfg.settings;
|
||||||
|
|
||||||
sane.user.fs.".config/sxmo/conky.conf".symlink.target = let
|
sane.user.fs.".config/sxmo/conky.conf".symlink.target
|
||||||
battery_estimate = pkgs.static-nix-shell.mkBash {
|
= "../conky/conky.conf";
|
||||||
pname = "battery_estimate";
|
|
||||||
src = ./.;
|
|
||||||
};
|
|
||||||
in pkgs.substituteAll {
|
|
||||||
src = ./conky-config;
|
|
||||||
bat = "${battery_estimate}/bin/battery_estimate";
|
|
||||||
weather = "timeout 20 ${pkgs.sane-weather}/bin/sane-weather";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
(lib.mkIf (cfg.greeter == "lightdm-mobile") {
|
(lib.mkIf (cfg.greeter == "lightdm-mobile") {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user