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

View File

@ -47,7 +47,7 @@
ref = "flake";
};
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: {

View File

@ -27,7 +27,7 @@ in {
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;

View File

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