Update simple-osd-daemons

This commit is contained in:
Alexander Bantyev 2020-09-18 21:31:26 +03:00
parent aeda3f56bf
commit 57181a346e
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
4 changed files with 33 additions and 36 deletions

18
flake.lock generated
View File

@ -124,11 +124,11 @@
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1599941320, "lastModified": 1600170522,
"narHash": "sha256-xe0WZVLuWQ3goCnlh1VDDykwdUSOyikXoaclhH+xqVU=", "narHash": "sha256-rY7p7K5djPHvuRHNrRRS80j0BlbH2rp9w0F4uQbZYbs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nix", "repo": "nix",
"rev": "7cb5f643a6ee5b8ffee2e0bb9159a677ff76d17c", "rev": "733d2e9402807e54d503c3113e854bfddb3d44e0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -333,17 +333,17 @@
"nixpkgs": "nixpkgs_5" "nixpkgs": "nixpkgs_5"
}, },
"locked": { "locked": {
"lastModified": 1600036524, "lastModified": 1600420679,
"narHash": "sha256-Xyb2qLHhqgW+oyl2qQAh1Zcoj5Y69IHRkaGd9htEEC0=", "narHash": "sha256-3bolSr1u1xfvk/fZw9yk7iKeLI1R0Uu7UXcloysl5c8=",
"ref": "master", "ref": "master",
"rev": "ee4bf80484acbf18ab7d9f2da83ee3dfc9c1f722", "rev": "449a3912bd090011e538504b4daae6e61dc7523b",
"revCount": 3, "revCount": 15,
"type": "git", "type": "git",
"url": "https://code.balsoft.ru/balsoft/simple-osd-daemons" "url": "ssh://gitea@code.balsoft.ru/balsoft/simple-osd-daemons"
}, },
"original": { "original": {
"type": "git", "type": "git",
"url": "https://code.balsoft.ru/balsoft/simple-osd-daemons" "url": "ssh://gitea@code.balsoft.ru/balsoft/simple-osd-daemons"
} }
}, },
"weechat-notify-send": { "weechat-notify-send": {

View File

@ -47,7 +47,7 @@
ref = "flake"; ref = "flake";
}; };
nixos-fhs-compat.url = github:balsoft/nixos-fhs-compat; nixos-fhs-compat.url = github:balsoft/nixos-fhs-compat;
simple-osd-daemons.url = git+https://code.balsoft.ru/balsoft/simple-osd-daemons; simple-osd-daemons.url = git+ssh://gitea@code.balsoft.ru/balsoft/simple-osd-daemons;
}; };
outputs = { nixpkgs, nix, self, ... }@inputs: { outputs = { nixpkgs, nix, self, ... }@inputs: {

View File

@ -27,7 +27,7 @@ in {
inherit (inputs.lambda-launcher.packages.x86_64-linux) lambda-launcher; inherit (inputs.lambda-launcher.packages.x86_64-linux) lambda-launcher;
simple-osd = { inherit (inputs.simple-osd-daemons.packages.x86_64-linux) battery bluetooth brightness pulseaudio; }; simple-osd = inputs.simple-osd-daemons.packages.x86_64-linux;
inherit old; inherit old;

View File

@ -1,29 +1,26 @@
{ config, pkgs, lib, ... }: { { config, pkgs, lib, ... }:
home-manager.users.balsoft.systemd.user.services = { let
simple-osd-pulseaudio = { simple-osd-daemon = name: {
Install.WantedBy = [ "default.target" ]; Install.WantedBy = [ "default.target" ];
Service = { Service = {
ExecStart = "${pkgs.simple-osd.pulseaudio}/bin/simple-osd-pulseaudio"; ExecStart = "${pkgs.simple-osd.${name}}/bin/simple-osd-${name}";
};
}; };
simple-osd-bluetooth = { };
Install.WantedBy = [ "default.target" ]; inherit (import ../support.nix { inherit lib config; }) genIni;
Service = { daemons = names:
ExecStart = "${pkgs.simple-osd.bluetooth}/bin/simple-osd-bluetooth"; builtins.listToAttrs (builtins.map (name:
}; {
}; name = "simple-osd-${name}";
} // pkgs.lib.optionalAttrs (config.deviceSpecific.isLaptop) { value = simple-osd-daemon name;
simple-osd-battery = { }) names);
Install.WantedBy = [ "default.target" ]; in {
Service = { home-manager.users.balsoft = {
ExecStart = "${pkgs.simple-osd.battery}/bin/simple-osd-battery"; systemd.user.services =
}; daemons [ "pulseaudio" "mpris" ]
}; // pkgs.lib.optionalAttrs (config.deviceSpecific.isLaptop)
simple-osd-brightness = { (daemons [ "battery" "brightness" ]);
Install.WantedBy = [ "default.target" ]; xdg.configFile."simple-osd/common".text = genIni {
Service = { progressbar.length = 25;
ExecStart = "${pkgs.simple-osd.brightness}/bin/simple-osd-brightness";
};
}; };
}; };
} }