MyNixOS website logo
Description

WiFi connection script generator.

A CLI tool generating scripts for connecting to WiFi, circumventing big WiFi management tools.

hifi

A tool for generating wifi connection scripts. Uses wpa_supplicant to connect.

Prerequisites

You will need to have wpa_supplicant, wpa_passphrase and dhcpcd installed, as that is what is used in the connection scripts generated by hifi.

Installation

To install, simply do either:

stack install hifi

or

git clone https://gitlab.com/gonz/hifi ./hifi && cd hifi && stack install

Usage

hifi <filename> <interface> <ssid> <passphrase>

The filename parameter determines what your data and script files will be called. They are stored in your XDG data directory, which by default (in most distros) will mean your files will end up in $HOME/.local/share/hifi/....

The SSID and passphrase parameters should be obvious enough. They are simply the connection information you would use to connect to your network.

When a script has been generated once it will not have to be generated again. Instead, you should simply run the generated script.

Typical usage looks as follows, for a first run:

$ hifi wifi-home wlp7s0 MyWLANsSSID MyPassphrase
Created /home/yourusername/.local/share/hifi/data/wifi-home and /home/yourusername/.local/share/hifi/scripts/wifi-home
$ wifi-home

Your $PATH variable and connect scripts

If you want to be able to run the scripts without issuing their full path you will need to add your scripts folder to your path. You can do this in several ways, but the most common one is to add the following to your bash_profile, zsh_profile, zsh_env file or the like:

PATH=".local/share/hifi/scripts:$PATH" where $PATH can either refer to the rest of your $PATH environment variable or simply a literal containing all your specified directories.

Folders, templates

hifi will generate a script for connecting and a data portion that will be used in the script.

The scripts are located in $HOME/.local/share/hifi/scripts and the data portion in the data directory of that same hifi root folder.

hifi uses templates that are located in the templates directory, so you can change the template being used to generate both the data files and the scripts.

The templates are copied on cabal install and stack install, so any changes made will carry on to the installed version.

The templateDir function will return the directory where the files end up being stored. This varies, so that is why it uses getDataFileName and the data-files entry in the cabal-file.

Metadata

Version

0.1.4.1

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows