File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 577
577
keyboards . k995p = mk100 "/dev/input/by-id/usb-CATEX_TECH._104EC-XRGB_CA2017090001-event-kbd" ;
578
578
keyboards . feker80 = mkAlice "/dev/input/by-id/usb-Telink_FEKER_Alice80-event-kbd" ;
579
579
keyboards . aks068 = mkAlice "/dev/input/by-id/usb-RDR_AKS068-event-kbd" ;
580
+ keyboards . aks068w = mkAlice "/dev/input/by-id/usb-Telink_Wireless_Gaming_Keyboard-event-kbd" ;
580
581
keyboards . a275 = {
581
582
device = "/dev/input/by-path/platform-i8042-serio-0-event-kbd" ;
582
583
defcfg = {
Original file line number Diff line number Diff line change 2
2
repo = builtins . toString ./.. ;
3
3
in
4
4
with ( import ./project.nix { } ) ; rec {
5
+ inherit pkgs ;
5
6
pkgBin = pkg : "${ pkgs . ${ pkg } } /bin/${ pkg } " ;
6
7
nix-bundle = pkgs . nix-bundle . overrideAttrs ( attrs : {
7
8
buildInputs =
62
63
} ;
63
64
mkService = {
64
65
srv ,
65
- usr ? null ,
66
+ opts ? { } ,
66
67
mkExe ,
67
68
} : {
68
69
lib ,
75
76
] ;
76
77
77
78
options = {
78
- services . "${ srv } " = {
79
- enable = mkOption {
80
- default = false ;
81
- type = types . bool ;
82
- } ;
83
- } ;
79
+ services . "${ srv } " =
80
+ {
81
+ enable = mkOption {
82
+ default = false ;
83
+ type = types . bool ;
84
+ } ;
85
+ runAsUser = mkOption {
86
+ type = types . nullOr types . str ;
87
+ } ;
88
+ }
89
+ // opts ;
84
90
} ;
85
91
86
92
config = mkIf config . services . "${ srv } " . enable {
89
95
wantedBy = [ "default.target" ] ;
90
96
script = "PATH=$PATH:${ pkgs . busybox } /bin ${ mkExe config } " ;
91
97
serviceConfig = {
92
- User =
98
+ User = let
99
+ usr = config . services . "${ srv } " . runAsUser ;
100
+ in
93
101
if usr == null
94
102
then config . services . functora . userName
95
103
else usr ;
You can’t perform that action at this time.
0 commit comments