Skip to content

Commit

Permalink
konashow
Browse files Browse the repository at this point in the history
  • Loading branch information
arcnmx committed Sep 4, 2021
1 parent 2109730 commit d1e6c07
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion modules/home/konawall.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
cfg = config.services.konawall;
arc = import ../../canon.nix { inherit pkgs; };
service = config.systemd.user.services.konawall;
systemd = config.systemd.package or pkgs.systemd;
konashow = pkgs.writeShellScriptBin "konashow" ''
${systemd}/bin/journalctl \
_SYSTEMD_INVOCATION_ID=$(${systemd}/bin/systemctl show -p InvocationID --value konawall.service --user) \
-o cat --no-pager
'';
in with lib; {
options.services.konawall = {
enable = mkEnableOption "enable konawall";
Expand All @@ -25,6 +31,10 @@ in with lib; {
type = types.package;
default = pkgs.konawall or arc.packages.konawall;
};
konashow = mkOption {
type = types.package;
default = konashow;
};
interval = mkOption {
type = types.nullOr types.str;
default = null;
Expand Down Expand Up @@ -75,7 +85,7 @@ in with lib; {
};
Service = {
Type = "oneshot";
ExecStart = "${config.systemd.package or pkgs.systemd}/bin/systemctl --user --no-block restart konawall";
ExecStart = "${systemd}/bin/systemctl --user --no-block restart konawall";
};
};
};
Expand Down

0 comments on commit d1e6c07

Please sign in to comment.