-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
50 lines (46 loc) · 1.55 KB
/
flake.nix
File metadata and controls
50 lines (46 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
description = "A small script used to automatically change the various Laptops screen rotation";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:numtide/flake-utils";
};
};
outputs = { self, nixpkgs, flake-utils, ... }@inputs:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
rec {
defaultPackage = packages.screenrotate;
packages.screenrotate = with pkgs; stdenv.mkDerivation {
version = "1.0";
name = "screenrotation";
src = ./.;
buildInputs = [
libwacom
xf86_input_wacom
xorg.xrandr
iio-sensor-proxy
];
dontBuild = true;
installPhase = ''
mkdir -pv $out/bin/
cp ./screenrotation.sh $out/bin/
chmod +x $out/bin/screenrotation.sh
cp ./autoscreenrotation.sh $out/bin/
chmod +x $out/bin/autoscreenrotation.sh
cp ./toggleautoscreenrotation.sh $out/bin/
chmod +x $out/bin/toggleautoscreenrotation.sh
cp ./toggledisableinput.sh $out/bin/
chmod +x $out/bin/toggledisableinput.sh
cp ./enableInput.sh $out/bin/
chmod +x $out/bin/enableInput.sh
cp ./disableInput.sh $out/bin/
chmod +x $out/bin/disableInput.sh
'';
};
}
);
}