File tree Expand file tree Collapse file tree 5 files changed +55
-18
lines changed
Expand file tree Collapse file tree 5 files changed +55
-18
lines changed Original file line number Diff line number Diff line change 8282
8383 # A set of useful nix packages and utilities for ghaf
8484 ghafpkgs = {
85- #url = "github:tiiuae/ghafpkgs?ref=pull/142/head";
86- url = "github:tiiuae/ghafpkgs" ;
85+ url = "github:slakkala/ghafpkgs/qubes-ctap" ;
8786 inputs = {
8887 nixpkgs . follows = "nixpkgs" ;
8988 flake-parts . follows = "flake-parts" ;
106105
107106 # Ghaf Inter VM communication and control library
108107 givc = {
109- url = "github:tiiuae /ghaf-givc" ;
108+ url = "github:slakkala /ghaf-givc/dev/ctap " ;
110109 inputs = {
111110 nixpkgs . follows = "nixpkgs" ;
112111 flake-parts . follows = "flake-parts" ;
Original file line number Diff line number Diff line change 3535 config = mkIf cfg . enable {
3636 # Enable service and package for Yubikey
3737 services . pcscd . enable = true ;
38- environment . systemPackages = [ pkgs . pam_u2f ] ;
38+ environment . systemPackages = [
39+ pkgs . pam_u2f
40+ pkgs . qubes-ctap
41+ ] ;
3942
4043 security . pam . services = {
4144 sudo . u2fAuth = true ;
Original file line number Diff line number Diff line change 4141 admin = lib . head config . ghaf . givc . adminConfig . addresses ;
4242 tls . enable = config . ghaf . givc . enableTls ;
4343 enableUserTlsAccess = true ;
44+ enableExecModule = true ;
4445 notifier . enable = true ;
4546 socketProxy =
4647 lib . optionals ( builtins . elem netvmName config . ghaf . common . vms ) [
8687 }
8788 ] ;
8889 } ;
90+ systemd . services . givc-gui-vm = {
91+ path = [ pkgs . qubes-ctap ] ;
92+ } ;
8993 systemd . services . dbus-proxy-networkmanager = {
9094 description = "DBus proxy for Network Manager ${ guivmName } " ;
9195 serviceConfig = {
Original file line number Diff line number Diff line change 77 config ,
88 ...
99} :
10+ let
11+ qrexec = pkgs . writeShellApplication {
12+ name = "qrexec-client-vm" ;
13+ runtimeInputs = [ pkgs . givc-cli ] ;
14+ text = ''
15+ shift
16+ exec givc-cli ${ config . ghaf . givc . cliArgs } ctap "$@"
17+ '' ;
18+ } ;
19+ in
1020{
1121 chrome = {
12- packages = lib . optional config . ghaf . development . debug . tools . enable pkgs . alsa-utils ;
22+ packages = lib . optional config . ghaf . development . debug . tools . enable pkgs . alsa-utils ++ [
23+ pkgs . qubes-ctap
24+ qrexec
25+ ] ;
1326 ramMb = 6144 ;
1427 cores = 4 ;
1528 borderColor = "#9C0000" ;
114127 ] ) ;
115128 extraModules = [
116129 {
130+ services . udev . extraRules = ''
131+ ACTION=="remove", GOTO="qctap_hidraw_end"
132+ SUBSYSTEM=="hidraw", MODE="0660", GROUP="users"
133+ LABEL="qctap_hidraw_end"
134+ '' ;
135+ systemd . services . ctapproxy = {
136+ enable = true ;
137+ description = "CTAP Proxy" ;
138+ serviceConfig = {
139+ ExecStartPre = "${ pkgs . coreutils } /bin/mkdir -p /var/log/qubes" ;
140+ ExecStart = "${ pkgs . qubes-ctap } /bin/qctap-proxy --qrexec ${ qrexec } /bin/qrexec-client-vm dummy" ;
141+ Type = "notify" ;
142+ KillMode = "process" ;
143+ } ;
144+ wantedBy = [ "multi-user.target" ] ;
145+ } ;
117146 microvm . devices = [ ] ;
118147 imports = [
119148 ../services/wireguard-gui/wireguard-gui.nix
You can’t perform that action at this time.
0 commit comments