wm-helpers: make it a valid flake package, add app
This commit is contained in:
parent
082fb3dcc1
commit
402aced75d
@ -144,6 +144,8 @@
|
|||||||
nixosModules = (import ./modules/nixos) moduleInputs;
|
nixosModules = (import ./modules/nixos) moduleInputs;
|
||||||
homeManagerModules = (import ./modules/home-manager) moduleInputs;
|
homeManagerModules = (import ./modules/home-manager) moduleInputs;
|
||||||
packages = eachSystem (system: import ./pkgs { inherit nixpkgs system; });
|
packages = eachSystem (system: import ./pkgs { inherit nixpkgs system; });
|
||||||
|
apps = eachSystem (system: import ./pkgs/apps.nix
|
||||||
|
{ inherit (self.outputs) packages; inherit system; });
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
slab = mkSystem {
|
slab = mkSystem {
|
||||||
|
@ -18,8 +18,8 @@ let
|
|||||||
in
|
in
|
||||||
if hasAttr key keyNames then keyNames."${key}" else key;
|
if hasAttr key keyNames then keyNames."${key}" else key;
|
||||||
|
|
||||||
inherit (outputs.packages.${pkgs.system}.wm-helpers) keysetting;
|
inherit (outputs.packages.${pkgs.system}) wm-helpers;
|
||||||
|
keysetting = "${wm-helpers}/bin/keysetting";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# FIXME this is temporary just to get it working, need to make wm-common an
|
# FIXME this is temporary just to get it working, need to make wm-common an
|
||||||
|
9
pkgs/apps.nix
Normal file
9
pkgs/apps.nix
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{ packages, system, ... }:
|
||||||
|
let _packages = packages; in
|
||||||
|
let
|
||||||
|
packages = _packages.${system};
|
||||||
|
mkApp = program: { type = "app"; inherit program; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
keysetting = mkApp "${packages.wm-helpers}/bin/keysetting";
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
{ pkgs, ...}:
|
{ pkgs, ...}:
|
||||||
{
|
let
|
||||||
keysetting = pkgs.writeShellScript "keysetting" ''
|
keysetting = pkgs.writeShellScriptBin "keysetting" ''
|
||||||
wpctl=${pkgs.wireplumber}/bin/wpctl
|
wpctl=${pkgs.wireplumber}/bin/wpctl
|
||||||
notify_send=${pkgs.libnotify}/bin/notify-send
|
notify_send=${pkgs.libnotify}/bin/notify-send
|
||||||
brightnessctl=${pkgs.brightnessctl}/bin/brightnessctl
|
brightnessctl=${pkgs.brightnessctl}/bin/brightnessctl
|
||||||
@ -34,4 +34,8 @@
|
|||||||
mondown) setbright 5%-;;
|
mondown) setbright 5%-;;
|
||||||
esac
|
esac
|
||||||
'';
|
'';
|
||||||
|
in
|
||||||
|
pkgs.symlinkJoin {
|
||||||
|
name = "wm-helpers";
|
||||||
|
paths = keysetting;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user