add a2ln server
This commit is contained in:
parent
ed13e85157
commit
24573a42ef
@ -4,6 +4,7 @@
|
|||||||
inputs.self.nixosRoles.workstation
|
inputs.self.nixosRoles.workstation
|
||||||
|
|
||||||
inputs.self.nixosProfiles.stable-diffusion
|
inputs.self.nixosProfiles.stable-diffusion
|
||||||
|
inputs.self.nixosProfiles.a2ln-server
|
||||||
# inputs.self.nixosModules.passthrough
|
# inputs.self.nixosModules.passthrough
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ with config.deviceSpecific; {
|
|||||||
|
|
||||||
home-manager.users.alukard.home.packages = with pkgs; [
|
home-manager.users.alukard.home.packages = with pkgs; [
|
||||||
# cli
|
# cli
|
||||||
|
a2ln
|
||||||
bat
|
bat
|
||||||
comma
|
comma
|
||||||
curl
|
curl
|
||||||
|
@ -5,6 +5,10 @@ let
|
|||||||
config = config.nixpkgs.config;
|
config = config.nixpkgs.config;
|
||||||
localSystem = { inherit system; };
|
localSystem = { inherit system; };
|
||||||
});
|
});
|
||||||
|
stable = import inputs.nixpkgs-stable ({
|
||||||
|
config = config.nixpkgs.config;
|
||||||
|
localSystem = { inherit system; };
|
||||||
|
});
|
||||||
roundcube-plugins = import ./packages/roundcube-plugins/default.nix;
|
roundcube-plugins = import ./packages/roundcube-plugins/default.nix;
|
||||||
in
|
in
|
||||||
with lib; {
|
with lib; {
|
||||||
@ -21,6 +25,7 @@ with lib; {
|
|||||||
|
|
||||||
android-emulator = self.callPackage ./packages/android-emulator.nix { };
|
android-emulator = self.callPackage ./packages/android-emulator.nix { };
|
||||||
arkenfox-userjs = pkgs.callPackage ./packages/arkenfox-userjs.nix { arkenfox-repo = inputs.arkenfox-userjs; };
|
arkenfox-userjs = pkgs.callPackage ./packages/arkenfox-userjs.nix { arkenfox-repo = inputs.arkenfox-userjs; };
|
||||||
|
a2ln = pkgs.callPackage ./packages/a2ln.nix { };
|
||||||
bibata-cursors-tokyonight = pkgs.callPackage ./packages/bibata-cursors-tokyonight.nix { };
|
bibata-cursors-tokyonight = pkgs.callPackage ./packages/bibata-cursors-tokyonight.nix { };
|
||||||
ceserver = pkgs.callPackage ./packages/ceserver.nix { };
|
ceserver = pkgs.callPackage ./packages/ceserver.nix { };
|
||||||
hyprpaper = pkgs.callPackage ./packages/hyprpaper.nix { src = inputs.hyprpaper; };
|
hyprpaper = pkgs.callPackage ./packages/hyprpaper.nix { src = inputs.hyprpaper; };
|
||||||
|
38
profiles/packages/a2ln.nix
Normal file
38
profiles/packages/a2ln.nix
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{ lib, python3, fetchFromGitHub, writeText, libnotify, gobject-introspection, wrapGAppsHook }:
|
||||||
|
let
|
||||||
|
version = "1.1.4";
|
||||||
|
setup-py = writeText "setup.py" ''
|
||||||
|
from distutils.core import setup
|
||||||
|
setup(
|
||||||
|
name='a2ln',
|
||||||
|
version='${version}',
|
||||||
|
scripts=['a2ln'],
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
in python3.pkgs.buildPythonApplication rec {
|
||||||
|
inherit version;
|
||||||
|
pname = "a2ln";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
repo = "a2ln-server";
|
||||||
|
owner = "patri9ck";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "1lh8wbrhcdaqy1dhg13ay7s4hip7g911fbb5h0v3a99kzgn6vl1m";
|
||||||
|
};
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
cp ${setup-py} setup.py
|
||||||
|
'';
|
||||||
|
|
||||||
|
propagatedBuildInputs = with python3.pkgs; [
|
||||||
|
pillow pygobject3 setproctitle pyzmq qrcode
|
||||||
|
wrapGAppsHook libnotify gobject-introspection
|
||||||
|
];
|
||||||
|
|
||||||
|
strictDeps = false;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A way to display Android phone notifications on Linux (Server)";
|
||||||
|
license = licenses.gpl3;
|
||||||
|
};
|
||||||
|
}
|
17
profiles/servers/a2ln-server.nix
Normal file
17
profiles/servers/a2ln-server.nix
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
systemd.user.services.a2ln-server = rec {
|
||||||
|
serviceConfig = {
|
||||||
|
TimeoutStartSec = 0;
|
||||||
|
TimeoutStopSec = 10;
|
||||||
|
Type = "simple";
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
script = ''
|
||||||
|
${pkgs.a2ln}/bin/a2ln --pairing-port 23046 23045
|
||||||
|
'';
|
||||||
|
after = [ "graphical-session.target" ];
|
||||||
|
wants = after;
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [ 23045 23046 ];
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user