ENH upate rofi dev dhall file
This commit is contained in:
parent
0007284a67
commit
1f866f554c
|
@ -1,3 +1,5 @@
|
||||||
|
let C = ../rofi-extras/dhall/rofi-dev.dhall
|
||||||
|
|
||||||
let cryptdir =
|
let cryptdir =
|
||||||
{{ if eq .features.rofi_alias "laptop" -}}
|
{{ if eq .features.rofi_alias "laptop" -}}
|
||||||
"/mnt/data/Documents/.crypt"
|
"/mnt/data/Documents/.crypt"
|
||||||
|
@ -23,25 +25,27 @@ let gpgKey =
|
||||||
|
|
||||||
let bwConfig =
|
let bwConfig =
|
||||||
\(k : Text) ->
|
\(k : Text) ->
|
||||||
PasswordConfig.PwdBW ({ bwKey = k, bwTries = +2 } : BitwardenConfig)
|
C.PasswordConfig.PwdBW ({ bwKey = k, bwTries = 2 } : C.BitwardenConfig)
|
||||||
|
|
||||||
let sshData =
|
let sshData =
|
||||||
\(r : Text) ->
|
\(r : Text) ->
|
||||||
DataConfig.SSHFSConfig
|
C.DataConfig.SSHFSConfig
|
||||||
({ sshfsRemote = r, sshfsPassword = None PasswordConfig } : SSHFSData)
|
( { sshfsRemote = r, sshfsPassword = None C.PasswordConfig }
|
||||||
|
: C.SSHFSData
|
||||||
|
)
|
||||||
|
|
||||||
let sshfsTree =
|
let sshfsTree =
|
||||||
\(m : Text) ->
|
\(m : Text) ->
|
||||||
\(l : Text) ->
|
\(l : Text) ->
|
||||||
\(r : Text) ->
|
\(r : Text) ->
|
||||||
{ tcParent =
|
{ tcParent =
|
||||||
{ deviceMount = { mpPath = m, mpLabel = Some l } : MountConfig
|
{ deviceMount = { mpPath = m, mpLabel = Some l } : C.MountConfig
|
||||||
, deviceData = sshData r
|
, deviceData = sshData r
|
||||||
}
|
}
|
||||||
: DeviceConfig
|
: C.DeviceConfig
|
||||||
, tcChildren = [ "ssh" ]
|
, tcChildren = [ "ssh" ]
|
||||||
}
|
}
|
||||||
: TreeConfig
|
: C.TreeConfig
|
||||||
|
|
||||||
let crypt = \(b : Text) -> "${cryptdir}/${b}"
|
let crypt = \(b : Text) -> "${cryptdir}/${b}"
|
||||||
|
|
||||||
|
@ -53,55 +57,86 @@ let vcryptTree =
|
||||||
\(v : Text) ->
|
\(v : Text) ->
|
||||||
\(k : Text) ->
|
\(k : Text) ->
|
||||||
{ tcParent =
|
{ tcParent =
|
||||||
{ deviceMount = { mpPath = m, mpLabel = l } : MountConfig
|
{ deviceMount = { mpPath = m, mpLabel = l } : C.MountConfig
|
||||||
, deviceData =
|
, deviceData =
|
||||||
DataConfig.VeracryptConfig
|
C.DataConfig.VeracryptConfig
|
||||||
( { vcVolume = crypt v
|
( { vcVolume = crypt v
|
||||||
, vcPassword = Some (bwConfig (vcName k))
|
, vcPassword = Some (bwConfig (vcName k))
|
||||||
}
|
}
|
||||||
: VeracryptData
|
: C.VeracryptData
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
: DeviceConfig
|
: C.DeviceConfig
|
||||||
, tcChildren = [] : List Text
|
, tcChildren = [] : List Text
|
||||||
}
|
}
|
||||||
: TreeConfig
|
: C.TreeConfig
|
||||||
|
|
||||||
let defaultDevs =
|
let defaultDevs =
|
||||||
{ ssh =
|
[ { tKey = "ssh"
|
||||||
vcryptTree "${env:HOME as Text}/.ssh" (Some "ssh") "ssh-config" sshKey
|
, tVal =
|
||||||
, gnupg =
|
vcryptTree
|
||||||
vcryptTree "${env:GNUPGHOME as Text}" (None Text) "gpg-config" gpgKey
|
"${env:HOME as Text}/.ssh"
|
||||||
|
(Some "ssh")
|
||||||
|
"ssh-config"
|
||||||
|
sshKey
|
||||||
}
|
}
|
||||||
|
, { tKey = "gnupg"
|
||||||
|
, tVal =
|
||||||
|
vcryptTree
|
||||||
|
"${env:GNUPGHOME as Text}"
|
||||||
|
(None Text)
|
||||||
|
"gpg-config"
|
||||||
|
gpgKey
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
let otherDevs =
|
let otherDevs =
|
||||||
{{- if eq .features.rofi_alias "laptop" -}}
|
{{- if eq .features.rofi_alias "laptop" -}}
|
||||||
{ accounts = vcryptTree "accounts" (None Text) "accounts" "accounts"
|
[ { tKey = "accounts"
|
||||||
, ansible-pki =
|
, tVal = vcryptTree "accounts" (None Text) "accounts" "accounts"
|
||||||
vcryptTree "ansible-pki" (None Text) "ansible" "Ansible PKI"
|
}
|
||||||
, call_logs = vcryptTree "call-logs" (None Text) "call_logs" "ACR"
|
, { tKey = "ansible-pki"
|
||||||
, ebm_snakemake =
|
, tVal = vcryptTree "ansible-pki" (None Text) "ansible" "Ansible PKI"
|
||||||
sshfsTree "ebm_snakemake" "EBM" "nisaba:/aigenomics/EBM_dev/snakemake"
|
}
|
||||||
, music =
|
, { tKey = "call_logs"
|
||||||
|
, tVal = vcryptTree "call-logs" (None Text) "call_logs" "ACR"
|
||||||
|
}
|
||||||
|
, { tKey = "ebm_snakemake"
|
||||||
|
, tVal =
|
||||||
|
sshfsTree
|
||||||
|
"ebm_snakemake"
|
||||||
|
"EBM"
|
||||||
|
"nisaba:/aigenomics/EBM_dev/snakemake"
|
||||||
|
}
|
||||||
|
, { tKey = "music"
|
||||||
|
, tVal =
|
||||||
sshfsTree
|
sshfsTree
|
||||||
"/mnt/data/Music"
|
"/mnt/data/Music"
|
||||||
"Music"
|
"Music"
|
||||||
"portnoy4prez:/mnt/data/home/Music"
|
"portnoy4prez:/mnt/data/home/Music"
|
||||||
, videos =
|
}
|
||||||
|
, { tKey = "videos"
|
||||||
|
, tVal =
|
||||||
sshfsTree
|
sshfsTree
|
||||||
"/mnt/data/Videos"
|
"/mnt/data/Videos"
|
||||||
"Videos"
|
"Videos"
|
||||||
"portnoy4prez:/mnt/data/home/Videos"
|
"portnoy4prez:/mnt/data/home/Videos"
|
||||||
}
|
}
|
||||||
|
]
|
||||||
{{- else if eq .features.rofi_alias "workstation" -}}
|
{{- else if eq .features.rofi_alias "workstation" -}}
|
||||||
{ ebm_snakemake =
|
[ { tKey = "ebm_snakemake"
|
||||||
sshfsTree "ebm_snakemake" "EBM" "nisaba:/aigenomics/EBM_dev/snakemake"
|
, tVal =
|
||||||
|
sshfsTree
|
||||||
|
"ebm_snakemake"
|
||||||
|
"EBM"
|
||||||
|
"nisaba:/aigenomics/EBM_dev/snakemake"
|
||||||
}
|
}
|
||||||
|
]
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{=}
|
[] : C.TreeMap
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
in { scTmpPath = Some "/tmp/media/${env:LOGNAME as Text}"
|
in { scTmpPath = Some "/tmp/media/${env:LOGNAME as Text}"
|
||||||
, scVerbose = Some False
|
, scVerbose = Some False
|
||||||
, scDevices = toMap (defaultDevs /\ otherDevs)
|
, scDevices = defaultDevs # otherDevs
|
||||||
}
|
}
|
Loading…
Reference in New Issue