ENH config rofi config for laptop
This commit is contained in:
parent
3c1499b44c
commit
09ccdd2473
|
@ -1,91 +1,99 @@
|
||||||
let C = ../rofi-extras/dhall/rofi-dev.dhall
|
let C = ../rofi-extras/dhall/rofi-dev.dhall
|
||||||
|
|
||||||
let cryptdir = "${env:HOME as Text}/.crypt"
|
let cryptdir = "${env:HOME as Text}/Documents/.crypt"
|
||||||
|
|
||||||
let sshKey = "ssh nanobarbie"
|
let sshKey = "ssh nanobarbie"
|
||||||
|
|
||||||
let gpgKey = "gpg nanobarbie"
|
let gpgKey = "gpg nanobarbie"
|
||||||
|
|
||||||
let bwConfig =
|
let bwConfig =
|
||||||
\(k : Text) ->
|
\(k : Text) -> C.PasswordConfig.PwdBW C.BitwardenConfig::{ bwKey = k }
|
||||||
C.PasswordConfig.PwdBW ({ bwKey = k, bwTries = 2 } : C.BitwardenConfig)
|
|
||||||
|
|
||||||
let sshData =
|
let sshData =
|
||||||
\(r : Text) ->
|
\(r : Text) -> C.DataConfig.SSHFSConfig C.SSHFSData::{ sshfsRemote = r }
|
||||||
C.DataConfig.SSHFSConfig
|
|
||||||
( { sshfsRemote = r, sshfsPassword = None C.PasswordConfig }
|
|
||||||
: C.SSHFSData
|
|
||||||
)
|
|
||||||
|
|
||||||
let sshfsTree =
|
let sshfsEntry =
|
||||||
\(m : Text) ->
|
|
||||||
\(l : Text) ->
|
\(l : Text) ->
|
||||||
|
\(m : Text) ->
|
||||||
\(r : Text) ->
|
\(r : Text) ->
|
||||||
|
{ tKey = l
|
||||||
|
, tVal =
|
||||||
{ tcParent =
|
{ tcParent =
|
||||||
{ deviceMount = { mpPath = m, mpLabel = Some l } : C.MountConfig
|
{ deviceMount = { mpPath = m, mpLabel = Some l }
|
||||||
, deviceData = sshData r
|
, deviceData = sshData r
|
||||||
}
|
}
|
||||||
: C.DeviceConfig
|
|
||||||
, tcChildren = [ "ssh" ]
|
, tcChildren = [ "ssh" ]
|
||||||
}
|
}
|
||||||
: C.TreeConfig
|
}
|
||||||
|
: C.TreeMap
|
||||||
|
|
||||||
let crypt = \(b : Text) -> "${cryptdir}/${b}"
|
let crypt = \(b : Text) -> "${cryptdir}/${b}"
|
||||||
|
|
||||||
let vcName = \(n : Text) -> "Veracrypt (${n})"
|
let vcName = \(n : Text) -> "Veracrypt (${n})"
|
||||||
|
|
||||||
let vcryptTree =
|
let vcryptEntry =
|
||||||
|
\(l : Text) ->
|
||||||
\(m : Text) ->
|
\(m : Text) ->
|
||||||
\(l : Optional Text) ->
|
|
||||||
\(v : Text) ->
|
\(v : Text) ->
|
||||||
\(k : Text) ->
|
\(k : Text) ->
|
||||||
{ tcParent =
|
{ tKey = l
|
||||||
{ deviceMount = { mpPath = m, mpLabel = l }
|
, tVal = C.TreeConfig::{
|
||||||
|
, tcParent =
|
||||||
|
{ deviceMount = { mpPath = m, mpLabel = Some l }
|
||||||
, deviceData =
|
, deviceData =
|
||||||
C.DataConfig.VeracryptConfig
|
C.DataConfig.VeracryptConfig
|
||||||
{ vcVolume = v, vcPassword = Some (bwConfig (vcName k)) }
|
{ vcVolume = v, vcPassword = Some (bwConfig (vcName k)) }
|
||||||
}
|
}
|
||||||
, tcChildren = [] : List Text
|
}
|
||||||
|
}
|
||||||
|
: C.TreeMap
|
||||||
|
|
||||||
|
let cifsEntry =
|
||||||
|
\(l : Text) ->
|
||||||
|
\(m : Text) ->
|
||||||
|
\(r : Text) ->
|
||||||
|
\(o : Optional C.CIFSOpts.Type) ->
|
||||||
|
{ tKey = l
|
||||||
|
, tVal = C.TreeConfig::{
|
||||||
|
, tcParent =
|
||||||
|
{ deviceMount = { mpPath = m, mpLabel = Some l }
|
||||||
|
, deviceData =
|
||||||
|
C.DataConfig.CIFSConfig
|
||||||
|
{ cifsRemote = r
|
||||||
|
, cifsSudo = True
|
||||||
|
, cifsPassword = Some
|
||||||
|
(C.PasswordConfig.PwdPr C.PromptConfig::{=})
|
||||||
|
, cifsOpts = o
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let defaultDevs =
|
let devs =
|
||||||
[ { tKey = "ssh"
|
[ vcryptEntry
|
||||||
, tVal =
|
"ssh"
|
||||||
vcryptTree
|
|
||||||
"${env:HOME as Text}/.ssh"
|
"${env:HOME as Text}/.ssh"
|
||||||
(Some "ssh")
|
(crypt "ssh-config-nanobarbie")
|
||||||
(crypt "ssh-config")
|
|
||||||
sshKey
|
sshKey
|
||||||
}
|
, vcryptEntry
|
||||||
, { tKey = "gnupg"
|
"gnupg"
|
||||||
, tVal =
|
|
||||||
vcryptTree
|
|
||||||
"${env:GNUPGHOME as Text}"
|
"${env:GNUPGHOME as Text}"
|
||||||
(None Text)
|
|
||||||
(crypt "gpg-config")
|
(crypt "gpg-config")
|
||||||
gpgKey
|
gpgKey
|
||||||
|
, vcryptEntry "pii" "pii" (crypt "pii") "work vault"
|
||||||
|
, sshfsEntry "nisaba_wrk" "nisaba_wrk" "nisaba:/wrk/njd2"
|
||||||
|
, sshfsEntry "nist_dvl" "nist_dvl" "nist-workstation:/mnt/data/Dvl"
|
||||||
|
, cifsEntry
|
||||||
|
"flowILS"
|
||||||
|
"flowILS"
|
||||||
|
"\\\\elwood.nist.gov\\63_MML\\63internal\\Flow ILS Share"
|
||||||
|
( Some
|
||||||
|
C.CIFSOpts::{
|
||||||
|
, cifsoptsUsername = Some "njd2"
|
||||||
|
, cifsoptsUID = Some 69444
|
||||||
|
, cifsoptsGID = Some 36679
|
||||||
}
|
}
|
||||||
, { tKey = "pii"
|
)
|
||||||
, tVal =
|
|
||||||
vcryptTree
|
|
||||||
"pii"
|
|
||||||
(None Text)
|
|
||||||
"${env:HOME as Text}/Documents/.crypt"
|
|
||||||
"work vault"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
let otherDevs =
|
in C.StaticConfig::{ scDevices = devs }
|
||||||
[ { 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
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue