use vpnpass from flake

This commit is contained in:
illustris 2023-02-25 02:43:33 +05:30
parent 16c21e9faa
commit 275cc237e8
Signed by: illustris
GPG Key ID: 56C8FC0B899FEFA3
4 changed files with 28 additions and 17 deletions

View File

@ -39,6 +39,7 @@
fatrace file fatrace file
gdb git gnumake gdb git gnumake
htop htop
illustris.vpnpass
iotop iperf iotop iperf
jq jq
killall killall
@ -59,7 +60,6 @@
youtube-dl youtube-dl
(pass.withExtensions (exts: [ exts.pass-otp ])) (pass.withExtensions (exts: [ exts.pass-otp ]))
((pkgs.callPackage ./packages/passcol) { }) ((pkgs.callPackage ./packages/passcol) { })
(writeScriptBin "vpnpass" (builtins.readFile ./scripts/vpnpass))
]; ];
}; };

21
flake.lock generated
View File

@ -21,6 +21,26 @@
"type": "github" "type": "github"
} }
}, },
"illustris": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1677273080,
"narHash": "sha256-0xvYx6GlbvZhIm/IL7iJD7tKCU77dYbdulq3Af8nHpQ=",
"owner": "illustris",
"repo": "flake",
"rev": "f7035476ecfae1af3a1ea38b2171256ac15cfa76",
"type": "github"
},
"original": {
"owner": "illustris",
"repo": "flake",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1676300157, "lastModified": 1676300157,
@ -40,6 +60,7 @@
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"illustris": "illustris",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
}, },

View File

@ -7,9 +7,13 @@
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
illustris = {
url = "github:illustris/flake";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, nixpkgs, home-manager, ... }: { outputs = { self, nixpkgs, home-manager, illustris, ... }: {
nixosConfigurations = { nixosConfigurations = {
desktop = nixpkgs.lib.nixosSystem { desktop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
@ -18,6 +22,7 @@
home-manager.nixosModule home-manager.nixosModule
{nix.registry.np.flake = nixpkgs;} {nix.registry.np.flake = nixpkgs;}
{environment.etc.flake.source = self;} {environment.etc.flake.source = self;}
{nixpkgs.overlays = [ illustris.overlays.default ];}
]; ];
}; };
}; };

View File

@ -1,15 +0,0 @@
#!/usr/bin/env expect
set conf [lindex $argv 0];
set user [lindex $argv 1];
set pass_pw [lindex $argv 2];
set pass_otp [lindex $argv 3];
spawn sudo openvpn --config $conf
expect "Enter Auth Username:"
send "$user\n"
expect "Enter Auth Password:"
set pw [exec pass "$pass_pw"]
send "$pw\n"
expect "Enter Google Authenticator Code"
set otp [exec pass otp "$pass_otp"]
send "$otp\n"
interact