92 lines
2.2 KiB
Plaintext
92 lines
2.2 KiB
Plaintext
let C = ../rofi-extras/dhall/rofi-dev.dhall
|
|
|
|
let cryptdir = "${env:HOME as Text}/.crypt"
|
|
|
|
let sshKey = "ssh nanobarbie"
|
|
|
|
let gpgKey = "gpg nanobarbie"
|
|
|
|
let bwConfig =
|
|
\(k : Text) ->
|
|
C.PasswordConfig.PwdBW ({ bwKey = k, bwTries = 2 } : C.BitwardenConfig)
|
|
|
|
let sshData =
|
|
\(r : Text) ->
|
|
C.DataConfig.SSHFSConfig
|
|
( { sshfsRemote = r, sshfsPassword = None C.PasswordConfig }
|
|
: C.SSHFSData
|
|
)
|
|
|
|
let sshfsTree =
|
|
\(m : Text) ->
|
|
\(l : Text) ->
|
|
\(r : Text) ->
|
|
{ tcParent =
|
|
{ deviceMount = { mpPath = m, mpLabel = Some l } : C.MountConfig
|
|
, deviceData = sshData r
|
|
}
|
|
: C.DeviceConfig
|
|
, tcChildren = [ "ssh" ]
|
|
}
|
|
: C.TreeConfig
|
|
|
|
let crypt = \(b : Text) -> "${cryptdir}/${b}"
|
|
|
|
let vcName = \(n : Text) -> "Veracrypt (${n})"
|
|
|
|
let vcryptTree =
|
|
\(m : Text) ->
|
|
\(l : Optional Text) ->
|
|
\(v : Text) ->
|
|
\(k : Text) ->
|
|
{ tcParent =
|
|
{ deviceMount = { mpPath = m, mpLabel = l }
|
|
, deviceData =
|
|
C.DataConfig.VeracryptConfig
|
|
{ vcVolume = v, vcPassword = Some (bwConfig (vcName k)) }
|
|
}
|
|
, tcChildren = [] : List Text
|
|
}
|
|
|
|
let defaultDevs =
|
|
[ { tKey = "ssh"
|
|
, tVal =
|
|
vcryptTree
|
|
"${env:HOME as Text}/.ssh"
|
|
(Some "ssh")
|
|
(crypt "ssh-config")
|
|
sshKey
|
|
}
|
|
, { tKey = "gnupg"
|
|
, tVal =
|
|
vcryptTree
|
|
"${env:GNUPGHOME as Text}"
|
|
(None Text)
|
|
(crypt "gpg-config")
|
|
gpgKey
|
|
}
|
|
, { tKey = "pii"
|
|
, tVal =
|
|
vcryptTree
|
|
"pii"
|
|
(None Text)
|
|
"${env:HOME as Text}/Documents/.crypt"
|
|
"work vault"
|
|
}
|
|
]
|
|
|
|
let otherDevs =
|
|
[ { tKey = "nisaba-wrk"
|
|
, tVal = sshfsTree "nisaba_wrk" "nisaba_wrk" "nisaba:/wrk/njd2"
|
|
}
|
|
, { tKey = "nist-dvl"
|
|
, tVal =
|
|
sshfsTree "nist_dvl" "nist_dvl" "nist-workstation:/mnt/data/Dvl"
|
|
}
|
|
]
|
|
|
|
in { scTmpPath = Some "/tmp/media/${env:LOGNAME as Text}"
|
|
, scVerbose = Some False
|
|
, scDevices = defaultDevs # otherDevs
|
|
}
|