Introduction of BitWarden package + prep

+ BitWarden module for easy autologon (not very secure but convinent on
  personal machines) - Will think this over some more afterwards
* Get-Path will always return without trailing directory separator
  (might want to make this 'always' for dirs, but unsure yet)
+ Added Edit-MountUnit scaffolding for later modifying it to import a
  template on new mount units, and easy edit of systemd mount and
  automount units.
This commit is contained in:
Gal on Sygin 2022-02-03 19:08:16 -05:00
parent 40cb17d419
commit c0131deba4
7 changed files with 64 additions and 21 deletions

19
BitWarden/_.package.json Normal file
View file

@ -0,0 +1,19 @@
{
"package": {
"Name": "BitWarden",
"Condition": [
{
"custom": null,
"System": null,
"Hostname": null,
"Username": null,
"CmdletExists": null,
"ModuleExists": null,
"AppExeExists": [
"bw"
],
"Logic": 0
}
]
}
}

View file

@ -0,0 +1,10 @@
if( -not (Test-Path env:BITWARDEN_CLI_PATH) ) {
$env:BITWARDEN_CLI_PATH = Get-Command bw -Type Application | Select-Object -First 1 -ExpandProperty Source
}
$local:bwPath = Join-Path $HOME 'tmp'
$null = New-Item -ItemType Directory -Path $bwPath -Force
$bwPath = Join-Path $bwPath 'git-credential-bw.key'
if( Test-Path $bwPath ) {
$env:BW_SESSION= Get-Content $bwPath
}

View file

@ -0,0 +1,6 @@
{
"Always": [
"BitwardenWrapper"
]
}