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;
|
||||
homeManagerModules = (import ./modules/home-manager) moduleInputs;
|
||||
packages = eachSystem (system: import ./pkgs { inherit nixpkgs system; });
|
||||
apps = eachSystem (system: import ./pkgs/apps.nix
|
||||
{ inherit (self.outputs) packages; inherit system; });
|
||||
|
||||
nixosConfigurations = {
|
||||
slab = mkSystem {
|
||||
|
@ -18,8 +18,8 @@ let
|
||||
in
|
||||
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
|
||||
{
|
||||
# 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, ...}:
|
||||
{
|
||||
keysetting = pkgs.writeShellScript "keysetting" ''
|
||||
let
|
||||
keysetting = pkgs.writeShellScriptBin "keysetting" ''
|
||||
wpctl=${pkgs.wireplumber}/bin/wpctl
|
||||
notify_send=${pkgs.libnotify}/bin/notify-send
|
||||
brightnessctl=${pkgs.brightnessctl}/bin/brightnessctl
|
||||
@ -34,4 +34,8 @@
|
||||
mondown) setbright 5%-;;
|
||||
esac
|
||||
'';
|
||||
in
|
||||
pkgs.symlinkJoin {
|
||||
name = "wm-helpers";
|
||||
paths = keysetting;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user